@policystudio/policy-studio-ui-vue 1.1.89 → 1.1.90-access.1
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/.eslintignore +1 -0
- package/.eslintrc.js +75 -67
- package/.github/workflows/deploy-storybook.yml +5 -5
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6638 -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/doc/.storybook/PolicyStudio.ts +11 -0
- package/doc/.storybook/main.ts +27 -0
- package/doc/.storybook/manager.ts +7 -0
- package/{.storybook/preview.js → doc/.storybook/preview.ts} +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/doc/shims-vue.d.ts +6 -0
- package/{src/stories/Accordion.stories.js → doc/src/stories/Accordion.stories.ts} +4 -5
- package/{src/stories/BadgeWithIcon.stories.js → doc/src/stories/BadgeWithIcon.stories.ts} +2 -2
- package/{src/stories/BarChart.stories.js → doc/src/stories/BarChart.stories.ts} +2 -2
- package/{src/stories/Breadcrumb.stories.js → doc/src/stories/Breadcrumb.stories.ts} +2 -5
- package/{src/stories/Button.stories.js → doc/src/stories/Button.stories.ts} +130 -130
- package/{src/stories/CardInfos.stories.js → doc/src/stories/CardInfos.stories.ts} +2 -3
- package/{src/stories/ChartLegend.stories.js → doc/src/stories/ChartLegend.stories.ts} +2 -3
- package/{src/stories/Checkbox.stories.js → doc/src/stories/Checkbox.stories.ts} +2 -2
- package/{src/stories/CheckboxSimple.stories.js → doc/src/stories/CheckboxSimple.stories.ts} +2 -2
- package/{src/stories/Chips.stories.js → doc/src/stories/Chips.stories.ts} +22 -23
- package/{src/stories/ClimateZoneBadge.stories.js → doc/src/stories/ClimateZoneBadge.stories.ts} +3 -2
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src/stories/CostEffectBar.stories.js → doc/src/stories/CostEffectBar.stories.ts} +3 -2
- package/{src/stories/Datatable.stories.js → doc/src/stories/Datatable.stories.ts} +7 -4
- package/{src/stories/DateCardInfo.stories.js → doc/src/stories/DateCardInfo.stories.ts} +2 -6
- package/{src/stories/Dialog.stories.js → doc/src/stories/Dialog.stories.ts} +2 -2
- package/{src/stories/Draggable.stories.js → doc/src/stories/Draggable.stories.ts} +3 -2
- package/{src/stories/Dropdown.stories.js → doc/src/stories/Dropdown.stories.ts} +4 -3
- package/{src/stories/DropdownList.stories.js → doc/src/stories/DropdownList.stories.ts} +4 -2
- package/{src/stories/ElevationSystem.stories.mdx → doc/src/stories/ElevationSystem.mdx} +1 -1
- package/{src/stories/HighlightRippleDot.stories.js → doc/src/stories/HighlightRippleDot.stories.ts} +3 -2
- package/{src/stories/Icon.stories.js → doc/src/stories/Icon.stories.ts} +3 -1
- package/{src/stories/InlineSelector.stories.js → doc/src/stories/InlineSelector.stories.ts} +2 -2
- package/{src/stories/Input.stories.js → doc/src/stories/Input.stories.ts} +7 -4
- package/{src/stories/InputSelect.stories.js → doc/src/stories/InputSelect.stories.ts} +3 -2
- package/{src/stories/InputTextArea.stories.js → doc/src/stories/InputTextArea.stories.ts} +2 -2
- package/{src/stories/Introduction.stories.mdx → doc/src/stories/Introduction.mdx} +101 -101
- package/{src/stories/MiniTag.stories.js → doc/src/stories/MiniTag.stories.ts} +9 -2
- package/{src/stories/ProgressBar.stories.js → doc/src/stories/ProgressBar.stories.ts} +3 -2
- package/{src/stories/RadioButton.stories.js → doc/src/stories/RadioButton.stories.ts} +2 -2
- package/{src/stories/RadioButtonSimple.stories.js → doc/src/stories/RadioButtonSimple.stories.ts} +2 -2
- package/{src/stories/SimpleAlert.stories.js → doc/src/stories/SimpleAlert.stories.ts} +3 -2
- package/{src/stories/Slider.stories.js → doc/src/stories/Slider.stories.ts} +6 -2
- package/{src/stories/Switch.stories.js → doc/src/stories/Switch.stories.ts} +2 -2
- package/{src/stories/TabHeader.stories.js → doc/src/stories/TabHeader.stories.ts} +6 -1
- package/{src/stories/TableResults.stories.js → doc/src/stories/TableResults.stories.ts} +11 -7
- package/{src/stories/TagScope.stories.js → doc/src/stories/TagScope.stories.ts} +3 -2
- package/{src/stories/TestimonialCard.stories.js → doc/src/stories/TestimonialCard.stories.ts} +3 -3
- package/{src/stories/Toast.stories.js → doc/src/stories/Toast.stories.ts} +2 -2
- package/{src/stories/Toggle.stories.js → doc/src/stories/Toggle.stories.ts} +7 -4
- package/{src/stories/Tooltip.stories.js → doc/src/stories/Tooltip.stories.ts} +6 -6
- package/{src/stories/Typography.stories.mdx → doc/src/stories/Typography.mdx} +107 -105
- package/doc/tsconfig.json +17 -0
- package/package.json +43 -39
- package/scripts/gulp.js +11 -0
- package/scripts/kill-port.sh +12 -0
- package/src/App.vue +30 -0
- package/src/assets/scss/base.scss +3 -30
- package/src/assets/scss/components/PsAccordion.scss +12 -2
- package/src/assets/scss/components/PsButton.scss +7 -1
- package/src/assets/scss/components/PsChips.scss +12 -7
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDateCardInfo.scss +4 -5
- package/src/assets/scss/components/PsDialog.scss +7 -0
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsInput.scss +10 -0
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsSwitch.scss +10 -0
- package/src/assets/scss/components/PsTabHeader.scss +64 -2
- package/src/assets/scss/components/PsTableResults.scss +51 -82
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/assets/scss/components/PsTooltip.scss +149 -145
- package/src/components/accordion/PsAccordion.vue +20 -21
- package/src/components/accordion/PsAccordionItem.vue +122 -81
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +37 -36
- package/src/components/badges-and-tags/PsCardInfos.vue +40 -40
- package/src/components/badges-and-tags/PsChartLegend.vue +50 -41
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +28 -61
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +4 -3
- 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 +25 -30
- package/src/components/buttons/PsButton.vue +90 -98
- package/src/components/chips/PsChips.vue +118 -103
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +86 -83
- package/src/components/controls/PsCheckboxSimple.vue +97 -97
- package/src/components/controls/PsDraggable.vue +100 -99
- package/src/components/controls/PsInlineSelector.vue +111 -113
- package/src/components/controls/PsRadioButton.vue +72 -60
- package/src/components/controls/PsRadioButtonSimple.vue +81 -77
- package/src/components/controls/PsSlider.vue +190 -181
- package/src/components/controls/PsSwitch.vue +64 -54
- package/src/components/controls/PsToggle.vue +62 -57
- package/src/components/data-graphics/PsBarChart.vue +22 -23
- package/src/components/datatable/PsDataTable.vue +70 -65
- package/src/components/datatable/PsDataTableItem.vue +30 -32
- package/src/components/forms/PsDropdown.vue +173 -166
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +163 -146
- package/src/components/forms/PsInputSelect.vue +121 -100
- package/src/components/forms/PsInputTextArea.vue +84 -74
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +67 -60
- package/src/components/notifications/PsSimpleAlert.vue +47 -37
- package/src/components/notifications/PsToast.vue +48 -42
- package/src/components/table-results/PsTableResults.vue +527 -504
- package/src/components/table-results/PsTableResultsBody.vue +69 -68
- package/src/components/table-results/PsTableResultsHead.vue +108 -69
- package/src/components/table-results/PsTableResultsHeadComparison.vue +88 -69
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +112 -72
- package/src/components/table-results/PsTableResultsRow.vue +61 -58
- package/src/components/tabs/PsTabHeader.vue +138 -116
- package/src/components/tooltip/PsDialogTooltip.vue +112 -107
- package/src/components/tooltip/PsRichTooltip.vue +46 -43
- package/src/components/tooltip/PsTooltip.vue +126 -122
- package/src/components/ui/PsDotLoader.vue +6 -10
- package/src/components/ui/PsIcon.vue +149 -134
- package/src/index.ts +159 -0
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/GeneralFunctions.js +16 -7
- package/src/util/directives.ts +24 -0
- package/src/util/imageLoader.js +14 -7
- package/tailwind.config.js +12 -3
- package/tsconfig.json +47 -0
- package/.storybook/PolicyStudio.js +0 -10
- package/.storybook/eventBus.js +0 -3
- package/.storybook/main.js +0 -25
- package/.storybook/manager.js +0 -6
- package/babel.config.js +0 -3
- package/backup-package-lock.json +0 -37194
- package/dist/css/psui_styles.css +0 -110965
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -248
- package/src/index.js +0 -167
- package/src/stories/Playground.stories.js +0 -16
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src/contents/ComparisonData.js → doc/src/contents/ComparisonData.ts} +0 -0
- /package/{src/contents/FlexibleData.js → doc/src/contents/FlexibleData.ts} +0 -0
- /package/{src/contents/ResultsData.js → doc/src/contents/ResultsData.ts} +0 -0
- /package/{src/stories/Colors.stories.mdx → doc/src/stories/Colors.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,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-input-textarea"
|
|
4
|
+
:class="[{ disabled: disabled }]"
|
|
5
|
+
>
|
|
3
6
|
<div class="psui-el-input-textarea-wrapper">
|
|
4
|
-
<label
|
|
7
|
+
<label
|
|
8
|
+
:for="label"
|
|
9
|
+
v-if="label"
|
|
10
|
+
>{{ label }}</label>
|
|
5
11
|
<textarea
|
|
6
12
|
:id="label"
|
|
7
13
|
:autocapitalize="autocapitalize"
|
|
@@ -9,85 +15,89 @@
|
|
|
9
15
|
:value="value"
|
|
10
16
|
@focus="onInputFocus"
|
|
11
17
|
@blur="onInputBlur"
|
|
12
|
-
@input="
|
|
13
|
-
@change="
|
|
18
|
+
@input="emit('input', $event)"
|
|
19
|
+
@change="emit('change', $event)"
|
|
14
20
|
:rows="rows"
|
|
15
21
|
:placeholder="placeholder"
|
|
16
|
-
:readonly=
|
|
22
|
+
:readonly="disabled"
|
|
17
23
|
/>
|
|
18
24
|
</div>
|
|
19
|
-
<p
|
|
25
|
+
<p
|
|
26
|
+
class="psui-el-input-textarea-message"
|
|
27
|
+
v-if="optionalLabel && !disabled"
|
|
28
|
+
>
|
|
29
|
+
{{ optionalLabel }}
|
|
30
|
+
</p>
|
|
20
31
|
</div>
|
|
21
32
|
</template>
|
|
22
33
|
|
|
23
|
-
<script>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* It disabled the textarea input. All mouse events are disabled.
|
|
75
|
-
*/
|
|
76
|
-
disabled: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: false,
|
|
79
|
-
}
|
|
34
|
+
<script setup>
|
|
35
|
+
|
|
36
|
+
defineProps({
|
|
37
|
+
/**
|
|
38
|
+
* It sets the placeholder of the textarea input.
|
|
39
|
+
*/
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '',
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* It sets the value selected of the textarea input.
|
|
46
|
+
*/
|
|
47
|
+
value: {
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* It sets the label of the textarea input.
|
|
52
|
+
*/
|
|
53
|
+
label: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: '',
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* It sets a optional label if needed.
|
|
59
|
+
*/
|
|
60
|
+
optionalLabel: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: '',
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* It sets aria-required property. eg: true or false.
|
|
66
|
+
*/
|
|
67
|
+
required: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: true,
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* It sets the type of autocapitalize. See mdn web-doc for full information. default: sentences.
|
|
73
|
+
*/
|
|
74
|
+
autocapitalize: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: 'sentences',
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* It sets the size of the textarea input.
|
|
80
|
+
*/
|
|
81
|
+
rows: {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: 5,
|
|
80
84
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
/**
|
|
86
|
+
* It disabled the textarea input. All mouse events are disabled.
|
|
87
|
+
*/
|
|
88
|
+
disabled: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false,
|
|
91
|
+
},
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const emit = defineEmits(['focus', 'blur', 'input', 'change'])
|
|
95
|
+
|
|
96
|
+
const onInputFocus = ($event) => {
|
|
97
|
+
emit('focus', $event)
|
|
91
98
|
}
|
|
92
|
-
</script>
|
|
93
99
|
|
|
100
|
+
const onInputBlur = ($event) => {
|
|
101
|
+
emit('blur', $event)
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<nav
|
|
3
3
|
v-if="items.length > 0"
|
|
4
4
|
aria-label="breadcrumb"
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
<router-link
|
|
14
14
|
v-if="item.route && !item.isReset"
|
|
15
15
|
:to="item.route"
|
|
16
|
-
@click.native="onNavigate(item)"
|
|
17
16
|
>
|
|
18
17
|
{{ item.title }}
|
|
19
18
|
</router-link>
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
<span
|
|
22
21
|
v-else-if="item.isReset"
|
|
23
22
|
class="psui-flex psui-items-center psui-cursor-pointer psui-text-blue-60 psui-font-bold"
|
|
24
|
-
@click="
|
|
23
|
+
@click="emit('reset-state', item)"
|
|
25
24
|
>
|
|
26
25
|
<PsIcon
|
|
27
26
|
size="18"
|
|
@@ -32,8 +31,8 @@
|
|
|
32
31
|
{{ item.title }}
|
|
33
32
|
</span>
|
|
34
33
|
|
|
35
|
-
<span
|
|
36
|
-
v-else
|
|
34
|
+
<span
|
|
35
|
+
v-else
|
|
37
36
|
:title="item.title"
|
|
38
37
|
>
|
|
39
38
|
{{ item.title }}
|
|
@@ -43,36 +42,28 @@
|
|
|
43
42
|
</nav>
|
|
44
43
|
</template>
|
|
45
44
|
|
|
46
|
-
<script>
|
|
45
|
+
<script setup>
|
|
47
46
|
import PsIcon from '../ui/PsIcon.vue'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
type: [Array, Boolean],
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* It sets the li style.
|
|
60
|
-
*/
|
|
61
|
-
liClass: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: 'psui-text-small psui-text-gray-60'
|
|
64
|
-
}
|
|
47
|
+
|
|
48
|
+
defineProps({
|
|
49
|
+
/**
|
|
50
|
+
* It sets the items which will be rendered.
|
|
51
|
+
*/
|
|
52
|
+
items: {
|
|
53
|
+
type: [Array, Boolean],
|
|
54
|
+
default: () => [],
|
|
65
55
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
56
|
+
/**
|
|
57
|
+
* It sets the li style.
|
|
58
|
+
*/
|
|
59
|
+
liClass: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'psui-text-small psui-text-gray-60',
|
|
62
|
+
},
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const emit = defineEmits(['reset-state'])
|
|
75
66
|
|
|
76
|
-
|
|
67
|
+
</script>
|
|
77
68
|
|
|
78
|
-
|
|
69
|
+
<style></style>
|
|
@@ -1,82 +1,89 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-dialog"
|
|
4
|
+
:class="getComponentClass"
|
|
5
|
+
>
|
|
3
6
|
<div class="psui-el-dialog-icon">
|
|
4
|
-
<i class="material-icons-round">{{icon}}</i>
|
|
7
|
+
<i class="material-icons-round">{{ icon }}</i>
|
|
5
8
|
</div>
|
|
6
|
-
<div class="psui-el-dialog-wrapper">
|
|
9
|
+
<div class="psui-el-dialog-wrapper">
|
|
7
10
|
<div class="psui-el-dialog-default">
|
|
8
11
|
<slot>
|
|
9
|
-
<p class="psui-el-dialog-message">
|
|
12
|
+
<p class="psui-el-dialog-message">
|
|
13
|
+
{{ message }}
|
|
14
|
+
</p>
|
|
10
15
|
</slot>
|
|
11
16
|
</div>
|
|
12
17
|
<div class="psui-el-dialog-action">
|
|
13
|
-
<slot name="action"
|
|
18
|
+
<slot name="action" />
|
|
14
19
|
</div>
|
|
15
20
|
</div>
|
|
16
21
|
<button
|
|
17
|
-
class="psui-el-dialog-close"
|
|
18
|
-
v-if="hasClose"
|
|
19
|
-
@click="onClose"
|
|
22
|
+
class="psui-el-dialog-close"
|
|
23
|
+
v-if="hasClose"
|
|
24
|
+
@click="onClose"
|
|
25
|
+
>
|
|
20
26
|
<i class="material-icons-round">close</i>
|
|
21
27
|
</button>
|
|
22
28
|
</div>
|
|
23
29
|
</template>
|
|
24
30
|
|
|
25
|
-
<script>
|
|
31
|
+
<script setup>
|
|
26
32
|
// Figma - 3. Inline Dialog https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=3694%3A55841
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
61
|
-
*/
|
|
62
|
-
icon: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: 'info'
|
|
65
|
-
}
|
|
33
|
+
|
|
34
|
+
import { computed } from 'vue'
|
|
35
|
+
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
/**
|
|
38
|
+
* It sets the theme of the dialog. eg: informative, success and alert.
|
|
39
|
+
*/
|
|
40
|
+
theme: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'informative',
|
|
43
|
+
validator: (value) => ['informative', 'success', 'alert', 'gray', 'disabled'].includes(value),
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* It set the which will be displayed when component is rendered.
|
|
47
|
+
*/
|
|
48
|
+
message: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: '',
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* It sets the direction of the items within the dialog. See Figma Notifications for full information.
|
|
54
|
+
*/
|
|
55
|
+
layout: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'horizontal',
|
|
58
|
+
validator: (value) => ['horizontal', 'vertical'].includes(value),
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* It sets a close button if needed.
|
|
62
|
+
*/
|
|
63
|
+
hasClose: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true,
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
/**
|
|
68
|
+
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
69
|
+
*/
|
|
70
|
+
icon: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: 'info',
|
|
72
73
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
const emit = defineEmits(['close'])
|
|
77
|
+
|
|
78
|
+
const getComponentClass = computed(() => {
|
|
79
|
+
return [`layout-${props.layout}`, `theme-${props.theme}`, `close-${props.hasClose ? 'on' : 'off'}`]
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
const onClose = () => {
|
|
83
|
+
emit('close')
|
|
78
84
|
}
|
|
79
85
|
</script>
|
|
80
86
|
|
|
81
|
-
<style>
|
|
82
|
-
|
|
87
|
+
<style>
|
|
88
|
+
/* Please, use the file src/assets/scss/components/PsDialog.scss */
|
|
89
|
+
</style>
|
|
@@ -1,43 +1,53 @@
|
|
|
1
|
-
<template
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-simple-alert"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
@click.stop="emit('click')"
|
|
6
|
+
>
|
|
7
|
+
<PsIcon
|
|
8
|
+
:icon="icon"
|
|
9
|
+
:icon-classes="iconClass"
|
|
10
|
+
:size="iconSize"
|
|
11
|
+
/>
|
|
12
|
+
<p class="psui-el-simple-alert-message">
|
|
13
|
+
{{ message }}
|
|
14
|
+
</p>
|
|
15
|
+
<button
|
|
16
|
+
class="psui-el-simple-alert-button"
|
|
17
|
+
:class="buttonClass"
|
|
18
|
+
@click.stop="emit('close')"
|
|
19
|
+
>
|
|
20
|
+
close
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
11
23
|
</template>
|
|
12
24
|
|
|
13
|
-
<script>
|
|
25
|
+
<script setup>
|
|
14
26
|
import PsIcon from '../ui/PsIcon.vue'
|
|
15
27
|
|
|
28
|
+
defineProps({
|
|
29
|
+
message: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '',
|
|
32
|
+
},
|
|
33
|
+
icon: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'info',
|
|
36
|
+
},
|
|
37
|
+
iconClass: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: '',
|
|
40
|
+
},
|
|
41
|
+
buttonClass: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: '',
|
|
44
|
+
},
|
|
45
|
+
iconSize: {
|
|
46
|
+
type: [Number, String],
|
|
47
|
+
default: 24,
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const emit = defineEmits(['click', 'close'])
|
|
16
52
|
|
|
17
|
-
export default {
|
|
18
|
-
name: 'PsSimpleAlert',
|
|
19
|
-
components: { PsIcon },
|
|
20
|
-
props: {
|
|
21
|
-
message: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ''
|
|
24
|
-
},
|
|
25
|
-
icon: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: 'info'
|
|
28
|
-
},
|
|
29
|
-
iconClass:{
|
|
30
|
-
type:String,
|
|
31
|
-
default: ''
|
|
32
|
-
},
|
|
33
|
-
buttonClass:{
|
|
34
|
-
type:String,
|
|
35
|
-
default: ''
|
|
36
|
-
},
|
|
37
|
-
iconSize:{
|
|
38
|
-
type: [Number, String],
|
|
39
|
-
default: 24
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
}
|
|
43
53
|
</script>
|
|
@@ -1,53 +1,59 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="psui-el-toast"
|
|
4
|
+
:class="getComponentClass"
|
|
5
|
+
>
|
|
3
6
|
<i class="material-icons-round psui-el-toast-icon">{{ icon }}</i>
|
|
4
|
-
<p class="psui-el-toast-message">
|
|
7
|
+
<p class="psui-el-toast-message">
|
|
8
|
+
{{ message }}
|
|
9
|
+
</p>
|
|
5
10
|
<div class="psui-el-toast-actions">
|
|
6
|
-
<slot
|
|
11
|
+
<slot />
|
|
7
12
|
</div>
|
|
8
13
|
</div>
|
|
9
14
|
</template>
|
|
10
15
|
|
|
11
|
-
<script>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
/**
|
|
24
|
-
* It sets a supportive layout. eg: soft and intese. See Figma - Notification for full information.
|
|
25
|
-
*/
|
|
26
|
-
fill: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: 'intense',
|
|
29
|
-
validator: (value) => ['soft', 'intense'].includes(value)
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
32
|
-
* It sets the message which will be displayed when component is rendered.
|
|
33
|
-
*/
|
|
34
|
-
message: {
|
|
35
|
-
type: String,
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
39
|
-
*/
|
|
40
|
-
icon:{
|
|
41
|
-
type: String,
|
|
42
|
-
}
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed } from 'vue'
|
|
18
|
+
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
/**
|
|
21
|
+
* It sets the layout of the toast. eg: info, success, warning and error.
|
|
22
|
+
*/
|
|
23
|
+
layout: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'info',
|
|
26
|
+
validator: (value) => ['info', 'success', 'warning', 'error'].includes(value),
|
|
43
27
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
/**
|
|
29
|
+
* It sets a supportive layout. eg: soft and intese. See Figma - Notification for full information.
|
|
30
|
+
*/
|
|
31
|
+
fill: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'intense',
|
|
34
|
+
validator: (value) => ['soft', 'intense'].includes(value),
|
|
48
35
|
},
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
/**
|
|
37
|
+
* It sets the message which will be displayed when component is rendered.
|
|
38
|
+
*/
|
|
39
|
+
message: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '',
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
45
|
+
*/
|
|
46
|
+
icon: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: '',
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
const getComponentClass = computed(() => {
|
|
53
|
+
return `layout-${props.layout} fill-${props.fill}`
|
|
54
|
+
})
|
|
55
|
+
</script>
|
|
53
56
|
|
|
57
|
+
<style>
|
|
58
|
+
/* Please, use the file src/assets/scss/components/PsToast.scss */
|
|
59
|
+
</style>
|