@fastkit/vui 0.12.11 → 0.12.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastkit/vui",
3
- "version": "0.12.11",
3
+ "version": "0.12.12",
4
4
  "description": "A simple, extensible UI kit for Vue applications.",
5
5
  "keywords": [
6
6
  "fastkit",
@@ -44,23 +44,31 @@
44
44
  "src"
45
45
  ],
46
46
  "dependencies": {
47
- "@fastkit/color-scheme": "0.12.10",
48
- "@fastkit/helpers": "0.12.10",
49
- "@fastkit/icon-font": "0.12.10",
50
- "@fastkit/media-match": "0.12.10",
51
- "@fastkit/rules": "0.12.10",
52
- "@fastkit/stylebase": "0.12.10",
53
- "@fastkit/vue-app-layout": "0.12.11",
54
- "@fastkit/vue-color-scheme": "0.12.10",
55
- "@fastkit/vue-form-control": "0.12.10",
56
- "@fastkit/color-scheme-gen": "0.12.10",
57
- "@fastkit/vue-loading": "0.12.10",
58
- "@fastkit/vue-media-match": "0.12.10",
59
- "@fastkit/tiny-logger": "0.12.10",
60
- "@fastkit/vue-scroller": "0.12.10",
61
- "@fastkit/vue-stack": "0.12.10",
62
- "@fastkit/media-match-gen": "0.12.10",
63
- "@fastkit/vue-utils": "0.12.10"
47
+ "@fastkit/color-scheme": "0.12.11",
48
+ "@fastkit/color-scheme-gen": "0.12.11",
49
+ "@fastkit/dom": "0.0.1",
50
+ "@fastkit/helpers": "0.12.11",
51
+ "@fastkit/icon-font": "0.12.11",
52
+ "@fastkit/media-match": "0.12.11",
53
+ "@fastkit/media-match-gen": "0.12.11",
54
+ "@fastkit/rules": "0.12.11",
55
+ "@fastkit/stylebase": "0.12.11",
56
+ "@fastkit/vue-action": "0.0.1",
57
+ "@fastkit/tiny-logger": "0.12.11",
58
+ "@fastkit/vue-app-layout": "0.12.12",
59
+ "@fastkit/vue-body-scroll-lock": "0.0.1",
60
+ "@fastkit/vue-click-outside": "0.0.1",
61
+ "@fastkit/vue-color-scheme": "0.12.11",
62
+ "@fastkit/vue-keyboard": "0.0.1",
63
+ "@fastkit/vue-form-control": "0.12.11",
64
+ "@fastkit/vue-loading": "0.12.11",
65
+ "@fastkit/vue-location": "0.0.1",
66
+ "@fastkit/vue-media-match": "0.12.11",
67
+ "@fastkit/vue-resize": "0.0.1",
68
+ "@fastkit/vue-scroller": "0.12.11",
69
+ "@fastkit/vue-stack": "0.12.11",
70
+ "@fastkit/vue-transitions": "0.0.1",
71
+ "@fastkit/vue-utils": "0.12.11"
64
72
  },
65
73
  "peerDependencies": {
66
74
  "vue": "^3.2.0",
@@ -1,10 +1,7 @@
1
1
  import './VAvatar.scss';
2
2
  import { defineComponent, computed, PropType } from 'vue';
3
- import {
4
- navigationableInheritProps,
5
- useNavigationable,
6
- renderSlotOrEmpty,
7
- } from '@fastkit/vue-utils';
3
+ import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
+ import { actionableInheritProps, useActionable } from '@fastkit/vue-action';
8
5
  import { colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
9
6
  import { useVui } from '../../injections';
10
7
  import { VBusyImage } from '../VBusyImage';
@@ -21,7 +18,7 @@ export type AvatarSize = (typeof AVATAR_SIZES)[number];
21
18
  export function createAvatarProps() {
22
19
  return {
23
20
  ...colorSchemeProps(),
24
- ...navigationableInheritProps,
21
+ ...actionableInheritProps,
25
22
  size: {
26
23
  type: [String, Number] as PropType<AvatarSize | number>,
27
24
  default: 'md',
@@ -44,7 +41,7 @@ export const VAvatar = defineComponent({
44
41
  color: () => props.color || defaults.color,
45
42
  variant: () => props.variant || defaults.variant,
46
43
  });
47
- const navigationable = useNavigationable(ctx, {
44
+ const actionable = useActionable(ctx, {
48
45
  clickableClassName: () => 'v-avatar--clickable',
49
46
  linkFallbackTag: 'div',
50
47
  });
@@ -71,7 +68,7 @@ export const VAvatar = defineComponent({
71
68
 
72
69
  return () => {
73
70
  const { src } = props;
74
- const { Tag, attrs } = navigationable.value;
71
+ const { Tag, attrs } = actionable.value;
75
72
  return (
76
73
  <Tag
77
74
  {...attrs}
@@ -1,13 +1,13 @@
1
1
  import './VBreadcrumbs.scss';
2
2
 
3
3
  import { defineComponent, PropType, VNodeChild, computed } from 'vue';
4
- import { VLink, NavigationableInheritProps } from '@fastkit/vue-utils';
4
+ import { VAction, ActionableInheritProps } from '@fastkit/vue-action';
5
5
  import { useVui } from '../../injections';
6
6
  import type { VuiService } from '../../service';
7
7
  import { RawIconProp, resolveRawIconProp } from '../VIcon';
8
8
 
9
9
  export interface BreadcrumbsItem
10
- extends Pick<NavigationableInheritProps, 'to' | 'disabled'> {
10
+ extends Pick<ActionableInheritProps, 'to' | 'disabled'> {
11
11
  /**
12
12
  * "正確なマッチモード" を強制する場合true
13
13
  */
@@ -101,14 +101,14 @@ export const VBreadcrumbs = defineComponent({
101
101
  if (text) myChildren.push(text);
102
102
 
103
103
  const itemChild = to ? (
104
- <VLink
104
+ <VAction
105
105
  class="v-breadcrumbs__link"
106
106
  to={to}
107
107
  exactActiveClass="v-breadcrumbs__link--active"
108
108
  // exact={exact}
109
109
  >
110
110
  {myChildren}
111
- </VLink>
111
+ </VAction>
112
112
  ) : (
113
113
  myChildren
114
114
  );
@@ -12,7 +12,8 @@ import {
12
12
  onBeforeUnmount,
13
13
  CSSProperties,
14
14
  } from 'vue';
15
- import { IN_WINDOW, loadImage } from '@fastkit/helpers';
15
+ import { IN_WINDOW } from '@fastkit/helpers';
16
+ import { loadImage } from '@fastkit/dom';
16
17
  import { defineSlotsProps } from '@fastkit/vue-utils';
17
18
 
18
19
  export declare type ImgHTMLAttributesPropOptions = {
@@ -12,9 +12,8 @@ import {
12
12
  createPropsOptions,
13
13
  renderSlotOrEmpty,
14
14
  htmlAttributesPropOptions,
15
- VLink,
16
- navigationableInheritProps,
17
15
  } from '@fastkit/vue-utils';
16
+ import { VAction, actionableInheritProps } from '@fastkit/vue-action';
18
17
  import { useVui } from '../../injections';
19
18
  import { createControlProps, useControl } from '../../composables';
20
19
  import { VProgressCircular } from '../loading';
@@ -57,7 +56,7 @@ function resolveRawVButtonIcon(
57
56
  export const vueButtonProps = createPropsOptions({
58
57
  ...htmlAttributesPropOptions,
59
58
  ...colorSchemeProps(),
60
- ...navigationableInheritProps,
59
+ ...actionableInheritProps,
61
60
  spacer: [Boolean, String] as PropType<RawVButtonSpacer>,
62
61
  rounded: Boolean,
63
62
  icon: [String, Function] as PropType<RawVButtonIcon>,
@@ -140,7 +139,7 @@ export const VButton = defineComponent({
140
139
  return () => {
141
140
  const children = renderSlotOrEmpty(ctx.slots);
142
141
  return (
143
- <VLink {...ctx.attrs} class={['v-button', classes.value]}>
142
+ <VAction {...ctx.attrs} class={['v-button', classes.value]}>
144
143
  <span class="v-button__content">
145
144
  {startIcon.value}
146
145
  {children}
@@ -154,7 +153,7 @@ export const VButton = defineComponent({
154
153
  size={LOADING_SIZE_MAP[control.size.value]}
155
154
  />
156
155
  )}
157
- </VLink>
156
+ </VAction>
158
157
  );
159
158
  };
160
159
  },
@@ -1,9 +1,9 @@
1
1
  import './VCard.scss';
2
2
  import { defineComponent, computed } from 'vue';
3
3
  import { VPaper, createPaperProps } from '../VPaper';
4
- import { navigationableInheritProps, VLink } from '@fastkit/vue-utils';
4
+ import { actionableInheritProps, VAction } from '@fastkit/vue-action';
5
5
 
6
- // @TODO Unable to resolve dts for `navigationableInheritProps`.
6
+ // @TODO Unable to resolve dts for `actionableInheritProps`.
7
7
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
8
  // @ts-ignore
9
9
  import { RouteLocationRaw } from 'vue-router';
@@ -11,7 +11,7 @@ import { RouteLocationRaw } from 'vue-router';
11
11
  export function createCardProps() {
12
12
  return {
13
13
  ...createPaperProps(),
14
- ...navigationableInheritProps,
14
+ ...actionableInheritProps,
15
15
  disabled: Boolean,
16
16
  };
17
17
  }
@@ -32,7 +32,7 @@ export const VCard = defineComponent({
32
32
  ctx.attrs.class,
33
33
  typeof ctx.attrs.onClick === 'function' && 'clickable',
34
34
  ],
35
- tag: hasLink ? VLink : 'div',
35
+ tag: hasLink ? VAction : 'div',
36
36
  };
37
37
  if (props.disabled) {
38
38
  attrs.disabled = 'disabled' as any;
@@ -1,16 +1,13 @@
1
1
  import './VChip.scss';
2
2
  import { defineComponent, computed, PropType, VNodeChild } from 'vue';
3
- import {
4
- navigationableInheritProps,
5
- useNavigationable,
6
- renderSlotOrEmpty,
7
- } from '@fastkit/vue-utils';
3
+ import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
+ import { actionableInheritProps, useActionable } from '@fastkit/vue-action';
8
5
  import { colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
9
6
  import { useVui } from '../../injections';
10
7
  import type { IconName } from '../VIcon';
11
8
  import { VIcon } from '../VIcon';
12
9
 
13
- // @TODO Unable to resolve dts for `navigationableInheritProps`.
10
+ // @TODO Unable to resolve dts for `actionableInheritProps`.
14
11
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
12
  // @ts-ignore
16
13
  import { RouteLocationRaw } from 'vue-router';
@@ -26,7 +23,7 @@ export type RawVChipIcon = IconName | VChipIcon;
26
23
  export function createChipProps() {
27
24
  return {
28
25
  ...colorSchemeProps(),
29
- ...navigationableInheritProps,
26
+ ...actionableInheritProps,
30
27
  size: {
31
28
  type: String as PropType<ChipSize>,
32
29
  default: 'md',
@@ -76,7 +73,7 @@ export const VChip = defineComponent({
76
73
  const _icon = resolveRawVChipIcon(props.endIcon, 'end');
77
74
  return _icon && _icon();
78
75
  });
79
- const navigationable = useNavigationable(ctx, {
76
+ const actionable = useActionable(ctx, {
80
77
  clickableClassName: () => 'v-chip--clickable',
81
78
  linkFallbackTag: 'div',
82
79
  });
@@ -92,7 +89,7 @@ export const VChip = defineComponent({
92
89
  });
93
90
 
94
91
  return () => {
95
- const { Tag, attrs } = navigationable.value;
92
+ const { Tag, attrs } = actionable.value;
96
93
  return (
97
94
  <Tag
98
95
  {...attrs}
@@ -22,7 +22,8 @@ import { VPagination } from '../VPagination';
22
22
  import { VCheckbox } from '../VCheckbox';
23
23
  import { VIcon, resolveRawIconProp } from '../VIcon';
24
24
  import { VProgressCircular } from '../loading';
25
- import { resizeDirectiveArgument, VNodeChildOrSlot } from '@fastkit/vue-utils';
25
+ import { VNodeChildOrSlot } from '@fastkit/vue-utils';
26
+ import { resizeDirectiveArgument } from '@fastkit/vue-resize';
26
27
  import { VueAppLayout } from '@fastkit/vue-app-layout';
27
28
  import { ScopeName, toScopeColorClass } from '@fastkit/vue-color-scheme';
28
29
  import { VPaper } from '../VPaper';
@@ -8,17 +8,12 @@ import {
8
8
  watch,
9
9
  } from 'vue';
10
10
  import { rawIconProp, resolveRawIconProp } from '../VIcon';
11
- import {
12
- renderSlotOrEmpty,
13
- navigationableInheritProps,
14
- createPropsOptions,
15
- } from '@fastkit/vue-utils';
11
+ import { renderSlotOrEmpty, createPropsOptions } from '@fastkit/vue-utils';
12
+ import { actionableInheritProps, VAction } from '@fastkit/vue-action';
16
13
  import { useScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
17
- // import { useLink } from 'vue-router';
18
- import { VLink } from '@fastkit/vue-utils';
19
14
  import { useVui } from '../../injections';
20
15
 
21
- // @TODO Unable to resolve dts for `navigationableInheritProps`.
16
+ // @TODO Unable to resolve dts for `actionableInheritProps`.
22
17
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
23
18
  // @ts-ignore
24
19
  import { RouteLocationRaw } from 'vue-router';
@@ -26,7 +21,7 @@ import { RouteLocationRaw } from 'vue-router';
26
21
  export function createListTileProps() {
27
22
  const icon = rawIconProp();
28
23
  return {
29
- ...navigationableInheritProps,
24
+ ...actionableInheritProps,
30
25
  ...createPropsOptions({
31
26
  startIcon: icon,
32
27
  endIcon: icon,
@@ -104,7 +99,7 @@ export const VListTile = defineComponent({
104
99
  const _endIcon = endIcon.value;
105
100
 
106
101
  return (
107
- <VLink
102
+ <VAction
108
103
  {...ctx.attrs}
109
104
  class={['v-list-tile', classes.value]}
110
105
  clickableClassName="v-list-tile--clickable">
@@ -121,7 +116,7 @@ export const VListTile = defineComponent({
121
116
  {_endIcon}
122
117
  </span>
123
118
  )}
124
- </VLink>
119
+ </VAction>
125
120
  );
126
121
  };
127
122
  },
@@ -10,16 +10,13 @@ import {
10
10
  watch,
11
11
  } from 'vue';
12
12
  import { createListTileProps, listTileEmits, VListTile } from '../VListTile';
13
- import {
14
- ExtractPropInput,
15
- renderSlotOrEmpty,
16
- VExpandTransition,
17
- } from '@fastkit/vue-utils';
13
+ import { ExtractPropInput, renderSlotOrEmpty } from '@fastkit/vue-utils';
14
+ import { VExpandTransition } from '@fastkit/vue-transitions';
18
15
  import { useVui } from '../../injections';
19
16
  import { useRoute } from 'vue-router';
20
17
  import { ScopeName } from '@fastkit/color-scheme';
21
18
 
22
- // @TODO Unable to resolve dts for `navigationableInheritProps`.
19
+ // @TODO Unable to resolve dts for `actionableInheritProps`.
23
20
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
24
21
  // @ts-ignore
25
22
  import { RouteLocationRaw } from 'vue-router';
@@ -16,7 +16,7 @@ import {
16
16
  import { isPromise } from '@fastkit/helpers';
17
17
  import { useRouter, RouterLink } from 'vue-router';
18
18
  import { resolveRawIconProp } from '../VIcon';
19
- import { resizeDirectiveArgument } from '@fastkit/vue-utils';
19
+ import { resizeDirectiveArgument } from '@fastkit/vue-resize';
20
20
  import { useScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
21
21
  import { useVui } from '../../injections';
22
22
 
@@ -20,9 +20,8 @@ import {
20
20
  createPropsOptions,
21
21
  VNodeChildOrSlot,
22
22
  resolveVNodeChildOrSlots,
23
- useKeyboard,
24
23
  } from '@fastkit/vue-utils';
25
- import {} from '@fastkit/vue-scroller';
24
+ import { useKeyboard } from '@fastkit/vue-keyboard';
26
25
  import { VFormControl } from '../VFormControl';
27
26
  import {
28
27
  VControlField,
package/src/index.ts CHANGED
@@ -4,15 +4,24 @@ export * from '@fastkit/helpers';
4
4
  export * from '@fastkit/icon-font';
5
5
  export * from '@fastkit/media-match';
6
6
  export * from '@fastkit/vue-media-match';
7
+ export * from '@fastkit/vue-keyboard';
8
+ export * from '@fastkit/vue-transitions';
9
+ export * from '@fastkit/vue-location';
7
10
  export * from '@fastkit/rules';
11
+ export * from '@fastkit/vue-body-scroll-lock';
12
+ export * from '@fastkit/vue-click-outside';
8
13
  export * from '@fastkit/vue-app-layout';
9
14
  export * from '@fastkit/vue-color-scheme';
10
15
  export * from '@fastkit/vue-form-control';
11
16
  export * from '@fastkit/vue-scroller';
12
17
  export * from '@fastkit/vue-stack';
18
+ export * from '@fastkit/vue-action';
13
19
  export * from '@fastkit/vue-utils';
14
20
  export * from '@fastkit/vue-loading';
15
21
 
22
+ // @MEMO Alias export
23
+ export { VAction as VLink } from '@fastkit/vue-action';
24
+
16
25
  export * from './schemes';
17
26
  export * from './composables';
18
27
  export * from './components';
package/src/plugin.tsx CHANGED
@@ -10,6 +10,9 @@ import {
10
10
  installVueStackPlugin,
11
11
  VueStackServiceOptions,
12
12
  } from '@fastkit/vue-stack';
13
+ import { installBodyScrollLockDirective } from '@fastkit/vue-body-scroll-lock';
14
+ import { installClickOutsideDirective } from '@fastkit/vue-click-outside';
15
+ import { installResizeDirective } from '@fastkit/vue-resize';
13
16
  import { VueColorSchemePlugin } from '@fastkit/vue-color-scheme';
14
17
  import { installVueAppLayout } from '@fastkit/vue-app-layout';
15
18
  import { onAppUnmount } from '@fastkit/vue-utils';
@@ -79,6 +82,9 @@ export class VuiPlugin {
79
82
  });
80
83
 
81
84
  installVueAppLayout(app);
85
+ installBodyScrollLockDirective(app);
86
+ installClickOutsideDirective(app);
87
+ installResizeDirective(app);
82
88
 
83
89
  // Vui
84
90
  const $vui = new VuiService(opts, app.config.globalProperties.$vstack);
package/src/service.tsx CHANGED
@@ -13,7 +13,8 @@ import { type VNodeChildOrSlot } from '@fastkit/vue-utils';
13
13
  import { type VueColorSchemePluginSettings } from '@fastkit/vue-color-scheme';
14
14
  import type { Router } from 'vue-router';
15
15
  import { RouterLink, useLink, UseLinkOptions } from 'vue-router';
16
- import { LocationService, setDefaultRouterLink } from '@fastkit/vue-utils';
16
+ import { setDefaultRouterLink } from '@fastkit/vue-action';
17
+ import { LocationService } from '@fastkit/vue-location';
17
18
  import { VForm } from './components/VForm';
18
19
  import { VTextField, TextFieldInput } from './components/VTextField';
19
20
  import { VueForm, FormControlHinttipDelay } from '@fastkit/vue-form-control';