@salesforcedevs/dw-components 1.1.2-alpha.1 → 1.1.2-alpha.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.1.2-alpha.1",
3
+ "version": "1.1.2-alpha.2",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,33 +1,46 @@
1
- dx-section.browse {
2
- --dx-c-section-heading-font-color: var(--dx-g-blue-vibrant-20);
3
- --dx-c-section-heading-font-family: var(--dx-g-font-display);
4
- --dx-c-section-heading-font-size: 32px;
5
- --dx-c-section-padding-top: 0;
6
- --dx-c-section-heading-margin-bottom: var(--dx-g-spacing-md);
7
- z-index: 1;
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
+
4
+ :host {
5
+ --dw-browse-trials-padding-top: 0;
6
+ --dw-browse-trials-padding-bottom: 0;
8
7
  }
9
8
 
10
- dx-tab-panel-list {
11
- --dx-c-tab-panel-list-horizontal-padding: 0;
9
+ .title {
10
+ color: var(--dx-g-blue-vibrant-20);
11
+ font-family: var(--dx-g-font-display);
12
+ font-weight: var(--dx-g-font-weight-demi);
13
+ font-size: 32px;
14
+ letter-spacing: -0.4px;
15
+ line-height: 40px;
16
+ margin-bottom: var(--dx-g-spacing-md);
12
17
  }
13
18
 
14
- dx-section.section-container {
15
- --dx-c-section-padding-vertical: 0;
16
- --dx-c-section-padding-horizontal: 0;
17
- width: 100%;
19
+ .panel-list-container {
20
+ padding: var(--dw-browse-trials-padding-top)
21
+ var(--dx-g-page-padding-horizontal)
22
+ var(--dw-browse-trials-padding-bottom)
23
+ var(--dx-g-page-padding-horizontal);
18
24
  }
19
25
 
20
- dx-section.section-container:not(:first-of-type) {
21
- margin-top: var(--dx-g-spacing-4xl);
22
- z-index: 1;
26
+ dx-tab-panel-list {
27
+ --dx-c-tab-panel-list-horizontal-padding: 0;
23
28
  }
24
29
 
25
30
  .button-toggle-container {
26
31
  margin-bottom: var(--dx-g-spacing-4xl);
27
32
  }
28
33
 
29
- .card-container {
34
+ .category-title {
35
+ width: 100%;
36
+ }
37
+
38
+ .category-container {
30
39
  display: flex;
31
40
  flex-wrap: wrap;
32
41
  gap: 40px;
33
42
  }
43
+
44
+ .category-container:not(:first-of-type) {
45
+ margin-top: var(--dx-g-spacing-3xl);
46
+ }
@@ -1,28 +1,27 @@
1
1
  <template>
2
- <dx-tab-panel-list tabs={_tabs} onchange={handleTabChange}>
3
- <template for:each={trials} for:item="trial">
4
- <dx-tab-panel key={trial.label}>
5
- <div
6
- key={trial.label}
7
- class="button-toggle-container"
8
- if:false={trial.hideFilters}
9
- for:each={buttonLabels}
10
- for:item="buttonLabel"
11
- >
12
- <dx-button-toggle
13
- label={buttonLabel.title}
14
- key={buttonLabel.title}
15
- ontoggle={handleFilters}
16
- ></dx-button-toggle>
17
- </div>
18
- <template for:each={trial.categories} for:item="category">
19
- <dx-section
20
- key={category.title}
21
- class="section-container"
22
- title={category.title}
23
- heading-level="4"
2
+ <div class="panel-list-container">
3
+ <h2 class="title">{title}</h2>
4
+ <dx-tab-panel-list tabs={_tabs} onchange={handleTabChange}>
5
+ <template for:each={trials} for:item="trial">
6
+ <dx-tab-panel key={trial.label}>
7
+ <div
8
+ key={trial.label}
9
+ class="button-toggle-container"
10
+ if:false={trial.hideFilters}
11
+ for:each={buttonLabels}
12
+ for:item="buttonLabel"
24
13
  >
25
- <div class="card-container">
14
+ <dx-button-toggle
15
+ label={buttonLabel.title}
16
+ key={buttonLabel.title}
17
+ ontoggle={handleFilters}
18
+ ></dx-button-toggle>
19
+ </div>
20
+ <template for:each={trial.categories} for:item="category">
21
+ <div key={category.title} class="category-container">
22
+ <h2 class="dx-text-heading-4 category-title">
23
+ {category.title}
24
+ </h2>
26
25
  <template for:each={category.cards} for:item="card">
27
26
  <template if:true={card.hasModal}>
28
27
  <dx-card-trial
@@ -59,9 +58,9 @@
59
58
  </template>
60
59
  </template>
61
60
  </div>
62
- </dx-section>
63
- </template>
64
- </dx-tab-panel>
65
- </template>
66
- </dx-tab-panel-list>
61
+ </template>
62
+ </dx-tab-panel>
63
+ </template>
64
+ </dx-tab-panel-list>
65
+ </div>
67
66
  </template>
@@ -2,6 +2,8 @@ import { LightningElement, api, track } from "lwc";
2
2
  import { toJson } from "dxUtils/normalizers";
3
3
 
4
4
  export default class BrowseTrials extends LightningElement {
5
+ @api title = "Browse Trials";
6
+
5
7
  @api
6
8
  get trials() {
7
9
  return this._trials;