@policystudio/policy-studio-ui-vue 1.0.48 → 1.0.54

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.
@@ -8025,11 +8025,13 @@ video {
8025
8025
  .psui-text-accent{
8026
8026
  font-size: 14px;
8027
8027
  line-height: 130%;
8028
+ letter-spacing: 0.6px;
8028
8029
  }
8029
8030
 
8030
8031
  .psui-text-accentSmall{
8031
8032
  font-size: 12px;
8032
8033
  line-height: 130%;
8034
+ letter-spacing: 0.6px;
8033
8035
  }
8034
8036
 
8035
8037
  .psui-text-p{
@@ -17181,6 +17183,75 @@ html {
17181
17183
  -webkit-font-smoothing: antialiased;
17182
17184
  }
17183
17185
 
17186
+ .psui-el-badge-with-icon {
17187
+ display: flex;
17188
+ align-items: center;
17189
+ padding-top: 0.25rem;
17190
+ padding-bottom: 0.25rem;
17191
+ padding-left: 0.5rem;
17192
+ padding-right: 0.5rem;
17193
+ border-radius: 0.25rem;
17194
+ }
17195
+
17196
+ .psui-el-badge-with-icon.layout-grey{
17197
+ --bg-opacity: 1;
17198
+ background-color: #F3F6F9;
17199
+ background-color: rgba(243, 246, 249, var(--bg-opacity));
17200
+ --text-opacity: 1;
17201
+ color: #798490;
17202
+ color: rgba(121, 132, 144, var(--text-opacity));
17203
+ }
17204
+
17205
+ .psui-el-badge-with-icon.layout-blue{
17206
+ --bg-opacity: 1;
17207
+ background-color: #E0EFF6;
17208
+ background-color: rgba(224, 239, 246, var(--bg-opacity));
17209
+ --text-opacity: 1;
17210
+ color: #318FAC;
17211
+ color: rgba(49, 143, 172, var(--text-opacity));
17212
+ }
17213
+
17214
+ .psui-el-badge-with-icon.layout-green{
17215
+ --bg-opacity: 1;
17216
+ background-color: #DEF8E8;
17217
+ background-color: rgba(222, 248, 232, var(--bg-opacity));
17218
+ --text-opacity: 1;
17219
+ color: #44A06A;
17220
+ color: rgba(68, 160, 106, var(--text-opacity));
17221
+ }
17222
+
17223
+ .psui-el-badge-with-icon.layout-yellow{
17224
+ --bg-opacity: 1;
17225
+ background-color: #FDF3E3;
17226
+ background-color: rgba(253, 243, 227, var(--bg-opacity));
17227
+ --text-opacity: 1;
17228
+ color: #B87305;
17229
+ color: rgba(184, 115, 5, var(--text-opacity));
17230
+ }
17231
+
17232
+ .psui-el-badge-with-icon .psui-el-badge-with-icon-icon {
17233
+ font-family: 'Material Icons Round';
17234
+ font-weight: normal;
17235
+ font-style: normal;
17236
+ font-size: 16px;
17237
+ line-height: 1;
17238
+ letter-spacing: normal;
17239
+ text-transform: none;
17240
+ display: inline-block;
17241
+ white-space: nowrap;
17242
+ word-wrap: normal;
17243
+ direction: ltr;
17244
+ -webkit-font-feature-settings: 'liga';
17245
+ -webkit-font-smoothing: antialiased;
17246
+ }
17247
+
17248
+ .psui-el-badge-with-icon .psui-el-badge-with-icon-message {
17249
+ margin-left: 0.25rem;
17250
+ font-size: 12px;
17251
+ line-height: 130%;
17252
+ font-weight: 700;
17253
+ }
17254
+
17184
17255
  .psui-el-draggable {
17185
17256
  width: 100%;
17186
17257
  display: flex;
@@ -17218,6 +17289,7 @@ html {
17218
17289
  .psui-el-draggable .psui-el-draggable-wrapper-title p {
17219
17290
  font-size: 12px;
17220
17291
  line-height: 130%;
17292
+ letter-spacing: 0.6px;
17221
17293
  --text-opacity: 1;
17222
17294
  color: #28323B;
17223
17295
  color: rgba(40, 50, 59, var(--text-opacity));
@@ -17259,16 +17331,31 @@ html {
17259
17331
  color: rgba(121, 132, 144, var(--text-opacity));
17260
17332
  font-size: 14px;
17261
17333
  line-height: 130%;
17262
- font-weight: 700;
17263
17334
  }
17264
17335
 
17265
- .psui-el-draggable .psui-el-draggable-item-title .psui-el-checkmark:before {
17266
- margin-right: 0.25rem;
17336
+ .psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox {
17337
+ --text-opacity: 1;
17338
+ color: #798490;
17339
+ color: rgba(121, 132, 144, var(--text-opacity));
17340
+ }
17341
+
17342
+ .psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox .psui-el-checkmark:before {
17343
+ margin-right: 0.25rem;
17344
+ --text-opacity: 1;
17345
+ color: #D6DDE5;
17346
+ color: rgba(214, 221, 229, var(--text-opacity));
17347
+ }
17348
+
17349
+ .psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox.active {
17267
17350
  --text-opacity: 1;
17268
- color: #D6DDE5;
17269
- color: rgba(214, 221, 229, var(--text-opacity));
17351
+ color: #515E6A;
17352
+ color: rgba(81, 94, 106, var(--text-opacity));
17270
17353
  }
17271
17354
 
17355
+ .psui-el-draggable .psui-el-draggable-item-title .psui-el-checkbox.disabled .psui-el-checkmark {
17356
+ color: #798490 !important;
17357
+ }
17358
+
17272
17359
  .psui-el-draggable .psui-el-draggable-item-append {
17273
17360
  display: flex;
17274
17361
  --text-opacity: 1;
@@ -17291,6 +17378,18 @@ html {
17291
17378
  opacity: 0.2;
17292
17379
  }
17293
17380
 
17381
+ .psui-el-draggable .psui-el-draggable-item .psui-el-checkbox.size-small .psui-el-checkmark span {
17382
+ font-weight: 700;
17383
+ }
17384
+
17385
+ .psui-el-draggable .psui-el-draggable-item .psui-el-checkbox.size-small .psui-el-checkmark:before {
17386
+ display: flex;
17387
+ align-items: center;
17388
+ justify-content: center;
17389
+ font-size: 24px;
17390
+ min-height: 24px;
17391
+ }
17392
+
17294
17393
  .psui-el-input-select {
17295
17394
  width: 100%;
17296
17395
  display: flex;
@@ -18003,7 +18102,8 @@ html {
18003
18102
  .psui-el-mini-tag span {
18004
18103
  width: 100%;
18005
18104
  font-weight: 700;
18006
- padding: 1px 8px 0px 8px;
18105
+ text-transform: uppercase;
18106
+ padding: 3px 8px 3px 8px;
18007
18107
  font-size: 10px;
18008
18108
  letter-spacing: 0.5px;
18009
18109
  }
@@ -18119,6 +18219,7 @@ html {
18119
18219
  gap: 1rem;
18120
18220
  font-size: 12px;
18121
18221
  line-height: 130%;
18222
+ letter-spacing: 0.6px;
18122
18223
  }
18123
18224
 
18124
18225
  .psui-el-toast.fill-intense.layout-info {
@@ -25600,11 +25701,13 @@ html {
25600
25701
  .sm\:psui-text-accent{
25601
25702
  font-size: 14px;
25602
25703
  line-height: 130%;
25704
+ letter-spacing: 0.6px;
25603
25705
  }
25604
25706
 
25605
25707
  .sm\:psui-text-accentSmall{
25606
25708
  font-size: 12px;
25607
25709
  line-height: 130%;
25710
+ letter-spacing: 0.6px;
25608
25711
  }
25609
25712
 
25610
25713
  .sm\:psui-text-p{
@@ -40020,11 +40123,13 @@ html {
40020
40123
  .md\:psui-text-accent{
40021
40124
  font-size: 14px;
40022
40125
  line-height: 130%;
40126
+ letter-spacing: 0.6px;
40023
40127
  }
40024
40128
 
40025
40129
  .md\:psui-text-accentSmall{
40026
40130
  font-size: 12px;
40027
40131
  line-height: 130%;
40132
+ letter-spacing: 0.6px;
40028
40133
  }
40029
40134
 
40030
40135
  .md\:psui-text-p{
@@ -54440,11 +54545,13 @@ html {
54440
54545
  .lg\:psui-text-accent{
54441
54546
  font-size: 14px;
54442
54547
  line-height: 130%;
54548
+ letter-spacing: 0.6px;
54443
54549
  }
54444
54550
 
54445
54551
  .lg\:psui-text-accentSmall{
54446
54552
  font-size: 12px;
54447
54553
  line-height: 130%;
54554
+ letter-spacing: 0.6px;
54448
54555
  }
54449
54556
 
54450
54557
  .lg\:psui-text-p{
@@ -68860,11 +68967,13 @@ html {
68860
68967
  .xl\:psui-text-accent{
68861
68968
  font-size: 14px;
68862
68969
  line-height: 130%;
68970
+ letter-spacing: 0.6px;
68863
68971
  }
68864
68972
 
68865
68973
  .xl\:psui-text-accentSmall{
68866
68974
  font-size: 12px;
68867
68975
  line-height: 130%;
68976
+ letter-spacing: 0.6px;
68868
68977
  }
68869
68978
 
68870
68979
  .xl\:psui-text-p{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.0.48",
3
+ "version": "1.0.54",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -27,6 +27,7 @@
27
27
  @import './components/PsInputTextArea.scss';
28
28
  @import './components/PsInputSelect.scss';
29
29
  @import './components/PsDraggable.scss';
30
+ @import './components//PsBadgeWithIcon.scss';
30
31
  @import "tailwindcss/base";
31
32
  @import "tailwindcss/components";
32
33
  @import "tailwindcss/utilities";
@@ -0,0 +1,40 @@
1
+ @layer components {
2
+
3
+ .psui-el-badge-with-icon {
4
+ @apply psui-flex psui-items-center psui-py-1 psui-px-2 psui-rounded;
5
+
6
+ &.layout-grey{
7
+ @apply psui-bg-gray-10 psui-text-gray-50;
8
+ }
9
+ &.layout-blue{
10
+ @apply psui-bg-blue-20 psui-text-blue-60;
11
+ }
12
+ &.layout-green{
13
+ @apply psui-bg-green-10 psui-text-green-70;
14
+ }
15
+ &.layout-yellow{
16
+ @apply psui-bg-yellow-10 psui-text-yellow-70;
17
+ }
18
+
19
+
20
+ .psui-el-badge-with-icon-icon {
21
+ font-family: 'Material Icons Round';
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-size: 16px;
25
+ line-height: 1;
26
+ letter-spacing: normal;
27
+ text-transform: none;
28
+ display: inline-block;
29
+ white-space: nowrap;
30
+ word-wrap: normal;
31
+ direction: ltr;
32
+ -webkit-font-feature-settings: 'liga';
33
+ -webkit-font-smoothing: antialiased;
34
+ }
35
+
36
+ .psui-el-badge-with-icon-message {
37
+ @apply psui-ml-1 psui-text-xsmall psui-font-bold;
38
+ }
39
+ }
40
+ }
@@ -31,11 +31,25 @@
31
31
  padding: 7px 16px;
32
32
 
33
33
  &-title {
34
- @apply psui-text-gray-50 psui-text-small psui-font-bold;
34
+ @apply psui-text-gray-50 psui-text-small;
35
35
 
36
- .psui-el-checkmark {
37
- &:before {
38
- @apply psui-mr-1 psui-text-gray-30;
36
+ .psui-el-checkbox {
37
+ @apply psui-text-gray-50;
38
+
39
+ .psui-el-checkmark {
40
+ &:before {
41
+ @apply psui-mr-1 psui-text-gray-30;
42
+ }
43
+ }
44
+
45
+ &.active {
46
+ @apply psui-text-gray-60;
47
+ }
48
+
49
+ &.disabled {
50
+ .psui-el-checkmark {
51
+ color: #798490 !important;
52
+ }
39
53
  }
40
54
  }
41
55
  }
@@ -58,6 +72,19 @@
58
72
  &.on-drag-over {
59
73
  opacity: 0.2;
60
74
  }
75
+
76
+ .psui-el-checkbox.size-small {
77
+ .psui-el-checkmark {
78
+ span {
79
+ @apply psui-font-bold;
80
+ }
81
+ &:before {
82
+ @apply psui-flex psui-items-center psui-justify-center;
83
+ font-size: 24px;
84
+ min-height: 24px;
85
+ }
86
+ }
87
+ }
61
88
  }
62
89
  }
63
90
  }
@@ -5,8 +5,8 @@
5
5
 
6
6
 
7
7
  span {
8
- @apply psui-w-full psui-font-bold;
9
- padding: 1px 8px 0px 8px;
8
+ @apply psui-w-full psui-font-bold psui-uppercase;
9
+ padding: 3px 8px 3px 8px;
10
10
  font-size: 10px;
11
11
  letter-spacing: 0.5px;
12
12
  }
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <div class="psui-el-badge-with-icon" :class="getComponentClass">
3
+ <i class="psui-el-badge-with-icon-icon">{{icon}}</i>
4
+ <span class="psui-el-badge-with-icon-message">{{message}}</span>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ export default {
10
+ name: 'PsBadgeWithIcon',
11
+ props:{
12
+ icon:{
13
+ type: String,
14
+ default:'info'
15
+ },
16
+ message:{
17
+ type: String,
18
+ default: 'Lorem ipsum'
19
+ },
20
+ layout:{
21
+ type: String,
22
+ default: 'grey',
23
+ validator: (value) => ['grey', 'blue', 'green','yellow'].includes(value)
24
+
25
+ }
26
+ },
27
+ computed:{
28
+ getComponentClass(){
29
+ return `layout-${this.layout}`
30
+ }
31
+ }
32
+ }
33
+ </script>
34
+
35
+ <style scoped>
36
+ .material-icons-round{
37
+ font-size: 16px;
38
+ }
39
+ </style>>
40
+
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <div class='psui-el-checkbox' @click="$emit('click')" :class="[getComponentClass, {'disabled':disabled}]" >
3
+ <input
4
+ type="checkbox"
5
+ :checked="checked"
6
+ :disabled="disabled"
7
+ :name="label"
8
+ />
9
+ <label
10
+ :for="label"
11
+ class="psui-el-checkmark"
12
+ >
13
+ <slot v-if="!label" name="content"></slot>
14
+ <span v-else>{{ label }}</span>
15
+ </label>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ //FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
21
+
22
+ export default {
23
+ name: 'PsCheckboxSimple',
24
+ props: {
25
+ /**
26
+ * It sets the label of the checkbox input.
27
+ */
28
+ label: {
29
+ type: String,
30
+ },
31
+ /**
32
+ * It disables the checkbox input.
33
+ */
34
+ disabled: {
35
+ type: Boolean,
36
+ default: false,
37
+ },
38
+ checked: {
39
+ type: Boolean,
40
+ default: false
41
+ },
42
+ /**
43
+ * It set the of the checkbox input. eg: big and small.
44
+ */
45
+ size: {
46
+ type: String,
47
+ default: 'big',
48
+ validator: (value)=> ['big', 'small'].includes(value)
49
+ },
50
+ /**
51
+ * It set the layout of the checkbox input. eg: default and mixed.
52
+ */
53
+ layout:{
54
+ type: String,
55
+ default: 'default',
56
+ validator: (value)=> ['default','mixed'].includes(value)
57
+ }
58
+ },
59
+ computed:{
60
+ getComponentClass(){
61
+ return `size-${this.size} layout-${this.layout}`
62
+ },
63
+ },
64
+ }
65
+ </script>
@@ -36,6 +36,9 @@
36
36
  size="small"
37
37
  :value="column.isActive"
38
38
  :label="column.title"
39
+ :class="{'active' : column.isActive}"
40
+ :disabled="column.isDisabled"
41
+ class="psui-el-draggable-item-checkbox"
39
42
  @input="$emit('on-select-item', { studyKey: getColumns.key, indexColumnGroup, indexColumn, columnGroupKey: columnGroup.key })"
40
43
  />
41
44
  </span>
@@ -66,6 +69,24 @@ export default {
66
69
  module:{
67
70
  type: String
68
71
  },
72
+
73
+ /**
74
+ * It disables the input. All mouse events are disabled.
75
+ */
76
+ disabled: {
77
+ type: Boolean,
78
+ default: false
79
+ },
69
80
  },
81
+ computed: {
82
+ getStatus() {
83
+ console.log('var:', this.column.key)
84
+ if (this.column.key == 'compliance_margin') {
85
+ return true
86
+ } else {
87
+ return false
88
+ }
89
+ },
90
+ }
70
91
  }
71
92
  </script>
package/src/index.js CHANGED
@@ -28,6 +28,8 @@ import PsChartLegend from './components/badges-and-tags/PsChartLegend.vue'
28
28
  import PsInlineSelector from './components/controls/PsInlineSelector.vue'
29
29
  import PsScrollBar from './components/playground/PsScrollBar.vue'
30
30
  import PsMiniTag from './components/badges-and-tags/PsMiniTag.vue'
31
+ import PsCheckboxSimple from './components/controls/PsCheckboxSimple.vue'
32
+ import PsBadgeWithIcon from './components/badges-and-tags/PsBadgeWithIcon.vue'
31
33
 
32
34
 
33
35
 
@@ -63,6 +65,8 @@ export default {
63
65
  Vue.component('PsDropdownList', PsDropdownList)
64
66
  Vue.component('PsScrollBar', PsScrollBar)
65
67
  Vue.component('PsMiniTag', PsMiniTag)
68
+ Vue.component('PsCheckboxSimple', PsCheckboxSimple)
69
+ Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
66
70
 
67
71
  Vue.directive('click-outside', {
68
72
  bind: function (el, binding, vnode) {
@@ -112,6 +116,8 @@ export {
112
116
  PsDropdown,
113
117
  PsDropdownList,
114
118
  PsScrollBar,
115
- PsMiniTag
119
+ PsMiniTag,
120
+ PsCheckboxSimple,
121
+ PsBadgeWithIcon
116
122
  }
117
123
 
@@ -0,0 +1,31 @@
1
+ import PsBadgeWithIcon from '../components/badges-and-tags/PsBadgeWithIcon.vue'
2
+
3
+ export default {
4
+ title: 'Components/BadgeWithIcon',
5
+ component: PsBadgeWithIcon,
6
+ argTypes: {
7
+ },
8
+ }
9
+
10
+ const TemplateDefault = (args, {argTypes})=>({
11
+ props: Object.keys(argTypes),
12
+ components:{PsBadgeWithIcon},
13
+ template: `
14
+ <div style="display: flex; flex-direction: column;">
15
+ <div style="width: fit-content; display:flex; gap:70px; margin-left: 40px;">
16
+ <span>Grey</span>
17
+ <span style="margin-left: 8px;">Blue</span>
18
+ <span style="margin-left: 5px;">Green</span>
19
+ <span>Yellow</span>
20
+ </div>
21
+ <div style="width: fit-content; display:flex; gap:5px;">
22
+ <PsBadgeWithIcon/>
23
+ <PsBadgeWithIcon layout="blue"/>
24
+ <PsBadgeWithIcon layout="green"/>
25
+ <PsBadgeWithIcon layout="yellow"/>
26
+ </div>
27
+ </div>
28
+ `
29
+ })
30
+
31
+ export const Default = TemplateDefault.bind({})
@@ -0,0 +1,48 @@
1
+ import PsCheckboxSimple from '../components/controls/PsCheckboxSimple.vue'
2
+ // const icons = ['add_circle', 'delete', 'done', 'info', 'send']
3
+ export default {
4
+ title: 'Components/CheckboxSimple',
5
+ component: PsCheckboxSimple,
6
+ }
7
+
8
+ const defaultTemplate = (args, {argTypes}) => ({
9
+ props: Object.keys(argTypes),
10
+ components: { PsCheckboxSimple },
11
+ data: () => ({
12
+ checkBox1 : true
13
+ }),
14
+ template: `
15
+ <div style='display:flex; gap: 20px;'>
16
+ <div style='display:flex; flex-direction:column; gap:5px;'>
17
+ <p>Resting</p>
18
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
19
+ <PsCheckboxSimple :checked="checkBox1" @click="checkBox1 = !checkBox1" label='Label 1' />
20
+ <PsCheckboxSimple v-bind="$props" label='Label 2' size='small' />
21
+ </div>
22
+ </div>
23
+ <div style='display:flex; flex-direction:column; gap:5px;'>
24
+ <p>Active</p>
25
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
26
+ <PsCheckboxSimple v-bind="$props" label='Label 3' checked />
27
+ <PsCheckboxSimple v-bind="$props" label='Label 4' checked size='small'/>
28
+ </div>
29
+ </div>
30
+ <div style='display:flex; flex-direction:column; gap:5px;'>
31
+ <p>Mixed</p>
32
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
33
+ <PsCheckboxSimple v-bind="$props" label='Label 5' layout='mixed' checked />
34
+ <PsCheckboxSimple v-bind="$props" label='Label 6' layout='mixed' size='small' checked />
35
+ </div>
36
+ </div>
37
+ <div style='display:flex; flex-direction:column; gap:5px;'>
38
+ <p>Disabled</p>
39
+ <div style='display: flex; flex-direction:column; gap: 10px;'>
40
+ <PsCheckboxSimple v-bind="$props" label='Label 7' disabled/>
41
+ <PsCheckboxSimple v-bind="$props" label='Label 8' size='small' disabled/>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ `
46
+ })
47
+
48
+ export const Default = defaultTemplate.bind({})
@@ -54,8 +54,8 @@ module.exports = {
54
54
  big: ['16px', '130%'],
55
55
  small: ['14px', '130%'],
56
56
  xsmall: ['12px', '130%'],
57
- accent: ['14px', '130%', { letterSpacing: '0.6px' }],
58
- accentSmall: ['12px', '130%', { letterSpacing: '0.6px' }],
57
+ accent: ['14px', { lineHeight: '130%', letterSpacing: '0.6px' }],
58
+ accentSmall: ['12px', { lineHeight: '130%', letterSpacing: '0.6px' }],
59
59
  p: ['16px', '130%'],
60
60
  h1: ['28px', '130%'],
61
61
  h2: ['24px', '130%'],