shopify-nuxt 0.0.1 → 0.0.2
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 +0 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- 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/useShopifyFetch.js +3 -1
- package/dist/runtime/server/utils/authenticate-admin.js +21 -6
- package/package.json +2 -1
- 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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yanuar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -131,12 +131,6 @@ const shopify = useAppBridge()
|
|
|
131
131
|
const shopifyFetch = useShopifyFetch()
|
|
132
132
|
const { data } = await shopifyFetch('/api/products')
|
|
133
133
|
</script>
|
|
134
|
-
|
|
135
|
-
<template>
|
|
136
|
-
<ShopifyAppProvider>
|
|
137
|
-
<!-- Your app content -->
|
|
138
|
-
</ShopifyAppProvider>
|
|
139
|
-
</template>
|
|
140
134
|
```
|
|
141
135
|
|
|
142
136
|
### Using Polaris components
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -35,7 +35,8 @@ const module$1 = defineNuxtModule({
|
|
|
35
35
|
addServerImportsDir(resolver.resolve("./runtime/server/utils"));
|
|
36
36
|
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
37
37
|
addComponentsDir({
|
|
38
|
-
path: resolver.resolve("./runtime/components")
|
|
38
|
+
path: resolver.resolve("./runtime/components"),
|
|
39
|
+
pathPrefix: false
|
|
39
40
|
});
|
|
40
41
|
nuxt.hook("app:resolve", () => {
|
|
41
42
|
nuxt.options.app.head = nuxt.options.app.head || {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-avatar v-bind="
|
|
2
|
+
<s-avatar v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-avatar>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShAvatar", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
initials: { type: String, required: false },
|
|
11
12
|
src: { type: String, required: false },
|
|
12
13
|
size: { type: String, required: false },
|
|
13
14
|
alt: { type: String, required: false }
|
|
14
15
|
});
|
|
16
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
15
17
|
</script>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-badge v-bind="
|
|
2
|
+
<s-badge v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-badge>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShBadge", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
content: { type: String, required: false },
|
|
11
12
|
progress: { type: String, required: false },
|
|
12
13
|
tone: { type: String, required: false },
|
|
13
14
|
icon: { type: String, required: false },
|
|
14
15
|
size: { type: String, required: false }
|
|
15
16
|
});
|
|
17
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
16
18
|
</script>
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-banner v-bind="
|
|
2
|
+
<s-banner v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-banner>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShBanner", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
heading: { type: String, required: false },
|
|
11
12
|
tone: { type: String, required: false },
|
|
12
13
|
hidden: { type: Boolean, required: false },
|
|
13
14
|
dismissible: { type: Boolean, required: false }
|
|
14
15
|
});
|
|
16
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
15
17
|
</script>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-box v-bind="
|
|
2
|
+
<s-box v-bind="polarisAttrs">
|
|
3
3
|
<slot />
|
|
4
4
|
</s-box>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
9
|
defineOptions({ name: "ShBox", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
10
|
+
const props = defineProps({
|
|
10
11
|
accessibilityRole: { type: String, required: false },
|
|
11
12
|
background: { type: String, required: false },
|
|
12
13
|
blockSize: { type: String, required: false },
|
|
@@ -32,4 +33,5 @@ defineProps({
|
|
|
32
33
|
accessibilityVisibility: { type: String, required: false },
|
|
33
34
|
display: { type: String, required: false }
|
|
34
35
|
});
|
|
36
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
35
37
|
</script>
|
|
@@ -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
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
26
|
+
onClick?: ((event: MouseEvent) => 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,12 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<s-button
|
|
2
|
+
<s-button
|
|
3
|
+
v-bind="polarisAttrs"
|
|
4
|
+
@click="emit('click', $event)"
|
|
5
|
+
@focus="emit('focus', $event)"
|
|
6
|
+
@blur="emit('blur', $event)"
|
|
7
|
+
>
|
|
3
8
|
<slot />
|
|
4
9
|
</s-button>
|
|
5
10
|
</template>
|
|
6
11
|
|
|
7
12
|
<script setup>
|
|
13
|
+
import { usePolarisAttrs } from "./utils";
|
|
8
14
|
defineOptions({ name: "ShButton", inheritAttrs: false });
|
|
9
|
-
defineProps({
|
|
15
|
+
const props = defineProps({
|
|
10
16
|
disabled: { type: Boolean, required: false },
|
|
11
17
|
icon: { type: String, required: false },
|
|
12
18
|
loading: { type: Boolean, required: false },
|
|
@@ -21,4 +27,6 @@ defineProps({
|
|
|
21
27
|
commandFor: { type: String, required: false },
|
|
22
28
|
interestFor: { type: String, required: false }
|
|
23
29
|
});
|
|
30
|
+
const emit = defineEmits(["click", "focus", "blur"]);
|
|
31
|
+
const polarisAttrs = usePolarisAttrs(props);
|
|
24
32
|
</script>
|
|
@@ -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
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
26
|
+
onClick?: ((event: MouseEvent) => 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
|
+
change: (event: Event) => void;
|
|
22
|
+
input: (event: Event) => void;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
25
|
+
onInput?: ((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
|
+
change: (event: Event) => void;
|
|
22
|
+
input: (event: Event) => void;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
25
|
+
onInput?: ((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
|
+
change: (event: Event) => void;
|
|
18
|
+
input: (event: Event) => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
21
|
+
onInput?: ((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
|
+
change: (event: Event) => void;
|
|
18
|
+
input: (event: Event) => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
21
|
+
onInput?: ((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
|
+
change: (event: InputEvent) => void;
|
|
25
|
+
focus: (event: InputEvent) => void;
|
|
26
|
+
input: (event: InputEvent) => void;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onBlur?: ((event: InputEvent) => any) | undefined;
|
|
29
|
+
onChange?: ((event: InputEvent) => any) | undefined;
|
|
30
|
+
onFocus?: ((event: InputEvent) => any) | undefined;
|
|
31
|
+
onInput?: ((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
|
+
change: (event: InputEvent) => void;
|
|
25
|
+
focus: (event: InputEvent) => void;
|
|
26
|
+
input: (event: InputEvent) => void;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
onBlur?: ((event: InputEvent) => any) | undefined;
|
|
29
|
+
onChange?: ((event: InputEvent) => any) | undefined;
|
|
30
|
+
onFocus?: ((event: InputEvent) => any) | undefined;
|
|
31
|
+
onInput?: ((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;
|