@policystudio/policy-studio-ui-vue 1.0.42 → 1.0.45
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.
- package/.github/workflows/release-package.yml +5 -5
- package/README.md +1 -0
- package/dist/css/psui_styles.css +9 -0
- package/package.json +2 -2
- package/src/assets/scss/components/PsChips.scss +7 -0
- package/src/components/chips/PsChips.vue +1 -18
- package/src/components/tabs/PsTabHeader.vue +4 -4
- package/src/stories/Chips.stories.js +1 -1
|
@@ -56,13 +56,13 @@ jobs:
|
|
|
56
56
|
with:
|
|
57
57
|
node-version: '16.x'
|
|
58
58
|
registry-url: 'https://registry.npmjs.org'
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
|
|
60
|
+
- name: Install dependencies
|
|
61
|
+
if: steps.check.outputs.changed == 'true' && success()
|
|
62
|
+
run: npm install
|
|
63
63
|
|
|
64
64
|
- name: Publish to npm.js
|
|
65
65
|
if: steps.check.outputs.changed == 'true' && success()
|
|
66
|
-
run: npm publish
|
|
66
|
+
run: npm run full-publish
|
|
67
67
|
env:
|
|
68
68
|
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
|
package/README.md
CHANGED
package/dist/css/psui_styles.css
CHANGED
|
@@ -19543,6 +19543,15 @@ html {
|
|
|
19543
19543
|
background-color: rgba(224, 239, 246, var(--bg-opacity));
|
|
19544
19544
|
}
|
|
19545
19545
|
|
|
19546
|
+
.psui-el-chips.type-button label.checked {
|
|
19547
|
+
--text-opacity: 1;
|
|
19548
|
+
color: #318FAC;
|
|
19549
|
+
color: rgba(49, 143, 172, var(--text-opacity));
|
|
19550
|
+
--bg-opacity: 1;
|
|
19551
|
+
background-color: #E0EFF6;
|
|
19552
|
+
background-color: rgba(224, 239, 246, var(--bg-opacity));
|
|
19553
|
+
}
|
|
19554
|
+
|
|
19546
19555
|
.psui-el-chips.type-button.layout-with-icon label {
|
|
19547
19556
|
display: flex;
|
|
19548
19557
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@policystudio/policy-studio-ui-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "Policy Studio UI",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Policy Studio Team",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"build-storybook": "STORYBOOK_ENV=production build-storybook",
|
|
16
16
|
"build-tailwind": "postcss src/assets/scss/base.scss -o dist/css/psui_styles.css",
|
|
17
17
|
"build-temp-tailwind": "postcss src/assets/scss/base.scss -o temp/css/psui_styles.css",
|
|
18
|
-
"publish": "npm run lint && npm run build-tailwind && build-storybook && npm publish",
|
|
18
|
+
"full-publish": "npm run lint && npm run build-tailwind && build-storybook && npm publish",
|
|
19
19
|
"serve": "concurrently --kill-others \"npm run watch-storybook\" \"npm run watch-tailwind\"",
|
|
20
20
|
"serve-prod": "concurrently --kill-others \"npm run watch-storybook\" \"npm run watch-prod-tailwind\"",
|
|
21
21
|
"watch-storybook": "start-storybook -p 6006",
|
|
@@ -82,6 +82,8 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
&.type-button {
|
|
85
|
+
|
|
86
|
+
|
|
85
87
|
label {
|
|
86
88
|
@apply psui-flex psui-items-center psui-justify-center psui-text-gray-60 psui-transition-all psui-cursor-pointer psui-rounded psui-py-1 psui-px-3 psui-text-small;
|
|
87
89
|
background-color: #F6F7F8;
|
|
@@ -93,6 +95,11 @@
|
|
|
93
95
|
&:active {
|
|
94
96
|
@apply psui-text-blue-60 psui-bg-blue-20;
|
|
95
97
|
}
|
|
98
|
+
|
|
99
|
+
&.checked {
|
|
100
|
+
@apply psui-text-blue-60 psui-bg-blue-20;
|
|
101
|
+
}
|
|
102
|
+
|
|
96
103
|
}
|
|
97
104
|
|
|
98
105
|
&.layout-with-icon {
|
|
@@ -12,10 +12,9 @@
|
|
|
12
12
|
:checked="checked"
|
|
13
13
|
/>
|
|
14
14
|
<label
|
|
15
|
-
@click="onClick"
|
|
16
15
|
:disabled="disabled"
|
|
17
16
|
:for="label"
|
|
18
|
-
:class="
|
|
17
|
+
:class="{'checked':checked && type === 'button'}"
|
|
19
18
|
>
|
|
20
19
|
<i v-if="icon" class="psui-el-chips-icon psui-el-chips-icon-prepend">{{ icon }}</i>
|
|
21
20
|
{{ label }}
|
|
@@ -90,11 +89,6 @@ export default {
|
|
|
90
89
|
},
|
|
91
90
|
},
|
|
92
91
|
emits: ['click', 'change'],
|
|
93
|
-
data() {
|
|
94
|
-
return {
|
|
95
|
-
isChecked: false,
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
92
|
computed: {
|
|
99
93
|
getComponentClass() {
|
|
100
94
|
if (this.disabled) {
|
|
@@ -103,23 +97,12 @@ export default {
|
|
|
103
97
|
return 'status-resting'
|
|
104
98
|
}
|
|
105
99
|
},
|
|
106
|
-
getCssClass() {
|
|
107
|
-
let cssClass = ''
|
|
108
|
-
|
|
109
|
-
if (this.checked === true ) {
|
|
110
|
-
cssClass = 'psui-text-blue-50 psui-bg-blue-20'
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return cssClass
|
|
114
|
-
},
|
|
115
100
|
},
|
|
116
101
|
methods: {
|
|
117
102
|
onClick() {
|
|
118
|
-
this.isChecked = !this.isChecked
|
|
119
103
|
this.$emit('click')
|
|
120
104
|
},
|
|
121
105
|
onChange(event) {
|
|
122
|
-
this.isChecked = event.target.checked
|
|
123
106
|
this.$emit('update:checked', event.target.checked)
|
|
124
107
|
this.$emit('change', event)
|
|
125
108
|
},
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
role="group"
|
|
6
6
|
>
|
|
7
7
|
|
|
8
|
-
<template v-for="item in getItems">
|
|
8
|
+
<template v-for="(item, index) in getItems">
|
|
9
9
|
<slot v-bind:item="item" >
|
|
10
10
|
<PsRichTooltip v-if="item.tooltip" :title="item.tooltip" layout="blue">
|
|
11
11
|
<template v-slot:trigger>
|
|
12
12
|
<button
|
|
13
|
-
:key="item[keyValue]"
|
|
13
|
+
:key="item[keyValue] + index"
|
|
14
14
|
type="button"
|
|
15
15
|
@click="selectTab(item)"
|
|
16
16
|
:class="getButtonClass(item)"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
</PsRichTooltip>
|
|
22
22
|
<button
|
|
23
|
-
|
|
24
|
-
:key="item[keyValue]"
|
|
23
|
+
v-else
|
|
24
|
+
:key="item[keyValue] + index"
|
|
25
25
|
type="button"
|
|
26
26
|
@click="selectTab(item)"
|
|
27
27
|
:class="getButtonClass(item)"
|