@shoprenter/sr-styleguide 1.0.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 (191) hide show
  1. package/README.md +37 -0
  2. package/dist/demo/src/demo.js +1 -0
  3. package/dist/demo/src/demo_bootstrap_js.css +119 -0
  4. package/dist/demo/src/demo_bootstrap_js.js +2 -0
  5. package/dist/demo/src/demo_bootstrap_js.js.LICENSE.txt +3180 -0
  6. package/dist/demo/src/index.html +1 -0
  7. package/dist/demo/src/stylesheet.js +0 -0
  8. package/dist/stylesheet/sr-styleguide.css +34 -0
  9. package/package.json +61 -0
  10. package/src/components/alerts/SrErrorAlert.vue +18 -0
  11. package/src/components/alerts/SrInfoAlert.vue +18 -0
  12. package/src/components/alerts/SrSuccessAlert.vue +18 -0
  13. package/src/components/alerts/SrWarningAlert.vue +18 -0
  14. package/src/components/app-containers/SrModule/SrModule.scss +16 -0
  15. package/src/components/app-containers/SrModule/SrModule.vue +17 -0
  16. package/src/components/app-containers/SrPage/SrPage.vue +25 -0
  17. package/src/components/buttons/SrDeleteButton.vue +11 -0
  18. package/src/components/buttons/SrHelpButton.scss +9 -0
  19. package/src/components/buttons/SrHelpButton.vue +16 -0
  20. package/src/components/buttons/SrPrimaryButton.vue +11 -0
  21. package/src/components/buttons/tests/SrHelpButton.spec.js +36 -0
  22. package/src/components/form/SrFormRow/SrFormRow.scss +26 -0
  23. package/src/components/form/SrFormRow/SrFormRow.vue +44 -0
  24. package/src/components/icons/SrAddCircleOutlineIcon.vue +11 -0
  25. package/src/components/icons/SrArrowRightIcon.vue +11 -0
  26. package/src/components/icons/SrCalendarIcon.vue +11 -0
  27. package/src/components/icons/SrCheckboxIndeterminateIcon.vue +11 -0
  28. package/src/components/icons/SrCheckboxOffIcon.vue +11 -0
  29. package/src/components/icons/SrCheckboxOnIcon.vue +11 -0
  30. package/src/components/icons/SrCloseIcon.vue +11 -0
  31. package/src/components/icons/SrDuplicateIcon.vue +11 -0
  32. package/src/components/icons/SrEditIcon.vue +11 -0
  33. package/src/components/icons/SrErrorCircleOutlineIcon.vue +11 -0
  34. package/src/components/icons/SrErrorIcon.vue +11 -0
  35. package/src/components/icons/SrExportIcon.vue +11 -0
  36. package/src/components/icons/SrFileWithStarIcon.vue +11 -0
  37. package/src/components/icons/SrFilterIcon.vue +11 -0
  38. package/src/components/icons/SrFindIcon.vue +11 -0
  39. package/src/components/icons/SrHelpCircleOutlineIcon.vue +11 -0
  40. package/src/components/icons/SrImportIcon.vue +11 -0
  41. package/src/components/icons/SrInfoIcon.vue +11 -0
  42. package/src/components/icons/SrInformationIcon.vue +11 -0
  43. package/src/components/icons/SrInvoiceIcon.vue +11 -0
  44. package/src/components/icons/SrInvoiceStornoIcon.vue +11 -0
  45. package/src/components/icons/SrLightningIcon.vue +11 -0
  46. package/src/components/icons/SrMagnifyIcon.vue +11 -0
  47. package/src/components/icons/SrMailIcon.vue +11 -0
  48. package/src/components/icons/SrNextIcon.vue +11 -0
  49. package/src/components/icons/SrOpenInNewIcon.vue +11 -0
  50. package/src/components/icons/SrPackageIcon.vue +10 -0
  51. package/src/components/icons/SrPadlockOutlineIcon.vue +11 -0
  52. package/src/components/icons/SrPencilIcon.vue +11 -0
  53. package/src/components/icons/SrPrevIcon.vue +11 -0
  54. package/src/components/icons/SrRadioOff.vue +11 -0
  55. package/src/components/icons/SrRadioOn.vue +11 -0
  56. package/src/components/icons/SrSearchCloseIcon.vue +11 -0
  57. package/src/components/icons/SrSearchIcon.vue +11 -0
  58. package/src/components/icons/SrSettingIcon.vue +11 -0
  59. package/src/components/icons/SrSuccessCircleOutlineIcon.vue +11 -0
  60. package/src/components/icons/SrSuccessIcon.vue +11 -0
  61. package/src/components/icons/SrTrashIcon.vue +11 -0
  62. package/src/components/icons/SrWarningCircleOutlineIcon.vue +11 -0
  63. package/src/components/icons/flags/SrCroatiaFlag.vue +73 -0
  64. package/src/components/icons/flags/SrGermanyFlag.vue +23 -0
  65. package/src/components/icons/flags/SrHungaryFlag.vue +19 -0
  66. package/src/components/icons/flags/SrRomaniaFlag.vue +23 -0
  67. package/src/components/icons/flags/SrSerbiaFlag.vue +34 -0
  68. package/src/components/icons/flags/SrSloveniaFlag.vue +33 -0
  69. package/src/components/icons/flags/SrUnitedKingdomFlag.vue +42 -0
  70. package/src/components/inputs/SrCheckbox/SrArrayCheckbox.vue +34 -0
  71. package/src/components/inputs/SrCheckbox/SrCheckbox.vue +15 -0
  72. package/src/components/inputs/SrCheckbox/tests/SrArrayCheckbox.spec.js +73 -0
  73. package/src/components/inputs/SrDatePicker/SrDatePicker.vue +56 -0
  74. package/src/components/inputs/SrInputField/SrInputField.vue +17 -0
  75. package/src/components/inputs/SrMultiCheckbox/SrMultiCheckbox.scss +35 -0
  76. package/src/components/inputs/SrMultiCheckbox/SrMultiCheckbox.vue +68 -0
  77. package/src/components/inputs/SrMultiCheckbox/tests/SrMultiCheckbox.spec.js +81 -0
  78. package/src/components/inputs/SrRadio/SrRadio.vue +19 -0
  79. package/src/components/inputs/SrRadio/SrRadioGroup.vue +15 -0
  80. package/src/components/inputs/SrSelect/SrSelect.vue +23 -0
  81. package/src/components/inputs/SrSwitch/SrSwitch.vue +30 -0
  82. package/src/components/layouts/slim/SrSlimContent/SrSlimContent.vue +14 -0
  83. package/src/components/layouts/slim/SrSlimHeading/SrSlimHeading.vue +14 -0
  84. package/src/components/layouts/slim/SrSlimLayout/SrSlimLayout.vue +13 -0
  85. package/src/components/milestone-indicators/multi-step-progress-bar/SrMultiStepProgressBar/SrMultiStepProgressBar.scss +25 -0
  86. package/src/components/milestone-indicators/multi-step-progress-bar/SrMultiStepProgressBar/SrMultiStepProgressBar.vue +12 -0
  87. package/src/components/milestone-indicators/multi-step-progress-bar/SrProgressBarStep/SrProgressBarStep.scss +69 -0
  88. package/src/components/milestone-indicators/multi-step-progress-bar/SrProgressBarStep/SrProgressBarStep.vue +25 -0
  89. package/src/components/pagination/SrPagination.vue +57 -0
  90. package/src/components/tables/SrSimpleTable/SrSimpleTable.vue +11 -0
  91. package/src/components/tabs/SrLanguageTab/SrLanguageTab.scss +12 -0
  92. package/src/components/tabs/SrLanguageTab/SrLanguageTab.vue +26 -0
  93. package/src/components/tabs/SrLanguageTab/adminLanguages.js +64 -0
  94. package/src/components/tabs/SrTab/SrTab.scss +9 -0
  95. package/src/components/tabs/SrTab/SrTab.vue +15 -0
  96. package/src/components/tabs/SrTabItem/SrTabItem.vue +12 -0
  97. package/src/components/tabs/SrTabs/SrTabs.scss +5 -0
  98. package/src/components/tabs/SrTabs/SrTabs.vue +28 -0
  99. package/src/components/tabs/SrTabsItems/SrTabsItems.vue +12 -0
  100. package/src/index.js +2 -0
  101. package/src/plugins/component-library/index.js +27 -0
  102. package/src/plugins/component-library/library/SrAlerts.js +13 -0
  103. package/src/plugins/component-library/library/SrAppContainers.js +9 -0
  104. package/src/plugins/component-library/library/SrButtons.js +11 -0
  105. package/src/plugins/component-library/library/SrFormRow.js +7 -0
  106. package/src/plugins/component-library/library/SrIcons.js +98 -0
  107. package/src/plugins/component-library/library/SrInputs.js +23 -0
  108. package/src/plugins/component-library/library/SrLayouts.js +11 -0
  109. package/src/plugins/component-library/library/SrMilestoneIndicators.js +11 -0
  110. package/src/plugins/component-library/library/SrPagination.js +7 -0
  111. package/src/plugins/component-library/library/SrTables.js +7 -0
  112. package/src/plugins/component-library/library/SrTabs.js +15 -0
  113. package/src/plugins/vuetify/index.js +9 -0
  114. package/src/plugins/vuetify/preset/icons/components/AddCircleOutlineIcon.vue +11 -0
  115. package/src/plugins/vuetify/preset/icons/components/ArrowRightIcon.vue +11 -0
  116. package/src/plugins/vuetify/preset/icons/components/CalendarIcon.vue +27 -0
  117. package/src/plugins/vuetify/preset/icons/components/CheckboxIndeterminateIcon.vue +12 -0
  118. package/src/plugins/vuetify/preset/icons/components/CheckboxOffIcon.vue +11 -0
  119. package/src/plugins/vuetify/preset/icons/components/CheckboxOnIcon.vue +12 -0
  120. package/src/plugins/vuetify/preset/icons/components/CloseIcon.vue +12 -0
  121. package/src/plugins/vuetify/preset/icons/components/DuplicateIcon.vue +11 -0
  122. package/src/plugins/vuetify/preset/icons/components/EditIcon.vue +11 -0
  123. package/src/plugins/vuetify/preset/icons/components/ErrorCircleOutlineIcon.vue +13 -0
  124. package/src/plugins/vuetify/preset/icons/components/ErrorIcon.vue +12 -0
  125. package/src/plugins/vuetify/preset/icons/components/ExportIcon.vue +11 -0
  126. package/src/plugins/vuetify/preset/icons/components/FileWithStarIcon.vue +15 -0
  127. package/src/plugins/vuetify/preset/icons/components/FilterIcon.vue +11 -0
  128. package/src/plugins/vuetify/preset/icons/components/FindIcon.vue +11 -0
  129. package/src/plugins/vuetify/preset/icons/components/HelpCircleOutlineIcon.vue +11 -0
  130. package/src/plugins/vuetify/preset/icons/components/ImportIcon.vue +11 -0
  131. package/src/plugins/vuetify/preset/icons/components/InfoIcon.vue +11 -0
  132. package/src/plugins/vuetify/preset/icons/components/InformationIcon.vue +12 -0
  133. package/src/plugins/vuetify/preset/icons/components/InvoiceIcon.vue +13 -0
  134. package/src/plugins/vuetify/preset/icons/components/InvoiceStornoIcon.vue +13 -0
  135. package/src/plugins/vuetify/preset/icons/components/LightningIcon.vue +11 -0
  136. package/src/plugins/vuetify/preset/icons/components/MagnifyIcon.vue +11 -0
  137. package/src/plugins/vuetify/preset/icons/components/MailIcon.vue +11 -0
  138. package/src/plugins/vuetify/preset/icons/components/NextIcon.vue +11 -0
  139. package/src/plugins/vuetify/preset/icons/components/OpenInNewIcon.vue +11 -0
  140. package/src/plugins/vuetify/preset/icons/components/PackageIcon.vue +12 -0
  141. package/src/plugins/vuetify/preset/icons/components/PadlockOutlineIcon.vue +20 -0
  142. package/src/plugins/vuetify/preset/icons/components/PencilIcon.vue +11 -0
  143. package/src/plugins/vuetify/preset/icons/components/PrevIcon.vue +11 -0
  144. package/src/plugins/vuetify/preset/icons/components/RadioOff.vue +11 -0
  145. package/src/plugins/vuetify/preset/icons/components/RadioOn.vue +12 -0
  146. package/src/plugins/vuetify/preset/icons/components/SearchCloseIcon.vue +11 -0
  147. package/src/plugins/vuetify/preset/icons/components/SearchIcon.vue +11 -0
  148. package/src/plugins/vuetify/preset/icons/components/SettingIcon.vue +9 -0
  149. package/src/plugins/vuetify/preset/icons/components/SuccessCircleOutlineIcon.vue +13 -0
  150. package/src/plugins/vuetify/preset/icons/components/SuccessIcon.vue +11 -0
  151. package/src/plugins/vuetify/preset/icons/components/TrashIcon.vue +12 -0
  152. package/src/plugins/vuetify/preset/icons/components/WarningCircleOutlineIcon.vue +18 -0
  153. package/src/plugins/vuetify/preset/icons/index.js +156 -0
  154. package/src/plugins/vuetify/preset/index.js +27 -0
  155. package/src/plugins/vuetify/preset/locale/sr-en.js +10 -0
  156. package/src/plugins/vuetify/preset/locale/sr-hu.js +10 -0
  157. package/src/plugins/vuetify/preset/overrides.sass +7 -0
  158. package/src/plugins/vuetify/preset/style/css/root_variables.css +25 -0
  159. package/src/plugins/vuetify/preset/style/scss/_admin-menu.scss +24 -0
  160. package/src/plugins/vuetify/preset/style/scss/_components.scss +19 -0
  161. package/src/plugins/vuetify/preset/style/scss/_layout.scss +140 -0
  162. package/src/plugins/vuetify/preset/style/scss/_new-style.scss +80 -0
  163. package/src/plugins/vuetify/preset/style/scss/_pages.scss +5 -0
  164. package/src/plugins/vuetify/preset/style/scss/_scaffolding.scss +29 -0
  165. package/src/plugins/vuetify/preset/style/scss/_utility.scss +14 -0
  166. package/src/plugins/vuetify/preset/style/scss/_vuetify-rewrite.scss +4 -0
  167. package/src/plugins/vuetify/preset/style/scss/components/_actionbar.scss +31 -0
  168. package/src/plugins/vuetify/preset/style/scss/components/_block.scss +12 -0
  169. package/src/plugins/vuetify/preset/style/scss/components/_breadcrumb.scss +37 -0
  170. package/src/plugins/vuetify/preset/style/scss/components/_buttons.scss +71 -0
  171. package/src/plugins/vuetify/preset/style/scss/components/_cards.scss +61 -0
  172. package/src/plugins/vuetify/preset/style/scss/components/_copy-to-clipboard.scss +16 -0
  173. package/src/plugins/vuetify/preset/style/scss/components/_dialog.scss +61 -0
  174. package/src/plugins/vuetify/preset/style/scss/components/_icons.scss +21 -0
  175. package/src/plugins/vuetify/preset/style/scss/components/_input.scss +199 -0
  176. package/src/plugins/vuetify/preset/style/scss/components/_pagination.scss +36 -0
  177. package/src/plugins/vuetify/preset/style/scss/components/_quantity-range-input.scss +93 -0
  178. package/src/plugins/vuetify/preset/style/scss/components/_select-all-plus.scss +5 -0
  179. package/src/plugins/vuetify/preset/style/scss/components/_select.scss +92 -0
  180. package/src/plugins/vuetify/preset/style/scss/components/_simple-card.scss +97 -0
  181. package/src/plugins/vuetify/preset/style/scss/components/_sticky-header.scss +41 -0
  182. package/src/plugins/vuetify/preset/style/scss/components/_table.scss +94 -0
  183. package/src/plugins/vuetify/preset/style/scss/components/_tooltip.scss +3 -0
  184. package/src/plugins/vuetify/preset/style/scss/mixins/_breakpoints.scss +123 -0
  185. package/src/plugins/vuetify/preset/style/scss/pages/_apps.scss +99 -0
  186. package/src/plugins/vuetify/preset/style/scss/pages/_campaign.scss +30 -0
  187. package/src/plugins/vuetify/preset/style/scss/pages/_order-list.scss +498 -0
  188. package/src/plugins/vuetify/preset/style/scss/pages/_order-preview.scss +83 -0
  189. package/src/plugins/vuetify/preset/style/scss/pages/_product-list.scss +286 -0
  190. package/src/plugins/vuetify/preset/variables.scss +264 -0
  191. package/src/plugins/vuetify/vuetify.sass +95 -0
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$next</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrNextIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$openInNew</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrOpenInNewIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$package</v-icon>
4
+ </template>
5
+ <script>
6
+ export default {
7
+ name: 'SrPackageIcon',
8
+ inheritAttrs: false
9
+ }
10
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$padlockOutline</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrPadlockOutlineIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$pencil</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrPencilIcon.vue',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$prev</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrPrevIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$radioOff</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrRadioOff',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$radioOn</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrRadioOn',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$searchClose</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrSearchCloseIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$search</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrSearchIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$setting</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrSettingIcon.vue',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$successCircleOutline</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrSuccessCircleOutlineIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$success</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrSuccessIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$trashcan</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrTrashIcon.vue',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- eslint-disable-next-line -->
3
+ <v-icon v-bind="$attrs" v-on="$listeners">$warningCircleOutline</v-icon>
4
+ </template>
5
+
6
+ <script>
7
+ export default {
8
+ name: 'SrWarningCircleOutlineIcon',
9
+ inheritAttrs: false
10
+ }
11
+ </script>
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <path fill="#fff"
4
+ d="M1 11H31V21H1z"></path>
5
+ <path
6
+ d="M5,4H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" fill="#ea3323"></path>
7
+ <path
8
+ d="M5,20H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" transform="rotate(180 16 24)"
9
+ fill="#100e91"></path>
10
+ <path
11
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
12
+ opacity=".15"></path>
13
+ <path
14
+ d="M16.001,22h0c2.524,0,4.59-2.065,4.59-4.59v-5.454H11.412v5.454c0,2.524,2.065,4.59,4.59,4.59h0Z"
15
+ fill="#ea3323"></path>
16
+ <path
17
+ d="M16.001,21.926h0c2.476,0,4.502-2.026,4.502-4.502v-5.38H11.499v5.38c0,2.476,2.026,4.502,4.502,4.502Z"
18
+ fill="#fff"></path>
19
+ <path d="M13.399,12.214h-1.733v1.904h1.733v-1.904Z" fill="#ea3323"></path>
20
+ <path
21
+ d="M13.399,16.021h1.733v-1.904h-1.733v1.904Z" fill="#ea3323"></path>
22
+ <path
23
+ d="M11.667,17.414c0,.173,.011,.343,.031,.511h1.702v-1.904h-1.733v1.393Z" fill="#ea3323"></path>
24
+ <path
25
+ d="M16.865,16.021h-1.733v1.904h1.733v-1.904Z" fill="#ea3323"></path>
26
+ <path
27
+ d="M16.865,19.828h1.733v-1.904h-1.733v1.904Z" fill="red"></path>
28
+ <path
29
+ d="M18.598,20.87c.384-.29,.719-.642,.989-1.041h-.989v1.041Z" fill="#ea3323"></path>
30
+ <path
31
+ d="M13.4,19.828h1.733v-1.904h-1.733v1.904Z" fill="#ea3323"></path>
32
+ <path
33
+ d="M12.409,19.828c.271,.4,.606,.752,.991,1.043v-1.043h-.991Z" fill="#ea3323"></path>
34
+ <path
35
+ d="M16.3,21.732c.192-.013,.38-.039,.565-.077v-1.827h-1.733v1.827c.184,.038,.372,.063,.563,.077,.202,.012,.404,.012,.605,0h0Z"
36
+ fill="#ea3323"></path>
37
+ <path d="M20.298,17.925c.02-.168,.031-.339,.031-.513v-1.391h-1.731v1.904h1.7Z"
38
+ fill="#ea3323"></path>
39
+ <path d="M16.865,16.021h1.733v-1.904h-1.733v1.904Z"
40
+ fill="#ea3323"></path>
41
+ <path
42
+ d="M16.865,12.214h-1.733v1.904h1.733v-1.904Z" fill="#ea3323"></path>
43
+ <path
44
+ d="M20.329,14.117v-1.904h-1.731v1.904h1.731Z" fill="#ea3323"></path>
45
+ <path
46
+ d="M20.426,11.9l1.074-2.435-.818-1.322-1.356,.502-.952-1.088-1.255,.719-1.119-.916-1.119,.916-1.255-.719-.952,1.088-1.356-.502-.819,1.322,1.073,2.436c1.352-.612,2.851-.953,4.427-.953s3.074,.341,4.426,.952h0Z"
47
+ fill="#fff"></path>
48
+ <path
49
+ d="M12.705,8.753l-.002,.002-1.345-.498-.753,1.215,.288,.655,.73,1.658c.545-.241,1.114-.439,1.701-.588l-.62-2.444h0Z"
50
+ fill="#0093dd"></path>
51
+ <path
52
+ d="M14.893,8.387l-.002,.002-1.244-.713-.942,1.077,.62,2.444c.576-.147,1.169-.247,1.777-.297l-.208-2.513h0Z"
53
+ fill="#100e91"></path>
54
+ <path
55
+ d="M17.112,8.388l-.003,.002-1.109-.908-1.107,.907,.208,2.513c.296-.024,.596-.038,.899-.038s.605,.013,.903,.038l.209-2.513h0Z"
56
+ fill="#0093dd"></path>
57
+ <path
58
+ d="M19.3,8.754h-.003s-.944-1.078-.944-1.078l-1.241,.711-.209,2.513c.608,.05,1.201,.151,1.777,.297l.621-2.444h0Z"
59
+ fill="#100e91"></path>
60
+ <path
61
+ d="M20.375,11.785l1.02-2.312-.753-1.215-1.342,.497-.621,2.444c.585,.149,1.152,.347,1.695,.587h0Z"
62
+ fill="#0093dd"></path>
63
+ <path
64
+ d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
65
+ fill="#fff" opacity=".2"></path>
66
+ </svg>
67
+ </template>
68
+
69
+ <script>
70
+ export default {
71
+ name: 'SrCroatiaFlag'
72
+ }
73
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <path fill="#cc2b1d"
4
+ d="M1 11H31V21H1z"></path>
5
+ <path
6
+ d="M5,4H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z"></path>
7
+ <path
8
+ d="M5,20H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" transform="rotate(180 16 24)"
9
+ fill="#f8d147"></path>
10
+ <path
11
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
12
+ opacity=".15"></path>
13
+ <path
14
+ d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
15
+ fill="#fff" opacity=".2"></path>
16
+ </svg>
17
+ </template>
18
+
19
+ <script>
20
+ export default {
21
+ name: 'GermanFlag'
22
+ }
23
+ </script>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <path fill="#fff" d="M1 11H31V21H1z"></path>
4
+ <path d="M5,4H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" fill="#be373c"></path>
5
+ <path d="M5,20H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" transform="rotate(180 16 24)"
6
+ fill="#4f6f52"></path>
7
+ <path
8
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
9
+ opacity=".15"></path>
10
+ <path d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
11
+ fill="#fff" opacity=".2"></path>
12
+ </svg>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'SrHungaryFlag'
18
+ }
19
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <path fill="#f6d44a"
4
+ d="M10 4H22V28H10z"></path>
5
+ <path
6
+ d="M5,4h6V28H5c-2.208,0-4-1.792-4-4V8c0-2.208,1.792-4,4-4Z" fill="#0c267b"></path>
7
+ <path
8
+ d="M25,4h6V28h-6c-2.208,0-4-1.792-4-4V8c0-2.208,1.792-4,4-4Z" transform="rotate(180 26 16)"
9
+ fill="#be2a2c"></path>
10
+ <path
11
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
12
+ opacity=".15"></path>
13
+ <path
14
+ d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
15
+ fill="#fff" opacity=".2"></path>
16
+ </svg>
17
+ </template>
18
+
19
+ <script>
20
+ export default {
21
+ name: 'SrRomaniaFlag'
22
+ }
23
+ </script>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <path fill="#1a3d73"
4
+ d="M1 11H31V21H1z"></path>
5
+ <path
6
+ d="M5,4H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" fill="#b8403f"></path>
7
+ <path
8
+ d="M5,20H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" transform="rotate(180 16 24)" fill="#fff"></path>
9
+ <path
10
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
11
+ opacity=".15"></path>
12
+ <path
13
+ d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
14
+ fill="#fff" opacity=".2"></path>
15
+ <path
16
+ d="M13.669,9.423c.207-.03,.134-.355-.066-.293,.083-.137-.099-.295-.223-.194,.027-.145-.171-.234-.262-.122,.025-.143-.17-.232-.261-.121-.006-.128-.181-.185-.262-.087-.018-.133-.24-.222-.35-.151-.005-.129-.181-.188-.262-.089-.006-.132-.189-.186-.267-.082-.028-.124-.214-.149-.274-.037-.034-.129-.23-.142-.281-.019-.037-.09-.17-.117-.239-.047,.036-.198-.104-.402-.302-.439,.011-.101-.048-.17,.099-.15,.047,.19,.343-.106,.152-.152-.009-.086-.142-.086-.152,0-.131,.013-.095-.017-.099-.121,.146-.04,.006-.202-.076-.218-.082,.016-.222,.178-.076,.218-.003,.106,.031,.133-.099,.121-.01-.086-.143-.085-.151,0-.147,.039-.007,.202,.076,.218,.089-.014,.049-.089,.175-.066,.051,.261-.366,.174-.302,.589-.069-.07-.202-.043-.239,.047-.05-.123-.247-.11-.281,.019-.06-.112-.246-.087-.274,.037-.078-.105-.261-.05-.267,.082-.081-.099-.258-.04-.262,.089-.11-.071-.332,.018-.35,.151-.081-.098-.256-.04-.262,.087-.092-.11-.287-.022-.261,.121-.092-.112-.289-.023-.262,.122-.123-.101-.306,.057-.223,.194-.201-.062-.273,.264-.066,.293-.135,.06-.095,.28,.055,.285-.078,.097,.006,.254,.131,.24-.058,.084-.011,.161-.002,.254,.037,.088,.124,.04,.181,.06,.101,.354,.349,.588,.522,.918-.103,.031-.061,.143,.032,.125,.002-.003,.009,.039,.009,.04-.063,.095-.163,.347,.014,.397,.084,.152,.11,.048,.03,.186,.604,.244,1.466,.103,2.152,.161,.686-.058,1.549,.082,2.152-.161-.085-.143-.047-.035,.031-.186,.172-.045,.079-.304,.014-.397,0-.013,.004-.051,.025-.039,.086,.006,.111-.099,.017-.125,.173-.33,.421-.564,.522-.918,.056-.02,.146,.028,.181-.06,.011-.094,.055-.17-.002-.254,.125,.013,.209-.143,.131-.24,.15-.006,.19-.226,.055-.285Z"
17
+ fill="#e6bd4c"></path>
18
+ <path
19
+ d="M14.231,12.033v6.004c0,.983-.437,1.945-1.093,2.644s-1.573,1.18-2.595,1.18-1.939-.481-2.595-1.18-1.093-1.661-1.093-2.644v-6.004h7.375Z"
20
+ fill="#b8403f"></path>
21
+ <path
22
+ d="M10.543,21.888c-.967,0-1.896-.422-2.615-1.188-.699-.746-1.1-1.716-1.1-2.662v-6.031h7.43v6.031c0,.946-.401,1.917-1.1,2.662-.719,.767-1.647,1.188-2.615,1.188Zm-3.66-9.827v5.977c0,.932,.396,1.889,1.085,2.625,.708,.755,1.623,1.171,2.575,1.171s1.867-.416,2.575-1.171c.689-.735,1.085-1.692,1.085-2.625v-5.977H6.883Z"
23
+ fill="#fff"></path>
24
+ <path
25
+ d="M14.062,14.242c-.054-.845-.562-2.119-1.289-1.837,.458,1.041,.017,1.234-.784,2.183-.043-.024-.365-.015-.148-.114-.298-.151-.748-.725-.397-1.095,.178-.054,.416,.167,.513-.069,.253-.011,.44-.125,.445-.316-.183,.208-.391,.215-.613,.131-.176-.047-.228-.026-.081-.136,.202,.051,.141-.115,.283-.111,.127,0,.094,.301,.233,.135,.53-.48,.123-.628-.236-.725-.243-.169-1.021,.284-1.263,.257-.054,.142-.008,.274,.128,.259-.172,.284-.262,.573-.309,1.001,.049-.432-.395-.889-.195-1.037,.145-.357-.19-.162-.539-.381-.625-.34-1.741,.069-.861,.677,.173-.381,.165-.057,.432-.076,.255,.2-.578,.248-.7,.017,.021,.249,.408,.299,.585,.41,.441-.191,.609,.252,.448,.578-.162,.277-.342,.372-.468,.497,.22,.042-.124,.097-.147,.097-.463-.514-1.332-1.373-.869-1.89,.367-.961-1.206,.159-1.149,1.168-.317,1.488,.376,3.682,.131,5.243,.384-.004,.376-.526,.546-.022,.164-.098,.252-.307,.295-.549,.078,.262,.175-.027,.234-.147,.204-.055,.297-.522,.301-.785,.131,.294,.289-.257,.259-.477,.212,.507-.263,1.204-.545,1.501,.126,.089,.401,.013,.501-.108-.069,.223-.088,.532,.188,.271,.012,.322,.203,.203,.308-.088,.237,.412,.143-.137,.34-.407,.493,.48,.05,.778,.023,1.244,.155,.21-.384,.504-.265,.763,.299,.227-.592,.816-.119,1.002,.091,.022,.226,.094,.26-.046-.032,.183,.33,.263,.393,.112,.023,.156,.37,.192,.41,.031,.017,.163,.385,.164,.403,0,.039,.161,.387,.125,.41-.032,.062,.151,.425,.072,.394-.111,.035,.139,.171,.067,.262,.044,.38-.182-.177-.632-.213-.945,.313-.154-.167-.535-.234-.765,.218-.187-.135-.515-.187-.756,.168-.658,.393-.517,.465,.047,.19-.322,.208,.073,.38,.119,.107-.419,.422,.223,.262-.485,.1,.121,.375,.197,.501,.108-.282-.298-.756-.993-.545-1.501-.029,.22,.128,.772,.259,.477,.004,.264,.097,.731,.301,.785,.058,.118,.155,.41,.234,.147,.043,.242,.131,.45,.295,.549,.169-.509,.163,.022,.546,.022-.228-1.384,.357-3.571,.186-4.867Z"
26
+ fill="#fff"></path>
27
+ </svg>
28
+ </template>
29
+
30
+ <script>
31
+ export default {
32
+ name: 'SrSerbiaFlag'
33
+ }
34
+ </script>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <path fill="#0600f5"
4
+ d="M1 11H31V21H1z"></path>
5
+ <path
6
+ d="M5,4H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" fill="#fff"></path>
7
+ <path
8
+ d="M5,20H27c2.208,0,4,1.792,4,4v4H1v-4c0-2.208,1.792-4,4-4Z" transform="rotate(180 16 24)"
9
+ fill="#ea3323"></path>
10
+ <path
11
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
12
+ opacity=".15"></path>
13
+ <path
14
+ d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
15
+ fill="#fff"
16
+ opacity=".2"></path>
17
+ <path
18
+ d="M6.612,8.569c2.019-.889,4.318-.889,6.337,0,.331,4.68-.725,7.333-3.168,7.958-2.443-.625-3.499-3.278-3.168-7.958Z"
19
+ fill="#0600f5"></path>
20
+ <path
21
+ d="M9.781,10.646l.767,1.534,.511-.682,1.278,1.705c0,.079-.011,.158-.033,.234-.356,1.245-1.299,2.237-2.524,2.656-1.225-.419-2.168-1.411-2.524-2.656-.022-.076-.033-.155-.033-.234l1.278-1.705,.511,.682,.767-1.534Z"
22
+ fill="#fff"></path>
23
+ <path
24
+ d="M6.372,8.68c.08-.038,.16-.075,.241-.111l.253,4.044c.108,1.728,1.266,3.213,2.915,3.74,1.65-.527,2.807-2.012,2.915-3.74l.253-4.044c.081,.036,.161,.073,.241,.111l-.247,3.949c-.116,1.859-1.378,3.448-3.162,3.984-1.784-.535-3.046-2.125-3.162-3.984l-.247-3.949Z"
25
+ fill="#ea3323"></path>
26
+ </svg>
27
+ </template>
28
+
29
+ <script>
30
+ export default {
31
+ name: 'SrSloveniaFlag'
32
+ }
33
+ </script>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3
+ <rect x="1" y="4" width="30"
4
+ height="24" rx="4" ry="4"
5
+ fill="#071b65"></rect>
6
+ <path
7
+ d="M5.101,4h-.101c-1.981,0-3.615,1.444-3.933,3.334L26.899,28h.101c1.981,0,3.615-1.444,3.933-3.334L5.101,4Z"
8
+ fill="#fff"></path>
9
+ <path d="M22.25,19h-2.5l9.934,7.947c.387-.353,.704-.777,.929-1.257l-8.363-6.691Z"
10
+ fill="#b92932"></path>
11
+ <path
12
+ d="M1.387,6.309l8.363,6.691h2.5L2.316,5.053c-.387,.353-.704,.777-.929,1.257Z" fill="#b92932"></path>
13
+ <path
14
+ d="M5,28h.101L30.933,7.334c-.318-1.891-1.952-3.334-3.933-3.334h-.101L1.067,24.666c.318,1.891,1.952,3.334,3.933,3.334Z"
15
+ fill="#fff"></path>
16
+ <rect x="13" y="4" width="6" height="24" fill="#fff"></rect>
17
+ <rect x="1" y="13" width="30"
18
+ height="6"
19
+ fill="#fff"></rect>
20
+ <rect
21
+ x="14" y="4" width="4" height="24" fill="#b92932"></rect>
22
+ <rect x="14" y="1" width="4" height="30"
23
+ transform="translate(32) rotate(90)"
24
+ fill="#b92932"></rect>
25
+ <path
26
+ d="M28.222,4.21l-9.222,7.376v1.414h.75l9.943-7.94c-.419-.384-.918-.671-1.471-.85Z" fill="#b92932"></path>
27
+ <path
28
+ d="M2.328,26.957c.414,.374,.904,.656,1.447,.832l9.225-7.38v-1.408h-.75L2.328,26.957Z" fill="#b92932"></path>
29
+ <path
30
+ d="M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"
31
+ opacity=".15"></path>
32
+ <path
33
+ d="M27,5H5c-1.657,0-3,1.343-3,3v1c0-1.657,1.343-3,3-3H27c1.657,0,3,1.343,3,3v-1c0-1.657-1.343-3-3-3Z"
34
+ fill="#fff" opacity=".2"></path>
35
+ </svg>
36
+ </template>
37
+
38
+ <script>
39
+ export default {
40
+ name: 'SrUnitedKingdomFlag'
41
+ }
42
+ </script>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <v-checkbox
3
+ class="mb-2 mt-2"
4
+ :input-value="modelValue"
5
+ :ripple="false"
6
+ :value="checkboxValue"
7
+ hide-details
8
+ v-bind="$attrs"
9
+ @change="handleChange"
10
+ ></v-checkbox>
11
+ </template>
12
+
13
+ <script>
14
+ export default {
15
+ name: 'SrArrayCheckbox',
16
+ inheritAttrs: false,
17
+ emits: ['change:modelValue'],
18
+ props: {
19
+ modelValue: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ checkboxValue: {
24
+ type: [Number, String],
25
+ default: 0
26
+ }
27
+ },
28
+ methods: {
29
+ handleChange (checked) {
30
+ this.$emit('change:modelValue', checked)
31
+ }
32
+ }
33
+ }
34
+ </script>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <v-checkbox
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ hide-details
6
+ :ripple="false"
7
+ ></v-checkbox>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'SrCheckbox',
13
+ inheritAttrs: false
14
+ }
15
+ </script>
@@ -0,0 +1,73 @@
1
+ import { mount } from '@vue/test-utils'
2
+ import SrCheckboxArray from '../SrArrayCheckbox.vue'
3
+
4
+ function mountComponent (options = {}) {
5
+ const vuetify = createVuetify()
6
+ return mount(SrCheckboxArray, {
7
+ vuetify,
8
+ attachTo: document.body,
9
+ ...options
10
+ })
11
+ }
12
+
13
+ describe('SrArrayCheckbox.vue', () => {
14
+ it('renders v-checkbox component', () => {
15
+ const wrapper = mountComponent()
16
+ expect(wrapper.findComponent({ name: 'v-checkbox' }).exists()).toBe(true)
17
+ })
18
+
19
+ it('binds input-value to modelValue prop', () => {
20
+ const wrapper = mountComponent({
21
+ propsData: { modelValue: ['apple'], checkboxValue: 'apple' }
22
+ })
23
+ const checkbox = wrapper.findComponent({ name: 'v-checkbox' })
24
+ expect(checkbox.props('inputValue')).toContain('apple')
25
+ })
26
+
27
+ it('passes checkboxValue to v-checkbox value prop', () => {
28
+ const wrapper = mountComponent({
29
+ propsData: { checkboxValue: 'banana' }
30
+ })
31
+ const checkbox = wrapper.findComponent({ name: 'v-checkbox' })
32
+ expect(checkbox.props('value')).toBe('banana')
33
+ })
34
+
35
+ it('emits change:modelValue when checkbox is clicked', async () => {
36
+ const wrapper = mountComponent({
37
+ propsData: { modelValue: [], checkboxValue: 'orange' }
38
+ })
39
+
40
+ const checkbox = wrapper.findComponent({ name: 'v-checkbox' })
41
+ await checkbox.vm.$emit('change', ['orange'])
42
+
43
+ expect(wrapper.emitted('change:modelValue')).toBeTruthy()
44
+ expect(wrapper.emitted('change:modelValue')[0][0]).toEqual(['orange'])
45
+ })
46
+
47
+ it('supports number values in checkboxValue and modelValue', async () => {
48
+ const wrapper = mountComponent({
49
+ propsData: { modelValue: [1, 2], checkboxValue: 2 }
50
+ })
51
+
52
+ const checkbox = wrapper.findComponent({ name: 'v-checkbox' })
53
+ expect(checkbox.props('inputValue')).toContain(2)
54
+ expect(checkbox.props('value')).toBe(2)
55
+ })
56
+
57
+ it('works with default empty modelValue array', () => {
58
+ const wrapper = mountComponent()
59
+ const checkbox = wrapper.findComponent({ name: 'v-checkbox' })
60
+ expect(Array.isArray(checkbox.props('inputValue'))).toBe(true)
61
+ expect(checkbox.props('inputValue')).toHaveLength(0)
62
+ })
63
+
64
+ it('updates correctly when props change', async () => {
65
+ const wrapper = mountComponent({
66
+ propsData: { modelValue: ['x'], checkboxValue: 'y' }
67
+ })
68
+
69
+ await wrapper.setProps({ modelValue: ['y'] })
70
+ const checkbox = wrapper.findComponent({ name: 'v-checkbox' })
71
+ expect(checkbox.props('inputValue')).toContain('y')
72
+ })
73
+ })
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <v-menu
3
+ v-model="menuOpen"
4
+ offset-y
5
+ max-width="290"
6
+ >
7
+ <template #activator="{on, attrs}">
8
+ <v-text-field
9
+ :value="value"
10
+ :placeholder="placeholder"
11
+ :clearable="clearable"
12
+ dense hide-details outlined
13
+ append-icon="mdi-chevron-down"
14
+ readonly
15
+ v-bind="attrs"
16
+ v-on="on"
17
+ ></v-text-field>
18
+ </template>
19
+ <v-date-picker
20
+ :value="value"
21
+ @input="selectDate"
22
+ first-day-of-week="1"
23
+ />
24
+ </v-menu>
25
+ </template>
26
+
27
+ <script>
28
+ export default {
29
+ name: 'SrDatePicker',
30
+ props: {
31
+ value: {
32
+ required: false,
33
+ default: null
34
+ },
35
+ placeholder: {
36
+ required: false,
37
+ default: ''
38
+ },
39
+ clearable: {
40
+ required: false,
41
+ default: false
42
+ }
43
+ },
44
+ data () {
45
+ return {
46
+ menuOpen: false
47
+ }
48
+ },
49
+ methods: {
50
+ selectDate (value) {
51
+ this.$emit('input', value)
52
+ this.menuOpen = false
53
+ }
54
+ }
55
+ }
56
+ </script>
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <v-text-field
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ dense
6
+ outlined
7
+ persistent-hint
8
+ clearable
9
+ />
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ name: 'SrInputField',
15
+ inheritAttrs: false
16
+ }
17
+ </script>