@policystudio/policy-studio-ui-vue 1.1.90-beta.12 → 1.1.90-beta.18
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 -1
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6986 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +53 -63
- package/dist/index.js.map +1 -1
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js.map +1 -1
- 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/eventBus.d.ts +7 -0
- package/dist/util/eventBus.js +8 -0
- package/dist/util/eventBus.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js.map +1 -1
- package/package.json +9 -23
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/components/accordion/PsAccordionItem.vue +75 -75
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- package/src/components/badges-and-tags/PsCardInfos.vue +40 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +47 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +14 -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 +20 -26
- package/src/components/buttons/PsButton.vue +61 -62
- package/src/components/chips/PsChips.vue +98 -101
- 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 +99 -99
- package/src/components/controls/PsRadioButton.vue +59 -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 +53 -50
- package/src/components/data-graphics/PsBarChart.vue +19 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +14 -28
- package/src/components/forms/PsDropdown.vue +164 -162
- package/src/components/forms/PsDropdownList.vue +132 -129
- package/src/components/forms/PsInput.vue +155 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +71 -71
- package/src/components/navigations/PsBreadcrumb.vue +26 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +28 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +452 -458
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +63 -56
- 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 +42 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +126 -129
- package/src/index.ts +57 -71
- package/src/tsconfig.json +12 -0
- package/src/{shims-vue.d.ts → types/index.d.ts} +0 -5
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +0 -3
- package/src/util/directives.ts +24 -0
- package/src/util/eventBus.js +10 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -8
- package/tailwind.config.js +1 -1
- package/tsconfig.json +15 -17
- package/.storybook/PolicyStudio.ts +0 -11
- package/.storybook/eventBus.ts +0 -26
- package/.storybook/main.ts +0 -21
- package/.storybook/manager.ts +0 -7
- package/.storybook/preview.ts +0 -17
- package/dist/contents/ComparisonData.js +0 -376
- package/dist/contents/ComparisonData.js.map +0 -1
- package/dist/contents/FlexibleData.js +0 -501
- package/dist/contents/FlexibleData.js.map +0 -1
- package/dist/contents/ResultsData.js +0 -530
- package/dist/contents/ResultsData.js.map +0 -1
- package/dist/css/psui_styles.css +0 -4647
- package/dist/stories/Accordion.stories.js +0 -56
- package/dist/stories/Accordion.stories.js.map +0 -1
- package/dist/stories/BadgeWithIcon.stories.js +0 -28
- package/dist/stories/BadgeWithIcon.stories.js.map +0 -1
- package/dist/stories/BarChart.stories.js +0 -16
- package/dist/stories/BarChart.stories.js.map +0 -1
- package/dist/stories/Breadcrumb.stories.js +0 -21
- package/dist/stories/Breadcrumb.stories.js.map +0 -1
- package/dist/stories/Button.stories.js +0 -44
- package/dist/stories/Button.stories.js.map +0 -1
- package/dist/stories/CardInfos.stories.js +0 -13
- package/dist/stories/CardInfos.stories.js.map +0 -1
- package/dist/stories/ChartLegend.stories.js +0 -13
- package/dist/stories/ChartLegend.stories.js.map +0 -1
- package/dist/stories/Checkbox.stories.js +0 -44
- package/dist/stories/Checkbox.stories.js.map +0 -1
- package/dist/stories/CheckboxSimple.stories.js +0 -48
- package/dist/stories/CheckboxSimple.stories.js.map +0 -1
- package/dist/stories/Chips.stories.js +0 -27
- package/dist/stories/Chips.stories.js.map +0 -1
- package/dist/stories/ClimateZoneBadge.stories.js +0 -15
- package/dist/stories/ClimateZoneBadge.stories.js.map +0 -1
- package/dist/stories/CostEffectBar.stories.js +0 -21
- package/dist/stories/CostEffectBar.stories.js.map +0 -1
- package/dist/stories/Datatable.stories.js +0 -45
- package/dist/stories/Datatable.stories.js.map +0 -1
- package/dist/stories/DateCardInfo.stories.js +0 -18
- package/dist/stories/DateCardInfo.stories.js.map +0 -1
- package/dist/stories/Dialog.stories.js +0 -127
- package/dist/stories/Dialog.stories.js.map +0 -1
- package/dist/stories/Draggable.stories.js +0 -20
- package/dist/stories/Draggable.stories.js.map +0 -1
- package/dist/stories/Dropdown.stories.js +0 -98
- package/dist/stories/Dropdown.stories.js.map +0 -1
- package/dist/stories/DropdownList.stories.js +0 -208
- package/dist/stories/DropdownList.stories.js.map +0 -1
- package/dist/stories/Header.stories.js +0 -39
- package/dist/stories/Header.stories.js.map +0 -1
- package/dist/stories/HighlightRippleDot.stories.js +0 -13
- package/dist/stories/HighlightRippleDot.stories.js.map +0 -1
- package/dist/stories/Icon.stories.js +0 -19
- package/dist/stories/Icon.stories.js.map +0 -1
- package/dist/stories/InlineSelector.stories.js +0 -16
- package/dist/stories/InlineSelector.stories.js.map +0 -1
- package/dist/stories/Input.stories.js +0 -235
- package/dist/stories/Input.stories.js.map +0 -1
- package/dist/stories/InputSelect.stories.js +0 -28
- package/dist/stories/InputSelect.stories.js.map +0 -1
- package/dist/stories/InputTextArea.stories.js +0 -23
- package/dist/stories/InputTextArea.stories.js.map +0 -1
- package/dist/stories/MiniTag.stories.js +0 -44
- package/dist/stories/MiniTag.stories.js.map +0 -1
- package/dist/stories/Playground.stories.js +0 -14
- package/dist/stories/Playground.stories.js.map +0 -1
- package/dist/stories/ProgressBar.stories.js +0 -21
- package/dist/stories/ProgressBar.stories.js.map +0 -1
- package/dist/stories/RadioButton.stories.js +0 -36
- package/dist/stories/RadioButton.stories.js.map +0 -1
- package/dist/stories/RadioButtonSimple.stories.js +0 -40
- package/dist/stories/RadioButtonSimple.stories.js.map +0 -1
- package/dist/stories/SimpleAlert.stories.js +0 -19
- package/dist/stories/SimpleAlert.stories.js.map +0 -1
- package/dist/stories/Slider.stories.js +0 -70
- package/dist/stories/Slider.stories.js.map +0 -1
- package/dist/stories/Switch.stories.js +0 -35
- package/dist/stories/Switch.stories.js.map +0 -1
- package/dist/stories/TabHeader.stories.js +0 -48
- package/dist/stories/TabHeader.stories.js.map +0 -1
- package/dist/stories/TableResults.stories.js +0 -717
- package/dist/stories/TableResults.stories.js.map +0 -1
- package/dist/stories/TagScope.stories.js +0 -16
- package/dist/stories/TagScope.stories.js.map +0 -1
- package/dist/stories/TestimonialCard.stories.js +0 -24
- package/dist/stories/TestimonialCard.stories.js.map +0 -1
- package/dist/stories/Toast.stories.js +0 -51
- package/dist/stories/Toast.stories.js.map +0 -1
- package/dist/stories/Toggle.stories.js +0 -42
- package/dist/stories/Toggle.stories.js.map +0 -1
- package/dist/stories/Tooltip.stories.js +0 -108
- package/dist/stories/Tooltip.stories.js.map +0 -1
- package/postcss.config.js +0 -8
- package/src/assets/images/multifamily-units.svg +0 -10
- package/src/assets/images/policy-studio.svg +0 -15
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/contents/ComparisonData.ts +0 -378
- package/src/contents/FlexibleData.ts +0 -502
- package/src/contents/ResultsData.ts +0 -531
- package/src/stories/Accordion.stories.ts +0 -59
- package/src/stories/BadgeWithIcon.stories.ts +0 -31
- package/src/stories/BarChart.stories.ts +0 -17
- package/src/stories/Breadcrumb.stories.ts +0 -22
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/CardInfos.stories.ts +0 -15
- package/src/stories/ChartLegend.stories.ts +0 -15
- package/src/stories/Checkbox.stories.ts +0 -45
- package/src/stories/CheckboxSimple.stories.ts +0 -49
- package/src/stories/Chips.stories.ts +0 -33
- package/src/stories/ClimateZoneBadge.stories.ts +0 -18
- package/src/stories/Colors.mdx +0 -70
- package/src/stories/CostEffectBar.stories.ts +0 -24
- package/src/stories/Datatable.stories.ts +0 -53
- package/src/stories/DateCardInfo.stories.ts +0 -20
- package/src/stories/Dialog.stories.ts +0 -131
- package/src/stories/Draggable.stories.ts +0 -23
- package/src/stories/Dropdown.stories.ts +0 -100
- package/src/stories/DropdownList.stories.ts +0 -213
- package/src/stories/ElevationSystem.mdx +0 -41
- package/src/stories/Header.stories.ts +0 -42
- package/src/stories/Header.vue +0 -77
- package/src/stories/HighlightRippleDot.stories.ts +0 -16
- package/src/stories/Icon.stories.ts +0 -23
- package/src/stories/InlineSelector.stories.ts +0 -18
- package/src/stories/Input.stories.ts +0 -243
- package/src/stories/InputSelect.stories.ts +0 -31
- package/src/stories/InputTextArea.stories.ts +0 -25
- package/src/stories/Introduction.mdx +0 -211
- package/src/stories/MiniTag.stories.ts +0 -59
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/ProgressBar.stories.ts +0 -24
- package/src/stories/RadioButton.stories.ts +0 -40
- package/src/stories/RadioButtonSimple.stories.ts +0 -43
- package/src/stories/SimpleAlert.stories.ts +0 -22
- package/src/stories/Slider.stories.ts +0 -79
- package/src/stories/Switch.stories.ts +0 -39
- package/src/stories/TabHeader.stories.ts +0 -57
- package/src/stories/TableResults.stories.ts +0 -728
- package/src/stories/TagScope.stories.ts +0 -17
- package/src/stories/TestimonialCard.stories.ts +0 -27
- package/src/stories/Toast.stories.ts +0 -52
- package/src/stories/Toggle.stories.ts +0 -48
- package/src/stories/Tooltip.stories.ts +0 -114
- package/src/stories/Typography.mdx +0 -212
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -36
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import PsInput from '../components/forms/PsInput.vue'
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Text fields & Forms/Input',
|
|
4
|
-
component: PsInput,
|
|
5
|
-
argTypes: {
|
|
6
|
-
disabled: { control: 'boolean' },
|
|
7
|
-
required: { control: 'boolean' },
|
|
8
|
-
},
|
|
9
|
-
}
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
const TemplateInputText = (args, { argTypes }) => ({
|
|
12
|
-
props: Object.keys(argTypes),
|
|
13
|
-
components: { PsInput },
|
|
14
|
-
data: () => {
|
|
15
|
-
return {
|
|
16
|
-
validator: {
|
|
17
|
-
hasError: true,
|
|
18
|
-
label: 'Error message!'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
template: `
|
|
23
|
-
<div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
|
|
24
|
-
|
|
25
|
-
<div class="psui-col-span-3 psui-mt-8">
|
|
26
|
-
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Layout Default</h1>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '' }" />
|
|
30
|
-
<PsInput label="Resting without hint" />
|
|
31
|
-
<PsInput label="Resting with Placeholder" placeholder="This is a placeholder" />
|
|
32
|
-
|
|
33
|
-
<PsInput v-bind="{...$props, label: 'Focus'}" />
|
|
34
|
-
<PsInput label="Typing" placeholder="Type to see the effect..." />
|
|
35
|
-
<PsInput v-bind="{...$props, label: 'Active', active: true }" />
|
|
36
|
-
|
|
37
|
-
<PsInput v-bind="{...$props, label: 'Error', hasError: true }" />
|
|
38
|
-
<PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
|
|
39
|
-
<PsInput v-bind="{...$props, label: 'Prepend / Append ' }" >
|
|
40
|
-
<template v-slot:append>
|
|
41
|
-
Append
|
|
42
|
-
</template>
|
|
43
|
-
<template v-slot:prepend>
|
|
44
|
-
Prepend
|
|
45
|
-
</template>
|
|
46
|
-
</PsInput>
|
|
47
|
-
|
|
48
|
-
<PsInput label="Disabled" :disabled="true" value="100,000" />
|
|
49
|
-
<PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
|
|
50
|
-
<PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
|
|
51
|
-
|
|
52
|
-
<div class="psui-col-span-3 psui-mt-8">
|
|
53
|
-
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Layout Mini</h1>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<PsInput layout="mini" label="Resting with hint" hint="This is a hint" value="1,653" />
|
|
57
|
-
<PsInput layout="mini" label="Resting without hint" />
|
|
58
|
-
<PsInput layout="mini" label="Resting with Placeholder" placeholder="This is a placeholder" />
|
|
59
|
-
|
|
60
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Focus'}" />
|
|
61
|
-
<PsInput layout="mini" label="Typing" placeholder="Type to see the effect..." />
|
|
62
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Active', active: true }" />
|
|
63
|
-
|
|
64
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Error', hasError: true }" />
|
|
65
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
|
|
66
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Prepend / Append ' }" >
|
|
67
|
-
<template v-slot:append>
|
|
68
|
-
Append
|
|
69
|
-
</template>
|
|
70
|
-
<template v-slot:prepend>
|
|
71
|
-
Prepend
|
|
72
|
-
</template>
|
|
73
|
-
</PsInput>
|
|
74
|
-
|
|
75
|
-
<PsInput layout="mini" label="Disabled" :disabled="true" value="100,000" />
|
|
76
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
|
|
77
|
-
<PsInput layout="mini" v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
|
|
78
|
-
|
|
79
|
-
</div>
|
|
80
|
-
`
|
|
81
|
-
})
|
|
82
|
-
// @ts-ignore
|
|
83
|
-
const TemplateInputPassword = (args, { argTypes }) => ({
|
|
84
|
-
props: Object.keys(argTypes),
|
|
85
|
-
components: { PsInput },
|
|
86
|
-
data: () => {
|
|
87
|
-
return {
|
|
88
|
-
validator: {
|
|
89
|
-
hasError: true,
|
|
90
|
-
label: 'Error message!'
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
template: `
|
|
95
|
-
<div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
|
|
96
|
-
|
|
97
|
-
<div class="psui-col-span-3 psui-mt-8">
|
|
98
|
-
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Password Layout Default</h1>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '', hint: 'Between 8 and 16 characters' }" >
|
|
102
|
-
<template v-slot:append>
|
|
103
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
104
|
-
visibility_off
|
|
105
|
-
</span>
|
|
106
|
-
</template>
|
|
107
|
-
</PsInput>
|
|
108
|
-
|
|
109
|
-
<PsInput label="Resting without hint" hint="Between 8 and 16 characters">
|
|
110
|
-
<template v-slot:append>
|
|
111
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
112
|
-
visibility_off
|
|
113
|
-
</span>
|
|
114
|
-
</template>
|
|
115
|
-
</PsInput>
|
|
116
|
-
|
|
117
|
-
<PsInput label="Resting with Placeholder" placeholder="This is a placeholder" hint="Between 8 and 16 characters">
|
|
118
|
-
<template v-slot:append>
|
|
119
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
120
|
-
visibility_off
|
|
121
|
-
</span>
|
|
122
|
-
</template>
|
|
123
|
-
</PsInput>
|
|
124
|
-
|
|
125
|
-
<PsInput v-bind="{...$props, label: 'Focus'}" hint="Between 8 and 16 characters">
|
|
126
|
-
<template v-slot:append>
|
|
127
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
128
|
-
visibility_off
|
|
129
|
-
</span>
|
|
130
|
-
</template>
|
|
131
|
-
</PsInput>
|
|
132
|
-
|
|
133
|
-
<PsInput v-bind="{...$props, label: 'Typing', placeholder: 'Type to see the effect...', value: '' }" hint="Between 8 and 16 characters" >
|
|
134
|
-
<template v-slot:append>
|
|
135
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
136
|
-
visibility_off
|
|
137
|
-
</span>
|
|
138
|
-
</template>
|
|
139
|
-
</PsInput>
|
|
140
|
-
|
|
141
|
-
<PsInput v-bind="{label: 'Active', active: true }" value="Password123" hint="Between 8 and 16 characters">
|
|
142
|
-
<template v-slot:append>
|
|
143
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
144
|
-
visibility
|
|
145
|
-
</span>
|
|
146
|
-
</template>
|
|
147
|
-
</PsInput>
|
|
148
|
-
|
|
149
|
-
<PsInput v-bind="{...$props, label: 'Error', hasError: true }" hint="Between 8 and 16 characters" />
|
|
150
|
-
<PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
|
|
151
|
-
<PsInput v-bind="{...$props, label: 'Prepend / Append ' }" hint="Between 8 and 16 characters">
|
|
152
|
-
<template v-slot:append>
|
|
153
|
-
Append
|
|
154
|
-
</template>
|
|
155
|
-
<template v-slot:prepend>
|
|
156
|
-
Prepend
|
|
157
|
-
</template>
|
|
158
|
-
</PsInput>
|
|
159
|
-
|
|
160
|
-
<PsInput label="Disabled" :disabled="true" value="100,000" hint="Between 8 and 16 characters">
|
|
161
|
-
<template v-slot:append>
|
|
162
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
163
|
-
visibility
|
|
164
|
-
</span>
|
|
165
|
-
</template>
|
|
166
|
-
</PsInput>
|
|
167
|
-
|
|
168
|
-
<PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }">
|
|
169
|
-
<template v-slot:append>
|
|
170
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
171
|
-
visibility_off
|
|
172
|
-
</span>
|
|
173
|
-
</template>
|
|
174
|
-
</PsInput>
|
|
175
|
-
|
|
176
|
-
<PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" hint="Between 8 and 16 characters">
|
|
177
|
-
<template v-slot:append>
|
|
178
|
-
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
179
|
-
visibility_off
|
|
180
|
-
</span>
|
|
181
|
-
</template>
|
|
182
|
-
</PsInput>
|
|
183
|
-
</div>
|
|
184
|
-
`
|
|
185
|
-
})
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
const TemplateSlots = (args, { argTypes }) => ({
|
|
188
|
-
props: Object.keys(argTypes),
|
|
189
|
-
components: { PsInput },
|
|
190
|
-
template: `
|
|
191
|
-
<div class="psui-p-8 psui-bg-gray-10">
|
|
192
|
-
<PsInput v-bind="$props" class="psui-mb-4">
|
|
193
|
-
<template v-slot:append>
|
|
194
|
-
ft²
|
|
195
|
-
</template>
|
|
196
|
-
</PsInput>
|
|
197
|
-
<PsInput v-bind="$props" class="psui-mb-4">
|
|
198
|
-
<template v-slot:prepend>
|
|
199
|
-
ft²
|
|
200
|
-
</template>
|
|
201
|
-
</PsInput>
|
|
202
|
-
<PsInput v-bind="$props" class="psui-mb-4">
|
|
203
|
-
<template v-slot:prepend>
|
|
204
|
-
ft²
|
|
205
|
-
</template>
|
|
206
|
-
<template v-slot:append>
|
|
207
|
-
ft²
|
|
208
|
-
</template>
|
|
209
|
-
</PsInput>
|
|
210
|
-
</div>
|
|
211
|
-
`
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
export const InputText = TemplateInputText.bind({})
|
|
215
|
-
// @ts-ignore
|
|
216
|
-
InputText.args = {
|
|
217
|
-
label: 'Input Text',
|
|
218
|
-
placeholder: 'Placeholder',
|
|
219
|
-
hint: 'Optional Assistive text',
|
|
220
|
-
disabled: false,
|
|
221
|
-
required: false,
|
|
222
|
-
value: 10,
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export const InputPassword = TemplateInputPassword.bind({})
|
|
226
|
-
// @ts-ignore
|
|
227
|
-
InputPassword.args = {
|
|
228
|
-
type: 'password',
|
|
229
|
-
label: 'Password',
|
|
230
|
-
hint: 'Optional Assistive text',
|
|
231
|
-
disabled: false,
|
|
232
|
-
required: false,
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export const InputSlots = TemplateSlots.bind({})
|
|
236
|
-
// @ts-ignore
|
|
237
|
-
InputSlots.args = {
|
|
238
|
-
label: 'Label',
|
|
239
|
-
placeholder: 'Placeholder',
|
|
240
|
-
hint: 'Optional Assistive text',
|
|
241
|
-
disabled: false,
|
|
242
|
-
required: false,
|
|
243
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import PsInputSelect from '../components/forms/PsInputSelect.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Text fields & Forms/InputSelect',
|
|
5
|
-
component: PsInputSelect
|
|
6
|
-
}
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
const TemplateDefault = (args, {argTypes})=> ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: {PsInputSelect},
|
|
11
|
-
template: `
|
|
12
|
-
<div style='display:flex; gap: 30px;'>
|
|
13
|
-
<div style='width:300px; display:flex; flex-direction: column; gap:20px;'>
|
|
14
|
-
<span>Default Select</span>
|
|
15
|
-
<PsInputSelect v-bind="$props" label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
16
|
-
<PsInputSelect v-bind="$props" disabled label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
17
|
-
</div>
|
|
18
|
-
<div style='width:90px; display:flex; flex-direction: column; gap:20px;'>
|
|
19
|
-
<span>Mini Select</span>
|
|
20
|
-
<PsInputSelect v-bind="$props" layout="mini" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
21
|
-
<PsInputSelect v-bind="$props" layout="mini" disabled keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
`
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
export const Default = TemplateDefault.bind({})
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
Default.args = {
|
|
30
|
-
items: [{title:'Text 1', value:'Value 1'}, {title:'Text 2', value:'Value 2'}]
|
|
31
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import PsInputTextArea from '../components/forms/PsInputTextArea.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Text fields & Forms/Input Textarea',
|
|
5
|
-
component: PsInputTextArea,
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Template = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: {PsInputTextArea},
|
|
11
|
-
template: `
|
|
12
|
-
<div style='background-color:#F3F6F9; width:400px; height: 100%; padding: 20px 20px; display: flex: display; flex-direction: column;'>
|
|
13
|
-
<div style='display: flex; align-items:center; gap:30px;'>
|
|
14
|
-
<h1>Default</h1>
|
|
15
|
-
<PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" optionalLabel="Optional helper/feedback text"></PsInputTextArea>
|
|
16
|
-
</div>
|
|
17
|
-
<div style='display: flex; align-items:center; gap:30px; margin-top:40px;'>
|
|
18
|
-
<h1>Disable</h1>
|
|
19
|
-
<PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" disabled ></PsInputTextArea>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
`
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
export const Default = Template.bind({})
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/blocks";
|
|
2
|
-
import Code from './assets/code-brackets.svg';
|
|
3
|
-
import Colors from './assets/colors.svg';
|
|
4
|
-
import Comments from './assets/comments.svg';
|
|
5
|
-
import Direction from './assets/direction.svg';
|
|
6
|
-
import Flow from './assets/flow.svg';
|
|
7
|
-
import Plugin from './assets/plugin.svg';
|
|
8
|
-
import Repo from './assets/repo.svg';
|
|
9
|
-
import StackAlt from './assets/stackalt.svg';
|
|
10
|
-
|
|
11
|
-
<Meta title="Policy Studio" />
|
|
12
|
-
|
|
13
|
-
#Welcome to UI Explorer
|
|
14
|
-
|
|
15
|
-
Storybook helps you build UI components in isolation from your app's business logic, data, and context.
|
|
16
|
-
That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
|
|
17
|
-
|
|
18
|
-
Browse example stories now by navigating to them in the sidebar.
|
|
19
|
-
View their code in the `src/stories` directory to learn how they work.
|
|
20
|
-
We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
|
|
21
|
-
|
|
22
|
-
<div className="subheading">Configure</div>
|
|
23
|
-
|
|
24
|
-
<div className="link-list">
|
|
25
|
-
<a
|
|
26
|
-
className="link-item"
|
|
27
|
-
href="https://storybook.js.org/docs/react/addons/addon-types"
|
|
28
|
-
target="_blank"
|
|
29
|
-
>
|
|
30
|
-
<img src={Plugin} alt="plugin" />
|
|
31
|
-
<span>
|
|
32
|
-
<strong>Presets for popular tools</strong>
|
|
33
|
-
Easy setup for TypeScript, SCSS and more.
|
|
34
|
-
</span>
|
|
35
|
-
</a>
|
|
36
|
-
<a
|
|
37
|
-
className="link-item"
|
|
38
|
-
href="https://storybook.js.org/docs/react/configure/webpack"
|
|
39
|
-
target="_blank"
|
|
40
|
-
>
|
|
41
|
-
<img src={StackAlt} alt="Build" />
|
|
42
|
-
<span>
|
|
43
|
-
<strong>Build configuration</strong>
|
|
44
|
-
How to customize webpack and Babel
|
|
45
|
-
</span>
|
|
46
|
-
</a>
|
|
47
|
-
<a
|
|
48
|
-
className="link-item"
|
|
49
|
-
href="https://storybook.js.org/docs/react/configure/styling-and-css"
|
|
50
|
-
target="_blank"
|
|
51
|
-
>
|
|
52
|
-
<img src={Colors} alt="colors" />
|
|
53
|
-
<span>
|
|
54
|
-
<strong>Styling</strong>
|
|
55
|
-
How to load and configure CSS libraries
|
|
56
|
-
</span>
|
|
57
|
-
</a>
|
|
58
|
-
<a
|
|
59
|
-
className="link-item"
|
|
60
|
-
href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
|
|
61
|
-
target="_blank"
|
|
62
|
-
>
|
|
63
|
-
<img src={Flow} alt="flow" />
|
|
64
|
-
<span>
|
|
65
|
-
<strong>Data</strong>
|
|
66
|
-
Providers and mocking for data libraries
|
|
67
|
-
</span>
|
|
68
|
-
</a>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<div className="subheading">Learn</div>
|
|
72
|
-
|
|
73
|
-
<div className="link-list">
|
|
74
|
-
<a className="link-item" href="https://storybook.js.org/docs" target="_blank">
|
|
75
|
-
<img src={Repo} alt="repo" />
|
|
76
|
-
<span>
|
|
77
|
-
<strong>Storybook documentation</strong>
|
|
78
|
-
Configure, customize, and extend
|
|
79
|
-
</span>
|
|
80
|
-
</a>
|
|
81
|
-
<a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
|
|
82
|
-
<img src={Direction} alt="direction" />
|
|
83
|
-
<span>
|
|
84
|
-
<strong>In-depth guides</strong>
|
|
85
|
-
Best practices from leading teams
|
|
86
|
-
</span>
|
|
87
|
-
</a>
|
|
88
|
-
<a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
|
|
89
|
-
<img src={Code} alt="code" />
|
|
90
|
-
<span>
|
|
91
|
-
<strong>GitHub project</strong>
|
|
92
|
-
View the source and add issues
|
|
93
|
-
</span>
|
|
94
|
-
</a>
|
|
95
|
-
<a className="link-item" href="https://discord.gg/storybook" target="_blank">
|
|
96
|
-
<img src={Comments} alt="comments" />
|
|
97
|
-
<span>
|
|
98
|
-
<strong>Discord chat</strong>
|
|
99
|
-
Chat with maintainers and the community
|
|
100
|
-
</span>
|
|
101
|
-
</a>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<div className="tip-wrapper">
|
|
105
|
-
<span className="tip">Tip</span>
|
|
106
|
-
<code>src/stories/Introduction.stories.mdx</code>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
<style>
|
|
110
|
-
{`
|
|
111
|
-
.subheading {
|
|
112
|
-
--mediumdark: '#999999';
|
|
113
|
-
font-weight: 900;
|
|
114
|
-
font-size: 13px;
|
|
115
|
-
color: #999;
|
|
116
|
-
letter-spacing: 6px;
|
|
117
|
-
line-height: 24px;
|
|
118
|
-
text-transform: uppercase;
|
|
119
|
-
margin-bottom: 12px;
|
|
120
|
-
margin-top: 40px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.link-list {
|
|
124
|
-
display: grid;
|
|
125
|
-
grid-template-columns: 1fr;
|
|
126
|
-
grid-template-rows: 1fr 1fr;
|
|
127
|
-
row-gap: 10px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@media (min-width: 620px) {
|
|
131
|
-
.link-list {
|
|
132
|
-
row-gap: 20px;
|
|
133
|
-
column-gap: 20px;
|
|
134
|
-
grid-template-columns: 1fr 1fr;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@media all and (-ms-high-contrast:none) {
|
|
139
|
-
.link-list {
|
|
140
|
-
display: -ms-grid;
|
|
141
|
-
-ms-grid-columns: 1fr 1fr;
|
|
142
|
-
-ms-grid-rows: 1fr 1fr;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.link-item {
|
|
147
|
-
display: block;
|
|
148
|
-
padding: 20px 30px 20px 15px;
|
|
149
|
-
border: 1px solid #00000010;
|
|
150
|
-
border-radius: 5px;
|
|
151
|
-
transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
|
|
152
|
-
color: #333333;
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: flex-start;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.link-item:hover {
|
|
158
|
-
border-color: #1EA7FD50;
|
|
159
|
-
transform: translate3d(0, -3px, 0);
|
|
160
|
-
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.link-item:active {
|
|
164
|
-
border-color: #1EA7FD;
|
|
165
|
-
transform: translate3d(0, 0, 0);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.link-item strong {
|
|
169
|
-
font-weight: 700;
|
|
170
|
-
display: block;
|
|
171
|
-
margin-bottom: 2px;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.link-item img {
|
|
175
|
-
height: 40px;
|
|
176
|
-
width: 40px;
|
|
177
|
-
margin-right: 15px;
|
|
178
|
-
flex: none;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.link-item span {
|
|
182
|
-
font-size: 14px;
|
|
183
|
-
line-height: 20px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.tip {
|
|
187
|
-
display: inline-block;
|
|
188
|
-
border-radius: 1em;
|
|
189
|
-
font-size: 11px;
|
|
190
|
-
line-height: 12px;
|
|
191
|
-
font-weight: 700;
|
|
192
|
-
background: #E7FDD8;
|
|
193
|
-
color: #66BF3C;
|
|
194
|
-
padding: 4px 12px;
|
|
195
|
-
margin-right: 10px;
|
|
196
|
-
vertical-align: top;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.tip-wrapper {
|
|
200
|
-
font-size: 13px;
|
|
201
|
-
line-height: 20px;
|
|
202
|
-
margin-top: 40px;
|
|
203
|
-
margin-bottom: 40px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.tip-wrapper code {
|
|
207
|
-
font-size: 12px;
|
|
208
|
-
display: inline-block;
|
|
209
|
-
}
|
|
210
|
-
`}
|
|
211
|
-
</style>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import PsMiniTag, {
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
typeOptions,
|
|
5
|
-
} from '../components/badges-and-tags/PsMiniTag.vue'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Badges & Tags/Tags/Mini Tag',
|
|
9
|
-
component: PsMiniTag,
|
|
10
|
-
argTypes: {
|
|
11
|
-
type: {
|
|
12
|
-
control: {
|
|
13
|
-
type: 'select',
|
|
14
|
-
options: typeOptions,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
}
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
const Template = (args, { argTypes }) => ({
|
|
21
|
-
props: Object.keys(argTypes),
|
|
22
|
-
components: { PsMiniTag },
|
|
23
|
-
template: '<PsMiniTag v-bind="$props" />',
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
export const Info = Template.bind({})
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
Info.args = {
|
|
29
|
-
layout: 'info',
|
|
30
|
-
message: 'This is an info alert',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const Success = Template.bind({})
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
Success.args = {
|
|
36
|
-
layout: 'success',
|
|
37
|
-
message: 'This is a success alert',
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const Warning = Template.bind({})
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
Warning.args = {
|
|
43
|
-
layout: 'warning',
|
|
44
|
-
message: 'This is a warning alert',
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const Error = Template.bind({})
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
Error.args = {
|
|
50
|
-
layout: 'error',
|
|
51
|
-
message: 'This is an error alert',
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export const Default = Template.bind({})
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
Default.args = {
|
|
57
|
-
layout: 'default',
|
|
58
|
-
message: 'This is a default color',
|
|
59
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import PsScrollBar from '../components/playground/PsScrollBar.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/Playground',
|
|
5
|
-
component: PsScrollBar
|
|
6
|
-
}
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
const Template = (args, {argTypes}) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsScrollBar},
|
|
11
|
-
template: `
|
|
12
|
-
<PsScrollBar v-bind='$props' scrollWidth='30'></PsScrollbar>
|
|
13
|
-
`
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export const ScrollBar = Template.bind({})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import PsProgressBar from '../components/badges-and-tags/PsProgressBar.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Badges & Tags/Badges/ProgressBar',
|
|
5
|
-
component: PsProgressBar,
|
|
6
|
-
argTypes: {
|
|
7
|
-
value: {
|
|
8
|
-
control: { type: 'number', min: 0, max: 100 },
|
|
9
|
-
},
|
|
10
|
-
breakEven: {
|
|
11
|
-
control: { type: 'number', min: 0, max: 100 },
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
const TemplateDefault = (args, { argTypes }) => ({
|
|
17
|
-
props: Object.keys(argTypes),
|
|
18
|
-
components: { PsProgressBar },
|
|
19
|
-
template: '<PsProgressBar v-bind="$props" />',
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export const Default = TemplateDefault.bind({})
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
Default.args = {}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import PsRadioButton from '../components/controls/PsRadioButton.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Controls & Selectors/Radio Button',
|
|
5
|
-
component: PsRadioButton,
|
|
6
|
-
}
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
const DefaultTemplate = (args,{ argTypes}) => ({
|
|
9
|
-
props: Object.keys(argTypes),
|
|
10
|
-
components: { PsRadioButton},
|
|
11
|
-
template: `
|
|
12
|
-
<div style='display: flex; gap: 20px;'>
|
|
13
|
-
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
14
|
-
<span>Resting</span>
|
|
15
|
-
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
16
|
-
<PsRadioButton v-bind='$props' label='Label 1' size='big'/>
|
|
17
|
-
<PsRadioButton v-bind='$props' label='Label 2' size='small'/>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
21
|
-
<span>Active</span>
|
|
22
|
-
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
23
|
-
<PsRadioButton v-bind='$props' label='Label 3' size='big' checked/>
|
|
24
|
-
<PsRadioButton v-bind='$props' label='Label 4' size='small' checked/>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
28
|
-
<span>Disable</span>
|
|
29
|
-
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
30
|
-
<PsRadioButton v-bind='$props' label='Label 5' size='big' disabled/>
|
|
31
|
-
<PsRadioButton v-bind='$props' label='Label 6' size='small' disabled/>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
`
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export const Default = DefaultTemplate.bind({})
|
|
40
|
-
|