@teammodlr/ui-kit 2.1.8 → 2.1.10

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 (159) 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/modal/Modal.vue.d.ts +6 -3
  11. package/lib/components/modal/style/Modal.css.d.ts +3 -0
  12. package/lib/components/radiobuttongroup/symbol.d.ts +2 -2
  13. package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
  14. package/lib/components/tree/props.d.ts +4 -4
  15. package/lib/components/tree/types.d.ts +10 -10
  16. package/lib/composables/element.d.ts +1 -1
  17. package/lib/composables/useInteractive.d.ts +1 -1
  18. package/lib/composables/useMount.d.ts +1 -1
  19. package/lib/composables/usePopper.d.ts +2 -2
  20. package/lib/composables/useZIndex.d.ts +1 -1
  21. package/lib/index.cjs.js +9 -9
  22. package/lib/index.es.js +2256 -2213
  23. package/lib/install.d.ts +1 -1
  24. package/lib/nuxt.js +17 -15
  25. package/lib/nuxt.plugin.js +6 -6
  26. package/lib/style.css +1 -1
  27. package/package.json +89 -79
  28. package/src/__storybook__/argTypes.ts +5 -13
  29. package/src/__storybook__/createStory.ts +10 -10
  30. package/src/call.ts +14 -14
  31. package/src/components/avatar/Avatar.vue +1 -1
  32. package/src/components/avatar/examples/index.stories.ts +4 -7
  33. package/src/components/avatar/style/Avatar.css.ts +17 -17
  34. package/src/components/avatargroup/examples/index.stories.ts +5 -10
  35. package/src/components/avatargroup/style/AvatarGroup.css.ts +9 -4
  36. package/src/components/avatargroup/symbol.ts +5 -5
  37. package/src/components/badge/examples/index.stories.ts +4 -6
  38. package/src/components/badge/style/Badge.css.ts +36 -36
  39. package/src/components/breadcrumb/examples/index.stories.ts +6 -10
  40. package/src/components/breadcrumb/style/Breadcrumb.css.ts +17 -17
  41. package/src/components/breadcrumb/style/index.ts +1 -1
  42. package/src/components/breadcrumb/symbol.ts +4 -3
  43. package/src/components/button/examples/index.stories.ts +4 -4
  44. package/src/components/button/style/Button.css.ts +143 -133
  45. package/src/components/buttongroup/examples/index.stories.ts +6 -12
  46. package/src/components/buttongroup/style/ButtonGroup.css.ts +13 -11
  47. package/src/components/buttongroup/symbol.ts +5 -4
  48. package/src/components/checkbox/Checkbox.vue +8 -8
  49. package/src/components/checkbox/examples/index.stories.ts +4 -9
  50. package/src/components/checkbox/examples/index.ts +0 -1
  51. package/src/components/checkbox/style/Checkbox.css.ts +31 -27
  52. package/src/components/checkbox/style/index.ts +1 -1
  53. package/src/components/colorpicker/examples/index.stories.ts +5 -10
  54. package/src/components/colorpicker/examples/index.ts +1 -1
  55. package/src/components/colorpicker/style/ColorPicker.css.ts +22 -14
  56. package/src/components/colorpicker/utils.ts +46 -28
  57. package/src/components/confirm/examples/index.stories.ts +5 -8
  58. package/src/components/confirm/props.ts +2 -2
  59. package/src/components/confirm/providerProps.ts +1 -2
  60. package/src/components/confirm/types.ts +15 -16
  61. package/src/components/confirm/useConfirm.ts +3 -1
  62. package/src/components/dialog/examples/index.stories.ts +5 -9
  63. package/src/components/dialog/style/Dialog.css.ts +38 -37
  64. package/src/components/dropdown/examples/index.stories.ts +3 -7
  65. package/src/components/dropdown/hooks.ts +20 -20
  66. package/src/components/dropdown/style/Dropdown.css.ts +24 -24
  67. package/src/components/dropdown/symbol.ts +3 -2
  68. package/src/components/form/Form.vue +1 -1
  69. package/src/components/form/examples/index.stories.ts +2 -4
  70. package/src/components/form/style/Form.css.ts +13 -8
  71. package/src/components/form/style/index.ts +2 -2
  72. package/src/components/form/symbol.ts +10 -5
  73. package/src/components/image/examples/index.stories.ts +5 -7
  74. package/src/components/input/Input.vue +8 -9
  75. package/src/components/input/examples/index.stories.ts +5 -7
  76. package/src/components/input/style/Input.css.ts +40 -43
  77. package/src/components/link/examples/index.stories.ts +4 -9
  78. package/src/components/messageprovider/examples/index.stories.ts +5 -8
  79. package/src/components/messageprovider/style/Message.css.ts +31 -31
  80. package/src/components/messageprovider/style/index.ts +1 -1
  81. package/src/components/messageprovider/types.ts +31 -22
  82. package/src/components/messageprovider/useMessage.ts +6 -4
  83. package/src/components/modal/Modal.vue +72 -54
  84. package/src/components/modal/examples/index.stories.ts +6 -10
  85. package/src/components/modal/examples/index.ts +1 -0
  86. package/src/components/modal/examples/sidebar.vue +75 -0
  87. package/src/components/modal/style/Modal.css.ts +91 -72
  88. package/src/components/pagination/examples/index.stories.ts +5 -9
  89. package/src/components/pagination/examples/index.ts +1 -1
  90. package/src/components/pagination/style/Pagination.css.ts +41 -37
  91. package/src/components/radio/Radio.vue +7 -7
  92. package/src/components/radio/examples/index.stories.ts +4 -9
  93. package/src/components/radio/examples/index.ts +0 -1
  94. package/src/components/radio/style/Checkbox.css.ts +30 -31
  95. package/src/components/radio/style/index.ts +1 -1
  96. package/src/components/radiobutton/RadioButton.vue +3 -3
  97. package/src/components/radiobutton/style/RadioButton.css.ts +41 -36
  98. package/src/components/radiobuttongroup/examples/index.stories.ts +6 -10
  99. package/src/components/radiobuttongroup/examples/index.ts +0 -1
  100. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +14 -14
  101. package/src/components/radiobuttongroup/style/index.ts +1 -1
  102. package/src/components/radiobuttongroup/symbol.ts +8 -7
  103. package/src/components/renderer/examlpes/index.stories.ts +4 -8
  104. package/src/components/renderer/props.ts +2 -3
  105. package/src/components/renderer/renderer.ts +3 -3
  106. package/src/components/select/Select.vue +3 -4
  107. package/src/components/select/examples/index.stories.ts +4 -10
  108. package/src/components/select/style/Select.css.ts +62 -61
  109. package/src/components/skeleton/examples/index.stories.ts +5 -9
  110. package/src/components/skeleton/style/Skeleton.css.ts +16 -16
  111. package/src/components/skeleton/style/index.ts +2 -2
  112. package/src/components/slider/style/Slider.css.ts +12 -5
  113. package/src/components/switch/Switch.vue +4 -4
  114. package/src/components/switch/examples/index.stories.ts +4 -9
  115. package/src/components/switch/examples/index.ts +0 -1
  116. package/src/components/switch/style/Switch.css.ts +56 -57
  117. package/src/components/switch/style/index.ts +1 -1
  118. package/src/components/tab/examples/index.stories.ts +5 -11
  119. package/src/components/table/examples/index.stories.ts +6 -12
  120. package/src/components/table/style/Table.css.ts +22 -17
  121. package/src/components/table/style/index.ts +1 -1
  122. package/src/components/table/types/index.ts +1 -1
  123. package/src/components/tag/examples/index.stories.ts +4 -10
  124. package/src/components/tag/style/Tag.css.ts +14 -9
  125. package/src/components/textarea/Textarea.vue +7 -8
  126. package/src/components/textarea/examples/index.stories.ts +4 -8
  127. package/src/components/textarea/style/Textarea.css.ts +33 -33
  128. package/src/components/tooltip/examples/index.stories.ts +5 -10
  129. package/src/components/tooltip/examples/index.ts +2 -2
  130. package/src/components/tooltip/style/Tooltip.css.ts +24 -25
  131. package/src/components/transfer/examples/index.stories.ts +5 -9
  132. package/src/components/transfer/style/Transfer.css.ts +41 -40
  133. package/src/components/tree/examples/index.stories.ts +6 -10
  134. package/src/components/tree/props.ts +20 -18
  135. package/src/components/tree/style/Tree.css.ts +36 -31
  136. package/src/components/tree/types.ts +60 -62
  137. package/src/components/virtualscroll/examples/index.stories.ts +4 -8
  138. package/src/components/virtualscroll/style/VirtualScroll.css.ts +1 -2
  139. package/src/composables/element.ts +4 -4
  140. package/src/composables/useCachedUid.ts +7 -6
  141. package/src/composables/useEventListener.ts +11 -6
  142. package/src/composables/useInput.ts +63 -41
  143. package/src/composables/useInteractive.ts +10 -11
  144. package/src/composables/useMergedState.ts +7 -7
  145. package/src/composables/useMount.ts +11 -11
  146. package/src/composables/usePopper.ts +57 -36
  147. package/src/composables/useZIndex.ts +5 -5
  148. package/src/create.ts +10 -6
  149. package/src/examples/cards/cards.stories.ts +3 -3
  150. package/src/examples/modal/modal.stories.ts +3 -3
  151. package/src/exports/nuxt.js +17 -15
  152. package/src/exports/nuxt.plugin.js +6 -6
  153. package/src/index.ts +0 -2
  154. package/src/install.ts +5 -5
  155. package/src/shims-vue.d.ts +3 -3
  156. package/src/styles/theme.css.ts +51 -43
  157. package/src/styles/transitions.css.ts +26 -28
  158. package/src/types/props.ts +16 -2
  159. package/src/utils/injection.ts +3 -3
@@ -5,54 +5,63 @@
5
5
  :enter-active-class="fade.enterActive"
6
6
  :leave-active-class="fade.leaveActive"
7
7
  :enter-from-class="fade.enterFrom"
8
- :leave-to-class="fade.leaveTo"
9
- >
10
- <div v-show="isOpen" :class="style.background" :style="{zIndex: zIndex}" @mousedown="closeOutside">
8
+ :leave-to-class="fade.leaveTo">
9
+ <div
10
+ v-show="isOpen"
11
+ :class="style.background"
12
+ :style="{ zIndex: zIndex }"
13
+ @mousedown="closeOutside">
11
14
  <Transition
12
15
  type="animation"
13
16
  :enter-active-class="modalScale.enterActive"
14
17
  :leave-active-class="modalScale.leaveActive"
15
18
  :enter-from-class="modalScale.enterFrom"
16
- :leave-to-class="modalScale.leaveTo"
17
- >
18
-
19
- <div v-if="isOpen" :class="containerClasses" @click.stop ref="target">
20
- <div :class="style.header">
21
- <div :class="style.title">
22
- <div>
23
- {{ title }}
19
+ :leave-to-class="modalScale.leaveTo">
20
+ <div
21
+ v-if="isOpen"
22
+ :class="containerClasses"
23
+ @click.stop
24
+ ref="target">
25
+ <div :class="style.sidebar" v-if="hasSidebar">
26
+ <slot name="sidebar"></slot>
27
+ </div>
28
+ <div :class="style.content">
29
+ <div :class="style.header">
30
+ <div :class="style.title" v-if="title">
31
+ <div>
32
+ {{ title }}
33
+ </div>
24
34
  </div>
25
35
  </div>
26
- <button :class="style.close" @click="close">
27
- </button>
28
- </div>
29
- <div :class="style.body">
30
- <slot name="body"></slot>
31
- </div>
32
- <div :class="style.footer">
33
- <slot name="footer"></slot>
36
+ <button
37
+ :class="style.close"
38
+ @click="close"></button>
39
+ <div :class="style.body">
40
+ <slot name="body"></slot>
41
+ <slot></slot>
42
+ </div>
43
+ <div :class="style.footer">
44
+ <slot name="footer"></slot>
45
+ </div>
34
46
  </div>
35
47
  </div>
36
-
37
-
38
48
  </Transition>
39
49
  </div>
40
-
41
50
  </Transition>
42
51
  </Teleport>
43
52
  </template>
44
53
 
45
54
  <script lang="ts">
46
- import type {PropType} from "vue";
47
- import type {Size} from "../../types/props";
48
- import {defineComponent, ref, computed, watch, nextTick} from 'vue';
55
+ import type { PropType } from 'vue';
56
+ import type { Size } from '../../types/props';
57
+ import { defineComponent, ref, computed, watch, nextTick } from 'vue';
49
58
  import * as style from './style';
50
- import { modalScale, fade } from "../../styles/transitions.css";
51
- import {useZIndex} from "../../composables/useZIndex";
52
- import { useEventListener, useMagicKeys } from "@vueuse/core";
59
+ import { modalScale, fade } from '../../styles/transitions.css';
60
+ import { useZIndex } from '../../composables/useZIndex';
61
+ import { useEventListener, useMagicKeys } from '@vueuse/core';
53
62
 
54
63
  export default defineComponent({
55
- name: "MModal",
64
+ name: 'MModal',
56
65
  props: {
57
66
  size: {
58
67
  type: String as PropType<Size>,
@@ -60,7 +69,7 @@ export default defineComponent({
60
69
  },
61
70
  title: {
62
71
  type: String,
63
- default: ""
72
+ default: ''
64
73
  },
65
74
  canClickOutside: {
66
75
  type: Boolean,
@@ -75,12 +84,12 @@ export default defineComponent({
75
84
  }
76
85
  },
77
86
  emits: ['open'],
78
- setup(props, {emit}) {
79
- const {nextZIndex} = useZIndex();
87
+ setup(props, { emit, slots }) {
88
+ const { nextZIndex } = useZIndex();
80
89
  const isOpen = ref(false);
81
90
  const target = ref();
82
91
  const zIndex = ref(props.zIndex ?? nextZIndex());
83
-
92
+ const hasSidebar = computed(() => !!slots.sidebar);
84
93
  const clickInside = ref(false);
85
94
  // const {hasFocus, activate, deactivate} = useFocusTrap(target, {
86
95
  // immediate: true,
@@ -88,18 +97,21 @@ export default defineComponent({
88
97
  // allowOutsideClick: true
89
98
  // });
90
99
 
91
- const { escape } = useMagicKeys()
100
+ const { escape } = useMagicKeys();
92
101
 
93
- watch(escape, (v) => {
102
+ watch(escape, v => {
94
103
  if (v && isOpen.value) {
95
- close()
104
+ close();
96
105
  }
97
- })
106
+ });
98
107
 
99
108
  const containerClasses = computed(() => {
100
109
  return [
101
110
  style.container,
102
111
  style.size[props.size],
112
+ {
113
+ [style.hasSidebar]: hasSidebar.value
114
+ }
103
115
  ];
104
116
  });
105
117
 
@@ -142,13 +154,15 @@ export default defineComponent({
142
154
  let ownerWindow = window;
143
155
  let documentElement = ownerWindow.document.documentElement;
144
156
 
145
- let scrollbarWidthBefore = ownerWindow.innerWidth - documentElement.clientWidth;
157
+ let scrollbarWidthBefore =
158
+ ownerWindow.innerWidth - documentElement.clientWidth;
146
159
  documentElement.style.overflow = 'hidden';
147
160
 
148
161
  if (scrollbarWidthBefore > 0) {
149
- let scrollbarWidthAfter = documentElement.clientWidth - documentElement.offsetWidth;
162
+ let scrollbarWidthAfter =
163
+ documentElement.clientWidth - documentElement.offsetWidth;
150
164
  let scrollbarWidth = scrollbarWidthBefore - scrollbarWidthAfter;
151
- documentElement.style.paddingRight = `${scrollbarWidth}px`
165
+ documentElement.style.paddingRight = `${scrollbarWidth}px`;
152
166
  }
153
167
  }
154
168
 
@@ -157,22 +171,25 @@ export default defineComponent({
157
171
  let ownerWindow = window;
158
172
  let documentElement = ownerWindow.document.documentElement;
159
173
 
160
- documentElement.style.overflow = 'visible'
161
- documentElement.style.paddingRight = '0px'
174
+ documentElement.style.overflow = 'visible';
175
+ documentElement.style.paddingRight = '0px';
162
176
  }, 250);
163
177
  }
164
178
 
165
- watch(() => isOpen.value, (value) => {
166
- if (value) {
167
- zIndex.value = props.zIndex ? zIndex.value++ : nextZIndex();
168
- emit('open');
169
- nextTick(() => {
170
- // activate()
171
- })
172
- } else {
173
- // deactivate()
179
+ watch(
180
+ () => isOpen.value,
181
+ value => {
182
+ if (value) {
183
+ zIndex.value = props.zIndex ? zIndex.value++ : nextZIndex();
184
+ emit('open');
185
+ nextTick(() => {
186
+ // activate()
187
+ });
188
+ } else {
189
+ // deactivate()
190
+ }
174
191
  }
175
- });
192
+ );
176
193
 
177
194
  return {
178
195
  close,
@@ -186,8 +203,9 @@ export default defineComponent({
186
203
  containerClasses,
187
204
  zIndex,
188
205
  modalScale,
189
- fade
206
+ fade,
207
+ hasSidebar
190
208
  };
191
209
  }
192
- })
210
+ });
193
211
  </script>
@@ -1,20 +1,16 @@
1
- import MModal from "../Modal.vue";
2
- import {
3
- MModalBasic,
4
- MModalForm
5
- } from "./index";
1
+ import MModal from '../Modal.vue';
2
+ import { MModalBasic, MModalForm, MModalSidebar } from './index';
6
3
 
7
- import {
8
- createStory, sizeArgType
9
- } from "../../../__storybook__";
4
+ import { createStory, sizeArgType } from '../../../__storybook__';
10
5
 
11
6
  export default {
12
7
  component: MModal,
13
8
  title: 'Components/Modal',
14
9
  argTypes: {
15
- ...sizeArgType(),
10
+ ...sizeArgType()
16
11
  }
17
- }
12
+ };
18
13
 
19
14
  export const Basic = createStory(MModalBasic);
20
15
  export const ModalForm = createStory(MModalForm);
16
+ export const ModalSidebar = createStory(MModalSidebar);
@@ -1,2 +1,3 @@
1
1
  export { default as MModalBasic } from './basic.vue';
2
2
  export { default as MModalForm } from './modal-form.vue';
3
+ export { default as MModalSidebar } from './sidebar.vue';
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <MModal ref="modal" size="md">
3
+ <template #sidebar> I AM SIDEBAR </template>
4
+ <div>
5
+ <MInput />
6
+ </div>
7
+ <template #footer>
8
+ <div style="display: flex; flex-grow: 1; justify-content: end">
9
+ <MButton variant="primary" @click="modal?.close()">
10
+ Okay
11
+ </MButton>
12
+ <MButton style="margin-left: 8px" @click="modal?.close()">
13
+ Cancel
14
+ </MButton>
15
+ </div>
16
+ </template>
17
+ </MModal>
18
+
19
+ <div style="position: relative; width: 100%; height: 1000px">
20
+ <button
21
+ @click="open"
22
+ style="
23
+ position: absolute;
24
+ width: 100px;
25
+ height: 50px;
26
+ top: 0;
27
+ left: 0;
28
+ ">
29
+ Top Left
30
+ </button>
31
+ <button
32
+ @click="open"
33
+ style="
34
+ position: absolute;
35
+ width: 100px;
36
+ height: 50px;
37
+ top: 0;
38
+ right: 0;
39
+ ">
40
+ Top Right
41
+ </button>
42
+ <button
43
+ @click="open"
44
+ style="
45
+ position: absolute;
46
+ width: 100px;
47
+ height: 50px;
48
+ bottom: 0;
49
+ left: 0;
50
+ ">
51
+ Bottom Left
52
+ </button>
53
+ <button
54
+ @click="open"
55
+ style="
56
+ position: absolute;
57
+ width: 100px;
58
+ height: 50px;
59
+ bottom: 0;
60
+ right: 0;
61
+ ">
62
+ Bottom Right
63
+ </button>
64
+ </div>
65
+ </template>
66
+
67
+ <script lang="ts" setup>
68
+ import { ref } from 'vue';
69
+
70
+ const modal = ref<any>(null);
71
+
72
+ const open = (event: MouseEvent) => {
73
+ modal.value.open(event.target);
74
+ };
75
+ </script>
@@ -1,12 +1,17 @@
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
9
  const sizes = {
5
10
  xs: '300px',
6
11
  sm: '400px',
7
12
  md: '640px',
8
13
  lg: '800px',
9
- xl: '1140px',
14
+ xl: '1140px'
10
15
  };
11
16
 
12
17
  export const vars = {
@@ -14,77 +19,82 @@ export const vars = {
14
19
  backgroundColor: createVar(),
15
20
  borderColor: createVar(),
16
21
  initialLeft: createVar(),
17
- initialTop: createVar(),
18
- }
22
+ initialTop: createVar()
23
+ };
19
24
 
20
25
  export const size = styleVariants({
21
26
  xs: {
22
27
  vars: {
23
- [vars.maxWidth]: sizes.xs,
24
- },
28
+ [vars.maxWidth]: sizes.xs
29
+ }
25
30
  },
26
31
  sm: {
27
32
  vars: {
28
- [vars.maxWidth]: sizes.sm,
29
- },
33
+ [vars.maxWidth]: sizes.sm
34
+ }
30
35
  },
31
36
  md: {
32
37
  vars: {
33
- [vars.maxWidth]: sizes.md,
34
- },
38
+ [vars.maxWidth]: sizes.md
39
+ }
35
40
  },
36
41
  lg: {
37
42
  vars: {
38
- [vars.maxWidth]: sizes.lg,
39
- },
43
+ [vars.maxWidth]: sizes.lg
44
+ }
40
45
  },
41
46
  xl: {
42
47
  vars: {
43
- [vars.maxWidth]: sizes.xl,
44
- },
45
- },
48
+ [vars.maxWidth]: sizes.xl
49
+ }
50
+ }
46
51
  });
47
52
 
48
-
49
53
  export const background = style({
50
54
  zIndex: 100,
51
55
  backgroundColor: 'hsla(0,0%,45.1%,0.7)',
52
- position: "fixed",
56
+ position: 'fixed',
53
57
  top: 0,
54
58
  bottom: 0,
55
59
  left: 0,
56
60
  right: 0,
57
- display: "flex",
58
- justifyContent: "center",
59
- alignItems: "center",
61
+ display: 'flex',
62
+ justifyContent: 'center',
63
+ alignItems: 'center'
60
64
  });
61
65
 
62
66
  export const container = style({
63
- backgroundColor: "#fff",
64
- width: "100%",
67
+ backgroundColor: '#fff',
68
+ width: '100%',
65
69
  maxWidth: vars.maxWidth,
66
70
  borderRadius: themeVars.rounded.medium,
67
- boxShadow: "0 1px 2px -2px rgba(0, 0, 0, 0.08), 0 3px 6px 0 rgba(0, 0, 0, 0.06), 0 5px 12px 4px rgba(0, 0, 0, 0.04)",
71
+ boxShadow:
72
+ '0 1px 2px -2px rgba(0, 0, 0, 0.08), 0 3px 6px 0 rgba(0, 0, 0, 0.06), 0 5px 12px 4px rgba(0, 0, 0, 0.04)',
68
73
  border: `1px solid rgba(0, 0, 0, 0.45)`,
69
- display: "flex",
70
- flexDirection: "column",
71
- position: "relative",
74
+ display: 'flex',
75
+ flexDirection: 'column',
76
+ position: 'relative',
77
+ gap: themeVars.space[2]
78
+ });
79
+
80
+ export const hasSidebar = style({
81
+ flexDirection: 'row'
72
82
  });
73
83
 
74
84
  export const header = style({
75
- display: "flex",
76
- justifyContent: "space-between",
77
- alignItems: "flex-start",
85
+ display: 'flex',
86
+ justifyContent: 'space-between',
87
+ alignItems: 'flex-start',
78
88
  padding: `${themeVars.space[4]} ${themeVars.space[4]} 0 ${themeVars.space[4]}`,
79
- flexShrink: "0",
89
+ flexShrink: '0'
80
90
  });
81
91
 
82
92
  export const title = style({
83
93
  margin: 0,
84
94
  fontSize: `${themeVars.fontSize.xlarge}`,
85
- fontWeight: "500",
86
- display: "flex",
87
- alignItems: "center",
95
+ fontWeight: '500',
96
+ display: 'flex',
97
+ alignItems: 'center',
88
98
  color: themeVars.color.font.default
89
99
  });
90
100
 
@@ -92,7 +102,9 @@ export const close = style([
92
102
  {
93
103
  outline: `none ${themeVars.color.gray[300]}`,
94
104
  display: 'inline-block',
95
- position: 'relative',
105
+ position: 'absolute',
106
+ top: themeVars.space[3],
107
+ right: themeVars.space[3],
96
108
  width: '1.5rem',
97
109
  height: '1.5rem',
98
110
  backgroundColor: 'transparent',
@@ -103,7 +115,7 @@ export const close = style([
103
115
  borderRadius: themeVars.rounded.full,
104
116
  marginLeft: themeVars.space[2],
105
117
  ':hover': {
106
- backgroundColor: themeVars.color.gray[150],
118
+ backgroundColor: themeVars.color.gray[150]
107
119
  },
108
120
  ':focus': {
109
121
  backgroundColor: themeVars.color.gray[150]
@@ -130,59 +142,59 @@ export const close = style([
130
142
  height: '2px',
131
143
  backgroundColor: themeVars.color.gray[500],
132
144
  transformOrigin: 'center',
133
- transition: 'all 0.2s',
145
+ transition: 'all 0.2s'
134
146
  }
135
147
  }
136
148
  ]);
137
149
 
138
150
  export const body = style({
139
151
  padding: `${themeVars.space[4]}`,
140
- display: "flex",
141
- flexDirection: "column",
142
- flexGrow: "1",
152
+ display: 'flex',
153
+ flexDirection: 'column',
154
+ flexGrow: '1',
143
155
  color: themeVars.color.font.text
144
156
  });
145
157
 
146
158
  export const footer = style({
147
- display: "flex",
148
- width: "100%",
149
- alignItems: "center",
150
- padding: `0 ${themeVars.space[4]} ${themeVars.space[4]} ${themeVars.space[4]}`,
159
+ display: 'flex',
160
+ width: '100%',
161
+ alignItems: 'center',
162
+ padding: `0 ${themeVars.space[4]} ${themeVars.space[4]} ${themeVars.space[4]}`
151
163
  });
152
164
 
153
- const fadeOutBackgroundAnimation = "fade-out-background-animation";
165
+ const fadeOutBackgroundAnimation = 'fade-out-background-animation';
154
166
  globalKeyframes(fadeOutBackgroundAnimation, {
155
- 'from': {
156
- opacity: 1,
167
+ from: {
168
+ opacity: 1
157
169
  },
158
- 'to': {
159
- opacity: 0,
170
+ to: {
171
+ opacity: 0
160
172
  }
161
173
  });
162
174
 
163
- const fadeInBackgroundAnimation = "fade-in-background-animation";
175
+ const fadeInBackgroundAnimation = 'fade-in-background-animation';
164
176
  globalKeyframes(fadeInBackgroundAnimation, {
165
- 'from': {
166
- opacity: 0,
177
+ from: {
178
+ opacity: 0
167
179
  },
168
- 'to': {
169
- opacity: 1,
180
+ to: {
181
+ opacity: 1
170
182
  }
171
183
  });
172
184
 
173
- const fadeOutAnimation = "fade-out-animation";
185
+ const fadeOutAnimation = 'fade-out-animation';
174
186
  globalKeyframes(fadeOutAnimation, {
175
- 'from': {
187
+ from: {
176
188
  opacity: 1,
177
189
  transform: 'scale(1)'
178
190
  },
179
- 'to': {
191
+ to: {
180
192
  opacity: 0,
181
193
  transform: 'scale(0.8)'
182
194
  }
183
195
  });
184
196
 
185
- const fadeInAnimation = "fade-in-animation";
197
+ const fadeInAnimation = 'fade-in-animation';
186
198
  globalKeyframes(fadeInAnimation, {
187
199
  '0%': {
188
200
  opacity: 0,
@@ -198,11 +210,11 @@ globalKeyframes(fadeInAnimation, {
198
210
  },
199
211
  '100%': {
200
212
  opacity: 1,
201
- transform: 'scale(1)',
213
+ transform: 'scale(1)'
202
214
  }
203
215
  });
204
216
 
205
- const fadeInAnimationNoBounce = "fade-in-animation-no-bounce";
217
+ const fadeInAnimationNoBounce = 'fade-in-animation-no-bounce';
206
218
  globalKeyframes(fadeInAnimationNoBounce, {
207
219
  '0%': {
208
220
  opacity: 0,
@@ -211,7 +223,7 @@ globalKeyframes(fadeInAnimationNoBounce, {
211
223
  top: vars.initialTop
212
224
  },
213
225
  '60%': {
214
- opacity: 1,
226
+ opacity: 1
215
227
  },
216
228
  '100%': {
217
229
  opacity: 1,
@@ -225,34 +237,41 @@ export const fadeEnterNoBounce = style({
225
237
  animationName: fadeInAnimationNoBounce,
226
238
  animationDuration: '0.2s',
227
239
  animationTimingFunction: 'ease-in-out',
228
- transition: "transform 0.3s ease-out",
229
- })
240
+ transition: 'transform 0.3s ease-out'
241
+ });
230
242
 
231
243
  export const fadeEnter = style({
232
244
  animationName: fadeInAnimation,
233
245
  animationDuration: '0.25s',
234
246
  animationTimingFunction: 'ease-in-out',
235
- transition: themeVars.transition.default,
236
- })
247
+ transition: themeVars.transition.default
248
+ });
237
249
 
238
250
  export const fadeLeave = style({
239
251
  animationName: fadeOutAnimation,
240
252
  animationDuration: '0.2s',
241
- animationTimingFunction: 'ease-in-out',
242
- })
253
+ animationTimingFunction: 'ease-in-out'
254
+ });
243
255
 
244
256
  export const fadeBackgroundEnter = style({
245
257
  animationName: fadeInBackgroundAnimation,
246
258
  animationDuration: '0.1s',
247
- animationTimingFunction: 'ease-in-out',
248
- })
259
+ animationTimingFunction: 'ease-in-out'
260
+ });
249
261
 
250
262
  export const fadeBackgroundLeave = style({
251
263
  animationName: fadeOutBackgroundAnimation,
252
264
  animationDuration: '0.2s',
253
- animationTimingFunction: 'ease-in-out',
254
- })
265
+ animationTimingFunction: 'ease-in-out'
266
+ });
255
267
 
256
- export const fadeEnterFrom = style({
268
+ export const fadeEnterFrom = style({});
269
+
270
+ export const sidebar = style({
271
+ borderRadius: `0 ${themeVars.rounded.medium} ${themeVars.rounded.medium} 0`
272
+ });
257
273
 
274
+ export const content = style({
275
+ flex: 1,
276
+ width: '100%'
258
277
  });
@@ -1,15 +1,11 @@
1
- import MPagination from "../Pagination.vue";
2
- import {
3
- MPaginationBasic
4
- } from "./index";
1
+ import MPagination from '../Pagination.vue';
2
+ import { MPaginationBasic } from './index';
5
3
 
6
- import {
7
- createStory
8
- } from "../../../__storybook__";
4
+ import { createStory } from '../../../__storybook__';
9
5
 
10
6
  export default {
11
7
  component: MPagination,
12
8
  title: 'Components/Pagination'
13
- }
9
+ };
14
10
 
15
- export const Basic = createStory(MPaginationBasic)
11
+ export const Basic = createStory(MPaginationBasic);
@@ -1 +1 @@
1
- export { default as MPaginationBasic } from './basic.vue';
1
+ export { default as MPaginationBasic } from './basic.vue';