tide-design-system 2.2.15 → 2.2.16

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.
@@ -103,12 +103,21 @@ export const disabledArgType = {
103
103
 
104
104
  export const isProduction = process.env.NODE_ENV === 'production';
105
105
 
106
- export const doSomething = () => {
107
- alert('Did something.');
106
+ export const doSomething = (message: string = 'Did something.') => {
107
+ const doSomethingAlert = document.getElementById('do-something-alert');
108
+
109
+ if (!doSomethingAlert) return;
110
+
111
+ doSomethingAlert.innerHTML = message;
112
+ doSomethingAlert.style.opacity = '1';
113
+
114
+ setTimeout(() => {
115
+ doSomethingAlert.style.opacity = '0';
116
+ }, 1000);
108
117
  };
109
118
 
110
119
  export const doSomethingElse = () => {
111
- alert('Did something else.');
120
+ doSomething('Did something else.');
112
121
  };
113
122
 
114
123
  // Flatten a nested constant into a simple constant.
package/index.ts CHANGED
@@ -32,7 +32,7 @@ import TideSeoLinks from '@/components/TideSeoLinks.vue';
32
32
  import TideSheet from '@/components/TideSheet.vue';
33
33
  import TideSwitch from '@/components/TideSwitch.vue';
34
34
  import { ALERT } from '@/types/Alert';
35
- import { BADGE_TRUSTED } from '@/types/Badge';
35
+ import { BADGE_COLOR, BADGE_COLOR_DETAILS, BADGE_TRUSTED } from '@/types/Badge';
36
36
  import { BREAKPOINT, MEDIA } from '@/types/Breakpoint';
37
37
  import { TYPE_CARD } from '@/types/Card';
38
38
  import { ELEMENT, ELEMENT_TEXT_AS_ICON } from '@/types/Element';
@@ -161,6 +161,8 @@ export type {
161
161
 
162
162
  export {
163
163
  ALERT,
164
+ BADGE_COLOR,
165
+ BADGE_COLOR_DETAILS,
164
166
  BADGE_TRUSTED,
165
167
  BREAKPOINT,
166
168
  CSS,
package/package.json CHANGED
@@ -61,7 +61,7 @@
61
61
  "main": "dist/tide-design-system.cjs",
62
62
  "module": "dist/tide-design-system.esm.js",
63
63
  "types": "dist/tide-design-system.esm.d.ts",
64
- "version": "2.2.15",
64
+ "version": "2.2.16",
65
65
  "dependencies": {
66
66
  "@floating-ui/vue": "^1.1.6"
67
67
  }
@@ -78,7 +78,7 @@ button:disabled {
78
78
 
79
79
  /* cross-browser normalization */
80
80
  input::placeholder {
81
- color: var(--tide-gray); /* TODO: replace with an accessible light text color from design system */
81
+ color: var(--tide-gray-700);
82
82
  opacity: 1;
83
83
  }
84
84
 
@@ -411,9 +411,13 @@
411
411
  .lg-tide-shadow-top {box-shadow: var(--tide-shadow-top);}
412
412
  .lg-tide-shadow-text {text-shadow: var(--tide-shadow-text);}
413
413
 
414
- .lg-tide-text-center {text-align: center;}
415
- .lg-tide-text-left {text-align: left;}
416
- .lg-tide-text-right {text-align: right;}
414
+ .lg-tide-strikethrough {text-decoration: line-through;}
415
+ .lg-tide-strikethrough-none {text-decoration: none;}
416
+
417
+ .lg-tide-text-center {text-align: center;}
418
+ .lg-tide-text-justify {text-align: justify;}
419
+ .lg-tide-text-left {text-align: left;}
420
+ .lg-tide-text-right {text-align: right;}
417
421
 
418
422
  .lg-tide-text-transform-lower {text-transform: lowercase;}
419
423
  .lg-tide-text-transform-none {text-transform: none;}
@@ -411,9 +411,13 @@
411
411
  .md-tide-shadow-top {box-shadow: var(--tide-shadow-top);}
412
412
  .md-tide-shadow-text {text-shadow: var(--tide-shadow-text);}
413
413
 
414
- .md-tide-text-center {text-align: center;}
415
- .md-tide-text-left {text-align: left;}
416
- .md-tide-text-right {text-align: right;}
414
+ .md-tide-strikethrough {text-decoration: line-through;}
415
+ .md-tide-strikethrough-none {text-decoration: none;}
416
+
417
+ .md-tide-text-center {text-align: center;}
418
+ .md-tide-text-justify {text-align: justify;}
419
+ .md-tide-text-left {text-align: left;}
420
+ .md-tide-text-right {text-align: right;}
417
421
 
418
422
  .md-tide-text-transform-lower {text-transform: lowercase;}
419
423
  .md-tide-text-transform-none {text-transform: none;}
@@ -411,9 +411,13 @@
411
411
  .sm-tide-shadow-top {box-shadow: var(--tide-shadow-top);}
412
412
  .sm-tide-shadow-text {text-shadow: var(--tide-shadow-text);}
413
413
 
414
- .sm-tide-text-center {text-align: center;}
415
- .sm-tide-text-left {text-align: left;}
416
- .sm-tide-text-right {text-align: right;}
414
+ .sm-tide-strikethrough {text-decoration: line-through;}
415
+ .sm-tide-strikethrough-none {text-decoration: none;}
416
+
417
+ .sm-tide-text-center {text-align: center;}
418
+ .sm-tide-text-justify {text-align: justify;}
419
+ .sm-tide-text-left {text-align: left;}
420
+ .sm-tide-text-right {text-align: right;}
417
421
 
418
422
  .sm-tide-text-transform-lower {text-transform: lowercase;}
419
423
  .sm-tide-text-transform-none {text-transform: none;}
@@ -411,9 +411,13 @@
411
411
  .xl-tide-shadow-top {box-shadow: var(--tide-shadow-top);}
412
412
  .xl-tide-shadow-text {text-shadow: var(--tide-shadow-text);}
413
413
 
414
- .xl-tide-text-center {text-align: center;}
415
- .xl-tide-text-left {text-align: left;}
416
- .xl-tide-text-right {text-align: right;}
414
+ .xl-tide-strikethrough {text-decoration: line-through;}
415
+ .xl-tide-strikethrough-none {text-decoration: none;}
416
+
417
+ .xl-tide-text-center {text-align: center;}
418
+ .xl-tide-text-justify {text-align: justify;}
419
+ .xl-tide-text-left {text-align: left;}
420
+ .xl-tide-text-right {text-align: right;}
417
421
 
418
422
  .xl-tide-text-transform-lower {text-transform: lowercase;}
419
423
  .xl-tide-text-transform-none {text-transform: none;}
@@ -410,9 +410,13 @@
410
410
  .tide-shadow-top {box-shadow: var(--tide-shadow-top);}
411
411
  .tide-shadow-text {text-shadow: var(--tide-shadow-text);}
412
412
 
413
- .tide-text-center {text-align: center;}
414
- .tide-text-left {text-align: left;}
415
- .tide-text-right {text-align: right;}
413
+ .tide-strikethrough {text-decoration: line-through;}
414
+ .tide-strikethrough-none {text-decoration: none;}
415
+
416
+ .tide-text-center {text-align: center;}
417
+ .tide-text-justify {text-align: justify;}
418
+ .tide-text-left {text-align: left;}
419
+ .tide-text-right {text-align: right;}
416
420
 
417
421
  .tide-text-transform-lower {text-transform: lowercase;}
418
422
  .tide-text-transform-none {text-transform: none;}
@@ -53,7 +53,7 @@
53
53
  --tide-transparent-400: color-mix(in srgb, black 50%, transparent);
54
54
 
55
55
  /* Blur */
56
- --tide-bg-blur: var(--tide-bg-blur);
56
+ --tide-bg-blur: 8px;
57
57
 
58
58
  /* Global tonal palette */
59
59
  --tide-gray-100: #FFFFFF;
@@ -79,7 +79,7 @@
79
79
 
80
80
  <img
81
81
  :alt="alt"
82
- :class="[CSS.WIDTH.FULL, CSS.HEIGHT.FULL, CSS.OBJECT.CENTER, objectFitClassName]"
82
+ :class="['tide-image-img', CSS.WIDTH.FULL, CSS.HEIGHT.FULL, CSS.OBJECT.CENTER, objectFitClassName]"
83
83
  :fetchpriority="isLazy ? undefined : 'high'"
84
84
  :loading="props.isLazy ? 'lazy' : 'eager'"
85
85
  ref="img"
@@ -88,3 +88,9 @@
88
88
  />
89
89
  </picture>
90
90
  </template>
91
+
92
+ <style scoped>
93
+ .tide-image-img {
94
+ border-radius: inherit;
95
+ }
96
+ </style>
@@ -9,18 +9,16 @@
9
9
 
10
10
  type Props = {
11
11
  checked?: boolean;
12
- dataTrack?: string;
13
12
  disabled?: boolean;
14
13
  indeterminate?: boolean;
15
14
  inputId?: string;
16
15
  label: string;
17
16
  name: string;
18
- number?: number | undefined;
17
+ number?: number;
19
18
  };
20
19
 
21
20
  const props = withDefaults(defineProps<Props>(), {
22
21
  checked: false,
23
- dataTrack: '',
24
22
  disabled: false,
25
23
  indeterminate: false,
26
24
  inputId: undefined,
@@ -42,7 +40,6 @@
42
40
  CSS.FONT.ROLE.BODY_1,
43
41
  disabled ? ['disabled', CSS.POINTER_EVENTS.OFF] : CSS.CURSOR.POINTER,
44
42
  ]"
45
- :data-track="props.dataTrack"
46
43
  >
47
44
  <input
48
45
  :checked="isChecked"
@@ -81,7 +78,8 @@
81
78
  <label
82
79
  :class="[
83
80
  CSS.DISPLAY.FLEX,
84
- CSS.GAP.HALF,
81
+ CSS.AXIS1.BETWEEN,
82
+ CSS.FLEX.GROW.ON,
85
83
  CSS.FONT.ROLE.BODY_1,
86
84
  disabled ? CSS.CURSOR.NOT_ALLOWED : CSS.CURSOR.POINTER,
87
85
  ]"
@@ -2,22 +2,23 @@
2
2
  import { ref, watch } from 'vue';
3
3
 
4
4
  import { CSS } from '@/types/Styles';
5
+ import { formatNumber } from '@/utilities/format';
5
6
 
6
7
  type Props = {
7
8
  checked?: boolean;
8
- dataTrack?: string;
9
9
  disabled?: boolean;
10
10
  inputId?: string;
11
11
  label: string;
12
12
  name: string;
13
+ number?: number;
13
14
  };
14
15
 
15
16
  const props = withDefaults(defineProps<Props>(), {
16
17
  checked: false,
17
- dataTrack: '',
18
18
  disabled: false,
19
19
  inputId: undefined,
20
20
  label: undefined,
21
+ number: undefined,
21
22
  });
22
23
 
23
24
  const checked = ref(props.checked);
@@ -46,7 +47,6 @@
46
47
  <input
47
48
  :checked="checked"
48
49
  :class="[CSS.DISPLAY.NONE]"
49
- :data-track="props.dataTrack"
50
50
  :id="props.inputId"
51
51
  name=""
52
52
  type="radio"
@@ -73,10 +73,23 @@
73
73
  </div>
74
74
 
75
75
  <label
76
- :class="[CSS.FONT.ROLE.BODY_1, CSS.CURSOR.POINTER, CSS.POINTER_EVENTS.ON]"
76
+ :class="[
77
+ CSS.DISPLAY.FLEX,
78
+ CSS.FLEX.GROW.ON,
79
+ CSS.AXIS1.BETWEEN,
80
+ CSS.FONT.ROLE.BODY_1,
81
+ CSS.CURSOR.POINTER,
82
+ CSS.POINTER_EVENTS.ON,
83
+ ]"
77
84
  :for="props.inputId"
78
85
  >
79
- {{ props.label }}
86
+ <span>{{ label }}</span>
87
+ <span
88
+ :class="[CSS.FONT.COLOR.SURFACE.VARIANT]"
89
+ v-if="props.number"
90
+ >
91
+ ({{ formatNumber(props.number) }})
92
+ </span>
80
93
  </label>
81
94
  </div>
82
95
  </template>
@@ -15,7 +15,6 @@
15
15
 
16
16
  type Props = {
17
17
  autocomplete?: boolean;
18
- dataTrack?: string;
19
18
  disabled?: boolean;
20
19
  error?: ValidationError;
21
20
  hasClear?: boolean;
@@ -37,7 +36,6 @@
37
36
 
38
37
  const props = withDefaults(defineProps<Props>(), {
39
38
  autocomplete: false,
40
- dataTrack: '',
41
39
  disabled: false,
42
40
  error: false,
43
41
  hasClear: false,
@@ -70,7 +68,7 @@
70
68
  );
71
69
  const hasMinilabel = computed(() => hasFocus.value || !isEmpty.value);
72
70
  const isEmpty = computed(() => value.value === '' || value.value === undefined);
73
- const type = computed(() =>
71
+ const inputType = computed(() =>
74
72
  props.type === TEXT_INPUT_TYPE.PASSWORD && showPassword.value === true ? TEXT_INPUT_TYPE.TEXT : props.type
75
73
  );
76
74
 
@@ -145,9 +143,9 @@
145
143
  hasError && 'error',
146
144
  ]"
147
145
  >
148
- <div
146
+ <label
149
147
  :class="[
150
- 'tide-input-border',
148
+ 'tide-input-text-field',
151
149
  CSS.DISPLAY.FLEX,
152
150
  CSS.AXIS2.CENTER,
153
151
  CSS.GAP.HALF,
@@ -156,14 +154,15 @@
156
154
  CSS.BG.SURFACE.DEFAULT,
157
155
  hasClear ? [CSS.PADDING.RIGHT.HALF, CSS.PADDING.LEFT.ONE] : [CSS.PADDING.X.ONE],
158
156
  CSS.PADDING.Y.HALF,
159
- props.disabled ? CSS.CURSOR.NOT_ALLOWED : CSS.CURSOR.TEXT,
157
+ disabled ? CSS.CURSOR.NOT_ALLOWED : CSS.CURSOR.TEXT,
160
158
  ]"
159
+ :for="inputId"
161
160
  >
162
161
  <TideIcon
163
162
  :class="[CSS.FONT.COLOR.SURFACE.VARIANT]"
164
- :icon="props.iconLeading"
163
+ :icon="iconLeading"
165
164
  :size="SIZE.SMALL"
166
- v-if="props.iconLeading"
165
+ v-if="iconLeading"
167
166
  />
168
167
 
169
168
  <div :class="[CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.GAP.QUARTER, CSS.WIDTH.FULL]">
@@ -171,48 +170,43 @@
171
170
  :class="[
172
171
  'tide-input-text-prefix',
173
172
  CSS.FONT.ROLE.BODY_1,
174
- ,
175
173
  !hasError && CSS.FONT.COLOR.SURFACE.VARIANT,
176
174
  hasMinilabel ? '' : 'offset',
177
175
  ]"
178
- v-if="props.prefix"
176
+ v-if="prefix"
179
177
  >
180
- {{ props.prefix }}
178
+ {{ prefix }}
181
179
  </div>
182
180
 
183
- <div
184
- :class="[CSS.DISPLAY.FLEX, CSS.FLEX.DIRECTION.COLUMN, CSS.WIDTH.FULL]"
185
- @click.prevent="input?.focus()"
186
- >
187
- <label
181
+ <div :class="[CSS.DISPLAY.FLEX, CSS.FLEX.DIRECTION.COLUMN, CSS.WIDTH.FULL]">
182
+ <div
188
183
  :class="[
184
+ 'tide-input-text-label',
189
185
  hasMinilabel ? ['minilabel', CSS.FONT.ROLE.LABEL_3] : CSS.FONT.ROLE.LABEL_1,
190
186
  !hasError && CSS.FONT.COLOR.SURFACE.VARIANT,
191
187
  CSS.CURSOR.TEXT,
192
188
  CSS.POINTER_EVENTS.OFF,
193
189
  ]"
194
- :for="props.inputId"
195
190
  v-if="label"
196
191
  >
197
192
  {{ formattedLabel }}
198
- </label>
193
+ </div>
199
194
 
200
195
  <input
201
196
  :autocomplete="autocomplete ? 'on' : 'off'"
202
197
  :class="[CSS.WIDTH.FULL, disabled && CSS.CURSOR.NOT_ALLOWED, CSS.FONT.ROLE.BODY_1]"
203
- :data-track="props.dataTrack"
204
- :disabled="props.disabled"
205
- :maxlength="props.maxlength"
206
- :minlength="props.minlength"
207
- :name="props.name"
198
+ :disabled="disabled"
199
+ :maxlength="maxlength"
200
+ :minlength="minlength"
201
+ :name="name"
208
202
  ref="input"
209
- :required="props.required"
210
- :type="type"
203
+ :required="required"
204
+ :type="inputType"
211
205
  @change="handleValidation"
212
206
  @focus="handleFocus"
213
207
  @focusout="handleFocusOut"
214
208
  @input="handleInput"
215
- :id="props.inputId"
209
+ :id="inputId"
216
210
  v-model="value"
217
211
  />
218
212
  </div>
@@ -224,32 +218,38 @@
224
218
  !hasError && CSS.FONT.COLOR.SURFACE.VARIANT,
225
219
  hasMinilabel ? '' : 'offset',
226
220
  ]"
227
- v-if="props.suffix"
221
+ v-if="suffix"
228
222
  >
229
- {{ props.suffix }}
223
+ {{ suffix }}
230
224
  </div>
231
225
  </div>
232
226
 
233
- <TideIcon
234
- :class="[CSS.PADDING.Y.HALF, CSS.PADDING.FULL.HALF, CSS.CURSOR.POINTER]"
235
- :icon="ICON.CLOSE"
236
- :size="SIZE.SMALL"
227
+ <button
237
228
  @click="handleClear"
238
- v-if="hasClear && props.type !== TEXT_INPUT_TYPE.PASSWORD"
239
- />
240
-
241
- <TideIcon
242
- :class="[CSS.PADDING.Y.HALF, CSS.PADDING.FULL.HALF, CSS.CURSOR.POINTER]"
243
- :icon="ICON.VISIBILITY"
244
- :size="SIZE.SMALL"
229
+ v-if="hasClear && type !== TEXT_INPUT_TYPE.PASSWORD"
230
+ >
231
+ <TideIcon
232
+ :class="[CSS.MARGIN.FULL.HALF]"
233
+ :icon="ICON.CLOSE"
234
+ :size="SIZE.SMALL"
235
+ />
236
+ </button>
237
+
238
+ <button
245
239
  @click="showPassword = !showPassword"
246
- v-if="props.type === TEXT_INPUT_TYPE.PASSWORD"
247
- />
248
- </div>
240
+ v-if="type === TEXT_INPUT_TYPE.PASSWORD"
241
+ >
242
+ <TideIcon
243
+ :class="[CSS.MARGIN.FULL.HALF]"
244
+ :icon="ICON.VISIBILITY"
245
+ :size="SIZE.SMALL"
246
+ />
247
+ </button>
248
+ </label>
249
249
 
250
250
  <div
251
251
  :class="[CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.GAP.QUARTER]"
252
- v-if="props.supportingText || hasError"
252
+ v-if="supportingText || hasError"
253
253
  >
254
254
  <TideIcon
255
255
  :class="[]"
@@ -259,19 +259,19 @@
259
259
  />
260
260
 
261
261
  <div :class="[CSS.FONT.ROLE.LABEL_3]">
262
- {{ hasError ? errorMessage : props.supportingText }}
262
+ {{ hasError ? errorMessage : supportingText }}
263
263
  </div>
264
264
  </div>
265
265
  </div>
266
266
  </template>
267
267
 
268
268
  <style scoped>
269
- label {
269
+ .tide-input-text-label {
270
270
  height: 1.1875rem;
271
271
  transition: font-size var(--tide-animate), transform var(--tide-animate);
272
272
  }
273
273
 
274
- label:not(.minilabel),
274
+ .tide-input-text-label:not(.minilabel),
275
275
  .tide-input-text-prefix:not(.offset),
276
276
  .tide-input-text-suffix:not(.offset) {
277
277
  transform: translate(0, calc(9 / 16 * 1rem));
@@ -290,16 +290,16 @@
290
290
  color: var(--tide-error-primary);
291
291
  }
292
292
 
293
- .tide-input-text.error .tide-input-border {
293
+ .tide-input-text.error .tide-input-text-field {
294
294
  outline-color: var(--tide-error-border);
295
295
  background-color: var(--tide-error-surface);
296
296
  }
297
297
 
298
- .tide-input-text.error:focus-within .tide-input-border {
298
+ .tide-input-text.error:focus-within .tide-input-text-field {
299
299
  outline-color: var(--tide-error-border);
300
300
  }
301
301
 
302
- .tide-input-text:focus-within .tide-input-border {
302
+ .tide-input-text:focus-within .tide-input-text-field {
303
303
  --tide-input-outline-width: var(--tide-border-width-2);
304
304
  outline-color: var(--tide-surface-border-high);
305
305
  }
@@ -308,7 +308,7 @@
308
308
  outline: none;
309
309
  }
310
310
 
311
- .tide-input-border {
311
+ .tide-input-text-field {
312
312
  --tide-input-outline-width: var(--tide-border-width-1);
313
313
  outline: var(--tide-input-outline-width) solid var(--tide-border);
314
314
  outline-offset: calc(var(--tide-input-outline-width) * -1);
@@ -10,7 +10,6 @@
10
10
  import type { ValidationError } from '@/types/Validation';
11
11
 
12
12
  type Props = {
13
- dataTrack?: string;
14
13
  error?: ValidationError;
15
14
  inputId?: string;
16
15
  label?: string;
@@ -24,7 +23,6 @@
24
23
  };
25
24
 
26
25
  const props = withDefaults(defineProps<Props>(), {
27
- dataTrack: '',
28
26
  error: false,
29
27
  inputId: undefined,
30
28
  label: undefined,
@@ -93,7 +91,7 @@
93
91
  <div
94
92
  :class="['tide-input-textarea', CSS.DISPLAY.FLEX, CSS.FLEX.DIRECTION.COLUMN, CSS.GAP.QUARTER, hasError && 'error']"
95
93
  >
96
- <div
94
+ <label
97
95
  :class="[
98
96
  'tide-input-textarea-field',
99
97
  CSS.GAP.HALF,
@@ -103,42 +101,41 @@
103
101
  CSS.PADDING.TOP.HALF,
104
102
  CSS.OVERFLOW.XY.HIDDEN,
105
103
  CSS.BG.SURFACE.DEFAULT,
104
+ CSS.CURSOR.TEXT,
106
105
  ]"
106
+ :for="inputId"
107
107
  >
108
- <label
108
+ <div
109
109
  :class="[
110
+ 'tide-input-textarea-label',
110
111
  hasMinilabel ? ['minilabel', CSS.FONT.ROLE.LABEL_3] : CSS.FONT.ROLE.LABEL_1,
111
112
  !hasError && CSS.FONT.COLOR.SURFACE.VARIANT,
112
- CSS.CURSOR.TEXT,
113
113
  CSS.POINTER_EVENTS.OFF,
114
114
  ]"
115
- :for="props.inputId"
116
- ref="label"
117
115
  v-if="label"
118
116
  >
119
117
  {{ formattedLabel }}
120
- </label>
118
+ </div>
121
119
 
122
120
  <textarea
123
- :class="[CSS.WIDTH.FULL, CSS.FONT.ROLE.BODY_1]"
124
- :data-track="props.dataTrack"
125
- :maxlength="props.maxlength"
126
- :minlength="props.minlength"
127
- :name="props.name"
121
+ :class="[CSS.DISPLAY.BLOCK, CSS.WIDTH.FULL, CSS.FONT.ROLE.BODY_1]"
122
+ :maxlength="maxlength"
123
+ :minlength="minlength"
124
+ :name="name"
128
125
  ref="input"
129
- :required="props.required"
130
- :rows="props.rows"
126
+ :required="required"
127
+ :rows="rows"
131
128
  @change="handleValidation"
132
129
  @focus="handleFocus"
133
130
  @focusout="handleFocusOut"
134
- :id="props.inputId"
131
+ :id="inputId"
135
132
  v-model="value"
136
133
  />
137
- </div>
134
+ </label>
138
135
 
139
136
  <div
140
137
  :class="[CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.GAP.QUARTER]"
141
- v-if="props.supportingText || hasError"
138
+ v-if="supportingText || hasError"
142
139
  >
143
140
  <TideIcon
144
141
  :icon="ICON.ERROR"
@@ -147,7 +144,7 @@
147
144
  />
148
145
 
149
146
  <div :class="[CSS.FONT.ROLE.LABEL_3]">
150
- {{ hasError ? errorMessage : props.supportingText }}
147
+ {{ hasError ? errorMessage : supportingText }}
151
148
  </div>
152
149
  </div>
153
150
  </div>
@@ -157,10 +154,8 @@
157
154
  textarea {
158
155
  resize: vertical;
159
156
  }
160
- </style>
161
157
 
162
- <style scoped>
163
- label {
158
+ .tide-input-textarea-label {
164
159
  height: 1.1875rem;
165
160
  transition: font-size var(--tide-animate), transform var(--tide-animate);
166
161
  }
@@ -35,8 +35,9 @@
35
35
  const handlePermanentOpenBodyClick = (e: MouseEvent) => {
36
36
  if (!anchor.value || !floating.value) return;
37
37
  if (isClickOutside(e, [anchor.value, floating.value])) {
38
- e.stopImmediatePropagation();
39
38
  isToggledOpen.value = false;
39
+ e.preventDefault();
40
+ e.stopImmediatePropagation();
40
41
  }
41
42
  };
42
43
 
@@ -49,9 +50,13 @@
49
50
  };
50
51
 
51
52
  const handleAnchorElementClick = (e: MouseEvent) => {
52
- isToggledOpen.value = true;
53
- e.stopPropagation();
54
53
  e.preventDefault();
54
+ if (isToggledOpen.value) {
55
+ isToggledOpen.value = false;
56
+ isHovered.value = false;
57
+ } else {
58
+ isToggledOpen.value = true;
59
+ }
55
60
  };
56
61
 
57
62
  const addListenersToAnchorElement = () => {
@@ -1,4 +1,6 @@
1
- <script lang="ts" setup></script>
1
+ <script lang="ts" setup>
2
+ import {} from '../../../index';
3
+ </script>
2
4
 
3
5
  <template>
4
6
  <div />
@@ -64,6 +64,14 @@ export default {
64
64
  type: { summary: 'string' },
65
65
  },
66
66
  },
67
+ number: {
68
+ control: 'text',
69
+ description: 'Parenthetical response count',
70
+ table: {
71
+ defaultValue: { summary: 'None' },
72
+ type: { summary: 'number' },
73
+ },
74
+ },
67
75
  },
68
76
  args: {
69
77
  checked: undefined,
@@ -73,6 +81,7 @@ export default {
73
81
  inputId: '',
74
82
  label: 'Input label',
75
83
  name: '',
84
+ number: '',
76
85
  },
77
86
  component: TideInputRadio,
78
87
  parameters,