@brightspace-ui/core 3.159.5 → 3.159.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ class FormErrorSummary extends LocalizeCoreElement(LitElement) {
10
10
  return {
11
11
  errors: { type: Object, attribute: false },
12
12
  _expanded: { type: Boolean, attribute: false },
13
- _hasBottomMargin: { type: Boolean, attribute: '_has-bottom-margin', reflect: true },
13
+ _hasTopMargin: { type: Boolean, attribute: '_has-top-margin', reflect: true },
14
14
  _hasErrors: { type: Boolean, attribute: '_has-errors', reflect: true },
15
15
  };
16
16
  }
@@ -24,8 +24,8 @@ class FormErrorSummary extends LocalizeCoreElement(LitElement) {
24
24
  :host([hidden]) {
25
25
  display: none;
26
26
  }
27
- :host([_has-bottom-margin][_has-errors]) {
28
- margin-block-end: 1rem;
27
+ :host([_has-top-margin][_has-errors]) {
28
+ margin-block-start: 1rem;
29
29
  }
30
30
 
31
31
  .d2l-form-error-summary-header {
@@ -58,7 +58,7 @@ class FormErrorSummary extends LocalizeCoreElement(LitElement) {
58
58
  super();
59
59
  this.errors = [];
60
60
  this._expanded = true;
61
- this._hasBottomMargin = false;
61
+ this._hasTopMargin = false;
62
62
  this._hasErrors = false;
63
63
  }
64
64
 
@@ -21,3 +21,4 @@ A progress bar communicates information relating to the progress of completion o
21
21
  | `label` | String | Label for the progress bar |
22
22
  | `label-hidden` | Boolean | Hide the bar's label |
23
23
  | `value-hidden` | Boolean | Hide the bar's value |
24
+ <!-- docs: end hidden content -->
@@ -10,11 +10,35 @@ class Progress extends LitElement {
10
10
 
11
11
  static get properties() {
12
12
  return {
13
+ /**
14
+ * The maximum value of the progress bar
15
+ * @type {number}
16
+ */
13
17
  max: { type: Number, attribute: 'max' },
18
+ /**
19
+ * The current value of the progress bar
20
+ * @type {number}
21
+ */
14
22
  value: { type: Number },
23
+ /**
24
+ * Label for the progress bar
25
+ * @type {string}
26
+ */
15
27
  label: { type: String },
28
+ /**
29
+ * Hide the bar's label
30
+ * @type {boolean}
31
+ */
16
32
  labelHidden: { type: Boolean, attribute: 'label-hidden' },
33
+ /**
34
+ * Hide the bar's value
35
+ * @type {boolean}
36
+ */
17
37
  valueHidden: { type: Boolean, attribute: 'value-hidden' },
38
+ /**
39
+ * Use d2l-body-small styles
40
+ * @type {boolean}
41
+ */
18
42
  small: { type: Boolean, reflect: true }
19
43
  };
20
44
  }
@@ -89,6 +113,7 @@ class Progress extends LitElement {
89
113
  this.max = 100;
90
114
  this.value = 0;
91
115
  this.valueHidden = false;
116
+ this.small = false;
92
117
  }
93
118
 
94
119
  render() {
@@ -11733,29 +11733,36 @@
11733
11733
  "attributes": [
11734
11734
  {
11735
11735
  "name": "label",
11736
+ "description": "Label for the progress bar",
11736
11737
  "type": "string"
11737
11738
  },
11738
- {
11739
- "name": "small",
11740
- "type": "boolean"
11741
- },
11742
11739
  {
11743
11740
  "name": "label-hidden",
11741
+ "description": "Hide the bar's label",
11744
11742
  "type": "boolean",
11745
11743
  "default": "false"
11746
11744
  },
11747
11745
  {
11748
11746
  "name": "max",
11747
+ "description": "The maximum value of the progress bar",
11749
11748
  "type": "number",
11750
11749
  "default": "100"
11751
11750
  },
11752
11751
  {
11753
11752
  "name": "value",
11753
+ "description": "The current value of the progress bar",
11754
11754
  "type": "number",
11755
11755
  "default": "0"
11756
11756
  },
11757
11757
  {
11758
11758
  "name": "value-hidden",
11759
+ "description": "Hide the bar's value",
11760
+ "type": "boolean",
11761
+ "default": "false"
11762
+ },
11763
+ {
11764
+ "name": "small",
11765
+ "description": "Use d2l-body-small styles",
11759
11766
  "type": "boolean",
11760
11767
  "default": "false"
11761
11768
  }
@@ -11764,34 +11771,41 @@
11764
11771
  {
11765
11772
  "name": "label",
11766
11773
  "attribute": "label",
11774
+ "description": "Label for the progress bar",
11767
11775
  "type": "string"
11768
11776
  },
11769
- {
11770
- "name": "small",
11771
- "attribute": "small",
11772
- "type": "boolean"
11773
- },
11774
11777
  {
11775
11778
  "name": "labelHidden",
11776
11779
  "attribute": "label-hidden",
11780
+ "description": "Hide the bar's label",
11777
11781
  "type": "boolean",
11778
11782
  "default": "false"
11779
11783
  },
11780
11784
  {
11781
11785
  "name": "max",
11782
11786
  "attribute": "max",
11787
+ "description": "The maximum value of the progress bar",
11783
11788
  "type": "number",
11784
11789
  "default": "100"
11785
11790
  },
11786
11791
  {
11787
11792
  "name": "value",
11788
11793
  "attribute": "value",
11794
+ "description": "The current value of the progress bar",
11789
11795
  "type": "number",
11790
11796
  "default": "0"
11791
11797
  },
11792
11798
  {
11793
11799
  "name": "valueHidden",
11794
11800
  "attribute": "value-hidden",
11801
+ "description": "Hide the bar's value",
11802
+ "type": "boolean",
11803
+ "default": "false"
11804
+ },
11805
+ {
11806
+ "name": "small",
11807
+ "attribute": "small",
11808
+ "description": "Use d2l-body-small styles",
11795
11809
  "type": "boolean",
11796
11810
  "default": "false"
11797
11811
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.159.5",
3
+ "version": "3.159.7",
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",
@@ -15,8 +15,8 @@
15
15
  import '../primary-secondary.js';
16
16
  </script>
17
17
  <style>
18
- d2l-template-primary-secondary {
19
- --d2l-template-primary-secondary-primary-padding: 20px;
18
+ div[slot="primary"] {
19
+ padding: 0 20px;
20
20
  }
21
21
  div[slot="secondary"] {
22
22
  padding: 10px;
@@ -643,9 +643,12 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
643
643
  main {
644
644
  flex: 2 0 0;
645
645
  overflow-x: hidden;
646
- padding: var(--d2l-template-primary-secondary-primary-padding, 0);
647
646
  transition: none;
648
647
  }
648
+ main d2l-form-error-summary {
649
+ margin-inline: var(--d2l-template-primary-secondary-form-error-inline-margin, 20px);
650
+ }
651
+
649
652
  :host([resizable]) main {
650
653
  flex: 1 0 0;
651
654
  }
@@ -1052,7 +1055,7 @@ class TemplatePrimarySecondary extends LocalizeCoreElement(LitElement) {
1052
1055
  'd2l-template-scroll': isWindows
1053
1056
  };
1054
1057
  const primarySection = html`<main class="${classMap(scrollClasses)}">
1055
- ${this.hasForm ? html`<d2l-form-error-summary _has-bottom-margin id="form-error-summary"></d2l-form-error-summary>` : nothing}
1058
+ ${this.hasForm ? html`<d2l-form-error-summary _has-top-margin id="form-error-summary"></d2l-form-error-summary>` : nothing}
1056
1059
  <slot name="primary"></slot>
1057
1060
  </main>`;
1058
1061
  const secondarySection = html`