@teammodlr/ui-kit 2.1.8 → 2.1.9

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.
Files changed (153) hide show
  1. package/lib/components/avatargroup/symbol.d.ts +2 -2
  2. package/lib/components/breadcrumb/style/index.d.ts +1 -1
  3. package/lib/components/breadcrumb/symbol.d.ts +1 -1
  4. package/lib/components/buttongroup/symbol.d.ts +2 -2
  5. package/lib/components/colorpicker/ColorPicker.vue.d.ts +1 -1
  6. package/lib/components/dropdown/Dropdown.vue.d.ts +1 -1
  7. package/lib/components/dropdown/symbol.d.ts +1 -1
  8. package/lib/components/form/symbol.d.ts +1 -1
  9. package/lib/components/messageprovider/style/index.d.ts +1 -1
  10. package/lib/components/radiobuttongroup/symbol.d.ts +2 -2
  11. package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
  12. package/lib/components/tree/props.d.ts +4 -4
  13. package/lib/components/tree/types.d.ts +10 -10
  14. package/lib/composables/element.d.ts +1 -1
  15. package/lib/composables/useInteractive.d.ts +1 -1
  16. package/lib/composables/useMount.d.ts +1 -1
  17. package/lib/composables/usePopper.d.ts +2 -2
  18. package/lib/composables/useZIndex.d.ts +1 -1
  19. package/lib/index.cjs.js +9 -9
  20. package/lib/index.es.js +2297 -2276
  21. package/lib/install.d.ts +1 -1
  22. package/lib/nuxt.js +17 -15
  23. package/lib/nuxt.plugin.js +6 -6
  24. package/package.json +89 -79
  25. package/src/__storybook__/argTypes.ts +5 -13
  26. package/src/__storybook__/createStory.ts +10 -10
  27. package/src/call.ts +14 -14
  28. package/src/components/avatar/Avatar.vue +1 -1
  29. package/src/components/avatar/examples/index.stories.ts +4 -7
  30. package/src/components/avatar/style/Avatar.css.ts +17 -17
  31. package/src/components/avatargroup/examples/index.stories.ts +5 -10
  32. package/src/components/avatargroup/style/AvatarGroup.css.ts +9 -4
  33. package/src/components/avatargroup/symbol.ts +5 -5
  34. package/src/components/badge/examples/index.stories.ts +4 -6
  35. package/src/components/badge/style/Badge.css.ts +36 -36
  36. package/src/components/breadcrumb/examples/index.stories.ts +6 -10
  37. package/src/components/breadcrumb/style/Breadcrumb.css.ts +17 -17
  38. package/src/components/breadcrumb/style/index.ts +1 -1
  39. package/src/components/breadcrumb/symbol.ts +4 -3
  40. package/src/components/button/examples/index.stories.ts +4 -4
  41. package/src/components/button/style/Button.css.ts +143 -133
  42. package/src/components/buttongroup/examples/index.stories.ts +6 -12
  43. package/src/components/buttongroup/style/ButtonGroup.css.ts +13 -11
  44. package/src/components/buttongroup/symbol.ts +5 -4
  45. package/src/components/checkbox/Checkbox.vue +8 -8
  46. package/src/components/checkbox/examples/index.stories.ts +4 -9
  47. package/src/components/checkbox/examples/index.ts +0 -1
  48. package/src/components/checkbox/style/Checkbox.css.ts +31 -27
  49. package/src/components/checkbox/style/index.ts +1 -1
  50. package/src/components/colorpicker/examples/index.stories.ts +5 -10
  51. package/src/components/colorpicker/examples/index.ts +1 -1
  52. package/src/components/colorpicker/style/ColorPicker.css.ts +22 -14
  53. package/src/components/colorpicker/utils.ts +46 -28
  54. package/src/components/confirm/examples/index.stories.ts +5 -8
  55. package/src/components/confirm/props.ts +2 -2
  56. package/src/components/confirm/providerProps.ts +1 -2
  57. package/src/components/confirm/types.ts +15 -16
  58. package/src/components/confirm/useConfirm.ts +3 -1
  59. package/src/components/dialog/examples/index.stories.ts +5 -9
  60. package/src/components/dialog/style/Dialog.css.ts +38 -37
  61. package/src/components/dropdown/examples/index.stories.ts +3 -7
  62. package/src/components/dropdown/hooks.ts +20 -20
  63. package/src/components/dropdown/style/Dropdown.css.ts +24 -24
  64. package/src/components/dropdown/symbol.ts +3 -2
  65. package/src/components/form/Form.vue +1 -1
  66. package/src/components/form/examples/index.stories.ts +2 -4
  67. package/src/components/form/style/Form.css.ts +13 -8
  68. package/src/components/form/style/index.ts +2 -2
  69. package/src/components/form/symbol.ts +10 -5
  70. package/src/components/image/examples/index.stories.ts +5 -7
  71. package/src/components/input/Input.vue +8 -9
  72. package/src/components/input/examples/index.stories.ts +5 -7
  73. package/src/components/input/style/Input.css.ts +40 -43
  74. package/src/components/link/examples/index.stories.ts +4 -9
  75. package/src/components/messageprovider/examples/index.stories.ts +5 -8
  76. package/src/components/messageprovider/style/Message.css.ts +31 -31
  77. package/src/components/messageprovider/style/index.ts +1 -1
  78. package/src/components/messageprovider/types.ts +31 -22
  79. package/src/components/messageprovider/useMessage.ts +6 -4
  80. package/src/components/modal/examples/index.stories.ts +5 -10
  81. package/src/components/modal/style/Modal.css.ts +76 -73
  82. package/src/components/pagination/examples/index.stories.ts +5 -9
  83. package/src/components/pagination/examples/index.ts +1 -1
  84. package/src/components/pagination/style/Pagination.css.ts +41 -37
  85. package/src/components/radio/Radio.vue +7 -7
  86. package/src/components/radio/examples/index.stories.ts +4 -9
  87. package/src/components/radio/examples/index.ts +0 -1
  88. package/src/components/radio/style/Checkbox.css.ts +30 -31
  89. package/src/components/radio/style/index.ts +1 -1
  90. package/src/components/radiobutton/RadioButton.vue +3 -3
  91. package/src/components/radiobutton/style/RadioButton.css.ts +41 -36
  92. package/src/components/radiobuttongroup/examples/index.stories.ts +6 -10
  93. package/src/components/radiobuttongroup/examples/index.ts +0 -1
  94. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +14 -14
  95. package/src/components/radiobuttongroup/style/index.ts +1 -1
  96. package/src/components/radiobuttongroup/symbol.ts +8 -7
  97. package/src/components/renderer/examlpes/index.stories.ts +4 -8
  98. package/src/components/renderer/props.ts +2 -3
  99. package/src/components/renderer/renderer.ts +3 -3
  100. package/src/components/select/Select.vue +3 -4
  101. package/src/components/select/examples/index.stories.ts +4 -10
  102. package/src/components/select/style/Select.css.ts +62 -61
  103. package/src/components/skeleton/examples/index.stories.ts +5 -9
  104. package/src/components/skeleton/style/Skeleton.css.ts +16 -16
  105. package/src/components/skeleton/style/index.ts +2 -2
  106. package/src/components/slider/style/Slider.css.ts +12 -5
  107. package/src/components/switch/Switch.vue +4 -4
  108. package/src/components/switch/examples/index.stories.ts +4 -9
  109. package/src/components/switch/examples/index.ts +0 -1
  110. package/src/components/switch/style/Switch.css.ts +56 -57
  111. package/src/components/switch/style/index.ts +1 -1
  112. package/src/components/tab/examples/index.stories.ts +5 -11
  113. package/src/components/table/examples/index.stories.ts +6 -12
  114. package/src/components/table/style/Table.css.ts +22 -17
  115. package/src/components/table/style/index.ts +1 -1
  116. package/src/components/table/types/index.ts +1 -1
  117. package/src/components/tag/examples/index.stories.ts +4 -10
  118. package/src/components/tag/style/Tag.css.ts +14 -9
  119. package/src/components/textarea/Textarea.vue +7 -8
  120. package/src/components/textarea/examples/index.stories.ts +4 -8
  121. package/src/components/textarea/style/Textarea.css.ts +33 -33
  122. package/src/components/tooltip/examples/index.stories.ts +5 -10
  123. package/src/components/tooltip/examples/index.ts +2 -2
  124. package/src/components/tooltip/style/Tooltip.css.ts +24 -25
  125. package/src/components/transfer/examples/index.stories.ts +5 -9
  126. package/src/components/transfer/style/Transfer.css.ts +41 -40
  127. package/src/components/tree/examples/index.stories.ts +6 -10
  128. package/src/components/tree/props.ts +20 -18
  129. package/src/components/tree/style/Tree.css.ts +36 -31
  130. package/src/components/tree/types.ts +60 -62
  131. package/src/components/virtualscroll/examples/index.stories.ts +4 -8
  132. package/src/components/virtualscroll/style/VirtualScroll.css.ts +1 -2
  133. package/src/composables/element.ts +4 -4
  134. package/src/composables/useCachedUid.ts +7 -6
  135. package/src/composables/useEventListener.ts +11 -6
  136. package/src/composables/useInput.ts +63 -41
  137. package/src/composables/useInteractive.ts +10 -11
  138. package/src/composables/useMergedState.ts +7 -7
  139. package/src/composables/useMount.ts +11 -11
  140. package/src/composables/usePopper.ts +57 -36
  141. package/src/composables/useZIndex.ts +5 -5
  142. package/src/create.ts +10 -6
  143. package/src/examples/cards/cards.stories.ts +3 -3
  144. package/src/examples/modal/modal.stories.ts +3 -3
  145. package/src/exports/nuxt.js +17 -15
  146. package/src/exports/nuxt.plugin.js +6 -6
  147. package/src/index.ts +0 -2
  148. package/src/install.ts +5 -5
  149. package/src/shims-vue.d.ts +3 -3
  150. package/src/styles/theme.css.ts +51 -43
  151. package/src/styles/transitions.css.ts +26 -28
  152. package/src/types/props.ts +16 -2
  153. package/src/utils/injection.ts +3 -3
@@ -1,18 +1,14 @@
1
- import MDialog from "../Dialog.vue";
2
- import {
3
- MDialogBasic
4
- } from "./index";
1
+ import MDialog from '../Dialog.vue';
2
+ import { MDialogBasic } from './index';
5
3
 
6
- import {
7
- createStory, sizeArgType
8
- } from "../../../__storybook__";
4
+ import { createStory, sizeArgType } from '../../../__storybook__';
9
5
 
10
6
  export default {
11
7
  component: MDialog,
12
8
  title: 'Components/Dialog',
13
9
  argTypes: {
14
- ...sizeArgType(),
10
+ ...sizeArgType()
15
11
  }
16
- }
12
+ };
17
13
 
18
14
  export const Basic = createStory(MDialogBasic);
@@ -1,86 +1,87 @@
1
- import {createVar, globalKeyframes, style, styleVariants} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
1
+ import {
2
+ createVar,
3
+ globalKeyframes,
4
+ style,
5
+ styleVariants
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
3
8
 
4
- export const vars = {
9
+ export const vars = {};
5
10
 
6
- }
7
-
8
- export const root = style({
9
-
10
- });
11
+ export const root = style({});
11
12
  export const backdrop = style({
12
- position: "fixed",
13
+ position: 'fixed',
13
14
  inset: 0,
14
15
  top: 0,
15
16
  bottom: 0,
16
17
  left: 0,
17
18
  right: 0,
18
- display: "flex",
19
- justifyContent: "center",
20
- alignItems: "center",
21
- pointerEvents: "none",
19
+ display: 'flex',
20
+ justifyContent: 'center',
21
+ alignItems: 'center',
22
+ pointerEvents: 'none'
22
23
  });
23
24
 
24
25
  export const backdropColor = style({
25
- backgroundColor: 'rgba(0,0,0,.45)',
26
+ backgroundColor: 'rgba(0,0,0,.45)'
26
27
  });
27
28
 
28
29
  export const wrapper = style({
29
- position: "fixed",
30
+ position: 'fixed',
30
31
  inset: 0,
31
32
  top: 0,
32
33
  left: 0,
33
34
  right: 0,
34
35
  bottom: 0,
35
36
  outline: 0,
36
- overflow: "auto",
37
- boxSizing: "border-box",
37
+ overflow: 'auto',
38
+ boxSizing: 'border-box'
38
39
  });
39
40
 
40
41
  export const dialog = style({
41
- boxSizing: "border-box",
42
- margin: "0 auto",
42
+ boxSizing: 'border-box',
43
+ margin: '0 auto',
43
44
  padding: 0,
44
- position: "relative",
45
- top: "100px",
46
- width: "auto",
45
+ position: 'relative',
46
+ top: '100px',
47
+ width: 'auto',
47
48
  maxWidth: `calc(100vw - 32px)`,
48
- paddingBottom: "24px",
49
+ paddingBottom: '24px'
49
50
  });
50
51
 
51
52
  export const content = style({
52
- position: "relative",
53
- backgroundColor: "#FFF",
54
- backgroundClip: "padding-box",
53
+ position: 'relative',
54
+ backgroundColor: '#FFF',
55
+ backgroundClip: 'padding-box',
55
56
  border: 0,
56
57
  borderRadius: themeVars.rounded.default,
57
- pointerEvents: "auto",
58
+ pointerEvents: 'auto',
58
59
  padding: `20px 24px`,
59
60
  boxShadow: `0 6px 16px 0 rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12), 0 9px 28px 8px rgba(0,0,0,.05)`
60
- })
61
+ });
61
62
 
62
63
  export const header = style({
63
64
  color: themeVars.color.font.default,
64
- backgroundColor: "#FFF",
65
- marginBottom: themeVars.space[2],
65
+ backgroundColor: '#FFF',
66
+ marginBottom: themeVars.space[2]
66
67
  });
67
68
 
68
69
  export const footer = style({
69
- textAlign: "end",
70
+ textAlign: 'end',
70
71
  background: `0 0`,
71
- marginTop: themeVars.space[2],
72
- })
72
+ marginTop: themeVars.space[2]
73
+ });
73
74
 
74
75
  export const title = style({
75
76
  margin: 0,
76
77
  color: themeVars.color.font.default,
77
78
  fontWeight: 600,
78
79
  lineHeight: 1.5,
79
- wordWrap: "break-word",
80
+ wordWrap: 'break-word'
80
81
  });
81
82
 
82
83
  export const close = style({
83
- position: "absolute",
84
+ position: 'absolute',
84
85
  top: `17px`,
85
86
  insetInlineEnd: `17px`,
86
87
  padding: 0,
@@ -93,7 +94,7 @@ export const close = style({
93
94
  cursor: `pointer`,
94
95
  selectors: {
95
96
  '&:hover': {
96
- backgroundColor: `hsla(0,0%,45.1%,0.1)`,
97
+ backgroundColor: `hsla(0,0%,45.1%,0.1)`
97
98
  }
98
99
  }
99
- })
100
+ });
@@ -3,12 +3,8 @@ import MDropdownList from '../DropdownList.vue';
3
3
  import MDropdownItem from '../DropdownItem.vue';
4
4
  import MButton from '../../button/Button.vue';
5
5
 
6
- import {
7
- MDropdownBasic,
8
- MDropdownContext,
9
- MDropdownCustom
10
- } from './index';
11
- import {createStory, popperPositionArgType} from '../../../__storybook__';
6
+ import { MDropdownBasic, MDropdownContext, MDropdownCustom } from './index';
7
+ import { createStory, popperPositionArgType } from '../../../__storybook__';
12
8
 
13
9
  export default {
14
10
  component: MDropdown,
@@ -21,7 +17,7 @@ export default {
21
17
  argTypes: {
22
18
  ...popperPositionArgType()
23
19
  }
24
- }
20
+ };
25
21
 
26
22
  export const Basic = createStory(MDropdownBasic);
27
23
  export const Custom = createStory(MDropdownCustom);
@@ -1,30 +1,30 @@
1
- import { ref, watch, onMounted, nextTick } from 'vue'
1
+ import { ref, watch, onMounted, nextTick } from 'vue';
2
2
 
3
- import type { Ref } from 'vue'
3
+ import type { Ref } from 'vue';
4
4
 
5
5
  export function useLabel(
6
- rawLabel: Ref<string | number | null>,
7
- element: Ref<HTMLElement | null | undefined>
6
+ rawLabel: Ref<string | number | null>,
7
+ element: Ref<HTMLElement | null | undefined>
8
8
  ) {
9
- const label = ref(rawLabel.value)
9
+ const label = ref(rawLabel.value);
10
10
 
11
- function setLabel(value: string | number | null) {
12
- if (element.value) {
13
- label.value = value ?? element.value.textContent?.trim() ?? null
14
- } else {
15
- label.value = value
11
+ function setLabel(value: string | number | null) {
12
+ if (element.value) {
13
+ label.value = value ?? element.value.textContent?.trim() ?? null;
14
+ } else {
15
+ label.value = value;
16
+ }
16
17
  }
17
- }
18
18
 
19
- watch(rawLabel, value => {
20
- setLabel(value)
21
- })
19
+ watch(rawLabel, value => {
20
+ setLabel(value);
21
+ });
22
22
 
23
- onMounted(() => {
24
- nextTick(() => {
25
- setLabel(rawLabel.value)
26
- })
27
- })
23
+ onMounted(() => {
24
+ nextTick(() => {
25
+ setLabel(rawLabel.value);
26
+ });
27
+ });
28
28
 
29
- return label
29
+ return label;
30
30
  }
@@ -1,55 +1,55 @@
1
- import { style } from "@vanilla-extract/css";
2
- import { themeVars } from "../../../styles/theme.css";
1
+ import { style } from '@vanilla-extract/css';
2
+ import { themeVars } from '../../../styles/theme.css';
3
3
 
4
4
  export const menu = style({
5
- backgroundColor: "#ffffff",
6
- borderRadius: "5px",
5
+ backgroundColor: '#ffffff',
6
+ borderRadius: '5px',
7
7
  padding: '5px 0',
8
8
  zIndex: 4000,
9
- boxSizing: "border-box",
10
- position: "relative",
11
- minWidth: "200px",
12
- maxWidth: "350px",
9
+ boxSizing: 'border-box',
10
+ position: 'relative',
11
+ minWidth: '200px',
12
+ maxWidth: '350px',
13
13
  border: `1px solid ${themeVars.color.gray[300]}`,
14
14
  boxShadow: themeVars.shadow.md
15
15
  });
16
16
 
17
17
  export const menuItems = style({
18
- listStyle: "none",
18
+ listStyle: 'none',
19
19
  margin: 0,
20
- padding: 0,
20
+ padding: 0
21
21
  });
22
22
 
23
23
  export const menuItem = style({
24
- position: "relative",
25
- display: "flex",
26
- alignItems: "center",
27
- cursor: "pointer",
28
- minHeight: "36px",
24
+ position: 'relative',
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ cursor: 'pointer',
28
+ minHeight: '36px',
29
29
  fontSize: themeVars.fontSize.base,
30
30
  paddingBlock: themeVars.space['1.5'],
31
31
  paddingInline: themeVars.space['3'],
32
32
  gap: themeVars.space[2],
33
33
  color: themeVars.color.gray[800],
34
- transition: "background-color 0.05s ease-in-out",
35
- textDecoration: "none",
34
+ transition: 'background-color 0.05s ease-in-out',
35
+ textDecoration: 'none',
36
36
  ':hover': {
37
- backgroundColor: themeVars.color.gray[100],
37
+ backgroundColor: themeVars.color.gray[100]
38
38
  }
39
39
  });
40
40
 
41
41
  export const menuItemText = style({
42
42
  flex: 1,
43
- whiteSpace: "nowrap",
43
+ whiteSpace: 'nowrap'
44
44
  });
45
45
 
46
46
  export const menuItemIcon = style({
47
- display: "flex",
48
- alignItems: "center",
47
+ display: 'flex',
48
+ alignItems: 'center'
49
49
  });
50
50
 
51
51
  export const menuSeperator = style({
52
- height: "1px",
52
+ height: '1px',
53
53
  backgroundColor: themeVars.color.gray[200],
54
- marginBlock: themeVars.space[1],
55
- })
54
+ marginBlock: themeVars.space[1]
55
+ });
@@ -1,8 +1,9 @@
1
- import type {InjectionKey} from "vue";
1
+ import type { InjectionKey } from 'vue';
2
2
 
3
3
  export interface DropdownState {
4
4
  handleSelect: (labels: string[]) => void;
5
5
  isOpen: boolean;
6
6
  }
7
7
 
8
- export const DROPDOWN_STATE: InjectionKey<DropdownState> = Symbol('DROPDOWN_STATE');
8
+ export const DROPDOWN_STATE: InjectionKey<DropdownState> =
9
+ Symbol('DROPDOWN_STATE');
@@ -7,7 +7,7 @@
7
7
  </template>
8
8
 
9
9
  <script lang="ts">
10
- import {defineComponent, provide, reactive, computed, onMounted, watch, nextTick, ref, toRef} from 'vue';
10
+ import {defineComponent, provide, reactive, computed, onMounted, watch, nextTick, toRef} from 'vue';
11
11
  import type { PropType } from 'vue';
12
12
  import * as style from "./style";
13
13
  import {FORM_STATE} from "./symbol";
@@ -5,9 +5,7 @@ import MSelect from '../../select/Select.vue';
5
5
  import MCheckbox from '../../checkbox/Checkbox.vue';
6
6
  import MColorPicker from '../../colorpicker/ColorPicker.vue';
7
7
 
8
- import {
9
- MFormBasic
10
- } from './index';
8
+ import { MFormBasic } from './index';
11
9
  import { createStory } from '../../../__storybook__';
12
10
 
13
11
  export default {
@@ -20,6 +18,6 @@ export default {
20
18
  MColorPicker
21
19
  },
22
20
  title: 'Components/Form'
23
- }
21
+ };
24
22
 
25
23
  export const Basic = createStory(MFormBasic);
@@ -1,23 +1,28 @@
1
- import {createVar, globalKeyframes, globalStyle, style} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
1
+ import {
2
+ createVar,
3
+ globalKeyframes,
4
+ globalStyle,
5
+ style
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
3
8
 
4
9
  const borderRadiuses = {
5
10
  xs: '2px',
6
11
  sm: '3px',
7
12
  md: '4px',
8
13
  lg: '6px',
9
- xl: '8px',
14
+ xl: '8px'
10
15
  };
11
16
 
12
17
  export const vars = {
13
- spacing: createVar(),
18
+ spacing: createVar()
14
19
  };
15
20
 
16
21
  export const base = style({
17
22
  vars: {
18
23
  [vars.spacing]: themeVars.space[4]
19
24
  },
20
- display: "flex",
21
- flexDirection: "column",
22
- gap: vars.spacing,
23
- });
25
+ display: 'flex',
26
+ flexDirection: 'column',
27
+ gap: vars.spacing
28
+ });
@@ -1,2 +1,2 @@
1
- export {assignInlineVars} from '@vanilla-extract/dynamic';
2
- export * from './Form.css';
1
+ export { assignInlineVars } from '@vanilla-extract/dynamic';
2
+ export * from './Form.css';
@@ -1,11 +1,16 @@
1
- import type {InjectionKey} from "vue";
1
+ import type { InjectionKey } from 'vue';
2
2
 
3
3
  export interface FormState {
4
- add: (name: string, focus: () => void, validate: () => boolean, setError: (error: string) => void) => void;
4
+ add: (
5
+ name: string,
6
+ focus: () => void,
7
+ validate: () => boolean,
8
+ setError: (error: string) => void
9
+ ) => void;
5
10
  remove: (name: string) => void;
6
- insideForm: boolean,
7
- disabled: boolean,
11
+ insideForm: boolean;
12
+ disabled: boolean;
8
13
  loading: boolean;
9
14
  }
10
15
 
11
- export const FORM_STATE: InjectionKey<FormState> = Symbol('FORM_STATE');
16
+ export const FORM_STATE: InjectionKey<FormState> = Symbol('FORM_STATE');
@@ -1,12 +1,10 @@
1
- import { createStory } from "../../../__storybook__";
2
- import MImage from "../Image.vue";
3
- import {
4
- MImageBasic,
5
- } from "./index";
1
+ import { createStory } from '../../../__storybook__';
2
+ import MImage from '../Image.vue';
3
+ import { MImageBasic } from './index';
6
4
 
7
5
  export default {
8
6
  component: MImage,
9
- title: 'Components/Image',
10
- }
7
+ title: 'Components/Image'
8
+ };
11
9
 
12
10
  export const Basic = createStory(MImageBasic);
@@ -6,7 +6,7 @@
6
6
  <div v-if="description" :class="style.description">
7
7
  {{ description }}
8
8
  </div>
9
-
9
+
10
10
  <div :class="wrapperComputedClasses">
11
11
  <div v-if="hasLeftIcon" :class="style.leftIcon">
12
12
  <slot name="icon-left" />
@@ -14,12 +14,12 @@
14
14
  <div v-if="hasPrefix" :class="style.prefix">
15
15
  <slot name="prefix" />
16
16
  </div>
17
- <input
17
+ <input
18
18
  ref="element"
19
- :id="id"
20
- :type="inputType"
19
+ :id="id"
20
+ :type="inputType"
21
21
  :placeholder="placeholder"
22
- :name="name"
22
+ :name="name"
23
23
  :value="modelValue || ''"
24
24
  :readonly="readonly"
25
25
  v-on="inputListeners"
@@ -52,8 +52,7 @@ import {
52
52
  defineComponent,
53
53
  ref,
54
54
  computed,
55
- toRef,
56
- defineExpose
55
+ toRef
57
56
  } from "vue";
58
57
  import { useInput } from "../../composables/useInput";
59
58
  import { useInteractive } from "../../composables/useInteractive";
@@ -106,7 +105,7 @@ export default defineComponent({
106
105
  },
107
106
  },
108
107
  emits: useInput.emits(),
109
- setup(props, { slots, emit }) {
108
+ setup(props, { slots, emit, expose }) {
110
109
  const element = ref<HTMLInputElement|null>(null);
111
110
  const { focus, blur } = useInteractive(element);
112
111
  const {
@@ -198,7 +197,7 @@ export default defineComponent({
198
197
  emit('update:modelValue', '');
199
198
  };
200
199
 
201
- defineExpose({
200
+ expose({
202
201
  focus,
203
202
  blur,
204
203
  })
@@ -1,4 +1,4 @@
1
- import MInput from "../Input.vue";
1
+ import MInput from '../Input.vue';
2
2
  import {
3
3
  MInputBasic,
4
4
  MInputSuffix,
@@ -6,11 +6,9 @@ import {
6
6
  MInputLeftIcon,
7
7
  MInputRightIcon,
8
8
  MInputSizes
9
- } from "./index";
9
+ } from './index';
10
10
 
11
- import {
12
- createStory, sizeArgType
13
- } from "../../../__storybook__";
11
+ import { createStory, sizeArgType } from '../../../__storybook__';
14
12
 
15
13
  export default {
16
14
  component: MInput,
@@ -18,11 +16,11 @@ export default {
18
16
  argTypes: {
19
17
  ...sizeArgType()
20
18
  }
21
- }
19
+ };
22
20
 
23
21
  export const Basic = createStory(MInputBasic);
24
22
  export const Suffix = createStory(MInputSuffix);
25
23
  export const Prefix = createStory(MInputPrefix);
26
24
  export const Sizes = createStory(MInputSizes);
27
25
  export const LeftIcon = createStory(MInputLeftIcon);
28
- export const RightIcon = createStory(MInputRightIcon);
26
+ export const RightIcon = createStory(MInputRightIcon);