@flyanra/vue-core 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,4 +6,3 @@ export * from './navigation';
6
6
  export * from './basic';
7
7
  export * from './feedback';
8
8
  export * from './general';
9
- export * from './navigation';
@@ -0,0 +1,9 @@
1
+ export type T_FlyStepItem = {
2
+ label: string;
3
+ id: number;
4
+ clickable?: boolean;
5
+ };
6
+ export type T_FlyStepProps = {
7
+ steps: T_FlyStepItem[];
8
+ activeIndex: number;
9
+ };
@@ -0,0 +1,9 @@
1
+ import './FlySteps.element.scss';
2
+ import type { T_FlyStepProps } from './FlySteps.types';
3
+ declare const __VLS_export: import("vue").DefineComponent<T_FlyStepProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
+ "change-step": (data: number) => any;
5
+ }, string, import("vue").PublicProps, Readonly<T_FlyStepProps> & Readonly<{
6
+ "onChange-step"?: ((data: number) => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import FlySteps from './FlySteps.vue';
2
+ export default FlySteps;
3
+ export { FlySteps };
4
+ export type { T_FlyStepProps, T_FlyStepItem } from './FlySteps.types';
@@ -1 +1,2 @@
1
1
  export * from './menu';
2
+ export * from './fly-steps';
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyanra/vue-core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "Source-distributed Vue component library for Vite and Nuxt consumers.",
6
6
  "sideEffects": false,
@@ -13,6 +13,10 @@
13
13
  "types": "./dist/types/index.d.ts",
14
14
  "import": "./src/index.ts"
15
15
  },
16
+ "./types": {
17
+ "types": "./src/types/index.d.ts",
18
+ "default": "./src/types/index.ts"
19
+ },
16
20
  "./styles": {
17
21
  "types": "./src/styles/index.d.ts",
18
22
  "default": "./src/styles/index.scss"
@@ -9,4 +9,3 @@ export * from './navigation'
9
9
  export * from './basic'
10
10
  export * from './feedback'
11
11
  export * from './general'
12
- export * from './navigation'
@@ -0,0 +1,10 @@
1
+ export type T_FlyStepItem = {
2
+ label: string
3
+ id: number
4
+ clickable?: boolean
5
+ }
6
+
7
+ export type T_FlyStepProps = {
8
+ steps: T_FlyStepItem[]
9
+ activeIndex: number
10
+ }
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <div class="anra-steps">
3
+ <el-steps :active="activeIndex" align-center finish-status="success">
4
+ <el-step v-for="step in steps" :key="step.id" :title="step.label">
5
+ <template #title>
6
+ <div
7
+ :role="step.clickable ? 'button' : ''"
8
+ class="tw-text-sm tw-leading-normal tw-pt-px"
9
+ :class="step.clickable ? 'clickable' : ''"
10
+ @click="step.clickable ? emit('change-step', step.id) : null"
11
+ >
12
+ {{ step.label }}
13
+ </div>
14
+ </template>
15
+ </el-step>
16
+ </el-steps>
17
+ </div>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import { ElStep, ElSteps } from 'element-plus'
22
+
23
+ import './FlySteps.element.scss'
24
+ import type { T_FlyStepProps } from './FlySteps.types'
25
+
26
+ const emit = defineEmits<{
27
+ (e: 'change-step', data: number): void
28
+ }>()
29
+ defineProps<T_FlyStepProps>()
30
+ </script>
@@ -0,0 +1,6 @@
1
+ import FlySteps from './FlySteps.vue'
2
+
3
+ export default FlySteps
4
+ export { FlySteps }
5
+
6
+ export type { T_FlyStepProps, T_FlyStepItem } from './FlySteps.types'
@@ -1 +1,2 @@
1
1
  export * from './menu'
2
+ export * from './fly-steps'
@@ -0,0 +1,2 @@
1
+ @use 'element-plus/theme-chalk/src/dialog.scss' as *;
2
+ @use 'element-plus/theme-chalk/src/overlay.scss' as *;