@oslokommune/punkt-elements 19.3.0 → 19.3.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/CHANGELOG.md +8 -0
- package/dist/{accordion-BLMbI8SQ.cjs → accordion-CZ0O4c0_.cjs} +1 -1
- package/dist/{accordion-Bwka5Mxo.js → accordion-DFcdonl-.js} +5 -5
- package/dist/{alert-vIaasUjb.js → alert-BhvjSA5X.js} +7 -7
- package/dist/{alert-DsGNGcgd.cjs → alert-D1bQjZ7C.cjs} +2 -2
- package/dist/{async-directive-U0EE5r36.cjs → async-directive-BGoo_npW.cjs} +1 -1
- package/dist/{async-directive-C8UAk8Mv.js → async-directive-DsdqP_X7.js} +2 -2
- package/dist/{backlink-DM220m4q.cjs → backlink-Bw6IcRIo.cjs} +1 -1
- package/dist/{backlink-BjJwDjuP.js → backlink-DIdgvE2j.js} +3 -3
- package/dist/{breadcrumbs-B1pDtQy8.js → breadcrumbs-BfgCx3Xj.js} +2 -2
- package/dist/{breadcrumbs-BUmbj-hP.cjs → breadcrumbs-C10K1XLP.cjs} +1 -1
- package/dist/{button-BUl8uWWh.js → button-B5rWxfei.js} +5 -5
- package/dist/{button-CCR4eyt_.cjs → button-CmNrMH-c.cjs} +1 -1
- package/dist/{calendar-CtfdBqJN.cjs → calendar-D-Ow5DAp.cjs} +1 -1
- package/dist/{calendar-DWSW_GeN.js → calendar-U8xkRdgF.js} +3 -3
- package/dist/{card-27RxxKxW.js → card-D2YYPZr5.js} +23 -22
- package/dist/{card-B-RKnu_C.cjs → card-DW1uklP6.cjs} +6 -6
- package/dist/{checkbox-B-ejHbFP.js → checkbox-B2O0fkh9.js} +4 -4
- package/dist/{checkbox-B2G_B_bg.cjs → checkbox-C0zLtnCI.cjs} +1 -1
- package/dist/{class-map-D5GHsely.js → class-map-C4hdfSfY.js} +1 -1
- package/dist/{class-map-B0FX3YsK.cjs → class-map-Drv0_anQ.cjs} +1 -1
- package/dist/{combobox-nqNZDvBR.cjs → combobox-BgduqUpf.cjs} +1 -1
- package/dist/{combobox-DHL_CGYv.js → combobox-DpXTwNr4.js} +12 -12
- package/dist/components/card/card.d.ts +2 -1
- package/dist/components/fileupload/fileupload-operations.d.ts +6 -3
- package/dist/components/fileupload/fileupload-renderers.d.ts +5 -3
- package/dist/{consent-BeoP4rOa.js → consent-BBxZkgCO.js} +2 -2
- package/dist/{consent-Cle1hkPg.cjs → consent-BjYaCbef.cjs} +1 -1
- package/dist/{datepicker-DvO3w0eM.cjs → datepicker-53rj_Qqx.cjs} +1 -1
- package/dist/{datepicker-BWp2PM9S.js → datepicker-BLBimRTT.js} +11 -11
- package/dist/{directive-helpers-BushnrQQ.cjs → directive-helpers-BRrz3Bcj.cjs} +1 -1
- package/dist/{directive-helpers-DpyLJPJm.js → directive-helpers-D96YEsht.js} +1 -1
- package/dist/{element-CewjrA4g.cjs → element-BOmr9YLv.cjs} +1 -1
- package/dist/{element-CqC-sGuC.js → element-mwwC2Rra.js} +37 -3
- package/dist/{element-with-slot-MCvSBwUv.cjs → element-with-slot-2PHu2w7O.cjs} +1 -1
- package/dist/{element-with-slot-D_OKDlYo.js → element-with-slot-FD826ooP.js} +2 -2
- package/dist/{fileupload-DDLvQaSS.cjs → fileupload-4wgr4iAi.cjs} +78 -76
- package/dist/{fileupload-DbtTD1aU.js → fileupload-BxfBFhFt.js} +120 -100
- package/dist/{footer-CupUAe8d.cjs → footer-BGj1uWwC.cjs} +1 -1
- package/dist/{footer-UT8MbnCT.js → footer-D_d5kq44.js} +4 -4
- package/dist/{header-BxgtAiNM.js → header-CF-Re0nT.js} +14 -13
- package/dist/{header-wdEiBTI9.cjs → header-Cs4t2XMM.cjs} +4 -3
- package/dist/{header-menu-DGywRJCx.cjs → header-menu-BnqZagI6.cjs} +3 -3
- package/dist/{header-menu-CTEPH4St.js → header-menu-C9k9xG9V.js} +6 -6
- package/dist/{heading-ELXWxyTv.js → heading-BRHCV_5J.js} +2 -2
- package/dist/{heading-BDdX4JiM.cjs → heading-u9Arof4p.cjs} +1 -1
- package/dist/{helptext-DQe6GO75.cjs → helptext-DYgeTMtA.cjs} +1 -1
- package/dist/{helptext-BQkrYsoV.js → helptext-sRC8EJqL.js} +4 -4
- package/dist/{icon-Clz68-Kz.cjs → icon-CoBsgGUR.cjs} +1 -1
- package/dist/{icon-B2v30QUk.js → icon-DmRyYNlY.js} +1 -1
- package/dist/if-defined-2mkIDgOm.cjs +1 -0
- package/dist/{if-defined-BNXGXCwT.js → if-defined-Bebu3LXY.js} +1 -1
- package/dist/{input-element-BTzuDh4h.js → input-element-B1BntJeJ.js} +2 -2
- package/dist/{input-element-BdIWsDl-.cjs → input-element-W6Gklt2E.cjs} +1 -1
- package/dist/{input-wrapper-B5GdwzAM.js → input-wrapper-C1zXIKBU.js} +6 -6
- package/dist/{input-wrapper-BmPdpY4N.cjs → input-wrapper-CSPPa4uc.cjs} +1 -1
- package/dist/{link-BxKWhYsn.js → link-DcxVUj8s.js} +4 -4
- package/dist/{link-1JEWpEDG.cjs → link-EMsHusF7.cjs} +1 -1
- package/dist/{linkcard-DXOkeQUy.cjs → linkcard-CWeR6t2a.cjs} +1 -1
- package/dist/{linkcard-CICSZ7pK.js → linkcard-MJFR7FLT.js} +4 -4
- package/dist/{listbox-3fi7wQz4.cjs → listbox-BoBwzL4p.cjs} +6 -6
- package/dist/{listbox-7pQ0UjKV.js → listbox-DEzd-dxF.js} +65 -61
- package/dist/{loader-nIl61aTv.js → loader-CqFQoJlM.js} +4 -4
- package/dist/{loader-BA__N62k.cjs → loader-SJ6NauNT.cjs} +1 -1
- package/dist/{messagebox-D2xvSYWI.cjs → messagebox-D5GYIdjE.cjs} +2 -2
- package/dist/{messagebox-E8W7RyAJ.js → messagebox-DsKi_rKn.js} +5 -5
- package/dist/{modal-D5tGq-nN.js → modal-CJqe6y-V.js} +7 -7
- package/dist/{modal-i3Qxv38H.cjs → modal-DaerHpVi.cjs} +3 -3
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -1
- package/dist/pkt-footer.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +34 -34
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/{pkt-options-controller-BClk341e.cjs → pkt-options-controller-Dz-rYCG1.cjs} +1 -1
- package/dist/{pkt-options-controller-v2bPM9iU.js → pkt-options-controller-sUzxHa5A.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{progressbar-4WyR4T72.js → progressbar-Bd0DjiAb.js} +5 -5
- package/dist/{progressbar-CJFGbev-.cjs → progressbar-BrVlAcQI.cjs} +1 -1
- package/dist/{radiobutton-D7308uCY.js → radiobutton-B0V-jSEX.js} +4 -4
- package/dist/{radiobutton-BQRtv7PK.cjs → radiobutton-Cv1BlwLV.cjs} +1 -1
- package/dist/{ref-37-yxmc4.js → ref-CCSGk4MP.js} +2 -2
- package/dist/{ref-HT6KRjxp.cjs → ref-Emu5PNxk.cjs} +1 -1
- package/dist/{repeat-DntD73oB.js → repeat-CdxGS-_3.js} +2 -2
- package/dist/{repeat-Ddge5HTp.cjs → repeat-Dh9YKoeV.cjs} +1 -1
- package/dist/{searchinput-D1cJ73Ki.cjs → searchinput-7-VVdkss.cjs} +1 -1
- package/dist/{searchinput-j4IvYRzj.js → searchinput-CgzigmiI.js} +4 -4
- package/dist/{select-CDoA2rpC.cjs → select---PCiwmy.cjs} +1 -1
- package/dist/{select-BhK8veJn.js → select-BbcGPmPs.js} +7 -7
- package/dist/shared-strings/nb.d.ts +34 -0
- package/dist/{tabs-DexV26qJ.js → tabs-B134M9k2.js} +4 -4
- package/dist/{tabs-95BpwB6j.cjs → tabs-Dw9E06fL.cjs} +1 -1
- package/dist/{tag-CQEyjF32.cjs → tag-HTYKd-iG.cjs} +1 -1
- package/dist/{tag-DoUC99hn.js → tag-wYnHhHLK.js} +5 -5
- package/dist/{textarea-sulH-Yk7.js → textarea-BcgVLLTt.js} +9 -9
- package/dist/{textarea-BLVuKEng.cjs → textarea-pA_xv8lI.cjs} +1 -1
- package/dist/{textinput-CSrBua2N.cjs → textinput-Czz2affL.cjs} +1 -1
- package/dist/{textinput-Di2lAf2R.js → textinput-Dpj1X5yr.js} +8 -8
- package/dist/{timepicker-Iq1-vWRn.cjs → timepicker-BwDZkSpo.cjs} +1 -1
- package/dist/{timepicker-BaDGjuOR.js → timepicker-CfQMZlaP.js} +8 -8
- package/package.json +2 -2
- package/src/components/alert/alert.test.ts +1 -1
- package/src/components/alert/alert.ts +1 -1
- package/src/components/card/card.ts +7 -2
- package/src/components/fileupload/fileupload-operations.ts +31 -22
- package/src/components/fileupload/fileupload-renderers.ts +28 -17
- package/src/components/fileupload/fileupload.ts +26 -9
- package/src/components/header/header-global.ts +2 -1
- package/src/components/header/header-service.test.ts +15 -0
- package/src/components/header/header-user-menu.ts +1 -1
- package/src/components/header-menu/header-menu.ts +2 -2
- package/src/components/listbox/listbox.ts +9 -4
- package/src/components/messagebox/messagebox.ts +1 -1
- package/src/components/modal/modal.ts +2 -2
- package/dist/if-defined-CjRKmMQs.cjs +0 -1
|
@@ -4,6 +4,7 @@ import { ifDefined } from 'lit/directives/if-defined.js'
|
|
|
4
4
|
import { customElement, state } from 'lit/decorators.js'
|
|
5
5
|
|
|
6
6
|
import { navigateCyclic, trapTabInside, type IFileAndTransfer } from 'shared-utils/fileupload'
|
|
7
|
+
import { formatString } from 'shared-strings'
|
|
7
8
|
|
|
8
9
|
import '@/components/alert'
|
|
9
10
|
import '@/components/icon'
|
|
@@ -161,7 +162,11 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
161
162
|
?required=${this.required && this.uploadStrategy === 'form'}
|
|
162
163
|
accept=${this.getResolvedAcceptValue()}
|
|
163
164
|
aria-label=${ifDefined(
|
|
164
|
-
this.label
|
|
165
|
+
this.label
|
|
166
|
+
? undefined
|
|
167
|
+
: this.multiple
|
|
168
|
+
? this.pktStrings.get('fileupload').openFileDialogLabelMultiple
|
|
169
|
+
: this.pktStrings.get('fileupload').openFileDialogLabelSingle,
|
|
165
170
|
)}
|
|
166
171
|
aria-required=${ifDefined(this.required ? 'true' : undefined)}
|
|
167
172
|
aria-invalid=${ifDefined(this.hasEffectiveError ? 'true' : undefined)}
|
|
@@ -231,6 +236,7 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
231
236
|
private renderQueueItem(file: IFileAndTransfer, previewableImages: IFileAndTransfer[]) {
|
|
232
237
|
const fileSize = typeof file.file?.size === 'number' ? this.formatFileSize(file.file.size) : ''
|
|
233
238
|
const operations = this.getQueueItemOperations()
|
|
239
|
+
const fileuploadStrings = this.pktStrings.get('fileupload')
|
|
234
240
|
|
|
235
241
|
if (this.itemRenderer === 'thumbnail') {
|
|
236
242
|
const canOpenPreview = this.canOpenPreview(file)
|
|
@@ -257,7 +263,7 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
257
263
|
transferErrorMessage: file.errorMessage,
|
|
258
264
|
transferShowProgress: file.showProgress,
|
|
259
265
|
transferLastProgress: file.lastProgress,
|
|
260
|
-
|
|
266
|
+
strings: fileuploadStrings,
|
|
261
267
|
truncateTail: this.truncateTail,
|
|
262
268
|
onCancel: (fileId) => this.cancelTransfer(fileId),
|
|
263
269
|
onOpenPreview: (fileId) => this.openPreview(fileId, previewableImages),
|
|
@@ -281,7 +287,7 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
281
287
|
transferErrorMessage: file.errorMessage,
|
|
282
288
|
transferShowProgress: file.showProgress,
|
|
283
289
|
transferLastProgress: file.lastProgress,
|
|
284
|
-
|
|
290
|
+
strings: fileuploadStrings,
|
|
285
291
|
truncateTail: this.truncateTail,
|
|
286
292
|
onCancel: (fileId) => this.cancelTransfer(fileId),
|
|
287
293
|
})
|
|
@@ -381,7 +387,10 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
381
387
|
? html`<button
|
|
382
388
|
type="button"
|
|
383
389
|
class="pkt-fileupload__image-preview__nav pkt-fileupload__image-preview__nav--prev pkt-btn pkt-btn--medium pkt-btn--secondary pkt-btn--icon-only"
|
|
384
|
-
aria-label=${
|
|
390
|
+
aria-label=${formatString(fileuploadStrings.previewPrevious, {
|
|
391
|
+
index: this.previewCurrentIndex,
|
|
392
|
+
total: previewableImages.length,
|
|
393
|
+
})}
|
|
385
394
|
@click=${() => this.navigatePreview('prev', previewableImages)}
|
|
386
395
|
>
|
|
387
396
|
<pkt-icon
|
|
@@ -397,7 +406,11 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
397
406
|
${hasImage
|
|
398
407
|
? html`<img
|
|
399
408
|
src=${imageUrl}
|
|
400
|
-
alt=${
|
|
409
|
+
alt=${formatString(fileuploadStrings.previewImageAlt, {
|
|
410
|
+
filename,
|
|
411
|
+
index: this.previewCurrentIndex + 1,
|
|
412
|
+
total: previewableImages.length,
|
|
413
|
+
})}
|
|
401
414
|
class="pkt-fileupload__image-preview__image"
|
|
402
415
|
@error=${() => this.markImageFailed(currentImage.fileId, 'preview')}
|
|
403
416
|
/>`
|
|
@@ -417,7 +430,10 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
417
430
|
? html`<button
|
|
418
431
|
type="button"
|
|
419
432
|
class="pkt-fileupload__image-preview__nav pkt-fileupload__image-preview__nav--next pkt-btn pkt-btn--medium pkt-btn--secondary pkt-btn--icon-only"
|
|
420
|
-
aria-label=${
|
|
433
|
+
aria-label=${formatString(fileuploadStrings.previewNext, {
|
|
434
|
+
index: this.previewCurrentIndex + 2,
|
|
435
|
+
total: previewableImages.length,
|
|
436
|
+
})}
|
|
421
437
|
@click=${() => this.navigatePreview('next', previewableImages)}
|
|
422
438
|
>
|
|
423
439
|
<pkt-icon
|
|
@@ -435,17 +451,18 @@ export class PktFileUpload extends PktFileUploadBase implements IPktFileUpload {
|
|
|
435
451
|
|
|
436
452
|
private getQueueItemOperations(): TQueueItemOperation[] {
|
|
437
453
|
const operations: TQueueItemOperation[] = []
|
|
454
|
+
const fileuploadStrings = this.pktStrings.get('fileupload')
|
|
438
455
|
|
|
439
456
|
if (this.renameFilesEnabled && this.itemRenderer !== 'thumbnail') {
|
|
440
|
-
operations.push(createRenameOperation())
|
|
457
|
+
operations.push(createRenameOperation(fileuploadStrings))
|
|
441
458
|
}
|
|
442
459
|
|
|
443
460
|
if (this.addCommentsEnabled && this.itemRenderer !== 'thumbnail') {
|
|
444
|
-
operations.push(createCommentOperation())
|
|
461
|
+
operations.push(createCommentOperation(fileuploadStrings))
|
|
445
462
|
}
|
|
446
463
|
|
|
447
464
|
operations.push(...this.extraOperations)
|
|
448
|
-
operations.push(createRemoveOperation((fileId) => this.removeFileItem(fileId)))
|
|
465
|
+
operations.push(createRemoveOperation((fileId) => this.removeFileItem(fileId), fileuploadStrings))
|
|
449
466
|
|
|
450
467
|
return operations
|
|
451
468
|
}
|
|
@@ -583,11 +583,12 @@ export class PktHeaderGlobal extends PktElement<IPktHeaderGlobal> implements IPk
|
|
|
583
583
|
locale=${this.locale}
|
|
584
584
|
open
|
|
585
585
|
mobile-breakpoint=${this.mobileBreakpoint}
|
|
586
|
+
.strings=${this.strings}
|
|
586
587
|
></pkt-header-menu>
|
|
587
588
|
`
|
|
588
589
|
: html`
|
|
589
590
|
<nav class="pkt-header-menu pkt-header-menu--open">
|
|
590
|
-
<p class="pkt-header-menu__error"
|
|
591
|
+
<p class="pkt-header-menu__error">${this.pktStrings.get('header').menuLoadError}</p>
|
|
591
592
|
</nav>
|
|
592
593
|
`}
|
|
593
594
|
</div>
|
|
@@ -443,6 +443,21 @@ describe('pkt-header-service', () => {
|
|
|
443
443
|
expect(element.userMenu[0].title).toBe('Mine bookinger')
|
|
444
444
|
expect(element.userMenu[1].title).toBe('Innstillinger')
|
|
445
445
|
})
|
|
446
|
+
|
|
447
|
+
it('renders the icon for link items (#3675)', async () => {
|
|
448
|
+
const { element } = await createHeaderServiceTest({ 'service-name': 'Svc', 'opened-menu': 'user' })
|
|
449
|
+
element.user = { name: 'Aksel' }
|
|
450
|
+
element.userMenu = [{ title: 'Mine bookinger', iconName: 'heart', target: '/bookinger' }]
|
|
451
|
+
await element.updateComplete
|
|
452
|
+
await waitForNestedElements()
|
|
453
|
+
|
|
454
|
+
const link = element.querySelector('pkt-link[href="/bookinger"]') as HTMLElement & {
|
|
455
|
+
updateComplete: Promise<boolean>
|
|
456
|
+
}
|
|
457
|
+
await link.updateComplete
|
|
458
|
+
expect(link.getAttribute('iconname')).toBe('heart')
|
|
459
|
+
expect(link.querySelector('pkt-icon[name="heart"]')).toBeInTheDocument()
|
|
460
|
+
})
|
|
446
461
|
})
|
|
447
462
|
|
|
448
463
|
describe('events', () => {
|
|
@@ -175,7 +175,7 @@ export class PktHeaderMenu extends PktElement<IPktHeaderMenu> implements IPktHea
|
|
|
175
175
|
if (this.loadState === 'loading') {
|
|
176
176
|
return html`
|
|
177
177
|
<nav aria-busy="true">
|
|
178
|
-
<p class="pkt-header-menu__loading"
|
|
178
|
+
<p class="pkt-header-menu__loading">${this.pktStrings.get('header').menuLoading}</p>
|
|
179
179
|
</nav>
|
|
180
180
|
`
|
|
181
181
|
}
|
|
@@ -183,7 +183,7 @@ export class PktHeaderMenu extends PktElement<IPktHeaderMenu> implements IPktHea
|
|
|
183
183
|
if (this.loadState === 'error' || !this.localeData) {
|
|
184
184
|
return html`
|
|
185
185
|
<nav aria-hidden=${!this.open}>
|
|
186
|
-
<p class="pkt-header-menu__error"
|
|
186
|
+
<p class="pkt-header-menu__error">${this.pktStrings.get('header').menuLoadError}</p>
|
|
187
187
|
</nav>
|
|
188
188
|
`
|
|
189
189
|
}
|
|
@@ -5,7 +5,7 @@ import { PktElement } from '@/base-elements/element'
|
|
|
5
5
|
import { repeat } from 'lit/directives/repeat.js'
|
|
6
6
|
import { classMap } from 'lit/directives/class-map.js'
|
|
7
7
|
import type { IPktComboboxOption } from 'shared-types/combobox'
|
|
8
|
-
import type
|
|
8
|
+
import { formatString, type IPktStringsProps } from 'shared-strings'
|
|
9
9
|
import { uuidish } from 'shared-utils/utils'
|
|
10
10
|
import { filterOptionsBySearch } from 'shared-utils/combobox/option-utils'
|
|
11
11
|
import {
|
|
@@ -179,7 +179,7 @@ export class PktListbox extends PktElement<IPktListbox> implements IPktListbox {
|
|
|
179
179
|
name="exclamation-mark-circle"
|
|
180
180
|
size="large"
|
|
181
181
|
></pkt-icon>
|
|
182
|
-
|
|
182
|
+
${this.pktStrings.get('listbox').empty}
|
|
183
183
|
</div>`
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -258,7 +258,9 @@ export class PktListbox extends PktElement<IPktListbox> implements IPktListbox {
|
|
|
258
258
|
@keydown=${this.handleOptionKeydown}
|
|
259
259
|
>
|
|
260
260
|
<pkt-icon class="pkt-listbox__banner-icon" name="plus-sign" size="large"></pkt-icon>
|
|
261
|
-
|
|
261
|
+
${formatString(this.pktStrings.get('listbox').addValue, {
|
|
262
|
+
value: this.customUserInput ?? '',
|
|
263
|
+
})}
|
|
262
264
|
</div>
|
|
263
265
|
`
|
|
264
266
|
: nothing
|
|
@@ -270,7 +272,10 @@ export class PktListbox extends PktElement<IPktListbox> implements IPktListbox {
|
|
|
270
272
|
return this.isMultiSelect && this._selectedOptions > 0 && this.maxLength > 0
|
|
271
273
|
? html`
|
|
272
274
|
<div class="pkt-listbox__banner pkt-listbox__banner--maximum-reached">
|
|
273
|
-
${this.
|
|
275
|
+
${formatString(this.pktStrings.get('listbox').maxReached, {
|
|
276
|
+
selected: this._selectedOptions,
|
|
277
|
+
max: this.maxLength,
|
|
278
|
+
})}
|
|
274
279
|
</div>
|
|
275
280
|
`
|
|
276
281
|
: nothing
|
|
@@ -60,7 +60,7 @@ export class PktMessagebox extends PktElementWithSlot implements IPktMessagebox
|
|
|
60
60
|
<button
|
|
61
61
|
@click=${this.close}
|
|
62
62
|
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
63
|
-
aria-label
|
|
63
|
+
aria-label=${this.pktStrings.get('generic').close}
|
|
64
64
|
>
|
|
65
65
|
<pkt-icon name="close" class="pkt-link__icon"></pkt-icon>
|
|
66
66
|
</button>
|
|
@@ -198,13 +198,13 @@ export class PktModal extends PktElementWithSlot implements IPktModal {
|
|
|
198
198
|
? html`<div class="${classMap(closeButtonClasses)}">
|
|
199
199
|
<pkt-button
|
|
200
200
|
@click=${(event: Event) => this.close(event)}
|
|
201
|
-
aria-label
|
|
201
|
+
aria-label=${this.pktStrings.get('generic').close}
|
|
202
202
|
iconname="close"
|
|
203
203
|
variant="icon-only"
|
|
204
204
|
size="medium"
|
|
205
205
|
skin=${isCloseButtonSkinDefault ? 'tertiary' : 'primary'}
|
|
206
206
|
>
|
|
207
|
-
|
|
207
|
+
${this.pktStrings.get('generic').close}
|
|
208
208
|
</pkt-button>
|
|
209
209
|
</div>`
|
|
210
210
|
: html`<div class="pkt-modal__noCloseButton"></div>`}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./element-CewjrA4g.cjs");var t=t=>t??e.h;Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|