@timus-networks/theme 2.0.16 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/README.md +113 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.mts +11 -0
  4. package/dist/module.d.ts +11 -0
  5. package/dist/module.json +9 -0
  6. package/dist/module.mjs +187 -0
  7. package/dist/runtime/components/development/example.alert.vue +29 -0
  8. package/dist/runtime/components/development/example.avatar.vue +85 -0
  9. package/dist/runtime/components/development/example.badge.vue +93 -0
  10. package/dist/runtime/components/development/example.breadcrumb.vue +54 -0
  11. package/dist/runtime/components/development/example.button.vue +235 -0
  12. package/dist/runtime/components/development/example.button.vue.d.ts +11 -0
  13. package/dist/runtime/components/development/example.card.vue +68 -0
  14. package/dist/runtime/components/development/example.checkbox.vue +176 -0
  15. package/dist/runtime/components/development/example.checkbox.vue.d.ts +24 -0
  16. package/dist/runtime/components/development/example.collapse.vue +38 -0
  17. package/dist/runtime/components/development/example.datepicker.vue +193 -0
  18. package/dist/runtime/components/development/example.description.vue +94 -0
  19. package/dist/runtime/components/development/example.dialog.vue +79 -0
  20. package/dist/runtime/components/development/example.dropdown.vue +166 -0
  21. package/dist/runtime/components/development/example.form.vue +488 -0
  22. package/dist/runtime/components/development/example.input.vue +270 -0
  23. package/dist/runtime/components/development/example.input.vue.d.ts +23 -0
  24. package/dist/runtime/components/development/example.link.vue +68 -0
  25. package/dist/runtime/components/development/example.message.vue +64 -0
  26. package/dist/runtime/components/development/example.notification.vue +75 -0
  27. package/dist/runtime/components/development/example.number.vue +70 -0
  28. package/dist/runtime/components/development/example.pagination.vue +89 -0
  29. package/dist/runtime/components/development/example.popover.vue +151 -0
  30. package/dist/runtime/components/development/example.radio.vue +163 -0
  31. package/dist/runtime/components/development/example.radio.vue.d.ts +25 -0
  32. package/dist/runtime/components/development/example.select.vue +588 -0
  33. package/dist/runtime/components/development/example.select.vue.d.ts +70 -0
  34. package/dist/runtime/components/development/example.sidebar.vue +101 -0
  35. package/dist/runtime/components/development/example.static.vue +50 -0
  36. package/dist/runtime/components/development/example.switch.vue +101 -0
  37. package/dist/runtime/components/development/example.table.vue +112 -0
  38. package/dist/runtime/components/development/example.tag.vue +255 -0
  39. package/dist/runtime/components/development/example.timepicker.vue +89 -0
  40. package/dist/runtime/components/development/example.tooltip.vue +104 -0
  41. package/dist/runtime/components/development/example.upload.vue +84 -0
  42. package/dist/runtime/components/production/html-encode.vue +96 -0
  43. package/dist/runtime/components/production/timus-breadcrumb.d.ts +36 -0
  44. package/dist/runtime/components/production/timus-breadcrumb.js +224 -0
  45. package/dist/runtime/components/production/timus-breadcrumb.mjs +224 -0
  46. package/dist/runtime/components/production/timus-breadcrumb.vue +83 -0
  47. package/dist/runtime/components/production/timus-breadcrumb.vue.d.ts +340 -0
  48. package/dist/runtime/composables/useBreadcrumb.d.ts +8 -0
  49. package/dist/runtime/composables/useBreadcrumb.js +53 -0
  50. package/dist/runtime/composables/useBreadcrumb.mjs +53 -0
  51. package/dist/runtime/pages/theme.vue +61 -0
  52. package/dist/runtime/plugins/disable-warnings-plugin.d.ts +2 -0
  53. package/dist/runtime/plugins/disable-warnings-plugin.js +18 -0
  54. package/dist/runtime/plugins/disable-warnings-plugin.mjs +18 -0
  55. package/dist/runtime/plugins/sample-plugin.d.ts +20 -0
  56. package/dist/runtime/plugins/sample-plugin.js +5 -0
  57. package/dist/runtime/plugins/sample-plugin.mjs +5 -0
  58. package/dist/runtime/plugins/theme-provider-plugin.d.ts +30 -0
  59. package/dist/runtime/plugins/theme-provider-plugin.js +46 -0
  60. package/dist/runtime/plugins/theme-provider-plugin.mjs +46 -0
  61. package/dist/runtime/public/scss/element-plus/affix.css +305 -0
  62. package/dist/runtime/public/scss/element-plus/alert.css +516 -0
  63. package/dist/runtime/public/scss/element-plus/anchor-link.css +332 -0
  64. package/dist/runtime/public/scss/element-plus/anchor.css +376 -0
  65. package/dist/runtime/public/scss/element-plus/aside.css +308 -0
  66. package/dist/runtime/public/scss/element-plus/autocomplete.css +411 -0
  67. package/dist/runtime/public/scss/element-plus/avatar.css +370 -0
  68. package/dist/runtime/public/scss/element-plus/backtop.css +326 -0
  69. package/dist/runtime/public/scss/element-plus/badge.css +376 -0
  70. package/dist/runtime/public/scss/element-plus/base.css +550 -0
  71. package/dist/runtime/public/scss/element-plus/breadcrumb-item.css +0 -0
  72. package/dist/runtime/public/scss/element-plus/breadcrumb.css +370 -0
  73. package/dist/runtime/public/scss/element-plus/button-group.css +535 -0
  74. package/dist/runtime/public/scss/element-plus/button.css +1089 -0
  75. package/dist/runtime/public/scss/element-plus/calendar.css +370 -0
  76. package/dist/runtime/public/scss/element-plus/card.css +347 -0
  77. package/dist/runtime/public/scss/element-plus/carousel-item.css +350 -0
  78. package/dist/runtime/public/scss/element-plus/carousel.css +475 -0
  79. package/dist/runtime/public/scss/element-plus/cascader-panel.css +428 -0
  80. package/dist/runtime/public/scss/element-plus/cascader.css +560 -0
  81. package/dist/runtime/public/scss/element-plus/check-tag.css +386 -0
  82. package/dist/runtime/public/scss/element-plus/checkbox-button.css +451 -0
  83. package/dist/runtime/public/scss/element-plus/checkbox-group.css +307 -0
  84. package/dist/runtime/public/scss/element-plus/checkbox.css +588 -0
  85. package/dist/runtime/public/scss/element-plus/col.css +3270 -0
  86. package/dist/runtime/public/scss/element-plus/collapse-item.css +0 -0
  87. package/dist/runtime/public/scss/element-plus/collapse-transition.css +0 -0
  88. package/dist/runtime/public/scss/element-plus/collapse.css +490 -0
  89. package/dist/runtime/public/scss/element-plus/color/index.css +0 -0
  90. package/dist/runtime/public/scss/element-plus/color-picker.css +650 -0
  91. package/dist/runtime/public/scss/element-plus/common/popup.css +338 -0
  92. package/dist/runtime/public/scss/element-plus/common/transition.css +420 -0
  93. package/dist/runtime/public/scss/element-plus/common/var.css +302 -0
  94. package/dist/runtime/public/scss/element-plus/config-provider.css +0 -0
  95. package/dist/runtime/public/scss/element-plus/container.css +313 -0
  96. package/dist/runtime/public/scss/element-plus/dark/css-vars.css +353 -0
  97. package/dist/runtime/public/scss/element-plus/dark/var.css +302 -0
  98. package/dist/runtime/public/scss/element-plus/date-picker/date-picker.css +558 -0
  99. package/dist/runtime/public/scss/element-plus/date-picker/date-range-picker.css +410 -0
  100. package/dist/runtime/public/scss/element-plus/date-picker/date-table.css +426 -0
  101. package/dist/runtime/public/scss/element-plus/date-picker/month-table.css +388 -0
  102. package/dist/runtime/public/scss/element-plus/date-picker/picker-panel.css +454 -0
  103. package/dist/runtime/public/scss/element-plus/date-picker/picker.css +662 -0
  104. package/dist/runtime/public/scss/element-plus/date-picker/time-picker.css +384 -0
  105. package/dist/runtime/public/scss/element-plus/date-picker/time-range-picker.css +338 -0
  106. package/dist/runtime/public/scss/element-plus/date-picker/time-spinner.css +389 -0
  107. package/dist/runtime/public/scss/element-plus/date-picker/year-table.css +384 -0
  108. package/dist/runtime/public/scss/element-plus/date-picker.css +1531 -0
  109. package/dist/runtime/public/scss/element-plus/descriptions-item.css +347 -0
  110. package/dist/runtime/public/scss/element-plus/descriptions.css +435 -0
  111. package/dist/runtime/public/scss/element-plus/dialog.css +512 -0
  112. package/dist/runtime/public/scss/element-plus/display.css +357 -0
  113. package/dist/runtime/public/scss/element-plus/divider.css +345 -0
  114. package/dist/runtime/public/scss/element-plus/drawer.css +419 -0
  115. package/dist/runtime/public/scss/element-plus/dropdown-item.css +0 -0
  116. package/dist/runtime/public/scss/element-plus/dropdown-menu.css +0 -0
  117. package/dist/runtime/public/scss/element-plus/dropdown.css +495 -0
  118. package/dist/runtime/public/scss/element-plus/empty.css +355 -0
  119. package/dist/runtime/public/scss/element-plus/footer.css +310 -0
  120. package/dist/runtime/public/scss/element-plus/form-item.css +0 -0
  121. package/dist/runtime/public/scss/element-plus/form.css +527 -0
  122. package/dist/runtime/public/scss/element-plus/header.css +310 -0
  123. package/dist/runtime/public/scss/element-plus/icon.css +343 -0
  124. package/dist/runtime/public/scss/element-plus/image-viewer.css +439 -0
  125. package/dist/runtime/public/scss/element-plus/image.css +343 -0
  126. package/dist/runtime/public/scss/element-plus/index.css +17293 -0
  127. package/dist/runtime/public/scss/element-plus/infinite-scroll.css +0 -0
  128. package/dist/runtime/public/scss/element-plus/input-number.css +494 -0
  129. package/dist/runtime/public/scss/element-plus/input.css +770 -0
  130. package/dist/runtime/public/scss/element-plus/link.css +453 -0
  131. package/dist/runtime/public/scss/element-plus/loading.css +391 -0
  132. package/dist/runtime/public/scss/element-plus/main.css +311 -0
  133. package/dist/runtime/public/scss/element-plus/mention.css +413 -0
  134. package/dist/runtime/public/scss/element-plus/menu-item-group.css +0 -0
  135. package/dist/runtime/public/scss/element-plus/menu-item.css +0 -0
  136. package/dist/runtime/public/scss/element-plus/menu.css +737 -0
  137. package/dist/runtime/public/scss/element-plus/message-box.css +533 -0
  138. package/dist/runtime/public/scss/element-plus/message.css +528 -0
  139. package/dist/runtime/public/scss/element-plus/mixins/config.css +0 -0
  140. package/dist/runtime/public/scss/element-plus/mixins/function.css +0 -0
  141. package/dist/runtime/public/scss/element-plus/mixins/mixins.css +302 -0
  142. package/dist/runtime/public/scss/element-plus/mixins/utils.css +0 -0
  143. package/dist/runtime/public/scss/element-plus/notification.css +413 -0
  144. package/dist/runtime/public/scss/element-plus/option-group.css +331 -0
  145. package/dist/runtime/public/scss/element-plus/option.css +354 -0
  146. package/dist/runtime/public/scss/element-plus/overlay.css +317 -0
  147. package/dist/runtime/public/scss/element-plus/page-header.css +351 -0
  148. package/dist/runtime/public/scss/element-plus/pagination.css +586 -0
  149. package/dist/runtime/public/scss/element-plus/popconfirm.css +315 -0
  150. package/dist/runtime/public/scss/element-plus/popover.css +352 -0
  151. package/dist/runtime/public/scss/element-plus/popper.css +400 -0
  152. package/dist/runtime/public/scss/element-plus/progress.css +449 -0
  153. package/dist/runtime/public/scss/element-plus/radio-button.css +436 -0
  154. package/dist/runtime/public/scss/element-plus/radio-group.css +308 -0
  155. package/dist/runtime/public/scss/element-plus/radio.css +561 -0
  156. package/dist/runtime/public/scss/element-plus/rate.css +384 -0
  157. package/dist/runtime/public/scss/element-plus/reset.css +399 -0
  158. package/dist/runtime/public/scss/element-plus/result.css +381 -0
  159. package/dist/runtime/public/scss/element-plus/row.css +339 -0
  160. package/dist/runtime/public/scss/element-plus/scrollbar.css +373 -0
  161. package/dist/runtime/public/scss/element-plus/segmented.css +460 -0
  162. package/dist/runtime/public/scss/element-plus/select-dropdown-v2.css +351 -0
  163. package/dist/runtime/public/scss/element-plus/select-dropdown.css +351 -0
  164. package/dist/runtime/public/scss/element-plus/select-v2.css +765 -0
  165. package/dist/runtime/public/scss/element-plus/select.css +765 -0
  166. package/dist/runtime/public/scss/element-plus/skeleton-item.css +372 -0
  167. package/dist/runtime/public/scss/element-plus/skeleton.css +335 -0
  168. package/dist/runtime/public/scss/element-plus/slider.css +480 -0
  169. package/dist/runtime/public/scss/element-plus/space.css +317 -0
  170. package/dist/runtime/public/scss/element-plus/spinner.css +342 -0
  171. package/dist/runtime/public/scss/element-plus/statistic.css +336 -0
  172. package/dist/runtime/public/scss/element-plus/step.css +586 -0
  173. package/dist/runtime/public/scss/element-plus/steps.css +319 -0
  174. package/dist/runtime/public/scss/element-plus/sub-menu.css +0 -0
  175. package/dist/runtime/public/scss/element-plus/switch.css +594 -0
  176. package/dist/runtime/public/scss/element-plus/tab-pane.css +0 -0
  177. package/dist/runtime/public/scss/element-plus/table-column.css +382 -0
  178. package/dist/runtime/public/scss/element-plus/table-v2.css +520 -0
  179. package/dist/runtime/public/scss/element-plus/table.css +893 -0
  180. package/dist/runtime/public/scss/element-plus/tabs.css +892 -0
  181. package/dist/runtime/public/scss/element-plus/tag.css +624 -0
  182. package/dist/runtime/public/scss/element-plus/text.css +378 -0
  183. package/dist/runtime/public/scss/element-plus/time-picker.css +1023 -0
  184. package/dist/runtime/public/scss/element-plus/time-select.css +946 -0
  185. package/dist/runtime/public/scss/element-plus/timeline-item.css +415 -0
  186. package/dist/runtime/public/scss/element-plus/timeline.css +334 -0
  187. package/dist/runtime/public/scss/element-plus/tooltip-v2.css +410 -0
  188. package/dist/runtime/public/scss/element-plus/tooltip.css +0 -0
  189. package/dist/runtime/public/scss/element-plus/tour.css +461 -0
  190. package/dist/runtime/public/scss/element-plus/transfer.css +497 -0
  191. package/dist/runtime/public/scss/element-plus/tree-select.css +325 -0
  192. package/dist/runtime/public/scss/element-plus/tree.css +538 -0
  193. package/dist/runtime/public/scss/element-plus/upload.css +862 -0
  194. package/dist/runtime/public/scss/element-plus/var.css +389 -0
  195. package/dist/runtime/public/scss/element-plus/virtual-list.css +330 -0
  196. package/dist/runtime/public/scss/theme.css +1268 -0
  197. package/dist/runtime/server/tsconfig.json +6 -0
  198. package/dist/runtime/types.d.ts +31 -0
  199. package/dist/types.d.mts +7 -0
  200. package/dist/types.d.ts +7 -0
  201. package/package.json +35 -12
  202. package/components/TimusIcons.vue +0 -54
  203. package/generate-icon.js +0 -22
  204. package/module.ts +0 -84
  205. package/pages/icons.vue +0 -37
  206. package/plugins/sample-plugin.ts +0 -5
  207. package/public/isax/fonts/iconsax.svg +0 -927
  208. package/public/isax/fonts/iconsax.ttf +0 -0
  209. package/public/isax/fonts/iconsax.woff +0 -0
  210. package/public/isax/icons.json +0 -899
  211. package/public/isax/selection.json +0 -1
  212. package/public/isax/style.css +0 -1
  213. package/public/isax/style.scss +0 -5435
  214. package/public/isax/variables.scss +0 -900
@@ -0,0 +1,270 @@
1
+ <template>
2
+ <div class="flex flex-col gap-8 mb-16">
3
+ <h1 class="">Inputs</h1>
4
+ <p>Element Plus Button is a customizable and versatile UI component designed for creating interactive and visually appealing buttons in web applications.</p>
5
+
6
+ <el-card>
7
+ <template #header> Sizes </template>
8
+ <div class="flex flex-col gap-3 items-start">
9
+ <p>
10
+ Default size is Large. Input component provides {{ sizes.length }} additional sizes for you to choose among different scenarios. Use attribute size to set additional
11
+ sizes <el-text tag="mark">{{ sizes.join(', ') }}</el-text>
12
+ </p>
13
+ <div class="flex gap-4 items-start">
14
+ <el-input v-for="(size, index) of sizes" :key="size + index" v-model="input" placeholder="Please input" :size="size" :prefix-icon="ElIconSearch" />
15
+ </div>
16
+ </div>
17
+ <template #footer>
18
+ <code class="flex flex-col gap-3 items-start">
19
+ <html-encode tag="&lt;el-input :size='small' /&gt;" />
20
+ </code>
21
+ </template>
22
+ </el-card>
23
+
24
+ <el-card>
25
+ <template #header> Disabled </template>
26
+ <div class="flex flex-col gap-3 items-start">
27
+ <p>
28
+ Disable the Input with the <code><el-text tag="mark">disabled</el-text></code> attribute.
29
+ </p>
30
+ <div class="flex gap-4 items-start">
31
+ <el-input v-for="(size, index) of sizes" :key="size + index" v-model="input" placeholder="Please input" :size="size" disabled />
32
+ </div>
33
+ </div>
34
+ <template #footer>
35
+ <code class="flex flex-col gap-3 items-start">
36
+ <html-encode tag="&lt;el-input disabled /&gt;" />
37
+ </code>
38
+ </template>
39
+ </el-card>
40
+
41
+ <el-card>
42
+ <template #header> Clearable </template>
43
+ <div class="flex flex-col gap-3 items-start">
44
+ <p>Make the Input clearable with the <el-text tag="mark">clearable</el-text> attribute.</p>
45
+ <div class="flex gap-4">
46
+ <el-input v-for="(size, index) of sizes" :key="size + index" v-model="input" placeholder="Please input" :size="size" clearable />
47
+ </div>
48
+ </div>
49
+ <template #footer>
50
+ <code class="flex flex-col gap-3 items-start">
51
+ <html-encode tag="&lt;el-input clearable /&gt;" />
52
+ </code>
53
+ </template>
54
+ </el-card>
55
+
56
+ <el-card>
57
+ <template #header> Formatter </template>
58
+ <div class="flex flex-col gap-3 items-start">
59
+ <p>Display value within it's situation with <el-text tag="mark">formatter</el-text>, and we usually use <el-text tag="mark">parser</el-text> at the same time.</p>
60
+ <div class="flex gap-4 flex-wrap">
61
+ <el-input
62
+ v-model="input"
63
+ style="width: 240px"
64
+ placeholder="Please input"
65
+ :formatter="(value: string) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
66
+ :parser="(value: string) => value.replace(/\$\s?|(,*)/g, '')"
67
+ />
68
+ </div>
69
+ </div>
70
+ <template #footer>
71
+ <code class="flex flex-col gap-3 items-start">
72
+ <html-encode :tag="snippets.formatter" />
73
+ </code>
74
+ </template>
75
+ </el-card>
76
+
77
+ <el-card>
78
+ <template #header> Password box </template>
79
+ <div class="flex flex-col gap-3 items-start">
80
+ <p>Make a toggle-able password Input with the <el-text tag="mark">show-password</el-text> attribute.</p>
81
+ <div class="flex gap-4 flex-wrap">
82
+ <el-input v-model="input" style="width: 240px" type="password" placeholder="Please input password" show-password />
83
+ </div>
84
+ </div>
85
+ <template #footer>
86
+ <html-encode :tag="snippets.password" />
87
+ </template>
88
+ </el-card>
89
+
90
+ <el-card>
91
+ <template #header> Input with icon </template>
92
+ <div class="flex flex-col gap-3 items-start">
93
+ <p>
94
+ Add an icon to indicate input type. To add icons in Input, you can simply use <el-text tag="mark">prefix-icon</el-text> and
95
+ <el-text tag="mark">suffix-icon</el-text> attributes. Also, the <el-text tag="mark">prefix</el-text> and <el-text tag="mark">suffix</el-text> named slots works as well.
96
+ </p>
97
+ <div class="flex gap-4 flex-wrap">
98
+ <div class="flex gap-4 mb-4 items-start">
99
+ <span>Using attributes</span>
100
+ <el-input v-model="input" style="width: 240px" placeholder="Pick a date" :suffix-icon="ElIconCalendar" />
101
+ <el-input v-model="input" style="width: 240px" placeholder="Type something" :prefix-icon="ElIconSearch" />
102
+ </div>
103
+ <div class="flex gap-4 items-start">
104
+ <span>Using slots</span>
105
+ <el-input v-model="input" style="width: 240px" placeholder="Pick a date">
106
+ <template #suffix>
107
+ <el-icon class="el-input__icon"><calendar /></el-icon>
108
+ </template>
109
+ </el-input>
110
+ <el-input v-model="input" style="width: 240px" placeholder="Type something">
111
+ <template #prefix>
112
+ <el-icon class="el-input__icon"><search /></el-icon>
113
+ </template>
114
+ </el-input>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ <template #footer>
119
+ <div class="flex flex-col gap-3">
120
+ <html-encode :tag="snippets.icons.suffix" />
121
+ <html-encode :tag="snippets.icons.slot" />
122
+ </div>
123
+ </template>
124
+ </el-card>
125
+
126
+ <el-card>
127
+ <template #header> Textarea </template>
128
+ <div class="flex flex-col gap-3 items-start">
129
+ <p>
130
+ Resizable for entering multiple lines of text information. Add attribute <el-text tag="mark">type="textarea"</el-text> to change <el-text tag="mark">input</el-text> into
131
+ native textarea. Control the height by setting the rows prop.
132
+ </p>
133
+ <div class="flex gap-4 flex-wrap">
134
+ <el-input v-model="textarea" style="width: 240px" :rows="2" type="textarea" placeholder="Please input" />
135
+ </div>
136
+ </div>
137
+ <template #footer>
138
+ <html-encode :tag="snippets.textarea" />
139
+ </template>
140
+ </el-card>
141
+
142
+ <el-card>
143
+ <template #header>Mixed input</template>
144
+ <div class="flex flex-col gap-3 items-start">
145
+ <p>
146
+ <el-text tag="mark">Prepend</el-text> or <el-text tag="mark">append</el-text> an element, generally a label or a button. Use <el-text tag="mark">slot</el-text> to
147
+ distribute elements that prepend or append to Input.
148
+ </p>
149
+ <div>
150
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input">
151
+ <template #prepend>Http://</template>
152
+ </el-input>
153
+ </div>
154
+ <div class="mt-4">
155
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input">
156
+ <template #append>.com</template>
157
+ </el-input>
158
+ </div>
159
+ <div class="mt-4">
160
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select">
161
+ <template #prepend>
162
+ <el-select v-model="select" placeholder="Select" style="width: 115px">
163
+ <el-option label="Restaurant" value="1" />
164
+ <el-option label="Order No." value="2" />
165
+ <el-option label="Tel" value="3" />
166
+ </el-select>
167
+ </template>
168
+ <template #append>
169
+ <el-button :icon="ElIconSearch" type="primary" />
170
+ </template>
171
+ </el-input>
172
+ </div>
173
+ <div class="mt-4">
174
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select">
175
+ <template #prepend>
176
+ <el-button :icon="ElIconSearch" type="primary" />
177
+ </template>
178
+ <template #append>
179
+ <el-select v-model="select" placeholder="Select" style="width: 115px">
180
+ <el-option label="Restaurant" value="1" />
181
+ <el-option label="Order No." value="2" />
182
+ <el-option label="Tel" value="3" />
183
+ </el-select>
184
+ </template>
185
+ </el-input>
186
+ </div>
187
+ <div class="mt-4">
188
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select" disabled>
189
+ <template #prepend>
190
+ <el-button :icon="ElIconSearch" type="primary" />
191
+ </template>
192
+ <template #append>
193
+ <el-button :icon="ElIconSearch" type="primary">Add</el-button>
194
+ </template>
195
+ </el-input>
196
+ </div>
197
+ <div class="mt-4">
198
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select" disabled>
199
+ <template #prepend>
200
+ <el-button :icon="ElIconSearch" type="primary" />
201
+ </template>
202
+ <template #append>
203
+ <el-select v-model="select" placeholder="Select" style="width: 115px">
204
+ <el-option label="Restaurant" value="1" />
205
+ <el-option label="Order No." value="2" />
206
+ <el-option label="Tel" value="3" />
207
+ </el-select>
208
+ </template>
209
+ </el-input>
210
+ </div>
211
+ </div>
212
+ <template #footer>
213
+ <html-encode :tag="snippets.mixed" />
214
+ </template>
215
+ </el-card>
216
+ </div>
217
+ </template>
218
+
219
+ <script>
220
+ import { Calendar, Search } from "@element-plus/icons-vue";
221
+ import { defineComponent } from "vue";
222
+ export default defineComponent({
223
+ name: "TimusInput",
224
+ components: { Calendar, Search },
225
+ data() {
226
+ return {
227
+ sizes: ["default", "large", "medium", "small", "mini"],
228
+ colors: ["primary", "secondary", "neutral", "success", "warning", "info", "danger"],
229
+ input: "",
230
+ textarea: "",
231
+ select: "1",
232
+ snippets: {
233
+ formatter: `<el-input
234
+ v-model="input"
235
+ placeholder="Please input"
236
+ :formatter="(value: string) => \`$ \${value}\`.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')"
237
+ :parser="(value: string) => value.replace(/\\$\\s?|(,*)/g, '')"
238
+ />`,
239
+ password: `<el-input v-model="input" type="password" placeholder="Please input password" show-password />`,
240
+ icons: {
241
+ suffix: `
242
+ // suffix
243
+ <el-input v-model="input" :suffix-icon="ElIconCalendar" />`,
244
+ slot: `
245
+ // slot
246
+ <el-input v-model="input" style="width: 240px" placeholder="Pick a date">
247
+ <template #suffix>
248
+ <el-icon class="el-input__icon"><calendar /></el-icon>
249
+ </template>
250
+ </el-input>
251
+ `
252
+ },
253
+ textarea: `<el-input v-model="textarea" style="width: 240px" :rows="2" type="textarea" placeholder="Please input" />`,
254
+ mixed: `
255
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input">
256
+ <template #prepend>Http://</template>
257
+ <template #append><el-button :icon="ElIconSearch" type="primary" /></template>
258
+ </el-input>
259
+ `
260
+ }
261
+ };
262
+ },
263
+ methods: {
264
+ capitalize(value) {
265
+ const text = String(value);
266
+ return text.charAt(0).toUpperCase() + text.slice(1);
267
+ }
268
+ }
269
+ });
270
+ </script>
@@ -0,0 +1,23 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {
2
+ sizes: string[];
3
+ colors: string[];
4
+ input: string;
5
+ textarea: string;
6
+ select: string;
7
+ snippets: {
8
+ formatter: string;
9
+ password: string;
10
+ icons: {
11
+ suffix: string;
12
+ slot: string;
13
+ };
14
+ textarea: string;
15
+ mixed: string;
16
+ };
17
+ }, {}, {
18
+ capitalize(value: string): string;
19
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
20
+ Calendar: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ Search: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
23
+ export default _default;
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div class="flex flex-col gap-8 mb-16">
3
+ <h1 class="">Link</h1>
4
+ <p>Text hyperlink</p>
5
+
6
+ <el-card>
7
+ <template #header> Basic </template>
8
+ <div class="flex flex-col gap-3 items-start">
9
+ <p>Basic text link</p>
10
+ <div class="flex gap-2">
11
+ <el-link v-for="color of colors" :key="color" :type="color">{{ color }}</el-link>
12
+ </div>
13
+ </div>
14
+ <template #footer> <html-encode :tag="snippets.basic" /> </template>
15
+ </el-card>
16
+
17
+ <el-card>
18
+ <template #header> Disabled </template>
19
+ <div class="flex flex-col gap-3 items-start">
20
+ <p>Disabled state of link</p>
21
+ <div class="flex gap-2">
22
+ <el-link v-for="color of colors" :key="color" :type="color" disabled>{{ color }}</el-link>
23
+ </div>
24
+ </div>
25
+
26
+ <template #footer> <html-encode :tag="snippets.disabled" /> </template>
27
+ </el-card>
28
+
29
+ <el-card>
30
+ <template #header> Underline </template>
31
+ <div class="flex flex-col gap-3 items-start">
32
+ <h2>Underline</h2>
33
+ <p>Underline of link</p>
34
+ <div class="flex gap-2">
35
+ <el-link :underline="false">Without Underline</el-link>
36
+ <el-link>With Underline</el-link>
37
+ </div>
38
+ </div>
39
+ <template #footer> <html-encode :tag="snippets.underline" /> </template>
40
+ </el-card>
41
+
42
+ <el-card>
43
+ <template #header> Icon </template>
44
+ <div class="flex flex-col gap-3 items-start">
45
+ <p>Link with icon</p>
46
+ <div class="flex flex-col gap-2 items-start">
47
+ <el-link class="isax-add">Check</el-link>
48
+ <el-link class="isax-add icon-right">Check</el-link>
49
+ <el-link :icon="ElIconPlus">Edit</el-link>
50
+ <el-link>
51
+ Check<el-icon class="isax-add el-icon--right"><el-icon-view /></el-icon>
52
+ </el-link>
53
+ </div>
54
+ </div>
55
+ <template #footer> <html-encode :tag="snippets.icon" /> </template>
56
+ </el-card>
57
+ </div>
58
+ </template>
59
+
60
+ <script lang="ts" setup>
61
+ const colors = ref<string[]>(['default', 'primary', 'secondary', 'neutral', 'success', 'warning', 'info', 'danger']);
62
+ const snippets = ref({
63
+ basic: `<el-link href="https://element-plus.org" target="_blank" type="secondary">default</el-link>`,
64
+ disabled: `<el-link type="secondary" disabled>default</el-link>`,
65
+ underline: `<el-link :underline="false">Without Underline</el-link>`,
66
+ icon: `<el-link class="isax-add icon-right">Check</el-link>`,
67
+ });
68
+ </script>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <div class="flex flex-col gap-8 mb-16">
3
+ <h1 class="">Message</h1>
4
+ <p>Used to show feedback after an activity. The difference with Notification is that the latter is often used to show a system level passive notification.</p>
5
+
6
+ <el-card>
7
+ <template #header> Basic usage </template>
8
+ <div class="flex flex-col gap-3">
9
+ <p>
10
+ Displays at the top, and disappears after 3 seconds. The setup of Message is very similar to notification, so parts of the options won't be explained in detail here. You
11
+ can check the options table below combined with notification doc to understand it. Element Plus has registered a <el-text tag="mark">$message</el-text> method for
12
+ invoking. Message can take a string or a VNode as parameter, and it will be shown as the main body.
13
+ </p>
14
+ <div class="flex flex-col gap-7.5">
15
+ <el-radio-group v-model="isPlain" size="mini">
16
+ <el-radio-button :value="false">basic</el-radio-button>
17
+ <el-radio-button :value="true">plain</el-radio-button>
18
+ </el-radio-group>
19
+ <div class="flex gap-4">
20
+ <el-button @click="basicOpener">default</el-button>
21
+ <el-button v-for="color of colors" :key="color" :type="color" @click="open(color, isPlain)">{{ color }}</el-button>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ <template #footer> <html-encode :tag="snippets.basic" /> </template>
26
+ </el-card>
27
+ </div>
28
+ </template>
29
+
30
+ <script lang="ts" setup>
31
+ import { ElMessage, type MessageOptions } from 'element-plus';
32
+ import { ref } from 'vue';
33
+
34
+ const colors = ref(['success', 'warning', 'info', 'error', 'danger']);
35
+ const snippets = ref({
36
+ basic: `
37
+ import { ElMessage, type MessageOptions } from 'element-plus';
38
+
39
+ ElMessage({
40
+ showClose: true,
41
+ grouping: true,
42
+ message: "Congrats, this is a message."",
43
+ type,
44
+ duration: 0,
45
+ plain,
46
+ } as MessageOptions)
47
+ `,
48
+ });
49
+ const basicOpener = () => {
50
+ ElMessage({ message: 'This is a message.', showClose: true, duration: 0 });
51
+ };
52
+ const isPlain = ref(false);
53
+ const open = function (type: string, plain: boolean = true) {
54
+ ElMessage({
55
+ showClose: true,
56
+ grouping: true,
57
+ message: `Congrats, this is a ${type} message.`,
58
+ type,
59
+ duration: 0,
60
+ plain,
61
+ validator: () => null,
62
+ } as MessageOptions);
63
+ };
64
+ </script>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div class="flex flex-col gap-8 mb-16">
3
+ <h1 class="">Notification - (Needs Acceptance)</h1>
4
+ <p>Displays a global notification message at a corner of the page.</p>
5
+
6
+ <el-card>
7
+ <template #header> Basic usage </template>
8
+ <div class="flex flex-col gap-3">
9
+ <p>
10
+ Element Plus has registered the <el-text tag="mark">$notify</el-text> method and it receives an object as its parameter. In the simplest case, you can set the
11
+ <el-text tag="mark">title</el-text> field and the <el-text tag="mark">message</el-text> field for the title and body of the notification. By default, the notification
12
+ automatically closes after 4500ms, but by setting <el-text tag="mark">duration</el-text> you can control its duration. Specifically, if set to 0, it will not close
13
+ automatically. Note that duration receives a <el-text tag="mark">Number</el-text> in milliseconds.
14
+ </p>
15
+ <section class="flex gap-7.5">
16
+ <el-button plain @click="open(4500)"> Closes automatically </el-button>
17
+ <el-button plain @click="open(0)"> Won't close automatically </el-button>
18
+ </section>
19
+ </div>
20
+ <template #footer> <html-encode :tag="snippets.basic" /> </template>
21
+ </el-card>
22
+
23
+ <el-card>
24
+ <template #header>With types</template>
25
+ <div class="flex flex-col gap-3">
26
+ <p>
27
+ We provide four types: <el-text tag="mark">success, warning, info</el-text> and <el-text tag="mark">error</el-text>. Element Plus provides four notification types:
28
+ success, warning, info and error. They are set by the <el-text tag="mark">type</el-text> field, and other values will be ignored. We also registered methods for these
29
+ types that can be invoked directly like open3 and open4 without passing a type field.
30
+ </p>
31
+ <section class="flex gap-7.5">
32
+ <el-button v-for="(type, index) of ['success', 'info', 'warning', 'error']" :key="index" plain :type="type" @click="open(0, type)">{{ type }}</el-button>
33
+ </section>
34
+ </div>
35
+ <template #footer> <html-encode :tag="snippets.types" /> </template>
36
+ </el-card>
37
+ </div>
38
+ </template>
39
+
40
+ <script lang="ts" setup>
41
+ import { ElNotification } from 'element-plus';
42
+ import { ref } from 'vue';
43
+
44
+ const open = (duration = 4500, type) => {
45
+ ElNotification({
46
+ title: capitalize(type) ?? 'Title',
47
+ message: 'This is a reminder',
48
+ duration: duration ?? 5000,
49
+ type: type ?? 'default',
50
+ });
51
+ };
52
+ const snippets = ref({
53
+ basic: `
54
+ ElNotification({
55
+ title: 'Title',
56
+ message: 'This is a reminder',
57
+ duration: 4500,
58
+ });`,
59
+ types: `
60
+ ElNotification({
61
+ title: 'Title',
62
+ message: 'This is a reminder',
63
+ duration: 0,
64
+ type: 'success',
65
+ });
66
+ `,
67
+ });
68
+ const capitalize = (value: string): string => {
69
+ if (!value) return null;
70
+
71
+ const text = String(value);
72
+
73
+ return text.charAt(0).toUpperCase() + text.slice(1);
74
+ };
75
+ </script>
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <div class="flex flex-col gap-8 mb-16">
3
+ <h1 class="">Input Number</h1>
4
+ <p>Input numerical values with a customizable range.</p>
5
+
6
+ <el-card>
7
+ <template #header> Basic usage </template>
8
+ <div class="flex flex-col gap-7.5">
9
+ <p>Bind a variable to <el-text tag="mark">v-model</el-text> in <span class="comment">el-input-number</span> element and you are set.</p>
10
+ <section class="flex gap-7.5">
11
+ <el-input-number v-model="num" :min="1" :max="10" @change="handleChange" />
12
+ <el-input-number v-model="num" :disabled="true" />
13
+ </section>
14
+ </div>
15
+ <template #footer> <html-encode :tag="snippets.basic" /> </template>
16
+ </el-card>
17
+
18
+ <el-card>
19
+ <template #header>Size</template>
20
+ <div class="flex flex-col gap-7.5">
21
+ <p>Use attribute <el-text tag="mark">size</el-text> to set additional sizes with large or small.</p>
22
+ <section class="flex flex-col">
23
+ <el-form label-position="top">
24
+ <div class="el-form-items items-start">
25
+ <el-form-item v-for="size of sizes" :key="size" :label="size">
26
+ <el-input-number v-model="num" :min="1" :max="10" controls-position="right" :size="size" @change="handleChange" />
27
+ </el-form-item>
28
+ </div>
29
+ </el-form>
30
+ <el-form label-position="top">
31
+ <div class="el-form-items items-start">
32
+ <el-form-item v-for="size of sizes" :key="size" :label="size">
33
+ <el-input-number v-model="num" :min="1" :max="10" controls-position="right" :size="size" :disabled="true" @change="handleChange" />
34
+ </el-form-item>
35
+ </div>
36
+ </el-form>
37
+ </section>
38
+ </div>
39
+ <template #footer> <html-encode :tag="snippets.content" /> </template>
40
+ </el-card>
41
+
42
+ <el-card>
43
+ <template #header>Controls Position</template>
44
+ <div class="flex flex-col gap-7.5">
45
+ <p>Set <el-text tag="mark">controls-position</el-text> to decide the position of control buttons.</p>
46
+ <section class="flex gap-7.5">
47
+ <el-input-number v-model="num" :min="1" :max="10" controls-position="right" size="large" @change="handleChange" />
48
+ <el-input-number v-model="num" :min="1" :max="10" controls-position="right" size="large" :disabled="true" @change="handleChange" />
49
+ </section>
50
+ </div>
51
+ <template #footer> <html-encode :tag="snippets.content" /> </template>
52
+ </el-card>
53
+ </div>
54
+ </template>
55
+
56
+ <script lang="ts" setup>
57
+ import { ref } from 'vue';
58
+
59
+ const sizes = ref(['default', 'large', 'medium', 'small', 'mini']);
60
+ const num = ref(1);
61
+ const handleChange = (value: number) => {
62
+ console.log(value);
63
+ };
64
+ const snippets = ref({
65
+ basic: `
66
+ <el-input-number v-model="num" :min="1" :max="10" @change="handleChange" />
67
+ <el-input-number v-model="num" :disabled="true" />`,
68
+ content: `<el-input-number v-model="num" :min="1" :max="10" controls-position="right" size="large" @change="handleChange" />`,
69
+ });
70
+ </script>
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <div class="flex flex-col gap-8 mb-16">
3
+ <h1 class="">Pagination</h1>
4
+ <p>If you have too much data to display in one page, use pagination.</p>
5
+
6
+ <el-card>
7
+ <template #header> Basic usage </template>
8
+ <div class="flex flex-col gap-7.5">
9
+ <p>
10
+ Set <el-text tag="mark">layout</el-text> with different pagination elements you wish to display separated with a comma. Pagination elements are:
11
+ <el-text tag="mark">prev</el-text> (a button navigating to the previous page), <el-text tag="mark">next</el-text> (a button navigating to the next page),
12
+ <el-text tag="mark">pager</el-text> (page list), <el-text tag="mark">jumper</el-text> (a jump-to input), <el-text tag="mark">total</el-text> (total item count),
13
+ <el-text tag="mark">sizes</el-text> (a select to determine page size) and <el-text tag="mark">-></el-text> (every element after this symbol will be pulled to the right).
14
+ </p>
15
+ <section class="flex flex-col gap-7.5">
16
+ <el-pagination
17
+ v-model:current-page="current_page"
18
+ v-model:page-size="page_size"
19
+ :page-sizes="[10, 20, 50, 100]"
20
+ :disabled="disabled"
21
+ :background="background"
22
+ layout="total, prev, pager, next, jumper, sizes"
23
+ :total="40000"
24
+ @size-change="handleSizeChange"
25
+ @current-change="handleCurrentChange"
26
+ />
27
+ </section>
28
+ </div>
29
+ <template #footer> <html-encode :tag="snippets.basic" /> </template>
30
+ </el-card>
31
+
32
+ <el-card>
33
+ <template #header> Disabled </template>
34
+ <div class="flex flex-col gap-7.5">
35
+ <p>For make a disable pagination component, add <el-text tag="mark">:disabled="true"</el-text></p>
36
+ <section class="flex flex-col gap-7.5">
37
+ <el-pagination
38
+ v-model:current-page="current_page"
39
+ v-model:page-size="page_size"
40
+ :page-sizes="[10, 20, 50, 100]"
41
+ :size="size"
42
+ :disabled="true"
43
+ :background="background"
44
+ layout="total, prev, pager, next, jumper, sizes"
45
+ :total="40000"
46
+ @size-change="handleSizeChange"
47
+ @current-change="handleCurrentChange"
48
+ />
49
+ </section>
50
+ </div>
51
+ <template #footer> <html-encode :tag="snippets.disable" /> </template>
52
+ </el-card>
53
+ </div>
54
+ </template>
55
+
56
+ <script lang="ts" setup>
57
+ import { ref } from 'vue';
58
+
59
+ const pagination = ref({
60
+ current_page: 2,
61
+ size: 'small',
62
+ page_size: 20,
63
+ disabled: false,
64
+ background: 'transparent',
65
+ handleSizeChange: (pageSize) => {
66
+ console.log(pageSize);
67
+ },
68
+ handleCurrentChange: (page) => {
69
+ console.log(page);
70
+ },
71
+ });
72
+ const { current_page, size, page_size, disabled, background, handleSizeChange, handleCurrentChange } = toRefs(pagination);
73
+ const snippets = ref({
74
+ basic: `
75
+ <el-pagination
76
+ v-model:current-page="current_page"
77
+ v-model:page-size="page_size"
78
+ :page-sizes="[10, 20, 50, 100]"
79
+ :size="size"
80
+ :background="background"
81
+ layout="total, prev, pager, next, jumper, sizes"
82
+ :total="40000"
83
+ @size-change="handleSizeChange"
84
+ @current-change="handleCurrentChange"
85
+ />
86
+ `,
87
+ disable: `<el-pagination :disabled="true" />`,
88
+ });
89
+ </script>