@policystudio/policy-studio-ui-vue 1.1.90-beta.2 → 1.1.90-beta.20

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 (146) hide show
  1. package/.eslintrc.js +13 -8
  2. package/.github/workflows/deploy-storybook.yml +4 -4
  3. package/.nvmrc +1 -0
  4. package/dist/css/psui_styles_output.css +6986 -0
  5. package/dist/index.d.ts +50 -0
  6. package/dist/index.js +104 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/util/GeneralFunctions.d.ts +3 -0
  9. package/dist/util/GeneralFunctions.js +29 -0
  10. package/dist/util/GeneralFunctions.js.map +1 -0
  11. package/dist/util/directives.d.ts +1 -0
  12. package/dist/util/directives.js +22 -0
  13. package/dist/util/directives.js.map +1 -0
  14. package/dist/util/imageLoader.d.ts +6 -0
  15. package/dist/util/imageLoader.js +52 -0
  16. package/dist/util/imageLoader.js.map +1 -0
  17. package/package.json +25 -37
  18. package/src/App.vue +30 -0
  19. package/src/assets/scss/components/PsDataTable.scss +1 -1
  20. package/src/components/accordion/PsAccordionItem.vue +75 -75
  21. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -33
  22. package/src/components/badges-and-tags/PsCardInfos.vue +40 -41
  23. package/src/components/badges-and-tags/PsChartLegend.vue +47 -51
  24. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +14 -19
  25. package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
  26. package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
  27. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
  28. package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
  29. package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
  30. package/src/components/badges-and-tags/PsTagScope.vue +17 -22
  31. package/src/components/badges-and-tags/PsTestimonialCard.vue +20 -26
  32. package/src/components/buttons/PsButton.vue +88 -111
  33. package/src/components/chips/PsChips.vue +98 -101
  34. package/src/components/controls/PsCheckbox.vue +84 -84
  35. package/src/components/controls/PsCheckboxSimple.vue +95 -95
  36. package/src/components/controls/PsDraggable.vue +53 -55
  37. package/src/components/controls/PsInlineSelector.vue +99 -99
  38. package/src/components/controls/PsRadioButton.vue +59 -58
  39. package/src/components/controls/PsRadioButtonSimple.vue +79 -75
  40. package/src/components/controls/PsSlider.vue +185 -176
  41. package/src/components/controls/PsSwitch.vue +51 -52
  42. package/src/components/controls/PsToggle.vue +53 -50
  43. package/src/components/data-graphics/PsBarChart.vue +19 -21
  44. package/src/components/datatable/PsDataTable.vue +56 -60
  45. package/src/components/datatable/PsDataTableItem.vue +14 -28
  46. package/src/components/forms/PsDropdown.vue +164 -162
  47. package/src/components/forms/PsDropdownList.vue +133 -130
  48. package/src/components/forms/PsInput.vue +155 -153
  49. package/src/components/forms/PsInputSelect.vue +91 -92
  50. package/src/components/forms/PsInputTextArea.vue +71 -71
  51. package/src/components/navigations/PsBreadcrumb.vue +26 -34
  52. package/src/components/notifications/PsDialog.vue +57 -56
  53. package/src/components/notifications/PsSimpleAlert.vue +28 -29
  54. package/src/components/notifications/PsToast.vue +40 -39
  55. package/src/components/table-results/PsTableResults.vue +449 -458
  56. package/src/components/table-results/PsTableResultsBody.vue +66 -67
  57. package/src/components/table-results/PsTableResultsHead.vue +62 -56
  58. package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
  59. package/src/components/table-results/PsTableResultsHeadFlexible.vue +63 -56
  60. package/src/components/table-results/PsTableResultsRow.vue +55 -56
  61. package/src/components/tabs/PsTabHeader.vue +106 -100
  62. package/src/components/tooltip/PsDialogTooltip.vue +96 -101
  63. package/src/components/tooltip/PsRichTooltip.vue +42 -45
  64. package/src/components/tooltip/PsTooltip.vue +111 -116
  65. package/src/components/ui/PsDotLoader.vue +1 -5
  66. package/src/components/ui/PsIcon.vue +126 -129
  67. package/src/index.ts +156 -0
  68. package/src/tsconfig.json +12 -0
  69. package/src/types/index.d.ts +6 -0
  70. package/src/util/GeneralFunctions.js +4 -6
  71. package/src/util/directives.ts +24 -0
  72. package/src/util/imageLoader.js +14 -7
  73. package/tailwind.config.js +1 -1
  74. package/tsconfig.json +47 -0
  75. package/.storybook/PolicyStudio.js +0 -10
  76. package/.storybook/eventBus.js +0 -26
  77. package/.storybook/main.js +0 -21
  78. package/.storybook/manager.js +0 -6
  79. package/.storybook/preview.js +0 -17
  80. package/babel.config.js +0 -17
  81. package/dist/css/psui_styles.css +0 -4647
  82. package/postcss.config.js +0 -8
  83. package/src/assets/images/multifamily-units.svg +0 -10
  84. package/src/assets/images/policy-studio.svg +0 -15
  85. package/src/components/playground/PsScrollBar.vue +0 -320
  86. package/src/contents/ComparisonData.js +0 -378
  87. package/src/contents/FlexibleData.js +0 -502
  88. package/src/contents/ResultsData.js +0 -531
  89. package/src/index.js +0 -166
  90. package/src/stories/Accordion.stories.js +0 -59
  91. package/src/stories/BadgeWithIcon.stories.js +0 -31
  92. package/src/stories/BarChart.stories.js +0 -17
  93. package/src/stories/Breadcrumb.stories.js +0 -25
  94. package/src/stories/Button.stories.js +0 -48
  95. package/src/stories/Button.vue +0 -59
  96. package/src/stories/CardInfos.stories.js +0 -16
  97. package/src/stories/ChartLegend.stories.js +0 -16
  98. package/src/stories/Checkbox.stories.js +0 -45
  99. package/src/stories/CheckboxSimple.stories.js +0 -49
  100. package/src/stories/Chips.stories.js +0 -31
  101. package/src/stories/ClimateZoneBadge.stories.js +0 -17
  102. package/src/stories/Colors.mdx +0 -70
  103. package/src/stories/CostEffectBar.stories.js +0 -23
  104. package/src/stories/Datatable.stories.js +0 -50
  105. package/src/stories/DateCardInfo.stories.js +0 -24
  106. package/src/stories/Dialog.stories.js +0 -131
  107. package/src/stories/Draggable.stories.js +0 -22
  108. package/src/stories/Dropdown.stories.js +0 -99
  109. package/src/stories/DropdownList.stories.js +0 -211
  110. package/src/stories/ElevationSystem.mdx +0 -41
  111. package/src/stories/Header.stories.js +0 -41
  112. package/src/stories/Header.vue +0 -77
  113. package/src/stories/HighlightRippleDot.stories.js +0 -15
  114. package/src/stories/Icon.stories.js +0 -21
  115. package/src/stories/InlineSelector.stories.js +0 -18
  116. package/src/stories/Input.stories.js +0 -240
  117. package/src/stories/InputSelect.stories.js +0 -30
  118. package/src/stories/InputTextArea.stories.js +0 -25
  119. package/src/stories/Introduction.mdx +0 -211
  120. package/src/stories/MiniTag.stories.js +0 -52
  121. package/src/stories/Playground.stories.js +0 -16
  122. package/src/stories/ProgressBar.stories.js +0 -23
  123. package/src/stories/RadioButton.stories.js +0 -40
  124. package/src/stories/RadioButtonSimple.stories.js +0 -43
  125. package/src/stories/SimpleAlert.stories.js +0 -21
  126. package/src/stories/Slider.stories.js +0 -75
  127. package/src/stories/Switch.stories.js +0 -39
  128. package/src/stories/TabHeader.stories.js +0 -52
  129. package/src/stories/TableResults.stories.js +0 -724
  130. package/src/stories/TagScope.stories.js +0 -17
  131. package/src/stories/TestimonialCard.stories.js +0 -27
  132. package/src/stories/Toast.stories.js +0 -52
  133. package/src/stories/Toggle.stories.js +0 -45
  134. package/src/stories/Tooltip.stories.js +0 -114
  135. package/src/stories/Typography.mdx +0 -212
  136. package/src/stories/assets/code-brackets.svg +0 -1
  137. package/src/stories/assets/colors.svg +0 -1
  138. package/src/stories/assets/comments.svg +0 -1
  139. package/src/stories/assets/direction.svg +0 -1
  140. package/src/stories/assets/flow.svg +0 -1
  141. package/src/stories/assets/plugin.svg +0 -1
  142. package/src/stories/assets/repo.svg +0 -1
  143. package/src/stories/assets/stackalt.svg +0 -1
  144. package/src/stories/button.css +0 -30
  145. package/src/stories/header.css +0 -32
  146. package/webpack.config.js +0 -22
package/postcss.config.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- 'postcss-import': {},
4
- 'tailwindcss/nesting': {},
5
- tailwindcss: {},
6
- autoprefixer: {},
7
- },
8
- }
@@ -1,10 +0,0 @@
1
- <svg width="39" height="38" viewBox="0 0 39 38" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0)">
3
- <path d="M18.2274 34.9462V30.9159M18.2274 34.9462H3.12439V30.9159H4.56681M18.2274 34.9462H21.1123H23.8274M34.3911 10.2129V34.9462H31.3789H28.6214M34.3911 10.2129L35.7911 10.8068V7.74167L18.2274 1.61667V4.27349M34.3911 10.2129L18.2274 4.27349M16.2759 11.6129L4.56681 16.7498M18.2274 7.74167L3.12439 14.6833V17.3826L4.56681 16.7498M18.2274 7.74167V30.9159M18.2274 7.74167V4.27349M8.34257 30.9159V25.7826H14.4941V30.9159M8.34257 30.9159H14.4941M8.34257 30.9159H4.56681M14.4941 30.9159H18.2274M4.56681 30.9159V16.7498M23.8274 34.9462V27.3947H28.6214V34.9462M23.8274 34.9462H28.6214M8.34257 18.825L12.5001 17.0432H14.4941V22.4735H8.34257V18.825ZM21.1123 18.4432H24.5062V23.7886H21.1123V18.4432ZM27.985 18.4432H31.3789V23.7886H27.985V18.4432ZM21.1123 15.1341H24.5062V9.70379L21.1123 8.34621V15.1341ZM27.985 15.1341H31.3789V12.1644L27.985 10.8068V15.1341Z" stroke="#A9AEB0" stroke-width="1.4" stroke-linejoin="round"/>
4
- </g>
5
- <defs>
6
- <clipPath id="clip0">
7
- <rect width="37.3333" height="37.3333" fill="white" transform="translate(0.791016 0.333344)"/>
8
- </clipPath>
9
- </defs>
10
- </svg>
@@ -1,15 +0,0 @@
1
- <svg width="191" height="60" viewBox="0 0 191 60" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M179.681 28.551H174.818V20.2315L167.535 7.46425H172.752L177.266 16.0717H177.329L181.874 7.46425H187.086L179.681 20.2954V28.551ZM177.459 34.7611C183.653 34.7611 187.935 39.1261 187.935 45.5257C187.935 51.9253 183.653 56.341 177.459 56.341C171.264 56.341 166.982 51.9253 166.982 45.5257C166.982 39.1261 171.264 34.7611 177.459 34.7611ZM177.459 52.2772C180.663 52.2772 182.913 50.0055 182.913 45.5257C182.913 41.046 180.663 38.7742 177.459 38.7742C174.254 38.7742 172.004 41.046 172.004 45.5257C172.004 50.0055 174.254 52.2772 177.459 52.2772ZM159.114 24.8071C161.285 24.8071 162.81 24.1672 164.367 23.2393L165.729 27.079C163.128 28.4869 160.712 28.8709 158.487 28.8709C151.289 28.8709 147.49 24.3912 147.49 18.2238C147.49 12.1679 151.94 7.27148 159.027 7.27148C161.379 7.27148 163.287 7.62425 164.748 8.23219V12.712C163.001 11.784 161.15 11.304 159.155 11.304C154.641 11.304 152.67 14.5358 152.67 18.1516C152.67 22.1308 155.15 24.8071 159.114 24.8071ZM154.865 45.3018C154.865 51.9573 149.934 56.0211 143.062 56.0211H136.221V34.9344H143.599C150.708 34.9344 154.865 38.9022 154.865 45.3018ZM143.093 39.0622H140.936V51.9441H143.185C147.9 51.9441 149.841 48.9175 149.841 45.475C149.841 41.3763 147.469 39.0622 143.093 39.0622ZM138.339 7.46425H143.202V28.551H138.339V7.46425ZM121.848 7.46425H126.711V24.4231H133.943V28.551H121.848V7.46425ZM126.879 50.4214C127.3 49.7175 127.496 48.7575 127.496 47.6697V34.9344H132.21V47.9575C132.21 49.7814 131.871 51.3493 131.224 52.5333C129.807 55.1571 126.972 56.341 123.182 56.341C119.391 56.341 116.556 55.1571 115.139 52.5333C114.492 51.3493 114.153 49.7814 114.153 47.9575V34.9344H118.867V47.6697C118.867 48.7575 119.083 49.7175 119.513 50.4214C120.193 51.6373 121.487 52.2772 123.182 52.2772C124.876 52.2772 126.171 51.6373 126.879 50.4214ZM107.075 28.8709C100.686 28.8709 96.2683 24.4552 96.2683 18.0556C96.2683 11.656 100.686 7.27148 107.075 7.27148C113.464 7.27148 117.882 11.656 117.882 18.0556C117.882 24.4552 113.464 28.8709 107.075 28.8709ZM107.075 11.304C103.769 11.304 101.449 13.5758 101.449 18.0556C101.449 22.5354 103.769 24.8071 107.075 24.8071C110.381 24.8071 112.708 22.5354 112.708 18.0556C112.708 13.5758 110.381 11.304 107.075 11.304ZM109.866 39.0622H104.658V56.0211H99.9435V39.0622H93.9961V34.9344H111.068L109.866 39.0622ZM88.423 20.9355C87.2152 21.3834 85.7214 21.6394 83.8777 21.6394H83.3374V28.551H78.4744V7.46425H84.3228C86.1981 7.46425 87.8191 7.72027 89.1223 8.3282C91.4743 9.41615 92.7775 11.528 92.7775 14.5358C92.7775 17.0071 91.7286 19.6875 88.423 20.9355ZM86.2935 11.8833C85.7928 11.528 85.0221 11.4 84.0685 11.4H83.3374V17.7112H84.1639C84.9903 17.7112 85.6896 17.6076 86.2299 17.3517C87.247 16.8717 87.7237 15.8797 87.7237 14.5358C87.7237 13.4479 87.3195 12.424 86.2935 11.8833ZM84.8713 34.7611C87.1209 34.7611 89.0005 35.2275 90.2332 35.8624V40.246C88.3534 39.2862 86.6895 38.7742 85.0254 38.7742C83.8954 38.7742 82.8991 39.1902 82.8991 40.4701C82.8991 43.7338 91.5274 43.2219 91.5274 50.0055C91.5274 53.9092 88.1377 56.341 83.7928 56.341C81.3892 56.341 78.8932 55.6692 77.1367 54.3571L78.924 50.6775C80.28 51.6373 81.8206 52.2772 83.6079 52.2772C84.9946 52.2772 86.5045 51.7974 86.5045 50.4214C86.5045 46.9336 77.8764 47.3817 77.8764 40.8861C77.8764 37.6543 80.3724 34.7611 84.8713 34.7611ZM163.281 56.0211H158.567V34.9344H163.281V56.0211Z" fill="#001629"/>
3
- <path d="M0 56.8409V51.5752L16.8841 54.0887V60.0002L0 56.8409Z" fill="#1B97DD"/>
4
- <path d="M0 48.1628V42.9253L16.8841 44.3153V50.2409L0 48.1628Z" fill="#1B97DD"/>
5
- <path d="M0 39.4851V34.2476L21.1789 34.5566V40.6506L0 39.4851Z" fill="#1B97DD"/>
6
- <path d="M0 30.8774V25.6258L37.8526 23.5898V30.3859L0 30.8774Z" fill="#1B97DD"/>
7
- <path d="M0 22.2561V17.0044L40.909 11.9873V18.9006L0 22.2561Z" fill="#1B97DD"/>
8
- <path d="M0 8.35479V13.6064L43.9719 7.10508V0L0 8.35479Z" fill="#1B97DD"/>
9
- <path d="M60.0008 13.6064V8.35479L43.9727 0V7.10508L60.0008 13.6064Z" fill="#005A8D"/>
10
- <path d="M60.0011 22.2279V16.9764L40.9102 11.9873V18.9006L60.0011 22.2279Z" fill="#005A8D"/>
11
- <path d="M59.9872 30.8779V25.6403L37.8398 23.5762V30.3863L59.9872 30.8779Z" fill="#005A8D"/>
12
- <path d="M59.9851 39.5554V34.2759L21.1641 34.5567V40.6507L59.9851 39.5554Z" fill="#005A8D"/>
13
- <path d="M59.9868 48.2051V42.9395L16.8711 44.3154V50.241L59.9868 48.2051Z" fill="#005A8D"/>
14
- <path d="M59.9868 56.8264V51.5889L16.8711 54.0883V59.9998L59.9868 56.8264Z" fill="#005A8D"/>
15
- </svg>
@@ -1,320 +0,0 @@
1
- <template>
2
- <div class="wrapper psui-flex psui-gap-4">
3
- <div
4
- class="visible-scrollbar psui-flex psui-flex-col psui-h-full psui-w-56 psui-bg-gray-30 psui-p-2"
5
- @click="onClick"
6
- >
7
- <h2 class="psui-font-bold">
8
- Scrollbar Playground (click over here to copy the computed style to clipboard)
9
- </h2>
10
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
11
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
12
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
13
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
14
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
15
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
16
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
17
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
18
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
19
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
20
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
21
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
22
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
23
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
24
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
25
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
26
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
27
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
28
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
29
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
30
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
31
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
32
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
33
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
34
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem, id.</p>
35
- </div>
36
- <div class="psui-flex psui-bg-gray-60 psui-p-2 psui-gap-4">
37
- <div class="psui-flex psui-flex-col">
38
- <div class="psui-flex psui-flex-col psui-w-48">
39
- <label for="width">Scroll Width (px)</label>
40
- <input
41
- type="text"
42
- id="width"
43
- name="width"
44
- @change="onChange"
45
- >
46
- </div>
47
- <div class="psui-flex psui-flex-col psui-w-48">
48
- <label for="width">Scroll Height (px)</label>
49
- <input
50
- type="text"
51
- id="height"
52
- name="height"
53
- @change="onChange"
54
- >
55
- </div>
56
- <div class="psui-flex psui-flex-col psui-w-48">
57
- <label for="width">ScrollTrack Color</label>
58
- <input
59
- type="text"
60
- id="track"
61
- name="track"
62
- @change="onChange"
63
- >
64
- </div>
65
- <div class="psui-flex psui-flex-col psui-w-48">
66
- <label for="width">Thumb Color</label>
67
- <input
68
- type="text"
69
- id="thumb"
70
- name="thumb"
71
- @change="onChange"
72
- >
73
- </div>
74
- <div class="psui-flex psui-flex-col psui-w-48">
75
- <label for="width">Thumb Border-Radius (px)</label>
76
- <input
77
- type="text"
78
- id="thumb-radius"
79
- name="thumb-radius"
80
- @change="onChange"
81
- >
82
- </div>
83
- <div class="psui-flex psui-flex-col psui-w-48">
84
- <label for="width">Thumb Border Size(px)</label>
85
- <input
86
- type="text"
87
- id="thumb-border"
88
- name="thumb-border"
89
- @change="onChange"
90
- >
91
- </div>
92
- <div class="psui-flex psui-flex-col psui-w-48">
93
- <label for="width">Thumb Border Color</label>
94
- <input
95
- type="text"
96
- id="thumb-border-color"
97
- name="thumb-border-color"
98
- @change="onChange"
99
- >
100
- </div>
101
- <div class="psui-flex psui-flex-col psui-w-48">
102
- <label for="width">Thumb Border Style</label>
103
- <select
104
- id="thumb-border-style"
105
- name="thumb-border-style"
106
- v-model="selectedStyle"
107
- >
108
- <option
109
- value=""
110
- hidden
111
- selected
112
- />
113
- <option
114
- v-for="(style, index) in borderStyle"
115
- :value="style"
116
- :key="index"
117
- >
118
- {{ style }}
119
- </option>
120
- </select>
121
- </div>
122
- </div>
123
- <div class="psui-flex psui-flex-col">
124
- <div class="psui-flex psui-flex-col psui-w-48">
125
- <label for="width">Thumb Hover Color</label>
126
- <input
127
- type="text"
128
- id="thumb-hover-color"
129
- name="thumb-hover-color"
130
- @change="onChange"
131
- >
132
- </div>
133
- <div class="psui-flex psui-flex-col psui-w-48">
134
- <label for="width">Thumb Hover Border Size</label>
135
- <input
136
- type="text"
137
- id="thumb-hover-border-size"
138
- name="thumb-hover-border-size"
139
- @change="onChange"
140
- >
141
- </div>
142
- <div class="psui-flex psui-flex-col psui-w-48">
143
- <label for="width">Thumb Hover Border Color</label>
144
- <input
145
- type="text"
146
- id="thumb-hover-border-color"
147
- name="thumb-hover-border-color"
148
- @change="onChange"
149
- >
150
- </div>
151
- <div class="psui-flex psui-flex-col psui-w-48">
152
- <label for="width">Thumb Border Style</label>
153
- <select
154
- id="thumb-border-style"
155
- name="thumb-border-style"
156
- v-model="selectedHoverStyle"
157
- >
158
- <option
159
- value=""
160
- hidden
161
- selected
162
- />
163
- <option
164
- v-for="(style, index) in borderStyle"
165
- :value="style"
166
- :key="index"
167
- >
168
- {{ style }}
169
- </option>
170
- </select>
171
- </div>
172
- </div>
173
- </div>
174
- </div>
175
- </template>
176
-
177
- <script>
178
-
179
- export default {
180
- name: 'PsScrollBar',
181
- data(){
182
- return {
183
- borderStyle: ['dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'ouset'],
184
- selectedStyle: null,
185
- selectedHoverStyle: null
186
- }
187
- },
188
- watch:{
189
- selectedStyle(){
190
- const visibleScrollBar = document.querySelector('.visible-scrollbar')
191
- visibleScrollBar.style.setProperty('--scrollbar-thumb-border-style', this.selectedStyle)
192
- },
193
- selectedHoverStyle(){
194
- const visibleScrollBar = document.querySelector('.visible-scrollbar')
195
- visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-border-style', this.selectedHoverStyle)
196
- }
197
- },
198
- methods:{
199
- onChange(event){
200
-
201
- const visibleScrollBar = document.querySelector('.visible-scrollbar')
202
-
203
- switch(event.target.id){
204
- case 'width':
205
- visibleScrollBar.style.setProperty('--scrollbar-width', `${event.target.value}px`)
206
- break
207
- case 'thumb':
208
- visibleScrollBar.style.setProperty('--scrollbar-thumb-color', event.target.value)
209
- break
210
- case 'track':
211
- visibleScrollBar.style.setProperty('--scrollbar-track-color', event.target.value)
212
- break
213
- case 'thumb-radius':
214
- visibleScrollBar.style.setProperty('--scrollbar-thumb-radius', `${event.target.value}px`)
215
- break
216
- case 'thumb-border':
217
- visibleScrollBar.style.setProperty('--scrollbar-thumb-border', `${event.target.value}px`)
218
- break
219
- case 'thumb-border-color':
220
- visibleScrollBar.style.setProperty('--scrollbar-thumb-border-color', event.target.value)
221
- break
222
- case 'height':
223
- visibleScrollBar.style.setProperty('--scrollbar-height', `${event.target.value}px`)
224
- break
225
- case 'thumb-hover-color':
226
- visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-color', event.target.value)
227
- break
228
- case 'thumb-hover-border-size':
229
- visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-border-size', `${event.target.value}px`)
230
- break
231
- case 'thumb-hover-border-color':
232
- visibleScrollBar.style.setProperty('--scrollbar-thumb-hover-border-color', event.target.value)
233
- break
234
- }
235
-
236
- },
237
- onClick(){
238
- const visibleScrollBar = document.querySelector('.visible-scrollbar')
239
-
240
- const styleScrollBar = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar')
241
- const styleScrollBarTrack = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-track')
242
- const styleScrollBarThumb = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-thumb')
243
- const styleScrollBarThumbHover = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-thumb:hover')
244
- const styleScrollBarCorner = getComputedStyle(visibleScrollBar, '::-webkit-scrollbar-corner')
245
-
246
- navigator.clipboard.writeText(`
247
- ::-webkit-scrollbar {
248
- display: ${styleScrollBar.display};
249
- width: ${styleScrollBar.width};
250
- }
251
-
252
- ::-webkit-scrollbar-track {
253
- background-color: ${styleScrollBarTrack.backgroundColor};
254
- }
255
-
256
- ::-webkit-scrollbar-thumb {
257
- background-color: ${styleScrollBarThumb.backgroundColor};
258
- border-radius: ${styleScrollBarThumb.borderRadius};
259
- border: ${styleScrollBarThumb.border};
260
- }
261
-
262
- ::-webkit-scrollbar-thumb:hover {
263
- background-color: ${styleScrollBarThumbHover.backgroundColor};
264
- border: ${styleScrollBarThumbHover.border};
265
- }
266
-
267
- ::-webkit-scrollbar-corner {
268
- display: ${styleScrollBarCorner.display};
269
- background-color: ${styleScrollBarCorner.backgroundColor};
270
- height: ${styleScrollBarCorner.height};
271
- width: ${styleScrollBarCorner.width};
272
- }
273
- `)
274
-
275
- window.alert('Copied to clipboard')
276
- }
277
- },
278
- }
279
-
280
- </script>
281
-
282
- <style scoped>
283
-
284
- .visible-scrollbar{
285
- overflow: scroll;
286
- white-space: nowrap;
287
- }
288
-
289
- .visible-scrollbar::-webkit-scrollbar {
290
- display: block;
291
- width: var(--scrollbar-width, 10px);
292
- height: var(--scrollbar-height, 10px);
293
- }
294
-
295
- .visible-scrollbar::-webkit-scrollbar-track {
296
- background: var(--scrollbar-track-color, gray);
297
- }
298
-
299
- .visible-scrollbar::-webkit-scrollbar-thumb {
300
- background: var(--scrollbar-thumb-color,black);
301
- border-radius: var(--scrollbar-thumb-radius);
302
- border: var(--scrollbar-thumb-border) var(--scrollbar-thumb-border-style) var(--scrollbar-thumb-border-color);
303
- }
304
-
305
- .visible-scrollbar::-webkit-scrollbar-thumb:hover {
306
- background: var(--scrollbar-thumb-hover-color, black);
307
- border: var(--scrollbar-thumb-hover-border-size) var(--scrollbar-thumb-hover-border-style) var(--scrollbar-thumb-hover-border-color);
308
- }
309
-
310
- .visible-scrollbar::-webkit-scrollbar-corner {
311
- display: none;
312
- background-color: var(--scrollbar-track-color, gray);
313
- height: var(--scrollbar-height, 10px);
314
- width: var(--scrollbar-width, 10px);
315
- }
316
-
317
- .wrapper {
318
- height: 450px;
319
- }
320
- </style>