shopify-nuxt 0.0.1 → 0.0.3
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/LICENSE +21 -0
- package/README.md +293 -29
- package/dist/module.json +1 -1
- package/dist/module.mjs +25 -6
- package/dist/runtime/components/polaris/ShAvatar.vue +4 -2
- package/dist/runtime/components/polaris/ShBadge.vue +4 -2
- package/dist/runtime/components/polaris/ShBanner.vue +4 -2
- package/dist/runtime/components/polaris/ShBox.vue +4 -2
- package/dist/runtime/components/polaris/ShButton.d.vue.ts +11 -3
- package/dist/runtime/components/polaris/ShButton.vue +10 -2
- package/dist/runtime/components/polaris/ShButton.vue.d.ts +11 -3
- package/dist/runtime/components/polaris/ShButtonGroup.vue +4 -2
- package/dist/runtime/components/polaris/ShCheckbox.d.vue.ts +12 -5
- package/dist/runtime/components/polaris/ShCheckbox.vue +22 -5
- package/dist/runtime/components/polaris/ShCheckbox.vue.d.ts +12 -5
- package/dist/runtime/components/polaris/ShChip.vue +4 -2
- package/dist/runtime/components/polaris/ShChoice.vue +4 -2
- package/dist/runtime/components/polaris/ShChoiceList.d.vue.ts +12 -4
- package/dist/runtime/components/polaris/ShChoiceList.vue +21 -3
- package/dist/runtime/components/polaris/ShChoiceList.vue.d.ts +12 -4
- package/dist/runtime/components/polaris/ShClickable.vue +4 -2
- package/dist/runtime/components/polaris/ShClickableChip.vue +4 -2
- package/dist/runtime/components/polaris/ShColorField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShColorField.vue +24 -4
- package/dist/runtime/components/polaris/ShColorField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShColorPicker.d.vue.ts +12 -4
- package/dist/runtime/components/polaris/ShColorPicker.vue +21 -3
- package/dist/runtime/components/polaris/ShColorPicker.vue.d.ts +12 -4
- package/dist/runtime/components/polaris/ShDateField.d.vue.ts +20 -4
- package/dist/runtime/components/polaris/ShDateField.vue +25 -3
- package/dist/runtime/components/polaris/ShDateField.vue.d.ts +20 -4
- package/dist/runtime/components/polaris/ShDatePicker.d.vue.ts +18 -4
- package/dist/runtime/components/polaris/ShDatePicker.vue +24 -3
- package/dist/runtime/components/polaris/ShDatePicker.vue.d.ts +18 -4
- package/dist/runtime/components/polaris/ShDivider.vue +4 -2
- package/dist/runtime/components/polaris/ShDropZone.d.vue.ts +14 -4
- package/dist/runtime/components/polaris/ShDropZone.vue +22 -3
- package/dist/runtime/components/polaris/ShDropZone.vue.d.ts +14 -4
- package/dist/runtime/components/polaris/ShEmailField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShEmailField.vue +24 -4
- package/dist/runtime/components/polaris/ShEmailField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShGrid.vue +4 -2
- package/dist/runtime/components/polaris/ShGridItem.vue +4 -2
- package/dist/runtime/components/polaris/ShHeading.vue +4 -2
- package/dist/runtime/components/polaris/ShIcon.vue +4 -2
- package/dist/runtime/components/polaris/ShImage.vue +4 -2
- package/dist/runtime/components/polaris/ShLink.vue +4 -2
- package/dist/runtime/components/polaris/ShMenu.vue +4 -2
- package/dist/runtime/components/polaris/ShModal.vue +4 -2
- package/dist/runtime/components/polaris/ShMoneyField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShMoneyField.vue +24 -4
- package/dist/runtime/components/polaris/ShMoneyField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShNumberField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShNumberField.vue +24 -4
- package/dist/runtime/components/polaris/ShNumberField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShOption.vue +4 -2
- package/dist/runtime/components/polaris/ShOptionGroup.vue +4 -2
- package/dist/runtime/components/polaris/ShPage.vue +4 -2
- package/dist/runtime/components/polaris/ShParagraph.vue +4 -2
- package/dist/runtime/components/polaris/ShPasswordField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShPasswordField.vue +24 -4
- package/dist/runtime/components/polaris/ShPasswordField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShPopover.d.vue.ts +1 -0
- package/dist/runtime/components/polaris/ShPopover.vue +5 -2
- package/dist/runtime/components/polaris/ShPopover.vue.d.ts +1 -0
- package/dist/runtime/components/polaris/ShQueryContainer.vue +4 -2
- package/dist/runtime/components/polaris/ShSearchField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShSearchField.vue +24 -4
- package/dist/runtime/components/polaris/ShSearchField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShSection.vue +4 -2
- package/dist/runtime/components/polaris/ShSelect.d.vue.ts +12 -4
- package/dist/runtime/components/polaris/ShSelect.vue +22 -4
- package/dist/runtime/components/polaris/ShSelect.vue.d.ts +12 -4
- package/dist/runtime/components/polaris/ShSpinner.vue +4 -2
- package/dist/runtime/components/polaris/ShStack.vue +4 -2
- package/dist/runtime/components/polaris/ShSwitch.d.vue.ts +12 -5
- package/dist/runtime/components/polaris/ShSwitch.vue +22 -5
- package/dist/runtime/components/polaris/ShSwitch.vue.d.ts +12 -5
- package/dist/runtime/components/polaris/ShTable.vue +4 -2
- package/dist/runtime/components/polaris/ShTableHeader.vue +4 -2
- package/dist/runtime/components/polaris/ShTableRow.vue +4 -2
- package/dist/runtime/components/polaris/ShText.vue +4 -2
- package/dist/runtime/components/polaris/ShTextArea.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShTextArea.vue +24 -4
- package/dist/runtime/components/polaris/ShTextArea.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShTextField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShTextField.vue +24 -4
- package/dist/runtime/components/polaris/ShTextField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/ShThumbnail.vue +4 -2
- package/dist/runtime/components/polaris/ShTooltip.d.vue.ts +4 -1
- package/dist/runtime/components/polaris/ShTooltip.vue +6 -1
- package/dist/runtime/components/polaris/ShTooltip.vue.d.ts +4 -1
- package/dist/runtime/components/polaris/ShUrlField.d.vue.ts +16 -4
- package/dist/runtime/components/polaris/ShUrlField.vue +24 -4
- package/dist/runtime/components/polaris/ShUrlField.vue.d.ts +16 -4
- package/dist/runtime/components/polaris/utils.d.ts +7 -0
- package/dist/runtime/components/polaris/utils.js +13 -0
- package/dist/runtime/composables/useAppBridge.d.ts +4 -1
- package/dist/runtime/composables/useAppBridge.js +24 -13
- package/dist/runtime/composables/useShopifyFetch.js +3 -1
- package/dist/runtime/middleware/shopify-auth.js +10 -4
- package/dist/runtime/pages/auth-login.d.vue.ts +3 -0
- package/dist/runtime/pages/auth-login.vue +90 -0
- package/dist/runtime/pages/auth-login.vue.d.ts +3 -0
- package/dist/runtime/server/index.d.ts +2 -0
- package/dist/runtime/server/index.js +4 -0
- package/dist/runtime/server/plugins/shopify-defaults.d.ts +8 -0
- package/dist/runtime/server/plugins/shopify-defaults.js +12 -0
- package/dist/runtime/server/routes/auth-callback.d.ts +1 -1
- package/dist/runtime/server/routes/auth-exit-iframe.d.ts +1 -1
- package/dist/runtime/server/routes/auth-session-token.d.ts +1 -1
- package/dist/runtime/server/routes/auth.d.ts +1 -1
- package/dist/runtime/server/services/shopify.js +3 -3
- package/dist/runtime/server/utils/authenticate-admin.js +21 -6
- package/dist/runtime/server/utils/clients.d.ts +24 -5
- package/dist/runtime/server/utils/clients.js +21 -2
- package/dist/runtime/server/utils/helpers.js +13 -11
- package/dist/runtime/server/utils/unauthenticated-storefront.d.ts +1 -5
- package/dist/runtime/server/utils/unauthenticated-storefront.js +2 -8
- package/dist/runtime/types.d.ts +33 -2
- package/package.json +10 -5
- package/dist/runtime/components/ShopifyAppProvider.d.vue.ts +0 -13
- package/dist/runtime/components/ShopifyAppProvider.vue +0 -11
- package/dist/runtime/components/ShopifyAppProvider.vue.d.ts +0 -13
- package/dist/runtime/plugins/polaris.d.ts +0 -1
- package/dist/runtime/plugins/polaris.js +0 -0
|
@@ -13,11 +13,19 @@ type __VLS_Props = {
|
|
|
13
13
|
commandFor?: string;
|
|
14
14
|
interestFor?: string;
|
|
15
15
|
};
|
|
16
|
-
declare var
|
|
16
|
+
declare var __VLS_12: {};
|
|
17
17
|
type __VLS_Slots = {} & {
|
|
18
|
-
default?: (props: typeof
|
|
18
|
+
default?: (props: typeof __VLS_12) => any;
|
|
19
19
|
};
|
|
20
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
click: (event: MouseEvent) => void;
|
|
22
|
+
blur: (event: FocusEvent) => void;
|
|
23
|
+
focus: (event: FocusEvent) => void;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
26
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
27
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
30
|
declare const _default: typeof __VLS_export;
|
|
23
31
|
export default _default;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-button-group v-bind="
|
|
2
|
+
<s-button-group v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-button-group>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShButtonGroup", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
gap: { type: String, required: false },
|
|
11
12
|
accessibilityLabel: { type: String, required: false }
|
|
12
13
|
});
|
|
14
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
13
15
|
</script>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
indeterminate?: boolean;
|
|
3
3
|
defaultIndeterminate?: boolean;
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
value?: string;
|
|
6
4
|
defaultChecked?: boolean;
|
|
7
5
|
accessibilityLabel?: string;
|
|
8
6
|
details?: string;
|
|
@@ -12,12 +10,21 @@ type __VLS_Props = {
|
|
|
12
10
|
disabled?: boolean;
|
|
13
11
|
id?: string;
|
|
14
12
|
name?: string;
|
|
13
|
+
modelValue?: boolean;
|
|
15
14
|
};
|
|
16
|
-
declare var
|
|
15
|
+
declare var __VLS_11: {};
|
|
17
16
|
type __VLS_Slots = {} & {
|
|
18
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_11) => any;
|
|
19
18
|
};
|
|
20
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (v: boolean) => void;
|
|
21
|
+
input: (event: Event) => void;
|
|
22
|
+
change: (event: Event) => void;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
25
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
26
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
29
|
declare const _default: typeof __VLS_export;
|
|
23
30
|
export default _default;
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-checkbox
|
|
2
|
+
<s-checkbox
|
|
3
|
+
v-bind="polarisAttrs"
|
|
4
|
+
:checked="modelValue"
|
|
5
|
+
@change="
|
|
6
|
+
(evt) => {
|
|
7
|
+
emit('change', evt);
|
|
8
|
+
value = evt.currentTarget?.checked || false;
|
|
9
|
+
}
|
|
10
|
+
"
|
|
11
|
+
@input="emit('input', $event)"
|
|
12
|
+
>
|
|
3
13
|
<slot />
|
|
4
14
|
</s-checkbox>
|
|
5
15
|
</template>
|
|
6
16
|
|
|
7
17
|
<script setup>
|
|
18
|
+
import { computed } from "vue";
|
|
19
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
20
|
defineOptions({ name: "ShCheckbox", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
21
|
+
const props = defineProps({
|
|
10
22
|
indeterminate: { type: Boolean, required: false },
|
|
11
23
|
defaultIndeterminate: { type: Boolean, required: false },
|
|
12
|
-
checked: { type: Boolean, required: false },
|
|
13
|
-
value: { type: String, required: false },
|
|
14
24
|
defaultChecked: { type: Boolean, required: false },
|
|
15
25
|
accessibilityLabel: { type: String, required: false },
|
|
16
26
|
details: { type: String, required: false },
|
|
@@ -19,6 +29,13 @@ defineProps({
|
|
|
19
29
|
required: { type: Boolean, required: false },
|
|
20
30
|
disabled: { type: Boolean, required: false },
|
|
21
31
|
id: { type: String, required: false },
|
|
22
|
-
name: { type: String, required: false }
|
|
32
|
+
name: { type: String, required: false },
|
|
33
|
+
modelValue: { type: Boolean, required: false }
|
|
23
34
|
});
|
|
35
|
+
const emit = defineEmits(["update:modelValue", "change", "input"]);
|
|
36
|
+
const value = computed({
|
|
37
|
+
get: () => props.modelValue,
|
|
38
|
+
set: (v) => emit("update:modelValue", v)
|
|
39
|
+
});
|
|
40
|
+
const polarisAttrs = usePolarisAttrs(props, ["modelValue"]);
|
|
24
41
|
</script>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
indeterminate?: boolean;
|
|
3
3
|
defaultIndeterminate?: boolean;
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
value?: string;
|
|
6
4
|
defaultChecked?: boolean;
|
|
7
5
|
accessibilityLabel?: string;
|
|
8
6
|
details?: string;
|
|
@@ -12,12 +10,21 @@ type __VLS_Props = {
|
|
|
12
10
|
disabled?: boolean;
|
|
13
11
|
id?: string;
|
|
14
12
|
name?: string;
|
|
13
|
+
modelValue?: boolean;
|
|
15
14
|
};
|
|
16
|
-
declare var
|
|
15
|
+
declare var __VLS_11: {};
|
|
17
16
|
type __VLS_Slots = {} & {
|
|
18
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_11) => any;
|
|
19
18
|
};
|
|
20
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (v: boolean) => void;
|
|
21
|
+
input: (event: Event) => void;
|
|
22
|
+
change: (event: Event) => void;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
25
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
26
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
29
|
declare const _default: typeof __VLS_export;
|
|
23
30
|
export default _default;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-chip v-bind="
|
|
2
|
+
<s-chip v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-chip>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShChip", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
color: { type: String, required: false },
|
|
11
12
|
accessibilityLabel: { type: String, required: false }
|
|
12
13
|
});
|
|
14
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
13
15
|
</script>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-choice v-bind="
|
|
2
|
+
<s-choice v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-choice>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShChoice", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
disabled: { type: Boolean, required: false },
|
|
11
12
|
selected: { type: Boolean, required: false },
|
|
12
13
|
value: { type: String, required: false },
|
|
13
14
|
accessibilityLabel: { type: String, required: false },
|
|
14
15
|
defaultSelected: { type: Boolean, required: false }
|
|
15
16
|
});
|
|
17
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
16
18
|
</script>
|
|
@@ -6,13 +6,21 @@ type __VLS_Props = {
|
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
label?: string;
|
|
8
8
|
labelAccessibilityVisibility?: 'visible' | 'exclusive';
|
|
9
|
-
|
|
9
|
+
modelValue?: string[];
|
|
10
10
|
};
|
|
11
|
-
declare var
|
|
11
|
+
declare var __VLS_11: {};
|
|
12
12
|
type __VLS_Slots = {} & {
|
|
13
|
-
default?: (props: typeof
|
|
13
|
+
default?: (props: typeof __VLS_11) => any;
|
|
14
14
|
};
|
|
15
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (v: string[]) => void;
|
|
17
|
+
input: (event: Event) => void;
|
|
18
|
+
change: (event: Event) => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
21
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((v: string[]) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
24
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
25
|
declare const _default: typeof __VLS_export;
|
|
18
26
|
export default _default;
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-choice-list
|
|
2
|
+
<s-choice-list
|
|
3
|
+
v-bind="polarisAttrs"
|
|
4
|
+
:values="modelValue"
|
|
5
|
+
@change="
|
|
6
|
+
(evt) => {
|
|
7
|
+
emit('change', evt);
|
|
8
|
+
value = evt.currentTarget?.values || [];
|
|
9
|
+
}
|
|
10
|
+
"
|
|
11
|
+
@input="emit('input', $event)"
|
|
12
|
+
>
|
|
3
13
|
<slot />
|
|
4
14
|
</s-choice-list>
|
|
5
15
|
</template>
|
|
6
16
|
|
|
7
17
|
<script setup>
|
|
18
|
+
import { computed } from "vue";
|
|
19
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
20
|
defineOptions({ name: "ShChoiceList", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
21
|
+
const props = defineProps({
|
|
10
22
|
disabled: { type: Boolean, required: false },
|
|
11
23
|
name: { type: String, required: false },
|
|
12
24
|
error: { type: String, required: false },
|
|
@@ -14,6 +26,12 @@ defineProps({
|
|
|
14
26
|
multiple: { type: Boolean, required: false },
|
|
15
27
|
label: { type: String, required: false },
|
|
16
28
|
labelAccessibilityVisibility: { type: String, required: false },
|
|
17
|
-
|
|
29
|
+
modelValue: { type: Array, required: false }
|
|
18
30
|
});
|
|
31
|
+
const emit = defineEmits(["update:modelValue", "change", "input"]);
|
|
32
|
+
const value = computed({
|
|
33
|
+
get: () => props.modelValue,
|
|
34
|
+
set: (v) => emit("update:modelValue", v)
|
|
35
|
+
});
|
|
36
|
+
const polarisAttrs = usePolarisAttrs(props, ["modelValue"]);
|
|
19
37
|
</script>
|
|
@@ -6,13 +6,21 @@ type __VLS_Props = {
|
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
label?: string;
|
|
8
8
|
labelAccessibilityVisibility?: 'visible' | 'exclusive';
|
|
9
|
-
|
|
9
|
+
modelValue?: string[];
|
|
10
10
|
};
|
|
11
|
-
declare var
|
|
11
|
+
declare var __VLS_11: {};
|
|
12
12
|
type __VLS_Slots = {} & {
|
|
13
|
-
default?: (props: typeof
|
|
13
|
+
default?: (props: typeof __VLS_11) => any;
|
|
14
14
|
};
|
|
15
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (v: string[]) => void;
|
|
17
|
+
input: (event: Event) => void;
|
|
18
|
+
change: (event: Event) => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
21
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((v: string[]) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
24
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
25
|
declare const _default: typeof __VLS_export;
|
|
18
26
|
export default _default;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-clickable v-bind="
|
|
2
|
+
<s-clickable v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-clickable>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShClickable", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
disabled: { type: Boolean, required: false },
|
|
11
12
|
loading: { type: Boolean, required: false },
|
|
12
13
|
target: { type: [String, Object], required: false },
|
|
@@ -41,4 +42,5 @@ defineProps({
|
|
|
41
42
|
commandFor: { type: String, required: false },
|
|
42
43
|
interestFor: { type: String, required: false }
|
|
43
44
|
});
|
|
45
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
44
46
|
</script>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-clickable-chip v-bind="
|
|
2
|
+
<s-clickable-chip v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-clickable-chip>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShClickableChip", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
color: { type: String, required: false },
|
|
11
12
|
accessibilityLabel: { type: String, required: false },
|
|
12
13
|
removable: { type: Boolean, required: false },
|
|
@@ -17,4 +18,5 @@ defineProps({
|
|
|
17
18
|
commandFor: { type: String, required: false },
|
|
18
19
|
interestFor: { type: String, required: false }
|
|
19
20
|
});
|
|
21
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
20
22
|
</script>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
alpha?: boolean;
|
|
3
|
-
value?: string;
|
|
4
3
|
autocomplete?: string;
|
|
5
4
|
defaultValue?: string;
|
|
6
5
|
details?: string;
|
|
@@ -13,12 +12,25 @@ type __VLS_Props = {
|
|
|
13
12
|
disabled?: boolean;
|
|
14
13
|
id?: string;
|
|
15
14
|
name?: string;
|
|
15
|
+
modelValue?: string;
|
|
16
16
|
};
|
|
17
|
-
declare var
|
|
17
|
+
declare var __VLS_13: {};
|
|
18
18
|
type __VLS_Slots = {} & {
|
|
19
|
-
default?: (props: typeof
|
|
19
|
+
default?: (props: typeof __VLS_13) => any;
|
|
20
20
|
};
|
|
21
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (v: string) => void;
|
|
23
|
+
blur: (event: InputEvent) => void;
|
|
24
|
+
focus: (event: InputEvent) => void;
|
|
25
|
+
input: (event: InputEvent) => void;
|
|
26
|
+
change: (event: InputEvent) => void;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onBlur?: ((event: InputEvent) => any) | undefined;
|
|
29
|
+
onFocus?: ((event: InputEvent) => any) | undefined;
|
|
30
|
+
onInput?: ((event: InputEvent) => any) | undefined;
|
|
31
|
+
onChange?: ((event: InputEvent) => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
35
|
declare const _default: typeof __VLS_export;
|
|
24
36
|
export default _default;
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-color-field
|
|
2
|
+
<s-color-field
|
|
3
|
+
v-bind="polarisAttrs"
|
|
4
|
+
:value="modelValue"
|
|
5
|
+
@blur="emit('blur', $event)"
|
|
6
|
+
@change="emit('change', $event)"
|
|
7
|
+
@focus="emit('focus', $event)"
|
|
8
|
+
@input="
|
|
9
|
+
(evt) => {
|
|
10
|
+
emit('input', evt);
|
|
11
|
+
value = evt.currentTarget?.value || '';
|
|
12
|
+
}
|
|
13
|
+
"
|
|
14
|
+
>
|
|
3
15
|
<slot />
|
|
4
16
|
</s-color-field>
|
|
5
17
|
</template>
|
|
6
18
|
|
|
7
19
|
<script setup>
|
|
20
|
+
import { computed } from "vue";
|
|
21
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
22
|
defineOptions({ name: "ShColorField", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
23
|
+
const props = defineProps({
|
|
10
24
|
alpha: { type: Boolean, required: false },
|
|
11
|
-
value: { type: String, required: false },
|
|
12
25
|
autocomplete: { type: String, required: false },
|
|
13
26
|
defaultValue: { type: String, required: false },
|
|
14
27
|
details: { type: String, required: false },
|
|
@@ -20,6 +33,13 @@ defineProps({
|
|
|
20
33
|
required: { type: Boolean, required: false },
|
|
21
34
|
disabled: { type: Boolean, required: false },
|
|
22
35
|
id: { type: String, required: false },
|
|
23
|
-
name: { type: String, required: false }
|
|
36
|
+
name: { type: String, required: false },
|
|
37
|
+
modelValue: { type: String, required: false }
|
|
24
38
|
});
|
|
39
|
+
const emit = defineEmits(["update:modelValue", "blur", "change", "focus", "input"]);
|
|
40
|
+
const value = computed({
|
|
41
|
+
get: () => props.modelValue,
|
|
42
|
+
set: (v) => emit("update:modelValue", v)
|
|
43
|
+
});
|
|
44
|
+
const polarisAttrs = usePolarisAttrs(props, ["modelValue"]);
|
|
25
45
|
</script>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
alpha?: boolean;
|
|
3
|
-
value?: string;
|
|
4
3
|
autocomplete?: string;
|
|
5
4
|
defaultValue?: string;
|
|
6
5
|
details?: string;
|
|
@@ -13,12 +12,25 @@ type __VLS_Props = {
|
|
|
13
12
|
disabled?: boolean;
|
|
14
13
|
id?: string;
|
|
15
14
|
name?: string;
|
|
15
|
+
modelValue?: string;
|
|
16
16
|
};
|
|
17
|
-
declare var
|
|
17
|
+
declare var __VLS_13: {};
|
|
18
18
|
type __VLS_Slots = {} & {
|
|
19
|
-
default?: (props: typeof
|
|
19
|
+
default?: (props: typeof __VLS_13) => any;
|
|
20
20
|
};
|
|
21
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (v: string) => void;
|
|
23
|
+
blur: (event: InputEvent) => void;
|
|
24
|
+
focus: (event: InputEvent) => void;
|
|
25
|
+
input: (event: InputEvent) => void;
|
|
26
|
+
change: (event: InputEvent) => void;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onBlur?: ((event: InputEvent) => any) | undefined;
|
|
29
|
+
onFocus?: ((event: InputEvent) => any) | undefined;
|
|
30
|
+
onInput?: ((event: InputEvent) => any) | undefined;
|
|
31
|
+
onChange?: ((event: InputEvent) => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
35
|
declare const _default: typeof __VLS_export;
|
|
24
36
|
export default _default;
|
|
@@ -2,13 +2,21 @@ type __VLS_Props = {
|
|
|
2
2
|
alpha?: boolean;
|
|
3
3
|
name?: string;
|
|
4
4
|
defaultValue?: string;
|
|
5
|
-
|
|
5
|
+
modelValue?: string;
|
|
6
6
|
};
|
|
7
|
-
declare var
|
|
7
|
+
declare var __VLS_11: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_11) => any;
|
|
10
10
|
};
|
|
11
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (v: string) => void;
|
|
13
|
+
input: (event: Event) => void;
|
|
14
|
+
change: (event: Event) => void;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
17
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
21
|
declare const _default: typeof __VLS_export;
|
|
14
22
|
export default _default;
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-color-picker
|
|
2
|
+
<s-color-picker
|
|
3
|
+
v-bind="polarisAttrs"
|
|
4
|
+
:value="modelValue"
|
|
5
|
+
@change="
|
|
6
|
+
(evt) => {
|
|
7
|
+
emit('change', evt);
|
|
8
|
+
value = evt.currentTarget?.value || '';
|
|
9
|
+
}
|
|
10
|
+
"
|
|
11
|
+
@input="emit('input', $event)"
|
|
12
|
+
>
|
|
3
13
|
<slot />
|
|
4
14
|
</s-color-picker>
|
|
5
15
|
</template>
|
|
6
16
|
|
|
7
17
|
<script setup>
|
|
18
|
+
import { computed } from "vue";
|
|
19
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
20
|
defineOptions({ name: "ShColorPicker", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
21
|
+
const props = defineProps({
|
|
10
22
|
alpha: { type: Boolean, required: false },
|
|
11
23
|
name: { type: String, required: false },
|
|
12
24
|
defaultValue: { type: String, required: false },
|
|
13
|
-
|
|
25
|
+
modelValue: { type: String, required: false }
|
|
14
26
|
});
|
|
27
|
+
const emit = defineEmits(["update:modelValue", "change", "input"]);
|
|
28
|
+
const value = computed({
|
|
29
|
+
get: () => props.modelValue,
|
|
30
|
+
set: (v) => emit("update:modelValue", v)
|
|
31
|
+
});
|
|
32
|
+
const polarisAttrs = usePolarisAttrs(props, ["modelValue"]);
|
|
15
33
|
</script>
|
|
@@ -2,13 +2,21 @@ type __VLS_Props = {
|
|
|
2
2
|
alpha?: boolean;
|
|
3
3
|
name?: string;
|
|
4
4
|
defaultValue?: string;
|
|
5
|
-
|
|
5
|
+
modelValue?: string;
|
|
6
6
|
};
|
|
7
|
-
declare var
|
|
7
|
+
declare var __VLS_11: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_11) => any;
|
|
10
10
|
};
|
|
11
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (v: string) => void;
|
|
13
|
+
input: (event: Event) => void;
|
|
14
|
+
change: (event: Event) => void;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
17
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
21
|
declare const _default: typeof __VLS_export;
|
|
14
22
|
export default _default;
|
|
@@ -17,13 +17,29 @@ type __VLS_Props = {
|
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
id?: string;
|
|
19
19
|
name?: string;
|
|
20
|
-
|
|
20
|
+
modelValue?: string;
|
|
21
21
|
};
|
|
22
|
-
declare var
|
|
22
|
+
declare var __VLS_15: {};
|
|
23
23
|
type __VLS_Slots = {} & {
|
|
24
|
-
default?: (props: typeof
|
|
24
|
+
default?: (props: typeof __VLS_15) => any;
|
|
25
25
|
};
|
|
26
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (v: string) => void;
|
|
28
|
+
blur: (event: Event) => void;
|
|
29
|
+
focus: (event: Event) => void;
|
|
30
|
+
input: (event: Event) => void;
|
|
31
|
+
change: (event: Event) => void;
|
|
32
|
+
invalid: (event: Event) => void;
|
|
33
|
+
viewchange: (event: Event) => void;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
|
+
onBlur?: ((event: Event) => any) | undefined;
|
|
36
|
+
onFocus?: ((event: Event) => any) | undefined;
|
|
37
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
38
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
39
|
+
onInvalid?: ((event: Event) => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
41
|
+
onViewchange?: ((event: Event) => any) | undefined;
|
|
42
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
43
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
44
|
declare const _default: typeof __VLS_export;
|
|
29
45
|
export default _default;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-date-field
|
|
2
|
+
<s-date-field
|
|
3
|
+
v-bind="polarisAttrs"
|
|
4
|
+
:value="modelValue"
|
|
5
|
+
@blur="emit('blur', $event)"
|
|
6
|
+
@change="
|
|
7
|
+
(evt) => {
|
|
8
|
+
emit('change', evt);
|
|
9
|
+
value = evt.currentTarget?.value || '';
|
|
10
|
+
}
|
|
11
|
+
"
|
|
12
|
+
@focus="emit('focus', $event)"
|
|
13
|
+
@input="emit('input', $event)"
|
|
14
|
+
@invalid="emit('invalid', $event)"
|
|
15
|
+
@viewchange="emit('viewchange', $event)"
|
|
16
|
+
>
|
|
3
17
|
<slot />
|
|
4
18
|
</s-date-field>
|
|
5
19
|
</template>
|
|
6
20
|
|
|
7
21
|
<script setup>
|
|
22
|
+
import { computed } from "vue";
|
|
23
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
24
|
defineOptions({ name: "ShDateField", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
25
|
+
const props = defineProps({
|
|
10
26
|
allow: { type: String, required: false },
|
|
11
27
|
disallow: { type: String, required: false },
|
|
12
28
|
allowDays: { type: String, required: false },
|
|
@@ -25,6 +41,12 @@ defineProps({
|
|
|
25
41
|
disabled: { type: Boolean, required: false },
|
|
26
42
|
id: { type: String, required: false },
|
|
27
43
|
name: { type: String, required: false },
|
|
28
|
-
|
|
44
|
+
modelValue: { type: String, required: false }
|
|
29
45
|
});
|
|
46
|
+
const emit = defineEmits(["update:modelValue", "blur", "change", "focus", "input", "invalid", "viewchange"]);
|
|
47
|
+
const value = computed({
|
|
48
|
+
get: () => props.modelValue,
|
|
49
|
+
set: (v) => emit("update:modelValue", v)
|
|
50
|
+
});
|
|
51
|
+
const polarisAttrs = usePolarisAttrs(props, ["modelValue"]);
|
|
30
52
|
</script>
|