Skip to content

Commit 824faaf

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents 57aa143 + 17c741b commit 824faaf

14 files changed

Lines changed: 29 additions & 31 deletions

File tree

src/components/Checkbox/Checkbox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { UseUniqueId } from '@/use';
4646
import MinusMinor from '@icons/MinusMinor.svg';
4747
import TickSmallMinor from '@icons/TickSmallMinor.svg';
4848
import styles from '@/classes/Checkbox.json';
49-
import type { Error } from '@/utilities/type';
49+
import type { ErrorType } from '@/utilities/type';
5050
import { Key } from '../KeypressListener/utils';
5151
import { errorTextID } from '../InlineError/utils';
5252
import { Choice } from '../Choice';
@@ -73,7 +73,7 @@ interface Props {
7373
/** Value for v-model binding */
7474
modelValue?: string | boolean;
7575
/** Display an error message */
76-
error?: Error | boolean;
76+
error?: ErrorType | boolean;
7777
}
7878
7979
const isWithinListbox = inject<boolean>('withinListboxContext', false);

src/components/Choice/Choice.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ label(
3939
import { computed } from 'vue';
4040
import { classNames } from 'polaris/polaris-react/src/utilities/css';
4141
import styles from '@/classes/Choice.json';
42-
import type { Error } from '@/utilities/type';
42+
import type { ErrorType } from '@/utilities/type';
4343
import { helpTextID } from './utils';
4444
import { InlineError } from '../InlineError';
4545
@@ -49,7 +49,7 @@ interface Props {
4949
/** Whether the associated form control is disabled */
5050
disabled?: boolean;
5151
/** Display an error message */
52-
error?: Error | boolean;
52+
error?: ErrorType | boolean;
5353
/** Visually hide the label */
5454
labelHidden?: boolean;
5555
}

src/components/ChoiceList/ChoiceList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import { computed, useSlots } from 'vue';
4343
import { classNames } from 'polaris/polaris-react/src/utilities/css';
4444
import { UseUniqueId } from '@/use';
4545
import styles from '@/classes/ChoiceList.json';
46-
import type { Error } from '@/utilities/type';
46+
import type { ErrorType } from '@/utilities/type';
4747
import { Checkbox } from '../Checkbox';
4848
import { RadioButton } from '../RadioButton';
4949
import { InlineError } from '../InlineError';
@@ -70,7 +70,7 @@ interface Props {
7070
/** Toggles display of the title */
7171
titleHidden?: boolean;
7272
/** Display an error message */
73-
error?: Error;
73+
error?: ErrorType;
7474
/** Disable all choices */
7575
disabled?: boolean;
7676
}

src/components/Combobox/components/TextField/TextField.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PolarisTextField(
3333
import { inject, computed, watch } from 'vue';
3434
import { UseUniqueId } from '@/use';
3535
import type { ComboboxTextFieldType } from '@/utilities/interface';
36-
import type { Error } from '@/utilities/type';
36+
import type { ErrorType } from '@/utilities/type';
3737
import type { LabelledProps } from '../../../Labelled/utils'
3838
import { labelID } from '../../../Label/utils';
3939
import { TextField as PolarisTextField } from '../../../TextField';
@@ -89,7 +89,7 @@ interface TextFieldProps {
8989
/** Allow for multiple lines of input */
9090
multiline?: boolean | number;
9191
/** Error to display beneath the label */
92-
error?: Error | boolean;
92+
error?: ErrorType | boolean;
9393
/** Determine type of input */
9494
type?: Type;
9595
/** Name of the input */
@@ -188,7 +188,7 @@ const handleFocus = (): void => {
188188
setTextFieldFocused(true);
189189
}
190190
};
191-
191+
192192
const handleBlur = (): void => {
193193
emits('blur');
194194

src/components/InlineError/InlineError.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ div(
1616
<script setup lang="ts">
1717
import AlertMinor from '@icons/AlertMinor.svg';
1818
import styles from '@/classes/InlineError.json';
19-
import type { Error } from '@/utilities/type';
19+
import type { ErrorType } from '@/utilities/type';
2020
import { errorTextID } from './utils';
2121
import { Icon } from '../Icon';
2222
2323
interface Props {
2424
/** Content briefly explaining how to resolve the invalid form field input. */
25-
message: Error;
25+
message: ErrorType;
2626
/** Unique identifier of the invalid form field that the message describes */
2727
fieldID: string;
2828
}

src/components/Labelled/Labelled.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ div(:class="className")
4242
import { computed } from 'vue';
4343
import { classNames } from 'polaris/polaris-react/src/utilities/css';
4444
import styles from '@/classes/Labelled.json';
45-
import type { Action, Error } from '@/utilities/type';
45+
import type { Action, ErrorType } from '@/utilities/type';
4646
import { ButtonFrom } from '@/components';
4747
import type { LabelProps } from '../Label/utils';
4848
import { Label } from '../Label';
@@ -53,7 +53,7 @@ interface LabelledProps {
5353
/** A unique identifier for the label */
5454
id: LabelProps['id'];
5555
/** Error to display beneath the label */
56-
error?: Error | boolean;
56+
error?: ErrorType | boolean;
5757
/** An action */
5858
action?: Action;
5959
/** Visually hide the label */

src/components/Labelled/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Action, Error } from '@/utilities/type';
1+
import type { Action, ErrorType } from '@/utilities/type';
22
import { labelID } from '../Label/utils';
33
import type { LabelProps } from "../Label/utils";
44

@@ -16,7 +16,7 @@ export interface LabelledProps {
1616
/** A unique identifier for the label */
1717
id: LabelProps['id'];
1818
/** Error to display beneath the label */
19-
error?: Error | boolean;
19+
error?: ErrorType | boolean;
2020
/** An action */
2121
action?: Action;
2222
/** Visually hide the label */

src/components/RangeSlider/RangeSlider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SingleThumb(
3838
import { computed, useSlots } from 'vue';
3939
import { UseUniqueId } from '@/use';
4040
import type { LabelledProps } from '@/components/Labelled/utils';
41-
import type { Error } from '@/utilities/type';
41+
import type { ErrorType } from '@/utilities/type';
4242
import type { RangeSliderValue } from './types';
4343
import { SingleThumb, DualThumb } from './components';
4444
@@ -60,7 +60,7 @@ interface RangeSliderProps {
6060
/** Provide a tooltip while sliding, indicating the current value */
6161
output?: boolean;
6262
/** Display an error message */
63-
error?: Error;
63+
error?: ErrorType;
6464
/** Disable input */
6565
disabled?: boolean;
6666
}

src/components/RangeSlider/components/DualThumb/DualThumb.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import isEqual from 'lodash/isEqual';
9393
import { classNames } from 'polaris/polaris-react/src/utilities/css';
9494
import { Labelled, EventListener } from '@/components';
9595
import type { LabelledProps } from '@/components/Labelled/utils';
96-
import type { Error } from '@/utilities/type';
96+
import type { ErrorType } from '@/utilities/type';
9797
import { labelID } from '@/components/Label/utils';
9898
import { Key } from '@/components/KeypressListener/utils';
9999
import { hasSlot } from '@/utilities/has-slot';
@@ -119,7 +119,7 @@ interface DualThumbProps {
119119
/** Provide a tooltip while sliding, indicating the current value */
120120
output?: boolean;
121121
/** Display an error message */
122-
error?: Error;
122+
error?: ErrorType;
123123
/** Disable input */
124124
disabled?: boolean;
125125
}

src/components/RangeSlider/components/SingleThumb/SingleThumb.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import styles from '@/classes/RangeSlider-SingleThumb.json';
6060
import sharedStyles from '@/classes/RangeSlider.json';
6161
6262
import type { LabelledProps } from '@/components/Labelled/utils';
63-
import type { Error } from '@/utilities/type';
63+
import type { ErrorType } from '@/utilities/type';
6464
6565
interface SingleThumbProps {
6666
/** Adds an action to the label */
@@ -80,7 +80,7 @@ interface SingleThumbProps {
8080
/** Provide a tooltip while sliding, indicating the current value */
8181
output?: boolean;
8282
/** Display an error message */
83-
error?: Error;
83+
error?: ErrorType;
8484
/** Disable input */
8585
disabled?: boolean;
8686
}
@@ -90,7 +90,6 @@ const slots = useSlots();
9090
9191
const emits = defineEmits<{
9292
(e: 'input', value: number, id: string): void;
93-
(e: 'update:modelValue', value: number, id: string): void;
9493
(e: 'focus'): void;
9594
(e: 'blur'): void;
9695
}>();
@@ -127,7 +126,6 @@ const className = computed(() => classNames(
127126
));
128127
129128
const handleChange = (event: Event) => {
130-
emits('update:modelValue', parseFloat((event.target as HTMLInputElement).value), props.id);
131129
emits('input', parseFloat((event.target as HTMLInputElement).value), props.id);
132130
}
133131
</script>

0 commit comments

Comments
 (0)