@teammodlr/ui-kit 2.0.20 → 2.0.22

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 (182) hide show
  1. package/lib/__storybook__/argTypes.d.ts +40 -40
  2. package/lib/__storybook__/createStory.d.ts +8 -8
  3. package/lib/__storybook__/index.d.ts +2 -2
  4. package/lib/components/avatar/Avatar.vue.d.ts +56 -56
  5. package/lib/components/avatar/style/Avatar.css.d.ts +9 -9
  6. package/lib/components/avatar/style/index.d.ts +1 -1
  7. package/lib/components/avatargroup/AvatarGroup.vue.d.ts +49 -49
  8. package/lib/components/avatargroup/style/AvatarGroup.css.d.ts +2 -2
  9. package/lib/components/avatargroup/style/index.d.ts +1 -1
  10. package/lib/components/avatargroup/symbol.d.ts +13 -13
  11. package/lib/components/badge/Badge.vue.d.ts +30 -30
  12. package/lib/components/badge/style/Badge.css.d.ts +4 -4
  13. package/lib/components/badge/style/index.d.ts +1 -1
  14. package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +34 -34
  15. package/lib/components/breadcrumb/BreadcrumbItem.vue.d.ts +29 -29
  16. package/lib/components/breadcrumb/style/Breadcrumb.css.d.ts +4 -4
  17. package/lib/components/breadcrumb/style/index.d.ts +1 -1
  18. package/lib/components/breadcrumb/symbol.d.ts +13 -13
  19. package/lib/components/button/Button.vue.d.ts +141 -141
  20. package/lib/components/button/style/Button.css.d.ts +25 -25
  21. package/lib/components/button/style/index.d.ts +1 -1
  22. package/lib/components/buttongroup/ButtonGroup.vue.d.ts +18 -18
  23. package/lib/components/buttongroup/style/ButtonGroup.css.d.ts +2 -2
  24. package/lib/components/buttongroup/style/index.d.ts +1 -1
  25. package/lib/components/buttongroup/symbol.d.ts +6 -6
  26. package/lib/components/checkbox/Checkbox.vue.d.ts +94 -94
  27. package/lib/components/checkbox/style/Checkbox.css.d.ts +16 -16
  28. package/lib/components/checkbox/style/index.d.ts +1 -1
  29. package/lib/components/colorpicker/ColorPicker.vue.d.ts +77 -77
  30. package/lib/components/colorpicker/style/ColorPicker.css.d.ts +10 -10
  31. package/lib/components/colorpicker/style/index.d.ts +1 -1
  32. package/lib/components/colorpicker/utils.d.ts +16 -16
  33. package/lib/components/dropdown/Dropdown.vue.d.ts +122 -115
  34. package/lib/components/dropdown/DropdownItem.vue.d.ts +78 -78
  35. package/lib/components/dropdown/DropdownList.vue.d.ts +5 -5
  36. package/lib/components/dropdown/DropdownSeperator.vue.d.ts +4 -4
  37. package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -2
  38. package/lib/components/dropdown/hooks.d.ts +2 -2
  39. package/lib/components/dropdown/style/Dropdown.css.d.ts +6 -6
  40. package/lib/components/dropdown/style/index.d.ts +1 -1
  41. package/lib/components/dropdown/symbol.d.ts +6 -6
  42. package/lib/components/form/Form.vue.d.ts +75 -75
  43. package/lib/components/form/style/Form.css.d.ts +4 -4
  44. package/lib/components/form/style/index.d.ts +2 -2
  45. package/lib/components/form/symbol.d.ts +9 -9
  46. package/lib/components/image/Image.vue.d.ts +50 -50
  47. package/lib/components/index.d.ts +40 -39
  48. package/lib/components/input/Input.vue.d.ts +142 -142
  49. package/lib/components/input/style/Input.css.d.ts +23 -23
  50. package/lib/components/input/style/index.d.ts +1 -1
  51. package/lib/components/link/Link.vue.d.ts +51 -51
  52. package/lib/components/messageprovider/Message.vue.d.ts +73 -73
  53. package/lib/components/messageprovider/MessageProvider.vue.d.ts +52 -52
  54. package/lib/components/messageprovider/style/Message.css.d.ts +12 -12
  55. package/lib/components/messageprovider/style/index.d.ts +1 -1
  56. package/lib/components/messageprovider/types.d.ts +29 -29
  57. package/lib/components/messageprovider/useMessage.d.ts +2 -2
  58. package/lib/components/modal/Modal.vue.d.ts +52 -52
  59. package/lib/components/modal/style/Modal.css.d.ts +21 -21
  60. package/lib/components/modal/style/index.d.ts +1 -1
  61. package/lib/components/pagination/Pagination.vue.d.ts +75 -75
  62. package/lib/components/pagination/style/Pagination.css.d.ts +10 -10
  63. package/lib/components/pagination/style/index.d.ts +1 -1
  64. package/lib/components/radio/Radio.vue.d.ts +85 -85
  65. package/lib/components/radio/style/Checkbox.css.d.ts +16 -16
  66. package/lib/components/radio/style/index.d.ts +1 -1
  67. package/lib/components/radiobutton/RadioButton.vue.d.ts +98 -98
  68. package/lib/components/radiobutton/style/RadioButton.css.d.ts +14 -14
  69. package/lib/components/radiobutton/style/index.d.ts +1 -1
  70. package/lib/components/radiobuttongroup/RadioButtonGroup.vue.d.ts +48 -48
  71. package/lib/components/radiobuttongroup/style/RadioButtonGroup.css.d.ts +3 -3
  72. package/lib/components/radiobuttongroup/style/index.d.ts +1 -1
  73. package/lib/components/radiobuttongroup/symbol.d.ts +9 -9
  74. package/lib/components/select/Select.vue.d.ts +194 -194
  75. package/lib/components/select/style/Select.css.d.ts +31 -31
  76. package/lib/components/select/style/index.d.ts +1 -1
  77. package/lib/components/skeleton/Skeleton.vue.d.ts +33 -33
  78. package/lib/components/skeleton/style/Skeleton.css.d.ts +8 -8
  79. package/lib/components/skeleton/style/index.d.ts +2 -2
  80. package/lib/components/slider/Slider.vue.d.ts +32 -32
  81. package/lib/components/slider/style/Slider.css.d.ts +4 -4
  82. package/lib/components/slider/style/index.d.ts +1 -1
  83. package/lib/components/tab/Tab.vue.d.ts +41 -41
  84. package/lib/components/tab/TabGroup.vue.d.ts +43 -43
  85. package/lib/components/table/Table.vue.d.ts +62 -62
  86. package/lib/components/table/TableBody.vue.d.ts +2 -2
  87. package/lib/components/table/TableCell.vue.d.ts +2 -2
  88. package/lib/components/table/TableHead.vue.d.ts +30 -30
  89. package/lib/components/table/TableHeadRow.vue.d.ts +2 -2
  90. package/lib/components/table/TableRow.vue.d.ts +2 -2
  91. package/lib/components/table/style/Table.css.d.ts +4 -4
  92. package/lib/components/table/style/index.d.ts +1 -1
  93. package/lib/components/table/types/index.d.ts +6 -6
  94. package/lib/components/tag/Tag.vue.d.ts +44 -44
  95. package/lib/components/tag/style/Tag.css.d.ts +11 -11
  96. package/lib/components/tag/style/index.d.ts +1 -1
  97. package/lib/components/textarea/TextArea.vue.d.ts +137 -0
  98. package/lib/components/textarea/style/TextArea.css.d.ts +19 -0
  99. package/lib/components/textarea/style/index.d.ts +1 -0
  100. package/lib/components/tooltip/Tooltip.vue.d.ts +71 -71
  101. package/lib/components/tooltip/style/Tooltip.css.d.ts +10 -10
  102. package/lib/components/tooltip/style/index.d.ts +1 -1
  103. package/lib/components/transfer/Transfer.vue.d.ts +67 -67
  104. package/lib/components/transfer/style/Transfer.css.d.ts +7 -7
  105. package/lib/components/transfer/style/index.d.ts +1 -1
  106. package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +73 -73
  107. package/lib/components/virtualscroll/style/VirtualScroll.css.d.ts +1 -1
  108. package/lib/components/virtualscroll/style/index.d.ts +1 -1
  109. package/lib/composables/element.d.ts +2 -2
  110. package/lib/composables/index.d.ts +3 -3
  111. package/lib/composables/useCachedUid.d.ts +13 -13
  112. package/lib/composables/useEventListener.d.ts +1 -1
  113. package/lib/composables/useInput.d.ts +36 -36
  114. package/lib/composables/useInteractive.d.ts +15 -15
  115. package/lib/composables/useIsServer.d.ts +1 -1
  116. package/lib/composables/useMount.d.ts +13 -13
  117. package/lib/composables/usePopper.d.ts +31 -31
  118. package/lib/composables/useZIndex.d.ts +8 -8
  119. package/lib/create.d.ts +9 -9
  120. package/lib/index.cjs.js +4 -4
  121. package/lib/index.d.ts +5 -5
  122. package/lib/index.es.js +2271 -2108
  123. package/lib/install.d.ts +4 -4
  124. package/lib/style.css +1 -1
  125. package/lib/styles/theme.css.d.ts +167 -167
  126. package/lib/styles/typography.css.d.ts +22 -22
  127. package/lib/types/props.d.ts +3 -3
  128. package/package.json +1 -1
  129. package/src/components/avatargroup/AvatarGroup.vue +71 -71
  130. package/src/components/avatargroup/symbol.ts +16 -16
  131. package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
  132. package/src/components/breadcrumb/style/Breadcrumb.css.ts +39 -39
  133. package/src/components/breadcrumb/symbol.ts +16 -16
  134. package/src/components/button/Button.vue +203 -203
  135. package/src/components/buttongroup/ButtonGroup.vue +36 -36
  136. package/src/components/buttongroup/symbol.ts +7 -7
  137. package/src/components/colorpicker/ColorPicker.vue +2 -2
  138. package/src/components/dropdown/Dropdown.vue +10 -5
  139. package/src/components/dropdown/DropdownItem.vue +134 -134
  140. package/src/components/dropdown/DropdownSeperator.vue +22 -22
  141. package/src/components/dropdown/symbol.ts +7 -7
  142. package/src/components/form/style/Form.css.ts +22 -22
  143. package/src/components/form/style/index.ts +1 -1
  144. package/src/components/form/symbol.ts +10 -10
  145. package/src/components/index.ts +2 -1
  146. package/src/components/modal/examples/index.ts +2 -2
  147. package/src/components/pagination/Pagination.vue +229 -229
  148. package/src/components/pagination/examples/basic.vue +17 -17
  149. package/src/components/pagination/examples/index.stories.ts +14 -14
  150. package/src/components/pagination/style/Pagination.css.ts +87 -87
  151. package/src/components/pagination/style/index.ts +1 -1
  152. package/src/components/radiobutton/RadioButton.vue +131 -131
  153. package/src/components/radiobutton/style/RadioButton.css.ts +183 -183
  154. package/src/components/radiobutton/style/index.ts +1 -1
  155. package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
  156. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +36 -36
  157. package/src/components/radiobuttongroup/symbol.ts +10 -10
  158. package/src/components/skeleton/Skeleton.vue +55 -55
  159. package/src/components/skeleton/style/Skeleton.css.ts +56 -56
  160. package/src/components/skeleton/style/index.ts +1 -1
  161. package/src/components/table/style/Table.css.ts +80 -80
  162. package/src/components/textarea/TextArea.css +173 -0
  163. package/src/components/textarea/TextArea.vue +181 -0
  164. package/src/components/textarea/examples/basic.vue +8 -0
  165. package/src/components/textarea/examples/index.stories.ts +18 -0
  166. package/src/components/textarea/examples/index.ts +1 -0
  167. package/src/components/textarea/style/TextArea.css.ts +190 -0
  168. package/src/components/textarea/style/index.ts +1 -0
  169. package/src/components/tooltip/style/Tooltip.css.ts +91 -91
  170. package/src/components/tooltip/style/index.ts +1 -1
  171. package/src/components/transfer/Transfer.vue +143 -143
  172. package/src/components/transfer/examples/basic.vue +20 -20
  173. package/src/components/transfer/examples/index.stories.ts +15 -15
  174. package/src/components/transfer/examples/index.ts +1 -1
  175. package/src/components/transfer/style/Transfer.css.ts +67 -67
  176. package/src/components/transfer/style/index.ts +1 -1
  177. package/src/composables/index.ts +2 -2
  178. package/src/composables/useInteractive.ts +19 -19
  179. package/src/composables/useZIndex.ts +30 -30
  180. package/src/examples/cards/cards.stories.ts +9 -9
  181. package/src/examples/cards/sidebar.vue +262 -262
  182. package/src/styles/theme.css.ts +170 -170
@@ -1,144 +1,144 @@
1
- <template>
2
- <div
3
- :class="style.wrapper"
4
- ref="wrapper"
5
- >
6
- <div :class="[style.list]">
7
- <div
8
- :class="style.listHeader">
9
- {{sourceTitle}}
10
- </div>
11
- <div
12
- :class="style.listBody">
13
- <div
14
- :class="style.listContainer">
15
- <div
16
- v-for="option in sourceData"
17
- :key="
18
- // @ts-ignore
19
- option[optionKey]"
20
- @click="handleSourceClick(option)"
21
- :class="style.transferItem"
22
- >
23
- {{
24
- // @ts-ignore
25
- option[optionLabel] }}
26
- </div>
27
- </div>
28
- </div>
29
- </div>
30
- <div :class="[style.list]">
31
- <div
32
- :class="style.listHeader">
33
- {{targetTitle}}
34
- </div>
35
- <div
36
- :class="style.listBody">
37
- <div
38
- :class="style.listContainer">
39
- <div
40
- v-for="option in targetData"
41
- :key="
42
- // @ts-ignore
43
- option[optionKey]"
44
- @click="handleTargetClick(option)"
45
- :class="style.transferItem"
46
- >
47
- {{
48
- // @ts-ignore
49
- option[optionLabel] }}
50
- </div>
51
- </div>
52
- </div>
53
- </div>
54
- </div>
55
- </template>
56
-
57
- <script lang="ts">
58
- // TODO: Tidy up
59
- import {computed, defineComponent, ref} from 'vue';
60
- import * as style from "./style";
61
-
62
- export default defineComponent({
63
- name: "Transfer",
64
- props: {
65
- options: {
66
- type: Array,
67
- default: () => []
68
- },
69
- optionKey: {
70
- type: String,
71
- default: "value"
72
- },
73
- optionLabel: {
74
- type: String,
75
- default: "label"
76
- },
77
- sourceTitle: {
78
- type: String,
79
- default: "Source"
80
- },
81
- targetTitle: {
82
- type: String,
83
- default: "Target"
84
- },
85
- modelValue: {
86
- type: Array,
87
- default: () => []
88
- },
89
- },
90
- setup(props, { emit }) {
91
- const wrapper = ref<HTMLElement | null>(null);
92
-
93
- const useData = () => {
94
- const dataObj = computed(() =>
95
- // @ts-ignore
96
- props.options.reduce((o, cur) => (o[cur[props.optionKey]] = cur) && o, {})
97
- );
98
-
99
- const sourceData = computed(() =>
100
- props.options.filter((option: any) => !props.modelValue.includes(option[props.optionKey]))
101
- );
102
-
103
- const targetData = computed(() => {
104
- return props.modelValue.reduce(
105
- // @ts-ignore
106
- (arr: any, cur: number) => {
107
- // @ts-ignore
108
- const val = dataObj.value[cur];
109
- if (val) {
110
- arr.push(val);
111
- }
112
- return arr;
113
- },
114
- []
115
- )
116
- });
117
-
118
- return {
119
- sourceData,
120
- targetData
121
- }
122
- }
123
-
124
- const { sourceData, targetData } = useData();
125
-
126
- const handleSourceClick = (option: any) => {
127
- emit('update:modelValue', [...props.modelValue, option[props.optionKey]]);
128
- };
129
-
130
- const handleTargetClick = (option: any) => {
131
- emit('update:modelValue', props.modelValue.filter((val: any) => val !== option[props.optionKey]));
132
- };
133
-
134
- return {
135
- style,
136
- sourceData,
137
- targetData,
138
- wrapper,
139
- handleSourceClick,
140
- handleTargetClick
141
- }
142
- }
143
- })
1
+ <template>
2
+ <div
3
+ :class="style.wrapper"
4
+ ref="wrapper"
5
+ >
6
+ <div :class="[style.list]">
7
+ <div
8
+ :class="style.listHeader">
9
+ {{sourceTitle}}
10
+ </div>
11
+ <div
12
+ :class="style.listBody">
13
+ <div
14
+ :class="style.listContainer">
15
+ <div
16
+ v-for="option in sourceData"
17
+ :key="
18
+ // @ts-ignore
19
+ option[optionKey]"
20
+ @click="handleSourceClick(option)"
21
+ :class="style.transferItem"
22
+ >
23
+ {{
24
+ // @ts-ignore
25
+ option[optionLabel] }}
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ <div :class="[style.list]">
31
+ <div
32
+ :class="style.listHeader">
33
+ {{targetTitle}}
34
+ </div>
35
+ <div
36
+ :class="style.listBody">
37
+ <div
38
+ :class="style.listContainer">
39
+ <div
40
+ v-for="option in targetData"
41
+ :key="
42
+ // @ts-ignore
43
+ option[optionKey]"
44
+ @click="handleTargetClick(option)"
45
+ :class="style.transferItem"
46
+ >
47
+ {{
48
+ // @ts-ignore
49
+ option[optionLabel] }}
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </template>
56
+
57
+ <script lang="ts">
58
+ // TODO: Tidy up
59
+ import {computed, defineComponent, ref} from 'vue';
60
+ import * as style from "./style";
61
+
62
+ export default defineComponent({
63
+ name: "Transfer",
64
+ props: {
65
+ options: {
66
+ type: Array,
67
+ default: () => []
68
+ },
69
+ optionKey: {
70
+ type: String,
71
+ default: "value"
72
+ },
73
+ optionLabel: {
74
+ type: String,
75
+ default: "label"
76
+ },
77
+ sourceTitle: {
78
+ type: String,
79
+ default: "Source"
80
+ },
81
+ targetTitle: {
82
+ type: String,
83
+ default: "Target"
84
+ },
85
+ modelValue: {
86
+ type: Array,
87
+ default: () => []
88
+ },
89
+ },
90
+ setup(props, { emit }) {
91
+ const wrapper = ref<HTMLElement | null>(null);
92
+
93
+ const useData = () => {
94
+ const dataObj = computed(() =>
95
+ // @ts-ignore
96
+ props.options.reduce((o, cur) => (o[cur[props.optionKey]] = cur) && o, {})
97
+ );
98
+
99
+ const sourceData = computed(() =>
100
+ props.options.filter((option: any) => !props.modelValue.includes(option[props.optionKey]))
101
+ );
102
+
103
+ const targetData = computed(() => {
104
+ return props.modelValue.reduce(
105
+ // @ts-ignore
106
+ (arr: any, cur: number) => {
107
+ // @ts-ignore
108
+ const val = dataObj.value[cur];
109
+ if (val) {
110
+ arr.push(val);
111
+ }
112
+ return arr;
113
+ },
114
+ []
115
+ )
116
+ });
117
+
118
+ return {
119
+ sourceData,
120
+ targetData
121
+ }
122
+ }
123
+
124
+ const { sourceData, targetData } = useData();
125
+
126
+ const handleSourceClick = (option: any) => {
127
+ emit('update:modelValue', [...props.modelValue, option[props.optionKey]]);
128
+ };
129
+
130
+ const handleTargetClick = (option: any) => {
131
+ emit('update:modelValue', props.modelValue.filter((val: any) => val !== option[props.optionKey]));
132
+ };
133
+
134
+ return {
135
+ style,
136
+ sourceData,
137
+ targetData,
138
+ wrapper,
139
+ handleSourceClick,
140
+ handleTargetClick
141
+ }
142
+ }
143
+ })
144
144
  </script>
@@ -1,21 +1,21 @@
1
- <template>
2
- <MTransfer
3
- :options="options"
4
- v-model="selected"
5
- >
6
- hi
7
- </MTransfer>
8
- </template>
9
- <script setup lang="ts">
10
- import { ref } from 'vue';
11
-
12
- function createOptions () {
13
- return Array.from({ length: 100 }).map((_,index) => ({
14
- label: 'Option ' + index,
15
- value: index,
16
- }))
17
- }
18
-
19
- const options = ref(createOptions());
20
- const selected = ref([1, 2, 3, 4, 5]);
1
+ <template>
2
+ <MTransfer
3
+ :options="options"
4
+ v-model="selected"
5
+ >
6
+ hi
7
+ </MTransfer>
8
+ </template>
9
+ <script setup lang="ts">
10
+ import { ref } from 'vue';
11
+
12
+ function createOptions () {
13
+ return Array.from({ length: 100 }).map((_,index) => ({
14
+ label: 'Option ' + index,
15
+ value: index,
16
+ }))
17
+ }
18
+
19
+ const options = ref(createOptions());
20
+ const selected = ref([1, 2, 3, 4, 5]);
21
21
  </script>
@@ -1,16 +1,16 @@
1
- import MTransfer from "../Transfer.vue";
2
-
3
- import {
4
- MTransferBasic
5
- } from "./index";
6
-
7
- import {
8
- createStory,
9
- } from "../../../__storybook__";
10
-
11
- export default {
12
- component: MTransfer,
13
- title: "Components/Transfer",
14
- };
15
-
1
+ import MTransfer from "../Transfer.vue";
2
+
3
+ import {
4
+ MTransferBasic
5
+ } from "./index";
6
+
7
+ import {
8
+ createStory,
9
+ } from "../../../__storybook__";
10
+
11
+ export default {
12
+ component: MTransfer,
13
+ title: "Components/Transfer",
14
+ };
15
+
16
16
  export const Basic = createStory(MTransferBasic);
@@ -1 +1 @@
1
- export { default as MTransferBasic } from './basic.vue';
1
+ export { default as MTransferBasic } from './basic.vue';
@@ -1,68 +1,68 @@
1
- import { createVar, style, styleVariants } from "@vanilla-extract/css";
2
- import { themeVars } from "../../../styles/theme.css";
3
-
4
- export const vars = {
5
-
6
- }
7
-
8
-
9
- export const wrapper = style({
10
- display: "flex",
11
- flexWrap: "nowrap",
12
- wordBreak: "break-word",
13
- fontSize: themeVars.fontSize.base,
14
- width: "100%",
15
- height: "300px",
16
- border: `1px solid ${themeVars.color.gray[300]}`,
17
- borderRadius: themeVars.rounded.default,
18
- overflow: "hidden"
19
- });
20
-
21
- export const list = style({
22
- flex: 1,
23
- minWidth: 0,
24
- height: "inherit",
25
- display: "flex",
26
- flexDirection: "column",
27
- overflow: "auto"
28
- });
29
-
30
- export const listHeader = style({
31
- minHeight: "40px",
32
- boxSizing: "border-box",
33
- display: "flex",
34
- padding: `${themeVars.space["4"]}`,
35
- alignItems: "center",
36
- position: "sticky",
37
- top: 0,
38
- backgroundColor: "#FFF",
39
- zIndex: 1,
40
- });
41
-
42
- export const listBody = style({
43
- flexBasis: 0,
44
- flexGrow: 1,
45
- boxSizing: "border-box",
46
- position: "relative",
47
- display: "flex",
48
- flexDirection: "column",
49
- });
50
-
51
- export const listContainer = style({
52
- flex: 1,
53
- position: "relative",
54
- overflow: "auto",
55
- });
56
-
57
- export const transferItem = style({
58
- padding: `0 ${themeVars.space["4"]}`,
59
- minHeight: "35px",
60
- display: "flex",
61
- alignItems: "center",
62
- color: themeVars.color.font.default,
63
- cursor: "pointer",
64
- userSelect: "none",
65
- ':hover': {
66
- backgroundColor: themeVars.color.gray[150]
67
- }
1
+ import { createVar, style, styleVariants } from "@vanilla-extract/css";
2
+ import { themeVars } from "../../../styles/theme.css";
3
+
4
+ export const vars = {
5
+
6
+ }
7
+
8
+
9
+ export const wrapper = style({
10
+ display: "flex",
11
+ flexWrap: "nowrap",
12
+ wordBreak: "break-word",
13
+ fontSize: themeVars.fontSize.base,
14
+ width: "100%",
15
+ height: "300px",
16
+ border: `1px solid ${themeVars.color.gray[300]}`,
17
+ borderRadius: themeVars.rounded.default,
18
+ overflow: "hidden"
19
+ });
20
+
21
+ export const list = style({
22
+ flex: 1,
23
+ minWidth: 0,
24
+ height: "inherit",
25
+ display: "flex",
26
+ flexDirection: "column",
27
+ overflow: "auto"
28
+ });
29
+
30
+ export const listHeader = style({
31
+ minHeight: "40px",
32
+ boxSizing: "border-box",
33
+ display: "flex",
34
+ padding: `${themeVars.space["4"]}`,
35
+ alignItems: "center",
36
+ position: "sticky",
37
+ top: 0,
38
+ backgroundColor: "#FFF",
39
+ zIndex: 1,
40
+ });
41
+
42
+ export const listBody = style({
43
+ flexBasis: 0,
44
+ flexGrow: 1,
45
+ boxSizing: "border-box",
46
+ position: "relative",
47
+ display: "flex",
48
+ flexDirection: "column",
49
+ });
50
+
51
+ export const listContainer = style({
52
+ flex: 1,
53
+ position: "relative",
54
+ overflow: "auto",
55
+ });
56
+
57
+ export const transferItem = style({
58
+ padding: `0 ${themeVars.space["4"]}`,
59
+ minHeight: "35px",
60
+ display: "flex",
61
+ alignItems: "center",
62
+ color: themeVars.color.font.default,
63
+ cursor: "pointer",
64
+ userSelect: "none",
65
+ ':hover': {
66
+ backgroundColor: themeVars.color.gray[150]
67
+ }
68
68
  })
@@ -1 +1 @@
1
- export * from './Transfer.css';
1
+ export * from './Transfer.css';
@@ -1,3 +1,3 @@
1
- export { useMessage } from '../components/messageprovider/useMessage';
2
- export { usePopper } from './usePopper';
1
+ export { useMessage } from '../components/messageprovider/useMessage';
2
+ export { usePopper } from './usePopper';
3
3
  export { useZIndex } from './useZIndex';
@@ -1,20 +1,20 @@
1
- import type { Ref } from "vue";
2
-
3
- export interface InteractiveProps {
4
- disabled?: boolean;
5
- loading?: boolean;
6
- }
7
-
8
- export const useInteractive = (
9
- el: Ref<HTMLElement | null>,
10
- ) => {
11
- return {
12
- focus: () => el.value?.focus?.(),
13
- blur: () => el.value?.blur?.(),
14
- }
15
- }
16
-
17
- useInteractive.props = () => ({
18
- disabled: Boolean,
19
- loading: Boolean,
1
+ import type { Ref } from "vue";
2
+
3
+ export interface InteractiveProps {
4
+ disabled?: boolean;
5
+ loading?: boolean;
6
+ }
7
+
8
+ export const useInteractive = (
9
+ el: Ref<HTMLElement | null>,
10
+ ) => {
11
+ return {
12
+ focus: () => el.value?.focus?.(),
13
+ blur: () => el.value?.blur?.(),
14
+ }
15
+ }
16
+
17
+ useInteractive.props = () => ({
18
+ disabled: Boolean,
19
+ loading: Boolean,
20
20
  } as const);
@@ -1,31 +1,31 @@
1
- import type {InjectionKey, Ref} from "vue";
2
- import {computed, inject, ref, unref} from "vue";
3
- import {isNumber} from "@vueuse/core";
4
-
5
- const zIndex = ref(0);
6
- export const initialZIndex = 1000;
7
-
8
- export const ZINDEX: InjectionKey<Ref<number | undefined>> = Symbol('ZINDEX');
9
- export const useZIndex = (override?: Ref<number>) => {
10
- const injection = override || inject(ZINDEX, undefined);
11
-
12
- const initial = computed(() => {
13
- const fromInjection = unref(injection);
14
- return isNumber(fromInjection) ? fromInjection : initialZIndex;
15
- });
16
-
17
- const current = computed(() => {
18
- return initial.value + zIndex.value
19
- });
20
-
21
- const nextZIndex = () => {
22
- zIndex.value++;
23
- return current.value;
24
- };
25
-
26
- return {
27
- initial,
28
- current,
29
- nextZIndex
30
- }
1
+ import type {InjectionKey, Ref} from "vue";
2
+ import {computed, inject, ref, unref} from "vue";
3
+ import {isNumber} from "@vueuse/core";
4
+
5
+ const zIndex = ref(0);
6
+ export const initialZIndex = 1000;
7
+
8
+ export const ZINDEX: InjectionKey<Ref<number | undefined>> = Symbol('ZINDEX');
9
+ export const useZIndex = (override?: Ref<number>) => {
10
+ const injection = override || inject(ZINDEX, undefined);
11
+
12
+ const initial = computed(() => {
13
+ const fromInjection = unref(injection);
14
+ return isNumber(fromInjection) ? fromInjection : initialZIndex;
15
+ });
16
+
17
+ const current = computed(() => {
18
+ return initial.value + zIndex.value
19
+ });
20
+
21
+ const nextZIndex = () => {
22
+ zIndex.value++;
23
+ return current.value;
24
+ };
25
+
26
+ return {
27
+ initial,
28
+ current,
29
+ nextZIndex
30
+ }
31
31
  }
@@ -1,9 +1,9 @@
1
- import Sidebar from "./sidebar.vue";
2
- import {createStory} from "../../__storybook__";
3
-
4
- export default {
5
- component: Sidebar,
6
- title: 'Examples/Cards/Sidebar'
7
- }
8
-
9
- export const Basic = createStory(Sidebar);
1
+ import Sidebar from "./sidebar.vue";
2
+ import {createStory} from "../../__storybook__";
3
+
4
+ export default {
5
+ component: Sidebar,
6
+ title: 'Examples/Cards/Sidebar'
7
+ }
8
+
9
+ export const Basic = createStory(Sidebar);