@brightspace-ui/core 3.78.0 → 3.79.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.
@@ -2,6 +2,7 @@ import { emptyStateIllustratedStyles, emptyStateStyles } from './empty-state-sty
2
2
  import { html, LitElement, nothing } from 'lit';
3
3
  import { bodyCompactStyles } from '../typography/styles.js';
4
4
  import { classMap } from 'lit/directives/class-map.js';
5
+ import { LoadingCompleteMixin } from '../../mixins/loading-complete/loading-complete-mixin.js';
5
6
  import { loadSvg } from '../../generated/empty-state/presetIllustrationLoader.js';
6
7
  import { PropertyRequiredMixin } from '../../mixins/property-required/property-required-mixin.js';
7
8
  import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
@@ -16,7 +17,7 @@ const illustrationAspectRatio = 500 / 330;
16
17
  * @slot - Slot for empty state actions
17
18
  * @slot illustration - Slot for custom SVG content if `illustration-name` property is not set
18
19
  */
19
- class EmptyStateIllustrated extends PropertyRequiredMixin(LitElement) {
20
+ class EmptyStateIllustrated extends LoadingCompleteMixin(PropertyRequiredMixin(LitElement)) {
20
21
 
21
22
  static get properties() {
22
23
  return {
@@ -53,35 +54,41 @@ class EmptyStateIllustrated extends PropertyRequiredMixin(LitElement) {
53
54
 
54
55
  connectedCallback() {
55
56
  super.connectedCallback();
56
- this.addEventListener('d2l-empty-state-illustrated-check', this._handleEmptyStateIllustratedCheck);
57
+ this.addEventListener('d2l-empty-state-illustrated-check', this.#handleEmptyStateIllustratedCheck);
57
58
  this._resizeObserver.observe(this);
58
59
  }
59
60
 
60
61
  disconnectedCallback() {
61
62
  super.disconnectedCallback();
62
- this.removeEventListener('d2l-empty-state-illustrated-check', this._handleEmptyStateIllustratedCheck);
63
+ this.removeEventListener('d2l-empty-state-illustrated-check', this.#handleEmptyStateIllustratedCheck);
63
64
  this._resizeObserver.disconnect();
64
65
  }
65
66
 
66
67
  render() {
67
- const illustrationContainerStyle = this._getIllustrationContainerStyle();
68
- const titleClass = this._getTitleClass();
68
+ const titleClass = {
69
+ 'd2l-empty-state-title': true,
70
+ 'd2l-empty-state-title-small': this._titleSmall,
71
+ 'd2l-empty-state-title-large': !this._titleSmall,
72
+ };
69
73
 
70
74
  return html`
71
- ${this.illustrationName
72
- ? html`
73
- <div style="${styleMap(illustrationContainerStyle)}">
74
- ${runAsync(this.illustrationName, () => this._getIllustration(this.illustrationName), { success: (illustration) => illustration }, { pendingState: false })}
75
- </div>`
76
- : html`<slot class="illustration-slot" name="illustration"></slot>`}
77
-
75
+ ${this.#renderIllustration()}
78
76
  <p class="${classMap(titleClass)}">${this.titleText}</p>
79
77
  <p class="d2l-body-compact d2l-empty-state-description">${this.description}</p>
80
78
  <slot class="action-slot"></slot>
81
79
  `;
82
80
  }
83
81
 
84
- async _getIllustration(illustrationName) {
82
+ _onResize(entries) {
83
+ if (!entries || entries.length === 0) return;
84
+ const entry = entries[0];
85
+ requestAnimationFrame(() => {
86
+ this._contentHeight = Math.min(entry.contentRect.right / illustrationAspectRatio, 330);
87
+ this._titleSmall = entry.contentRect.right <= 615;
88
+ });
89
+ }
90
+
91
+ async #getIllustration(illustrationName) {
85
92
  if (!illustrationName) return;
86
93
 
87
94
  const svg = await loadSvg(illustrationName);
@@ -91,32 +98,31 @@ class EmptyStateIllustrated extends PropertyRequiredMixin(LitElement) {
91
98
  return svg ? html`${unsafeSVG(svg.val)}` : nothing;
92
99
  }
93
100
 
94
- _getIllustrationContainerStyle() {
95
- return {
96
- height: `${this._contentHeight}px`,
97
- };
98
- }
99
-
100
- _getTitleClass() {
101
- return {
102
- 'd2l-empty-state-title': true,
103
- 'd2l-empty-state-title-small': this._titleSmall,
104
- 'd2l-empty-state-title-large': !this._titleSmall,
105
- };
106
- }
107
-
108
- _handleEmptyStateIllustratedCheck(e) {
101
+ #handleEmptyStateIllustratedCheck(e) {
109
102
  e.stopPropagation();
110
103
  e.detail.illustrated = true;
111
104
  }
112
105
 
113
- _onResize(entries) {
114
- if (!entries || entries.length === 0) return;
115
- const entry = entries[0];
116
- requestAnimationFrame(() => {
117
- this._contentHeight = Math.min(entry.contentRect.right / illustrationAspectRatio, 330);
118
- this._titleSmall = entry.contentRect.right <= 615;
119
- });
106
+ #renderIllustration() {
107
+ if (!this.illustrationName) {
108
+ this.resolveLoadingComplete();
109
+ return html`<slot class="illustration-slot" name="illustration"></slot>`;
110
+ }
111
+ const illustrationContainerStyle = {
112
+ height: `${this._contentHeight}px`,
113
+ };
114
+ const asyncVal = runAsync(
115
+ this.illustrationName,
116
+ () => this.#getIllustration(this.illustrationName),
117
+ {
118
+ success: illustration => {
119
+ this.resolveLoadingComplete();
120
+ return illustration;
121
+ }
122
+ },
123
+ { pendingState: false }
124
+ );
125
+ return html`<div style="${styleMap(illustrationContainerStyle)}">${asyncVal}</div>`;
120
126
  }
121
127
 
122
128
  }
@@ -3742,6 +3742,14 @@
3742
3742
  "attribute": "title-text",
3743
3743
  "description": "REQUIRED: A title for the empty state",
3744
3744
  "type": "string"
3745
+ },
3746
+ {
3747
+ "name": "loadingComplete",
3748
+ "type": "Promise<any>"
3749
+ },
3750
+ {
3751
+ "name": "resolveLoadingComplete",
3752
+ "type": "() => void"
3745
3753
  }
3746
3754
  ],
3747
3755
  "slots": [
package/lang/haw.js ADDED
@@ -0,0 +1,148 @@
1
+ export default {
2
+ "components.alert.close": "Pani i ka makaʻala",
3
+ "components.breadcrumbs.breadcrumb": "Palapalapala",
4
+ "components.button-add.addItem": "Pākuʻi Mea",
5
+ "components.calendar.hasEvents": "Loaʻa nā hanana.",
6
+ "components.calendar.notSelected": "ʻAʻole i koho ʻia.",
7
+ "components.calendar.selected": "Koho ʻia.",
8
+ "components.calendar.show": "Hōʻike {month}",
9
+ "components.count-badge.plus": "{number}+",
10
+ "components.dialog.close": "Pani i kēia kamaʻilio",
11
+ "components.dialog.critical": "Pilikia!",
12
+ "components.dropdown.close": "Pani",
13
+ "components.filter.activeFilters": "Nā kānana ʻeleu:",
14
+ "components.filter.additionalContentTooltip": "E hoʻohana i <b>nā kī pua hema/ ʻākau</b> e hoʻoneʻe i ka manaʻo i loko o kēia mea papa inoa",
15
+ "components.filter.clear": "Akaka",
16
+ "components.filter.clearAll": "Holoi a pau",
17
+ "components.filter.clearAllAnnounce": "Holoi i nā kānana a pau",
18
+ "components.filter.clearAllAnnounceOverride": "Holoi i nā kānana a pau no: {filterText}",
19
+ "components.filter.clearAllDescription": "Holoi i nā kānana a pau",
20
+ "components.filter.clearAllDescriptionOverride": "Holoi i nā kānana a pau no: {filterText}",
21
+ "components.filter.clearAnnounce": "Ke holoi nei i nā kānana no: {filterName}",
22
+ "components.filter.clearDescription": "Holoi i nā kānana no: {filterName}",
23
+ "components.filter.loading": "Hoʻouka i nā kānana",
24
+ "components.filter.filterCountDescription": "{number, plural, =0 {ʻAʻohe kānana i hoʻohana ʻia.} one {{number} hoʻohana ʻia ke kānana.} other {{number} hoʻohana ʻia nā kānana.}}",
25
+ "components.filter.filters": "Nā kānana",
26
+ "components.filter.noFilters": "ʻAʻohe kānana i loaʻa",
27
+ "components.filter.searchResults": "{number, plural, =0 {ʻAʻohe hopena hulina} one {{number} hopena huli} other {{number} hopena huli}}",
28
+ "components.filter.selectedFirstListLabel": "{headerText}. Hōʻike mua ʻia nā kānana i koho ʻia.",
29
+ "components.filter.singleDimensionDescription": "Kānana e: {filterName}",
30
+ "components.filter-dimension-set-date-text-value.textHours": "{num, plural, =1 {hola hope} other {hope loa {num} hola}}",
31
+ "components.filter-dimension-set-date-text-value.textDays": "{num, plural, =0 {I kēia lā} one {hope loa {num} lā} other {hope loa {num} lā}}",
32
+ "components.filter-dimension-set-date-text-value.textMonths": "{num} mahina i hala",
33
+ "components.filter-dimension-set-date-time-range-value.label": "{text}, hoʻonui e koho i nā lā",
34
+ "components.filter-dimension-set-date-time-range-value.valueTextRange": "{startValue} i {endValue}",
35
+ "components.filter-dimension-set-date-time-range-value.valueTextRangeStartOnly": "Lā hoʻomaka: {startValue}",
36
+ "components.filter-dimension-set-date-time-range-value.valueTextRangeEndOnly": "Lā Hoʻopau: {endValue}",
37
+ "components.filter-dimension-set-date-time-range-value.text": "Laulā lā maʻamau",
38
+ "components.form-element.defaultError": "ʻAʻole kūpono ʻo {label}.",
39
+ "components.form-element.defaultFieldLabel": "Kihapai",
40
+ "components.form-element.input.email.typeMismatch": "ʻAʻole kūpono ka leka uila",
41
+ "components.form-element.input.number.rangeError": "{minExclusive, select, true {{maxExclusive, select, true {Pono ka nui o ka helu ma mua o {min} a emi iho ma mua o {max}.} other {ʻOi aku ka nui o ka helu ma mua o {min} a emi mai a like paha me {max}. }}} other {{maxExclusive, select, true {Pono ka helu ma mua o ka {min} a emi iho ma mua o {max}.} other {Pono ka helu ma mua a i ʻole like me {min} a emi iho a like paha {max}.}}}}",
42
+ "components.form-element.input.number.rangeOverflow": "{maxExclusive, select, true {Pono ka helu ma mua o {max}.} other {Pono ka helu ma mua a i ʻole like me {max}.}}",
43
+ "components.form-element.input.number.rangeUnderflow": "{minExclusive, select, true {Pono ka helu ma mua o {min}.} other {Pono ka helu ma mua a i ʻole like me {min}.}}",
44
+ "components.form-element.input.text.tooShort": "Pono ka {label} ma kahi o {minlength} mau huapalapala",
45
+ "components.form-element.input.url.typeMismatch": "ʻAʻole kūpono ka URL",
46
+ "components.form-element.valueMissing": "Pono ʻo {label}.",
47
+ "components.form-error-summary.errorSummary": "{count, plural, one {Aia aku nei {count} Loaʻa ka hewa ma ka ʻike āu i hoʻouna ai} other {Aia aku nei {count} loaʻa nā hewa i ka ʻike āu i hoʻouna ai}}",
48
+ "components.form-error-summary.text": "Hoʻololi i nā kikoʻī hewa",
49
+ "components.input-color.backgroundColor": "Ka waihoʻoluʻu",
50
+ "components.input-color.foregroundColor": "Kalai mua",
51
+ "components.input-color.none": "ʻAʻohe",
52
+ "components.input-date-range.endDate": "Lā Hoʻopau",
53
+ "components.input-date-range.errorBadInput": "Pono ʻo {startLabel} ma mua o {endLabel}",
54
+ "components.input-date-range.interactive-label": "Hoʻokomo ka laulā lā",
55
+ "components.input-date-range.startDate": "lā hoʻomaka",
56
+ "components.input-date-time-range-to.to": "i",
57
+ "components.input-date-time-range.endDate": "End Date",
58
+ "components.input-date-time-range.errorBadInput": "Pono ʻo {startLabel} ma mua o {endLabel}",
59
+ "components.input-date-time-range.startDate": "Start Date",
60
+ "components.input-date-time.date": "Lā",
61
+ "components.input-date-time.errorMaxDateOnly": "Pono ka lā ma mua a ma {maxDate}",
62
+ "components.input-date-time.errorMinDateOnly": "Pono ka lā ma a ma hope paha o {minDate}",
63
+ "components.input-date-time.errorOutsideRange": "Pono ka lā ma waena o {minDate} a me {maxDate}",
64
+ "components.input-date-time.time": "Manawa",
65
+ "components.input-date-time-range.interactive-label": "Hoʻokomo ʻia ka lā a me ka manawa",
66
+ "components.input-date.clear": "Clear",
67
+ "components.input-date.errorMaxDateOnly": "Pono ka lā ma mua a ma {maxDate}",
68
+ "components.input-date.errorMinDateOnly": "Pono ka lā ma a ma hope paha o {minDate}",
69
+ "components.input-date.errorOutsideRange": "Pono ka lā ma waena o {minDate} a me {maxDate}",
70
+ "components.input-date.openInstructions": "E hoʻohana i ka hōʻano lā {format}. ʻO ka pua i lalo a i ʻole e kaomi i ke komo no ke komo ʻana i ka kalena liʻiliʻi.",
71
+ "components.input-date.now": "I kēia manawa",
72
+ "components.input-date.revert": "Ua hoʻihoʻi ʻia ʻo {label} i ka waiwai ma mua.",
73
+ "components.input-date.today": "I kēia lā",
74
+ "components.input-date.useDateFormat": "E hoʻohana i ka hōʻano lā {format}.",
75
+ "components.input-number.hintInteger": "ʻAe kēia kahua i nā waiwai helu helu (ʻaʻohe decimals)",
76
+ "components.input-number.hintDecimalDuplicate": "Aia he decimal i kēia helu",
77
+ "components.input-number.hintDecimalIncorrectComma": "E hoʻohui i kahi decimal e hoʻohana i ke koma \",\" ʻano",
78
+ "components.input-number.hintDecimalIncorrectPeriod": "No ka hoʻohui ʻana i kahi decimal e hoʻohana i ka manawa \".\" ʻano ʻano",
79
+ "components.input-search.clear": "Holoi Huli",
80
+ "components.input-search.defaultPlaceholder": "Huli...",
81
+ "components.input-search.search": "Huli",
82
+ "components.input-time-range.endTime": "Manawa Hoopau",
83
+ "components.input-time-range.errorBadInput": "Pono ʻo {startLabel} ma mua o {endLabel}",
84
+ "components.input-time-range.startTime": "Wā Hoʻomaka",
85
+ "components.interactive.instructions": "E kaomi iā Enter e launa pū, e pakele i waho",
86
+ "components.link.open-in-new-window": "Wehe ma ka puka makani hou.",
87
+ "components.list.keyboard": "E hoʻohana i <b>nā kī arrow</b> e hoʻoneʻe i ka manaʻo i loko o kēia papa inoa, a i ʻole <b>ʻaoʻao i luna/lalo</b> no ka neʻe ʻana i luna a i lalo i ka 5",
88
+ "components.list-controls.label": "Nā hana no ka papa inoa",
89
+ "components.list-item.addItem": "Pākuʻi Mea",
90
+ "components.list-item-drag-handle.default": "Hoʻonohonoho hou i ka hana ʻikamu no {name}",
91
+ "components.list-item-drag-handle.keyboard": "E hoʻonohonoho hou i ka mea, ke kūlana o kēia manawa {currentPosition} ma waho o {size}. No ka hoʻoneʻe ʻana i kēia mea, e kaomi i nā pua i luna a i lalo.",
92
+ "components.list-item-drag-handle-tooltip.title": "Nā Mana Keyboard no ka hoʻonohonoho hou ʻana:",
93
+ "components.list-item-drag-handle-tooltip.enter-key": "Komo",
94
+ "components.list-item-drag-handle-tooltip.enter-desc": "E hoʻololi i ke ʻano hoʻonohonoho hou.",
95
+ "components.list-item-drag-handle-tooltip.up-down-key": "Iluna/Iho",
96
+ "components.list-item-drag-handle-tooltip.up-down-desc": "E hoʻoneʻe i ka mea i luna a i lalo i ka papa inoa.",
97
+ "components.list-item-drag-handle-tooltip.left-right-key": "Hema/Akau",
98
+ "components.list-item-drag-handle-tooltip.left-right-desc": "E hoʻololi i ka pae pūnana.",
99
+ "components.menu-item-return.return": "E hoʻi i ka papa kuhikuhi mua.",
100
+ "components.menu-item-return.returnCurrentlyShowing": "E hoʻi i ka papa kuhikuhi mua. Ke nānā nei ʻoe iā {menuTitle}.",
101
+ "components.meter-mixin.commaSeperatedAria": "{term1}, {term2}",
102
+ "components.meter-mixin.fraction": "{x}∕{y}",
103
+ "components.meter-mixin.fractionAria": "{x} mai ka {y}",
104
+ "components.meter-mixin.progressIndicator": "Hōʻike Holomua",
105
+ "components.more-less.less": "emi mai",
106
+ "components.more-less.more": "hou aku",
107
+ "components.object-property-list.item-placeholder-text": "Mea Paʻa Wahi",
108
+ "components.overflow-group.moreActions": "Nā Hana Hou",
109
+ "components.pager-load-more.action": "Hoʻouka hou aku",
110
+ "components.pager-load-more.action-with-page-size": "Hoʻouka {count} hou aku",
111
+ "components.pageable.info": "{count, plural, one {{countFormatted} mea} other {{countFormatted} mau mea}}",
112
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} o {totalCountFormatted} mea} other {{countFormatted} o {totalCountFormatted} mau mea}}",
113
+ "components.pager-load-more.status-loading": "Ke hoʻouka nei i nā mea hou aʻe",
114
+ "components.selection.action-max-hint": "{count, plural, one {Disabled when more than {countFormatted} item is selected} other {Disabled when more than {countFormatted} items are selected}}",
115
+ "components.selection.action-required-hint": "E koho i kahi mea e hana ai i kēia hana",
116
+ "components.selection.select-all": "E koho i nā mea a pau",
117
+ "components.selection.select-all-items": "E koho i nā mea a pau {count}.",
118
+ "components.selection.selected": "{count} koho ʻia",
119
+ "components.selection.selected-plus": "{count}+ koho ʻia",
120
+ "components.selection-controls.label": "Nā hana no ke koho",
121
+ "components.switch.visible": "ʻIke ʻia",
122
+ "components.switch.visibleWithPeriod": "ʻIke ʻia.",
123
+ "components.switch.hidden": "Huna",
124
+ "components.switch.conditions": "Pono e hoʻokō i nā kūlana",
125
+ "components.table-col-sort-button.addSortOrder": "E koho e hoʻohui i ka hoʻonohonoho ʻana",
126
+ "components.table-col-sort-button.changeSortOrder": "E koho e hoʻololi i ka hoʻonohonoho ʻana",
127
+ "components.table-col-sort-button.title": "{sourceType, select, dates {{direction, select, desc {Hoʻokaʻawale ʻia ka mea hou a i ka mea kahiko} other {Hoʻokaʻawale ʻia ka mea kahiko i ka mea hou}}} numbers {{direction, select, desc {Hoʻokaʻina kiʻekiʻe a haʻahaʻa} other {Hoʻokaʻina haʻahaʻa a kiʻekiʻe}}} words {{direction, select, desc {Hoʻokaʻawale ʻia ʻo Z i A} other {Hoʻopili ʻia ʻo A a Z}}} value {Hoʻokaʻawale ʻia {selectedMenuItemText}} other {{direction, select, desc {Hoʻokaʻawale i ka iho ʻana} other {Hoʻokaʻawale ʻia i ka piʻi ʻana}}}}",
128
+ "components.table-controls.label": "Nā hana no ka papaʻaina",
129
+ "components.tabs.next": "Holo i mua",
130
+ "components.tabs.previous": "Holo i hope",
131
+ "components.tag-list.clear": "Kaomi, kaomi i hope, a i ʻole ke kī holoi e wehe i ka mea {value}",
132
+ "components.tag-list.clear-all": "Holoi a pau",
133
+ "components.tag-list.cleared-all": "Wehe ʻia nā mea papa inoa inoa a pau",
134
+ "components.tag-list.cleared-item": "Wehe ʻia ka helu helu helu {value}",
135
+ "components.tag-list.interactive-label": "Papa inoa inoa, {count} mau mea",
136
+ "components.tag-list.num-hidden": "+ {count} hou aku",
137
+ "components.tag-list.role-description": "Papa inoa inoa",
138
+ "components.tag-list.show-less": "Hōʻike liʻiliʻi",
139
+ "components.tag-list.show-more-description": "E koho e hōʻike i nā mea papa inoa inoa huna",
140
+ "components.tag-list-item.role-description": "Tag",
141
+ "components.tag-list-item.tooltip-arrow-keys": "Nā kī pua",
142
+ "components.tag-list-item.tooltip-arrow-keys-desc": "E neʻe ma waena o nā hōʻailona",
143
+ "components.tag-list-item.tooltip-delete-key": "Hoʻi hope / Holoi",
144
+ "components.tag-list-item.tooltip-delete-key-desc": "Holoi i ka hōʻailona kikoʻī",
145
+ "components.tag-list-item.tooltip-title": "Nā Mana Keyboard",
146
+ "templates.primary-secondary.divider": "Mea hoʻokaʻawale papa lua",
147
+ "templates.primary-secondary.secondary-panel": "Pane lua"
148
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.78.0",
3
+ "version": "3.79.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",