@energysage/es-ds-components 6.0.0 → 6.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.1.0](https://github.com/EnergySage/es-ds/compare/es-ds-components-v6.0.0...es-ds-components-v6.1.0) (2026-09-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * allow centering of zip code form and add missing space ([#1786](https://github.com/EnergySage/es-ds/issues/1786)) ([595c59e](https://github.com/EnergySage/es-ds/commit/595c59ebba727bba829c99a4b0a32c98c018f23d))
9
+
3
10
  ## [6.0.0](https://github.com/EnergySage/es-ds/compare/es-ds-components-v5.7.3...es-ds-components-v6.0.0) (2026-09-08)
4
11
 
5
12
 
@@ -1,65 +1,39 @@
1
1
  <script setup lang="ts">
2
- const props = defineProps({
3
- constrained: {
4
- type: Boolean,
5
- default: false,
6
- },
7
- contextMessage: {
8
- type: String,
9
- default: '',
10
- },
11
- dark: {
12
- type: Boolean,
13
- default: false,
14
- },
15
- fieldName: {
16
- type: String,
17
- default: 'zip_code',
18
- },
19
- inputId: {
20
- type: String,
21
- required: true,
22
- },
23
- newTab: {
24
- type: Boolean,
25
- default: false,
26
- },
27
- placeholder: {
28
- type: String,
29
- default: 'ZIP code',
30
- },
31
- privacyPolicyLink: {
32
- type: String,
33
- default: '',
34
- },
35
- privacyPolicyNewTab: {
36
- type: Boolean,
37
- default: false,
38
- },
39
- replaceFieldNameInUrl: {
40
- type: Boolean,
41
- default: false,
42
- },
43
- selectedProduct: {
44
- type: String,
45
- default: '',
46
- },
47
- showPrivacySection: {
48
- type: Boolean,
49
- default: true,
50
- },
51
- stackUntil: {
52
- type: String,
53
- default: '',
54
- },
55
- url: {
56
- type: String,
57
- required: true,
58
- },
59
- zipCodeValue: {
60
- type: String,
61
- default: '',
62
- },
2
+ interface IProps {
3
+ align?: 'left' | 'center' | 'right';
4
+ constrained?: boolean;
5
+ contextMessage?: string;
6
+ dark?: boolean;
7
+ fieldName?: string;
8
+ inputId?: string;
9
+ newTab?: boolean;
10
+ placeholder?: string;
11
+ privacyPolicyLink?: string;
12
+ privacyPolicyNewTab?: boolean;
13
+ replaceFieldNameInUrl?: boolean;
14
+ selectedProduct?: string;
15
+ showPrivacySection?: boolean;
16
+ stackUntil?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | '';
17
+ url: string;
18
+ zipCodeValue?: string;
19
+ }
20
+
21
+ const props = withDefaults(defineProps<IProps>(), {
22
+ align: 'left',
23
+ constrained: false,
24
+ contextMessage: '',
25
+ dark: false,
26
+ fieldName: 'zip_code',
27
+ inputId: useId(),
28
+ newTab: false,
29
+ placeholder: 'ZIP code',
30
+ privacyPolicyLink: '',
31
+ privacyPolicyNewTab: false,
32
+ replaceFieldNameInUrl: false,
33
+ selectedProduct: '',
34
+ showPrivacySection: true,
35
+ stackUntil: '',
36
+ zipCodeValue: '',
63
37
  });
64
38
 
65
39
  const state = reactive({
@@ -189,18 +163,28 @@ const handleSubmit = () => {
189
163
  </form>
190
164
  <div
191
165
  v-if="showPrivacySection"
192
- class="d-flex text-left"
193
- :class="{ 'font-size-75': constrained }">
166
+ class="d-md-flex"
167
+ :class="{
168
+ 'font-size-75': constrained,
169
+ [`text-${align}`]: true,
170
+ 'd-flex justify-content-start': align === 'left',
171
+ 'justify-content-center': align === 'center',
172
+ 'justify-content-end': align === 'right',
173
+ }">
194
174
  <icon-lock-on
195
175
  aria-hidden="true"
196
176
  class="privacy-lock-icon flex-shrink-0 mr-50 position-relative"
197
- :class="{ 'mt-25': !constrained }"
177
+ :class="{
178
+ 'mt-md-25': !constrained,
179
+ 'mt-25': !constrained && align === 'left',
180
+ }"
198
181
  height="1.125rem"
199
182
  width="1.125rem" />
200
- <div>
183
+ <span>
201
184
  <span>
202
- <slot name="privacyExplanation"> Your information is safe with us. </slot>
185
+ <slot name="privacyExplanation">Your information is safe with us.</slot>
203
186
  </span>
187
+ {{ ' ' }}
204
188
  <nuxt-link
205
189
  v-if="privacyPolicyLink"
206
190
  :href="privacyPolicyLink"
@@ -209,7 +193,7 @@ const handleSubmit = () => {
209
193
  :target="privacyPolicyNewTab ? '_blank' : '_self'">
210
194
  <slot name="privacyPolicyLinkText">Privacy Policy</slot>
211
195
  </nuxt-link>
212
- </div>
196
+ </span>
213
197
  </div>
214
198
  </div>
215
199
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energysage/es-ds-components",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "An EnergySage Vue component library",