@policystudio/policy-studio-ui-vue 1.0.29 → 1.0.32

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 (84) hide show
  1. package/.eslintrc.js +36 -35
  2. package/.storybook/preview.js +7 -1
  3. package/README.md +6 -2
  4. package/babel.config.js +1 -1
  5. package/dist/css/psui_styles.css +1580 -185
  6. package/package.json +16 -5
  7. package/postcss.config.js +1 -1
  8. package/src/assets/scss/base.scss +3 -0
  9. package/src/assets/scss/components/PsAccordion.scss +28 -11
  10. package/src/assets/scss/components/PsButton.scss +39 -18
  11. package/src/assets/scss/components/PsCardInfos.scss +1 -1
  12. package/src/assets/scss/components/PsCheckbox.scss +4 -5
  13. package/src/assets/scss/components/PsChips.scss +13 -8
  14. package/src/assets/scss/components/PsClimateZoneBadge.scss +1 -1
  15. package/src/assets/scss/components/PsCostEffectBar.scss +22 -27
  16. package/src/assets/scss/components/PsDataTable.scss +17 -0
  17. package/src/assets/scss/components/PsDialog.scss +5 -2
  18. package/src/assets/scss/components/PsDotLoader.scss +45 -0
  19. package/src/assets/scss/components/PsDraggable.scss +64 -0
  20. package/src/assets/scss/components/PsDropdown.scss +9 -24
  21. package/src/assets/scss/components/PsDropdownList.scss +19 -0
  22. package/src/assets/scss/components/PsInlineSelector.scss +40 -25
  23. package/src/assets/scss/components/PsInput.scss +8 -3
  24. package/src/assets/scss/components/PsInputSelect.scss +6 -3
  25. package/src/assets/scss/components/PsInputTextArea.scss +5 -2
  26. package/src/assets/scss/components/PsMiniTag.scss +3 -3
  27. package/src/assets/scss/components/PsRadioButton.scss +5 -5
  28. package/src/assets/scss/components/PsSwitch.scss +4 -4
  29. package/src/assets/scss/components/PsTabHeader.scss +14 -0
  30. package/src/assets/scss/components/PsToast.scss +3 -3
  31. package/src/assets/scss/components/PsToggle.scss +6 -2
  32. package/src/assets/scss/components/PsTooltip.scss +50 -18
  33. package/src/components/accordion/PsAccordion.vue +7 -23
  34. package/src/components/accordion/PsAccordionItem.vue +42 -26
  35. package/src/components/badges-and-tags/PsCardInfos.vue +12 -0
  36. package/src/components/badges-and-tags/PsChartLegend.vue +13 -0
  37. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +7 -0
  38. package/src/components/badges-and-tags/PsCostEffectBar.vue +6 -0
  39. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -1
  40. package/src/components/badges-and-tags/PsMiniTag.vue +6 -0
  41. package/src/components/badges-and-tags/PsProgressBar.vue +17 -9
  42. package/src/components/buttons/PsButton.vue +27 -2
  43. package/src/components/chips/PsChips.vue +33 -13
  44. package/src/components/controls/PsCheckbox.vue +32 -16
  45. package/src/components/controls/PsDraggable.vue +39 -150
  46. package/src/components/controls/PsInlineSelector.vue +34 -16
  47. package/src/components/controls/PsRadioButton.vue +28 -15
  48. package/src/components/controls/PsSlider.vue +1 -1
  49. package/src/components/controls/PsSwitch.vue +20 -11
  50. package/src/components/controls/PsToggle.vue +33 -12
  51. package/src/components/datatable/PsDataTable.vue +21 -1
  52. package/src/components/datatable/PsDataTableItem.vue +1 -1
  53. package/src/components/forms/PsDropdown.vue +73 -101
  54. package/src/components/forms/PsDropdownList.vue +82 -0
  55. package/src/components/forms/PsInput.vue +28 -1
  56. package/src/components/forms/PsInputSelect.vue +21 -0
  57. package/src/components/forms/PsInputTextArea.vue +54 -41
  58. package/src/components/notifications/PsDialog.vue +15 -0
  59. package/src/components/notifications/PsToast.vue +12 -0
  60. package/src/components/playground/PsScrollBar.vue +54 -0
  61. package/src/components/tabs/PsTabHeader.vue +31 -5
  62. package/src/components/tooltip/PsDialogTooltip.vue +107 -24
  63. package/src/components/tooltip/PsRichTooltip.vue +12 -9
  64. package/src/components/tooltip/PsTooltip.vue +27 -11
  65. package/src/components/ui/PsDotLoader.vue +15 -0
  66. package/src/components/ui/PsIcon.vue +30 -0
  67. package/src/index.js +39 -7
  68. package/src/stories/Accordion.stories.js +12 -48
  69. package/src/stories/Button.stories.js +30 -7
  70. package/src/stories/Chips.stories.js +16 -4
  71. package/src/stories/Colors.stories.mdx +1 -0
  72. package/src/stories/Dropdown.stories.js +81 -14
  73. package/src/stories/InlineSelector.stories.js +1 -1
  74. package/src/stories/Playground.stories.js +16 -0
  75. package/src/stories/Switch.stories.js +8 -2
  76. package/src/stories/Toast.stories.js +16 -16
  77. package/src/stories/Tooltip.stories.js +6 -6
  78. package/src/stories/Typography.stories.mdx +22 -18
  79. package/src/util/GeneralFunctions.js +8 -0
  80. package/src/util/imageLoader.js +1 -1
  81. package/tailwind.config.js +8 -3
  82. package/vetur/attributes.json +1376 -0
  83. package/vetur/tags.json +632 -0
  84. package/src/components/forms/PsDropdownCopy.vue +0 -212
@@ -1,11 +1,22 @@
1
1
  @layer components {
2
2
  .psui-el-inline-selector {
3
- @apply psui-w-auto psui-max-w-full psui-text-h4 psui-overflow-x-hidden psui-relative psui-flex-shrink-0 psui-text-blue-60;
3
+ @apply psui-w-auto psui-max-w-full psui-text-h4 psui-relative psui-flex-shrink-0 psui-text-blue-60 psui-box-border;
4
+
5
+ ::-webkit-scrollbar {
6
+ @apply psui-bg-gray-30;
7
+ display: block;
8
+ width: 6px;
9
+ }
10
+
11
+ ::-webkit-scrollbar-thumb {
12
+ @apply psui-bg-blue-70 psui-rounded;
13
+ }
4
14
 
5
15
  input {
6
16
  @apply psui-border-b psui-border-dashed psui-border-blue-50;
7
17
  transition: 300ms ease-in all;
8
-
18
+ padding-bottom: 3px;
19
+
9
20
  &::placeholder {
10
21
  @apply psui-text-h4 psui-text-gray-40
11
22
  }
@@ -17,7 +28,6 @@
17
28
  span {
18
29
  @apply psui-block psui-opacity-0;
19
30
  min-width: 100px;
20
- min-height: 29px;
21
31
  }
22
32
 
23
33
  input {
@@ -30,52 +40,57 @@
30
40
  }
31
41
 
32
42
  .psui-el-inline-selector-dropdown-wrapper {
33
- @apply psui-origin-top-right psui-absolute psui-overflow-y-auto psui-left-0 psui-mt-2 psui-rounded psui-shadow-elevation-20 psui-bg-white psui-p-4 psui-z-40;
34
- max-height: 50vh;
43
+ @apply psui-absolute psui-left-0 psui-bg-white psui-rounded psui-shadow-elevation-20 psui-z-50 psui-overflow-y-auto;
44
+ max-height: 30vh;
45
+ min-width: 300px;
35
46
 
36
47
  .psui-el-inline-selector-dropdown {
37
- @apply psui-w-full psui-flex psui-flex-wrap psui-bg-white;
48
+ @apply psui-flex psui-bg-white;
49
+
50
+
51
+ .psui-el-inline-selector-error {
52
+ @apply psui-w-full psui-p-3 psui-flex psui-flex-col;
53
+
54
+ h3 {
55
+ @apply psui-text-red-20
56
+ }
57
+
58
+ p {
59
+ @apply psui-text-gray-50
60
+ }
61
+ }
38
62
 
39
63
  ul {
40
- @apply psui-w-full;
64
+ @apply psui-w-full psui-bg-white;
41
65
 
42
66
  li {
43
- @apply psui-w-full psui-cursor-pointer;
67
+ @apply psui-flex psui-cursor-pointer;
44
68
  padding: 7.5px 16px;
45
69
 
46
70
  &:hover {
47
- @apply psui-text-blue-60 psui-bg-blue-20;
71
+ @apply psui-bg-blue-20;
72
+
73
+ span p {
74
+ @apply psui-text-blue-60;
75
+ }
48
76
  }
49
77
 
50
78
  span {
79
+ @apply psui-flex psui-items-center psui-w-full;
51
80
 
52
81
  > p {
53
- @apply psui-text-big psui-text-gray-60
82
+ @apply psui-inline-block psui-text-big psui-text-gray-60 psui-flex-shrink-0;
54
83
  }
55
84
 
56
85
  p + p {
57
- @apply psui-text-gray-40;
86
+ @apply psui-text-gray-40 psui-ml-auto psui-inline-block;
58
87
  font-size: 12px;
59
88
  line-height: 120%;
60
89
  }
61
90
  }
62
-
63
- }
64
- }
65
-
66
- .psui-el-inline-selector-error {
67
- @apply psui-w-full psui-p-3 psui-flex psui-flex-col;
68
-
69
- h3 {
70
- @apply psui-text-red-20
71
- }
72
-
73
- p {
74
- @apply psui-text-gray-50
75
91
  }
76
92
  }
77
93
  }
78
94
  }
79
-
80
95
  }
81
96
  }
@@ -11,15 +11,20 @@
11
11
  }
12
12
 
13
13
  &-hint {
14
- @apply psui-text-gray-50 psui-text-xsmall psui-mt-1
14
+ @apply psui-text-gray-50 psui-mt-1;
15
+ font-size: 12px;
16
+ line-height: 24px;
15
17
  }
16
18
 
17
19
  &-wrapper {
18
- @apply psui-relative psui-w-full psui-border psui-border-gray-30 psui-rounded-md psui-bg-white psui-flex transition-default
20
+ @apply psui-relative psui-w-full psui-border psui-border-gray-30 psui-rounded-md psui-bg-white psui-flex;
21
+ transition: ease 130ms;
19
22
  }
20
23
 
21
24
  label {
22
- @apply psui-font-bold psui-text-gray-80
25
+ @apply psui-font-bold psui-text-gray-80;
26
+ line-height: 32px;
27
+
23
28
  }
24
29
 
25
30
  input {
@@ -1,6 +1,7 @@
1
1
  @layer components {
2
2
  .psui-el-input-select {
3
3
  @apply psui-w-full psui-flex psui-flex-col psui-relative psui-text-gray-40 psui-box-border;
4
+ transition: ease 130ms;
4
5
 
5
6
  &.disabled {
6
7
  @apply psui-pointer-events-none;
@@ -31,7 +32,7 @@
31
32
  content: 'arrow_drop_down';
32
33
  font-family: 'Material Icons Round';
33
34
  font-size: 24px;
34
- top: 26px;
35
+ top: 38px;
35
36
  right: 15px;
36
37
  z-index: -20;
37
38
  }
@@ -54,13 +55,15 @@
54
55
 
55
56
 
56
57
  label {
57
- @apply psui-flex psui-text-gray-80 psui-text-big psui-items-center psui-w-full psui-font-bold psui-pointer-events-none
58
+ @apply psui-flex psui-text-gray-80 psui-items-center psui-w-full psui-font-bold psui-pointer-events-none;
59
+ font-size: 16px;
60
+ line-height: 32px;
58
61
  }
59
62
 
60
63
  .psui-el-input-helper {
61
64
  @apply psui-text-gray-50;
62
65
  font-size: 12px;
63
- line-height: 120%;
66
+ line-height: 24px;
64
67
  }
65
68
 
66
69
  &.layout-mini {
@@ -19,9 +19,12 @@
19
19
 
20
20
  .psui-el-input-textarea-wrapper {
21
21
  @apply psui-flex psui-flex-col;
22
+ transition: ease 130ms;
22
23
 
23
24
  label {
24
- @apply psui-h-full psui-flex psui-items-center psui-font-bold psui-text-big psui-py-1
25
+ @apply psui-h-full psui-flex psui-items-center psui-font-bold psui-text-big psui-py-1;
26
+ font-size: 16px;
27
+ line-height: 32px;
25
28
  }
26
29
 
27
30
  textarea {
@@ -42,7 +45,7 @@
42
45
  .psui-el-input-textarea-message {
43
46
  @apply psui-text-gray-50 psui-flex psui-font-normal;
44
47
  font-size: 12px;
45
- line-height: 120%;
48
+ line-height: 24px;
46
49
  padding: 5px 0px;
47
50
  }
48
51
  }
@@ -5,10 +5,10 @@
5
5
 
6
6
 
7
7
  div {
8
- @apply psui-w-full;
9
- padding: 3px 8px 3px 8px;
8
+ @apply psui-w-full psui-font-bold;
9
+ padding: 1px 8px 0px 8px;
10
10
  font-size: 10px;
11
-
11
+ letter-spacing: 0.5px;
12
12
  }
13
13
 
14
14
  &-layout{
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
2
 
3
3
  .psui-el-radio {
4
- @apply psui-relative psui-text-gray-50;
4
+ @apply psui-relative psui-text-gray-50 psui-flex psui-bg-gray-10;
5
5
 
6
6
  &.disabled {
7
7
  .psui-el-checkmark {
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  .psui-el-checkmark {
31
- @apply psui-block psui-cursor-pointer;
31
+ @apply psui-cursor-pointer psui-flex psui-items-center;
32
32
  height: 18px;
33
33
 
34
34
  span {
@@ -37,7 +37,7 @@
37
37
 
38
38
  &::before {
39
39
  content: 'radio_button_unchecked';
40
- @apply psui-text-gray-40 psui-align-text-bottom;
40
+ @apply psui-text-gray-40;
41
41
  font-family: 'Material Icons Round';
42
42
  font-size: 18px;
43
43
  }
@@ -59,7 +59,7 @@
59
59
  }
60
60
 
61
61
  .psui-el-checkmark {
62
- @apply psui-block psui-cursor-pointer;
62
+ @apply psui-cursor-pointer psui-flex psui-items-center;
63
63
  height: 24px;
64
64
 
65
65
  span {
@@ -68,7 +68,7 @@
68
68
 
69
69
  &::before {
70
70
  content: 'radio_button_unchecked';
71
- @apply psui-text-gray-40 psui-align-text-bottom;
71
+ @apply psui-text-gray-40;
72
72
  font-family: 'Material Icons Round';
73
73
  font-size: 24px;
74
74
  }
@@ -12,7 +12,7 @@
12
12
  .psui-el-switch-button {
13
13
  &.toggle-false{
14
14
  &::before {
15
- @apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-500 psui-shadow-elevation-20;
15
+ @apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
16
16
  box-shadow: 0 0 98px 6px rgba(0, 0, 0, 0.2);
17
17
  left: 2px;
18
18
  top: 2px;
@@ -24,7 +24,7 @@
24
24
  @apply psui-bg-green-20;
25
25
 
26
26
  &::before {
27
- @apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-500 psui-shadow-elevation-20;
27
+ @apply psui-absolute psui-h-3 psui-w-3 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
28
28
  box-shadow: 0 0 98px 6px rgba(0, 0, 0, 0.2);
29
29
  left: 16px;
30
30
  top: 2px;
@@ -44,7 +44,7 @@
44
44
 
45
45
  &.toggle-false{
46
46
  &::before {
47
- @apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-500 psui-shadow-elevation-20;
47
+ @apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
48
48
  left: 2px;
49
49
  top: 2px;
50
50
  content: '';
@@ -55,7 +55,7 @@
55
55
  @apply psui-bg-green-20;
56
56
 
57
57
  &::before {
58
- @apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-500 psui-shadow-elevation-20;
58
+ @apply psui-absolute psui-h-5 psui-w-5 psui-bg-white psui-rounded-full psui-transition-all psui-ease-in-out psui-duration-300 psui-shadow-elevation-20;
59
59
  left: 24px;
60
60
  top:2px;
61
61
  content: '';
@@ -8,6 +8,10 @@
8
8
  &.status-disabled {
9
9
  @apply cursor-not-allowed
10
10
  }
11
+
12
+ &:focus {
13
+ outline: none;
14
+ }
11
15
  }
12
16
 
13
17
  &.status-disabled {
@@ -24,6 +28,7 @@
24
28
  button {
25
29
  @apply psui-bg-gray-10 psui-text-gray-60;
26
30
  padding: 6px 12px;
31
+ box-shadow: inset 0px 0px 8px rgba(40, 50, 59, 0.05);
27
32
 
28
33
  &:not(:last-child) {
29
34
  margin-right: 1px;
@@ -39,6 +44,7 @@
39
44
 
40
45
  &:hover {
41
46
  @apply psui-text-blue-60;
47
+ box-shadow: inset 0px 0px 8px rgba(40, 50, 59, 0.05);
42
48
  }
43
49
 
44
50
  &.status-active {
@@ -62,6 +68,10 @@
62
68
  border-bottom: 3px solid transparent;
63
69
  padding: 11.5px 0;
64
70
 
71
+ &:hover {
72
+ @apply psui-text-blue-60;
73
+ }
74
+
65
75
  &:not(:last-child) {
66
76
  margin-right: 20px;
67
77
  }
@@ -85,6 +95,10 @@
85
95
  @apply psui-bg-gray-10 psui-text-gray-50 psui-rounded-t;
86
96
  padding: 9px 12px;
87
97
 
98
+ &:hover {
99
+ @apply psui-text-blue-60;
100
+ }
101
+
88
102
  &:not(:last-child) {
89
103
  margin-right: 4px;
90
104
  }
@@ -1,6 +1,6 @@
1
1
  @layer components {
2
2
  .psui-el-toast {
3
- @apply psui-flex psui-items-center psui-text-big psui-text-white psui-py-3 psui-px-4 psui-rounded-md psui-font-bold;
3
+ @apply psui-flex psui-items-center psui-text-big psui-text-white psui-py-3 psui-px-4 psui-rounded-md psui-font-bold psui-shadow-elevation-20;
4
4
 
5
5
  .psui-el-toast-icon {
6
6
  @apply psui-flex psui-mr-4;
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  .psui-el-toast-actions {
15
- @apply psui-flex psui-gap-4
15
+ @apply psui-flex psui-gap-4 psui-text-accentSmall;
16
16
  }
17
17
 
18
18
  &.fill-intense.layout{
@@ -35,7 +35,7 @@
35
35
 
36
36
  &.fill-soft.layout {
37
37
  &-info {
38
- @apply psui-text-blue-60 psui-bg-blue-20
38
+ @apply psui-text-blue-60 psui-bg-blue-20;
39
39
  }
40
40
 
41
41
  &-success {
@@ -1,11 +1,15 @@
1
1
  @layer components{
2
2
 
3
3
  .psui-el-toggle {
4
- @apply psui-flex psui-rounded-sm psui-bg-gray-10 psui-gap-x-px;
4
+ @apply psui-flex psui-bg-gray-10 psui-items-center;
5
5
  padding: 2px;
6
+ gap: 2px;
7
+ border-radius: 4px;
6
8
 
7
9
  button {
8
- @apply transition-default psui-inline-flex psui-rounded-sm psui-text-small psui-bg-gray-10 psui-text-blue-60 psui-px-2;
10
+ @apply transition-default psui-inline-flex psui-text-small psui-bg-gray-10 psui-text-blue-60 psui-outline-none psui-align-middle;
11
+ border-radius: 4px;
12
+ padding:1px 8px;
9
13
 
10
14
  &.status-active {
11
15
  @apply psui-bg-blue-60 psui-text-white psui-font-bold psui-shadow-elevation-10;
@@ -5,11 +5,13 @@
5
5
  @apply psui-relative;
6
6
 
7
7
  .psui-el-tooltip-dialog {
8
- @apply psui-fixed psui-hidden psui-opacity-0 psui-transition-opacity psui-duration-500 psui-ease-in-out;
9
-
8
+ @apply psui-fixed psui-opacity-0 psui-transition-opacity psui-duration-300 psui-ease-in-out;
9
+ transition-delay: 0.4s;
10
+
10
11
  .psui-el-tooltip-content {
11
- @apply psui-flex psui-flex-col psui-rounded-md psui-shadow-md psui-z-20 psui-bg-gray-50 psui-text-white;
12
- padding: 5px 8px;
12
+ @apply psui-flex psui-flex-col psui-bg-gray-50 psui-text-white;
13
+ padding: 5px 8px 4px 8px;
14
+ border-radius: 4px;
13
15
 
14
16
  h2 {
15
17
  @apply psui-font-bold;
@@ -21,9 +23,10 @@
21
23
 
22
24
  &.layout {
23
25
  &-gray {
24
- @apply psui-bg-gray-30 psui-text-gray-80 psui-p-4 ;
26
+ @apply psui-bg-gray-30 psui-text-gray-80 psui-shadow-none;
25
27
  font-size: 12px;
26
28
  line-height: 120%;
29
+ padding: 10px 16px 12px 16px;
27
30
 
28
31
  .psui-el-tooltip-content-wrapper {
29
32
  @apply psui-font-normal psui-mt-1
@@ -31,9 +34,10 @@
31
34
  }
32
35
 
33
36
  &-blue {
34
- @apply psui-bg-blue-70 psui-text-white psui-p-4;
37
+ @apply psui-bg-blue-70 psui-text-white psui-shadow-none;
35
38
  font-size: 12px;
36
39
  line-height: 120%;
40
+ padding: 10px 16px 12px 16px;
37
41
 
38
42
  .psui-el-tooltip-content-wrapper {
39
43
  @apply psui-font-normal psui-mt-1
@@ -41,9 +45,10 @@
41
45
  }
42
46
 
43
47
  &-red {
44
- @apply psui-bg-red-10 psui-text-red-70 psui-p-4;
48
+ @apply psui-bg-red-10 psui-text-red-70 psui-shadow-none;
45
49
  font-size: 12px;
46
50
  line-height: 120%;
51
+ padding: 10px 16px 12px 16px;
47
52
 
48
53
  .psui-el-tooltip-content-wrapper {
49
54
  @apply psui-font-normal psui-mt-1
@@ -51,7 +56,8 @@
51
56
  }
52
57
 
53
58
  &-white {
54
- @apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
59
+ @apply psui-bg-white psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
60
+ gap: 8.8px;
55
61
 
56
62
  h2 {
57
63
  @apply psui-text-gray-80 psui-font-bold;
@@ -60,19 +66,27 @@
60
66
  }
61
67
 
62
68
  .psui-el-tooltip-content-wrapper {
63
- @apply psui-text-gray-50 psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
69
+ @apply psui-text-gray-50 psui-font-normal psui-flex psui-flex-col;
70
+ gap: 13.6px;
71
+ font-size: 14px;
72
+ line-height: 120%;
64
73
 
65
74
  button {
66
- @apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60;
75
+ @apply psui-rounded-md psui-bg-blue-20 psui-text-blue-60 psui-font-bold;
67
76
  padding: 7px 16px;
68
77
  width: fit-content;
78
+
79
+ &:focus {
80
+ outline: none;
81
+ }
69
82
  }
70
83
  }
71
84
  }
72
85
 
73
86
  &-dark {
74
- @apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
75
-
87
+ @apply psui-bg-blue-70 psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
88
+ gap: 8.8px;
89
+
76
90
  h2 {
77
91
  @apply psui-text-white psui-font-bold;
78
92
  font-size: 17px;
@@ -80,19 +94,29 @@
80
94
  }
81
95
 
82
96
  .psui-el-tooltip-content-wrapper {
83
- @apply psui-text-white psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
97
+ @apply psui-text-white psui-font-normal psui-flex psui-flex-col;
98
+ gap: 13.6px;
99
+ font-size: 14px;
100
+ line-height: 120%;
84
101
 
85
102
  button {
86
- @apply psui-rounded-md psui-bg-blue-60 psui-text-white;
103
+ @apply psui-rounded-md psui-bg-blue-60 psui-text-white psui-font-bold;
87
104
  padding: 7px 16px;
88
105
  width: fit-content;
106
+
107
+ &:focus {
108
+ outline: none;
109
+ }
110
+
89
111
  }
90
112
  }
91
113
  }
92
114
 
93
115
  &-color {
94
- @apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-gap-3 psui-flex-col;
95
-
116
+ @apply psui-bg-blue-50 psui-py-4 psui-px-6 psui-flex psui-flex-col psui-shadow-elevation-30;
117
+ gap: 8.8px;
118
+
119
+
96
120
  h2 {
97
121
  @apply psui-text-white psui-font-bold;
98
122
  font-size: 17px;
@@ -100,12 +124,20 @@
100
124
  }
101
125
 
102
126
  .psui-el-tooltip-content-wrapper {
103
- @apply psui-text-white psui-text-small psui-font-normal psui-flex psui-flex-col psui-gap-3;
127
+ @apply psui-text-white psui-font-normal psui-flex psui-flex-col;
128
+ gap: 13.6px;
129
+ font-size: 14px;
130
+ line-height: 120%;
104
131
 
105
132
  button {
106
- @apply psui-rounded-md psui-bg-blue-60 psui-text-white;
133
+ @apply psui-rounded-md psui-bg-blue-60 psui-text-white psui-font-bold;
107
134
  padding: 7px 16px;
108
135
  width: fit-content;
136
+
137
+ &:focus {
138
+ outline: none;
139
+ }
140
+
109
141
  }
110
142
  }
111
143
  }
@@ -1,42 +1,26 @@
1
1
  <template>
2
- <div class="psui-el-accordion" :class="`layout-${layout}`">
2
+ <div class="psui-el-accordion" :class="getComponentClass">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
6
6
 
7
7
  <script>
8
8
  export const layouts = ['big', 'medium']
9
- export const defaultIconsByLayout = {
10
- big: {
11
- 'iconOpened': 'remove',
12
- 'iconClosed': 'add'
13
- },
14
- medium: {
15
- 'iconOpened': 'expand_less',
16
- 'iconClosed': 'expand_more'
17
- }
18
- }
19
9
  export default {
20
10
  name: 'PsAccordion',
21
11
  props: {
12
+ /**
13
+ * It defines the size of the accordion items. eg: text size and font.
14
+ */
22
15
  layout: {
23
16
  type: String,
24
17
  default: 'medium',
25
- validator: (value) => layouts.indexOf(value) !== -1,
18
+ validator: (value) => ['medium','big'].includes(value),
26
19
  },
27
- 'iconOpened': {
28
- type: String,
29
- },
30
- 'iconClosed': {
31
- type: String,
32
- }
33
20
  },
34
21
  computed: {
35
- getIcons() {
36
- return {
37
- 'iconOpened' : this.iconOpened ?? defaultIconsByLayout[this.layout].iconOpened,
38
- 'iconClosed' : this.iconClosed ?? defaultIconsByLayout[this.layout].iconClosed,
39
- }
22
+ getComponentClass() {
23
+ return `layout-${this.layout}`
40
24
  }
41
25
  }
42
26
  }