@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.90-beta.50
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/.eslintrc.js +2 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6639 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js +35 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/directives.d.ts +1 -0
- package/dist/util/directives.js +22 -0
- package/dist/util/directives.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/doc/.nvmrc +1 -0
- package/{.storybook → doc/.storybook}/main.ts +8 -2
- package/{.storybook → doc/.storybook}/preview.ts +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/{src → doc}/shims-vue.d.ts +0 -5
- package/{src → doc/src}/stories/Accordion.stories.ts +2 -3
- package/{src → doc/src}/stories/BadgeWithIcon.stories.ts +1 -1
- package/{src → doc/src}/stories/BarChart.stories.ts +1 -1
- package/{src → doc/src}/stories/Breadcrumb.stories.ts +1 -1
- package/doc/src/stories/Button.stories.ts +130 -0
- package/{src → doc/src}/stories/CardInfos.stories.ts +1 -1
- package/{src → doc/src}/stories/ChartLegend.stories.ts +1 -1
- package/{src → doc/src}/stories/Checkbox.stories.ts +1 -1
- package/{src → doc/src}/stories/CheckboxSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/Chips.stories.ts +1 -4
- package/{src → doc/src}/stories/ClimateZoneBadge.stories.ts +2 -1
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src → doc/src}/stories/CostEffectBar.stories.ts +2 -1
- package/{src → doc/src}/stories/Datatable.stories.ts +5 -2
- package/{src → doc/src}/stories/DateCardInfo.stories.ts +1 -1
- package/{src → doc/src}/stories/Dialog.stories.ts +2 -2
- package/{src → doc/src}/stories/Draggable.stories.ts +3 -2
- package/{src → doc/src}/stories/Dropdown.stories.ts +4 -3
- package/{src → doc/src}/stories/DropdownList.stories.ts +4 -2
- package/{src → doc/src}/stories/HighlightRippleDot.stories.ts +3 -2
- package/{src → doc/src}/stories/Icon.stories.ts +3 -1
- package/{src → doc/src}/stories/InlineSelector.stories.ts +1 -1
- package/{src → doc/src}/stories/Input.stories.ts +7 -4
- package/{src → doc/src}/stories/InputSelect.stories.ts +3 -2
- package/{src → doc/src}/stories/InputTextArea.stories.ts +1 -1
- package/{src → doc/src}/stories/MiniTag.stories.ts +9 -2
- package/{src → doc/src}/stories/ProgressBar.stories.ts +3 -2
- package/{src → doc/src}/stories/RadioButton.stories.ts +2 -2
- package/{src → doc/src}/stories/RadioButtonSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/SimpleAlert.stories.ts +3 -2
- package/{src → doc/src}/stories/Slider.stories.ts +6 -2
- package/{src → doc/src}/stories/Switch.stories.ts +2 -2
- package/{src → doc/src}/stories/TabHeader.stories.ts +6 -1
- package/{src → doc/src}/stories/TableResults.stories.ts +11 -7
- package/{src → doc/src}/stories/TagScope.stories.ts +3 -2
- package/{src → doc/src}/stories/TestimonialCard.stories.ts +3 -3
- package/{src → doc/src}/stories/Toast.stories.ts +2 -2
- package/{src → doc/src}/stories/Toggle.stories.ts +6 -3
- package/{src → doc/src}/stories/Tooltip.stories.ts +3 -3
- package/doc/tsconfig.json +17 -0
- package/package.json +13 -28
- package/scripts/gulp.js +11 -0
- package/src/assets/scss/base.scss +3 -34
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +9 -3
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +28 -1
- package/src/assets/scss/components/PsTooltip.scss +2 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- package/src/components/badges-and-tags/PsCardInfos.vue +39 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +46 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
- package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
- package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
- package/src/components/badges-and-tags/PsTagScope.vue +17 -22
- package/src/components/badges-and-tags/PsTestimonialCard.vue +19 -26
- package/src/components/buttons/PsButton.vue +61 -62
- package/src/components/chips/PsChips.vue +112 -101
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +84 -84
- package/src/components/controls/PsCheckboxSimple.vue +95 -95
- package/src/components/controls/PsDraggable.vue +53 -55
- package/src/components/controls/PsInlineSelector.vue +98 -99
- package/src/components/controls/PsRadioButton.vue +65 -58
- package/src/components/controls/PsRadioButtonSimple.vue +79 -75
- package/src/components/controls/PsSlider.vue +185 -176
- package/src/components/controls/PsSwitch.vue +51 -52
- package/src/components/controls/PsToggle.vue +52 -50
- package/src/components/data-graphics/PsBarChart.vue +18 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +13 -28
- package/src/components/forms/PsDropdown.vue +166 -162
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +154 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +70 -71
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +27 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +461 -468
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +70 -67
- package/src/components/table-results/PsTableResultsHeadComparison.vue +67 -64
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +94 -67
- package/src/components/table-results/PsTableResultsRow.vue +55 -56
- package/src/components/tabs/PsTabHeader.vue +106 -100
- package/src/components/tooltip/PsDialogTooltip.vue +96 -101
- package/src/components/tooltip/PsRichTooltip.vue +41 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +143 -132
- package/src/index.ts +60 -67
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +12 -3
- package/src/util/directives.ts +24 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -0
- package/tailwind.config.js +1 -1
- package/tsconfig.json +18 -13
- package/.storybook/eventBus.ts +0 -26
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.ts +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
- /package/{.storybook → doc/.storybook}/PolicyStudio.ts +0 -0
- /package/{.storybook → doc/.storybook}/manager.ts +0 -0
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src → doc/src}/contents/ComparisonData.ts +0 -0
- /package/{src → doc/src}/contents/FlexibleData.ts +0 -0
- /package/{src → doc/src}/contents/ResultsData.ts +0 -0
- /package/{src → doc/src}/stories/Colors.mdx +0 -0
- /package/{src → doc/src}/stories/ElevationSystem.mdx +0 -0
- /package/{src → doc/src}/stories/Introduction.mdx +0 -0
- /package/{src → doc/src}/stories/Typography.mdx +0 -0
- /package/{src → doc/src}/stories/assets/code-brackets.svg +0 -0
- /package/{src → doc/src}/stories/assets/colors.svg +0 -0
- /package/{src → doc/src}/stories/assets/comments.svg +0 -0
- /package/{src → doc/src}/stories/assets/direction.svg +0 -0
- /package/{src → doc/src}/stories/assets/flow.svg +0 -0
- /package/{src → doc/src}/stories/assets/plugin.svg +0 -0
- /package/{src → doc/src}/stories/assets/repo.svg +0 -0
- /package/{src → doc/src}/stories/assets/stackalt.svg +0 -0
|
@@ -1,76 +1,83 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="psui-el-radio"
|
|
4
|
-
:class="[getComponentClass, {
|
|
4
|
+
:class="[getComponentClass, { disabled: disabled }]"
|
|
5
5
|
>
|
|
6
6
|
<input
|
|
7
7
|
:id="inputId"
|
|
8
8
|
type="radio"
|
|
9
|
+
:name="inputId"
|
|
9
10
|
:value="inputValue"
|
|
10
11
|
v-model="model"
|
|
11
|
-
:disabled="disabled"
|
|
12
|
+
:disabled="disabled"
|
|
13
|
+
:checked="isChecked"
|
|
12
14
|
>
|
|
13
15
|
<label
|
|
14
16
|
:for="inputId"
|
|
15
17
|
class="psui-el-checkmark"
|
|
16
|
-
><span>{{ label }}</span></label>
|
|
18
|
+
><span>{{ label }}</span></label>
|
|
17
19
|
</div>
|
|
18
20
|
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
21
23
|
//FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
default: ''
|
|
29
|
-
},
|
|
30
|
-
/**
|
|
31
|
-
* It sets the label of the radio button.
|
|
32
|
-
*/
|
|
33
|
-
label: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: '',
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* It's the value of the checkbox
|
|
39
|
-
*/
|
|
40
|
-
inputValue:{
|
|
41
|
-
type: [String, Object],
|
|
42
|
-
},
|
|
43
|
-
value:{
|
|
44
|
-
type: [String, Object]
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* It disables the radio button. All mouse events are disabled.
|
|
48
|
-
*/
|
|
49
|
-
disabled: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* It sets the size of the radio button. eg: big and small.
|
|
55
|
-
*/
|
|
56
|
-
size: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: 'big',
|
|
59
|
-
validator: (value) => ['big', 'small'].includes(value)
|
|
60
|
-
},
|
|
24
|
+
import { computed } from 'vue'
|
|
25
|
+
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
inputId: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
61
30
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return this.value
|
|
69
|
-
},
|
|
70
|
-
set(value){
|
|
71
|
-
this.$emit('input', value)
|
|
72
|
-
}
|
|
73
|
-
}
|
|
31
|
+
/**
|
|
32
|
+
* It sets the label of the radio button.
|
|
33
|
+
*/
|
|
34
|
+
label: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: '',
|
|
74
37
|
},
|
|
75
|
-
|
|
76
|
-
|
|
38
|
+
/**
|
|
39
|
+
* It's the value of the checkbox
|
|
40
|
+
*/
|
|
41
|
+
inputValue: {
|
|
42
|
+
type: [String, Object],
|
|
43
|
+
default: '',
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
type: [String, Object],
|
|
47
|
+
default: '',
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* It disables the radio button. All mouse events are disabled.
|
|
51
|
+
*/
|
|
52
|
+
disabled: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* It sets the size of the radio button. eg: big and small.
|
|
58
|
+
*/
|
|
59
|
+
size: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'big',
|
|
62
|
+
validator: (value) => ['big', 'small'].includes(value),
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const emit = defineEmits(['input'])
|
|
67
|
+
const getComponentClass = computed(() => {
|
|
68
|
+
return `size-${props.size}`
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const model = computed({
|
|
72
|
+
get: () => {
|
|
73
|
+
return props.value
|
|
74
|
+
},
|
|
75
|
+
set: (value) => {
|
|
76
|
+
emit('input', value)
|
|
77
|
+
},
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const isChecked = computed(() => {
|
|
81
|
+
return props.inputValue === props.value
|
|
82
|
+
})
|
|
83
|
+
</script>
|
|
@@ -1,97 +1,101 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="psui-el-radio"
|
|
4
|
-
:class="[getComponentClass, {
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-radio"
|
|
4
|
+
:class="[getComponentClass, { disabled: disabled }]"
|
|
5
5
|
v-bind="getComponentAttrs"
|
|
6
6
|
>
|
|
7
|
-
<input
|
|
8
|
-
type="radio"
|
|
9
|
-
:checked="checked"
|
|
7
|
+
<input
|
|
8
|
+
type="radio"
|
|
9
|
+
:checked="checked"
|
|
10
10
|
:disabled="disabled"
|
|
11
11
|
:label="label"
|
|
12
12
|
:name="name"
|
|
13
13
|
:id="getInputId"
|
|
14
14
|
v-bind="inputAttrs"
|
|
15
|
-
@change="
|
|
15
|
+
@change="emit('change')"
|
|
16
16
|
>
|
|
17
|
-
<label
|
|
17
|
+
<label
|
|
18
18
|
:for="getInputId"
|
|
19
19
|
class="psui-el-checkmark"
|
|
20
20
|
>
|
|
21
21
|
<slot name="content">
|
|
22
22
|
<span>{{ label }}</span>
|
|
23
23
|
</slot>
|
|
24
|
-
</label>
|
|
24
|
+
</label>
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script>
|
|
29
|
-
import { randomString } from '../../util/GeneralFunctions'
|
|
28
|
+
<script setup>
|
|
29
|
+
import { randomString } from '../../util/GeneralFunctions.js'
|
|
30
|
+
import { computed, useAttrs } from 'vue'
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* It set the of the checkbox input. eg: big and small.
|
|
66
|
-
*/
|
|
67
|
-
size: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: 'big',
|
|
70
|
-
validator: (value)=> ['big', 'small'].includes(value)
|
|
71
|
-
},
|
|
72
|
-
/**
|
|
73
|
-
* It set the layout of the checkbox input. eg: default and mixed.
|
|
74
|
-
*/
|
|
32
|
+
const emit = defineEmits(['change'])
|
|
33
|
+
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
/**
|
|
36
|
+
* It sets the label of the checkbox input.
|
|
37
|
+
*/
|
|
38
|
+
label: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: '',
|
|
41
|
+
},
|
|
42
|
+
name: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: '',
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* It disables the checkbox input.
|
|
48
|
+
*/
|
|
49
|
+
disabled: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Sets the input as checked
|
|
55
|
+
*/
|
|
56
|
+
checked: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Add html attributes to the element input
|
|
62
|
+
*/
|
|
63
|
+
inputAttrs: {
|
|
64
|
+
type: Object,
|
|
65
|
+
default: () => ({}),
|
|
75
66
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return this.inputAttrs.id
|
|
84
|
-
} else if (this?.$attrs?.id) {
|
|
85
|
-
return this.$attrs.id
|
|
86
|
-
} else {
|
|
87
|
-
return randomString(16)
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
getComponentAttrs() {
|
|
91
|
-
let componentAttrs = { ... this.$attrs }
|
|
92
|
-
delete componentAttrs.id
|
|
93
|
-
return componentAttrs
|
|
94
|
-
}
|
|
67
|
+
/**
|
|
68
|
+
* It set the of the checkbox input. eg: big and small.
|
|
69
|
+
*/
|
|
70
|
+
size: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: 'big',
|
|
73
|
+
validator: (value) => ['big', 'small'].includes(value),
|
|
95
74
|
},
|
|
96
|
-
|
|
75
|
+
/**
|
|
76
|
+
* It set the layout of the checkbox input. eg: default and mixed.
|
|
77
|
+
*/
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const attrs = useAttrs()
|
|
81
|
+
|
|
82
|
+
const getComponentClass = computed(() => {
|
|
83
|
+
return `size-${props.size}`
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const getInputId = computed(() => {
|
|
87
|
+
if (props?.inputAttrs?.id) {
|
|
88
|
+
return props.inputAttrs.id
|
|
89
|
+
} else if (attrs?.id) {
|
|
90
|
+
return attrs.id
|
|
91
|
+
} else {
|
|
92
|
+
return randomString(16)
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
const getComponentAttrs = computed(() => {
|
|
97
|
+
let componentAttrs = { ...attrs }
|
|
98
|
+
delete componentAttrs.id
|
|
99
|
+
return componentAttrs
|
|
100
|
+
})
|
|
97
101
|
</script>
|