@newjersey/njwds 2.3.0 → 2.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newjersey/njwds",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "NJ Web Design Standards",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,21 +15,13 @@ variants:
15
15
  context:
16
16
  comboBox:
17
17
  defaultValue: "blackberry"
18
-
19
- - name: disabled
20
- label: Disabled
21
- context:
22
- comboBox:
23
- disabled: true
24
-
25
- - name: placeholder
26
- label: Placeholder
27
- context:
28
- comboBox:
29
- placeholder: "Select one..."
18
+ label: "Select a fruit"
19
+ name: "fruit"
30
20
 
31
21
  - name: required
32
22
  label: Required
33
23
  context:
34
24
  comboBox:
25
+ label: "Select a fruit"
26
+ name: "fruit"
35
27
  required: true
@@ -0,0 +1,16 @@
1
+ label: Select
2
+ status: ready
3
+ preview: "@uswds-framed"
4
+
5
+ variants:
6
+ - name: default
7
+ label: Default
8
+ context:
9
+ select:
10
+ label: "Dropdown label"
11
+ - name: default-value
12
+ label: Default Value
13
+ context:
14
+ select:
15
+ defaultValue: "value1"
16
+ label: "Dropdown label"
@@ -0,0 +1,13 @@
1
+ <form class="usa-form">
2
+ <label class="usa-label" for="options">{{ select.label }}</label>
3
+ <select
4
+ class="usa-select"
5
+ name="options"
6
+ id="options"
7
+ >
8
+ <option value>- Select -</option>
9
+ <option {% if select.defaultValue =="value1" %} selected="selected"{% endif %} value="value1">Option A</option>
10
+ <option value="value2">Option B</option>
11
+ <option value="value3">Option C</option>
12
+ </select>
13
+ </form>
@@ -1,9 +0,0 @@
1
- <form class="usa-form">
2
- <label class="usa-label" for="options">Dropdown label</label>
3
- <select class="usa-select" name="options" id="options">
4
- <option value>- Select -</option>
5
- <option value="value1">Option A</option>
6
- <option value="value2">Option B</option>
7
- <option value="value3">Option C</option>
8
- </select>
9
- </form>