@policystudio/policy-studio-ui-vue 1.1.90-beta.10 → 1.1.90-beta.12
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/dist/contents/ComparisonData.js +376 -0
- package/dist/contents/ComparisonData.js.map +1 -0
- package/dist/contents/FlexibleData.js +501 -0
- package/dist/contents/FlexibleData.js.map +1 -0
- package/dist/contents/ResultsData.js +530 -0
- package/dist/contents/ResultsData.js.map +1 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/stories/Accordion.stories.js +56 -0
- package/dist/stories/Accordion.stories.js.map +1 -0
- package/dist/stories/BadgeWithIcon.stories.js +28 -0
- package/dist/stories/BadgeWithIcon.stories.js.map +1 -0
- package/dist/stories/BarChart.stories.js +16 -0
- package/dist/stories/BarChart.stories.js.map +1 -0
- package/dist/stories/Breadcrumb.stories.js +21 -0
- package/dist/stories/Breadcrumb.stories.js.map +1 -0
- package/dist/stories/Button.stories.js +44 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/CardInfos.stories.js +13 -0
- package/dist/stories/CardInfos.stories.js.map +1 -0
- package/dist/stories/ChartLegend.stories.js +13 -0
- package/dist/stories/ChartLegend.stories.js.map +1 -0
- package/dist/stories/Checkbox.stories.js +44 -0
- package/dist/stories/Checkbox.stories.js.map +1 -0
- package/dist/stories/CheckboxSimple.stories.js +48 -0
- package/dist/stories/CheckboxSimple.stories.js.map +1 -0
- package/dist/stories/Chips.stories.js +27 -0
- package/dist/stories/Chips.stories.js.map +1 -0
- package/dist/stories/ClimateZoneBadge.stories.js +15 -0
- package/dist/stories/ClimateZoneBadge.stories.js.map +1 -0
- package/dist/stories/CostEffectBar.stories.js +21 -0
- package/dist/stories/CostEffectBar.stories.js.map +1 -0
- package/dist/stories/Datatable.stories.js +45 -0
- package/dist/stories/Datatable.stories.js.map +1 -0
- package/dist/stories/DateCardInfo.stories.js +18 -0
- package/dist/stories/DateCardInfo.stories.js.map +1 -0
- package/dist/stories/Dialog.stories.js +127 -0
- package/dist/stories/Dialog.stories.js.map +1 -0
- package/dist/stories/Draggable.stories.js +20 -0
- package/dist/stories/Draggable.stories.js.map +1 -0
- package/dist/stories/Dropdown.stories.js +98 -0
- package/dist/stories/Dropdown.stories.js.map +1 -0
- package/dist/stories/DropdownList.stories.js +208 -0
- package/dist/stories/DropdownList.stories.js.map +1 -0
- package/dist/stories/Header.stories.js +39 -0
- package/dist/stories/Header.stories.js.map +1 -0
- package/dist/stories/HighlightRippleDot.stories.js +13 -0
- package/dist/stories/HighlightRippleDot.stories.js.map +1 -0
- package/dist/stories/Icon.stories.js +19 -0
- package/dist/stories/Icon.stories.js.map +1 -0
- package/dist/stories/InlineSelector.stories.js +16 -0
- package/dist/stories/InlineSelector.stories.js.map +1 -0
- package/dist/stories/Input.stories.js +235 -0
- package/dist/stories/Input.stories.js.map +1 -0
- package/dist/stories/InputSelect.stories.js +28 -0
- package/dist/stories/InputSelect.stories.js.map +1 -0
- package/dist/stories/InputTextArea.stories.js +23 -0
- package/dist/stories/InputTextArea.stories.js.map +1 -0
- package/dist/stories/MiniTag.stories.js +44 -0
- package/dist/stories/MiniTag.stories.js.map +1 -0
- package/dist/stories/Playground.stories.js +14 -0
- package/dist/stories/Playground.stories.js.map +1 -0
- package/dist/stories/ProgressBar.stories.js +21 -0
- package/dist/stories/ProgressBar.stories.js.map +1 -0
- package/dist/stories/RadioButton.stories.js +36 -0
- package/dist/stories/RadioButton.stories.js.map +1 -0
- package/dist/stories/RadioButtonSimple.stories.js +40 -0
- package/dist/stories/RadioButtonSimple.stories.js.map +1 -0
- package/dist/stories/SimpleAlert.stories.js +19 -0
- package/dist/stories/SimpleAlert.stories.js.map +1 -0
- package/dist/stories/Slider.stories.js +70 -0
- package/dist/stories/Slider.stories.js.map +1 -0
- package/dist/stories/Switch.stories.js +35 -0
- package/dist/stories/Switch.stories.js.map +1 -0
- package/dist/stories/TabHeader.stories.js +48 -0
- package/dist/stories/TabHeader.stories.js.map +1 -0
- package/dist/stories/TableResults.stories.js +717 -0
- package/dist/stories/TableResults.stories.js.map +1 -0
- package/dist/stories/TagScope.stories.js +16 -0
- package/dist/stories/TagScope.stories.js.map +1 -0
- package/dist/stories/TestimonialCard.stories.js +24 -0
- package/dist/stories/TestimonialCard.stories.js.map +1 -0
- package/dist/stories/Toast.stories.js +51 -0
- package/dist/stories/Toast.stories.js.map +1 -0
- package/dist/stories/Toggle.stories.js +42 -0
- package/dist/stories/Toggle.stories.js.map +1 -0
- package/dist/stories/Tooltip.stories.js +108 -0
- package/dist/stories/Tooltip.stories.js.map +1 -0
- package/dist/util/GeneralFunctions.js +29 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +8 -4
- package/src/stories/ClimateZoneBadge.stories.ts +12 -22
- package/src/stories/CostEffectBar.stories.ts +19 -21
- package/src/stories/Dialog.stories.ts +2 -2
- package/src/stories/Draggable.stories.ts +18 -27
- package/src/stories/Dropdown.stories.ts +13 -2
- package/src/stories/Icon.stories.ts +1 -0
- package/src/stories/Input.stories.ts +1 -2
- package/src/stories/RadioButton.stories.ts +1 -2
- package/src/stories/TabHeader.stories.ts +1 -0
- package/src/util/GeneralFunctions.ts +6 -5
- package/src/util/imageLoader.ts +5 -3
- package/tsconfig.json +2 -2
|
@@ -0,0 +1,235 @@
|
|
|
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
|
+
const TemplateInputText = (args, { argTypes }) => ({
|
|
11
|
+
props: Object.keys(argTypes),
|
|
12
|
+
components: { PsInput },
|
|
13
|
+
data: () => {
|
|
14
|
+
return {
|
|
15
|
+
validator: {
|
|
16
|
+
hasError: true,
|
|
17
|
+
label: 'Error message!'
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
template: `
|
|
22
|
+
<div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
|
|
23
|
+
|
|
24
|
+
<div class="psui-col-span-3 psui-mt-8">
|
|
25
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Layout Default</h1>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '' }" />
|
|
29
|
+
<PsInput label="Resting without hint" />
|
|
30
|
+
<PsInput label="Resting with Placeholder" placeholder="This is a placeholder" />
|
|
31
|
+
|
|
32
|
+
<PsInput v-bind="{...$props, label: 'Focus'}" />
|
|
33
|
+
<PsInput label="Typing" placeholder="Type to see the effect..." />
|
|
34
|
+
<PsInput v-bind="{...$props, label: 'Active', active: true }" />
|
|
35
|
+
|
|
36
|
+
<PsInput v-bind="{...$props, label: 'Error', hasError: true }" />
|
|
37
|
+
<PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
|
|
38
|
+
<PsInput v-bind="{...$props, label: 'Prepend / Append ' }" >
|
|
39
|
+
<template v-slot:append>
|
|
40
|
+
Append
|
|
41
|
+
</template>
|
|
42
|
+
<template v-slot:prepend>
|
|
43
|
+
Prepend
|
|
44
|
+
</template>
|
|
45
|
+
</PsInput>
|
|
46
|
+
|
|
47
|
+
<PsInput label="Disabled" :disabled="true" value="100,000" />
|
|
48
|
+
<PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
|
|
49
|
+
<PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
|
|
50
|
+
|
|
51
|
+
<div class="psui-col-span-3 psui-mt-8">
|
|
52
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Layout Mini</h1>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<PsInput layout="mini" label="Resting with hint" hint="This is a hint" value="1,653" />
|
|
56
|
+
<PsInput layout="mini" label="Resting without hint" />
|
|
57
|
+
<PsInput layout="mini" label="Resting with Placeholder" placeholder="This is a placeholder" />
|
|
58
|
+
|
|
59
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Focus'}" />
|
|
60
|
+
<PsInput layout="mini" label="Typing" placeholder="Type to see the effect..." />
|
|
61
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Active', active: true }" />
|
|
62
|
+
|
|
63
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Error', hasError: true }" />
|
|
64
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
|
|
65
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Prepend / Append ' }" >
|
|
66
|
+
<template v-slot:append>
|
|
67
|
+
Append
|
|
68
|
+
</template>
|
|
69
|
+
<template v-slot:prepend>
|
|
70
|
+
Prepend
|
|
71
|
+
</template>
|
|
72
|
+
</PsInput>
|
|
73
|
+
|
|
74
|
+
<PsInput layout="mini" label="Disabled" :disabled="true" value="100,000" />
|
|
75
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }" />
|
|
76
|
+
<PsInput layout="mini" v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" />
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
`
|
|
80
|
+
});
|
|
81
|
+
const TemplateInputPassword = (args, { argTypes }) => ({
|
|
82
|
+
props: Object.keys(argTypes),
|
|
83
|
+
components: { PsInput },
|
|
84
|
+
data: () => {
|
|
85
|
+
return {
|
|
86
|
+
validator: {
|
|
87
|
+
hasError: true,
|
|
88
|
+
label: 'Error message!'
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
template: `
|
|
93
|
+
<div class="psui-p-8 psui-bg-gray-10 psui-grid psui-grid-cols-3 psui-gap-6">
|
|
94
|
+
|
|
95
|
+
<div class="psui-col-span-3 psui-mt-8">
|
|
96
|
+
<h1 class="psui-font-bold psui-border-b psui-border-gray-30">PSInput Password Layout Default</h1>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<PsInput v-bind="{...$props, label: 'Resting with hint', placeholder: '', value: '', hint: 'Between 8 and 16 characters' }" >
|
|
100
|
+
<template v-slot:append>
|
|
101
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
102
|
+
visibility_off
|
|
103
|
+
</span>
|
|
104
|
+
</template>
|
|
105
|
+
</PsInput>
|
|
106
|
+
|
|
107
|
+
<PsInput label="Resting without hint" hint="Between 8 and 16 characters">
|
|
108
|
+
<template v-slot:append>
|
|
109
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
110
|
+
visibility_off
|
|
111
|
+
</span>
|
|
112
|
+
</template>
|
|
113
|
+
</PsInput>
|
|
114
|
+
|
|
115
|
+
<PsInput label="Resting with Placeholder" placeholder="This is a placeholder" hint="Between 8 and 16 characters">
|
|
116
|
+
<template v-slot:append>
|
|
117
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
118
|
+
visibility_off
|
|
119
|
+
</span>
|
|
120
|
+
</template>
|
|
121
|
+
</PsInput>
|
|
122
|
+
|
|
123
|
+
<PsInput v-bind="{...$props, label: 'Focus'}" hint="Between 8 and 16 characters">
|
|
124
|
+
<template v-slot:append>
|
|
125
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
126
|
+
visibility_off
|
|
127
|
+
</span>
|
|
128
|
+
</template>
|
|
129
|
+
</PsInput>
|
|
130
|
+
|
|
131
|
+
<PsInput v-bind="{...$props, label: 'Typing', placeholder: 'Type to see the effect...', value: '' }" hint="Between 8 and 16 characters" >
|
|
132
|
+
<template v-slot:append>
|
|
133
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
134
|
+
visibility_off
|
|
135
|
+
</span>
|
|
136
|
+
</template>
|
|
137
|
+
</PsInput>
|
|
138
|
+
|
|
139
|
+
<PsInput v-bind="{label: 'Active', active: true }" value="Password123" hint="Between 8 and 16 characters">
|
|
140
|
+
<template v-slot:append>
|
|
141
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
142
|
+
visibility
|
|
143
|
+
</span>
|
|
144
|
+
</template>
|
|
145
|
+
</PsInput>
|
|
146
|
+
|
|
147
|
+
<PsInput v-bind="{...$props, label: 'Error', hasError: true }" hint="Between 8 and 16 characters" />
|
|
148
|
+
<PsInput v-bind="{...$props, label: 'Error with custom message', hasError: 'Format invalid' }" />
|
|
149
|
+
<PsInput v-bind="{...$props, label: 'Prepend / Append ' }" hint="Between 8 and 16 characters">
|
|
150
|
+
<template v-slot:append>
|
|
151
|
+
Append
|
|
152
|
+
</template>
|
|
153
|
+
<template v-slot:prepend>
|
|
154
|
+
Prepend
|
|
155
|
+
</template>
|
|
156
|
+
</PsInput>
|
|
157
|
+
|
|
158
|
+
<PsInput label="Disabled" :disabled="true" value="100,000" hint="Between 8 and 16 characters">
|
|
159
|
+
<template v-slot:append>
|
|
160
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
161
|
+
visibility
|
|
162
|
+
</span>
|
|
163
|
+
</template>
|
|
164
|
+
</PsInput>
|
|
165
|
+
|
|
166
|
+
<PsInput v-bind="{...$props, label: 'Disabled without value', disabled: true, value: '', hint: false }">
|
|
167
|
+
<template v-slot:append>
|
|
168
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
169
|
+
visibility_off
|
|
170
|
+
</span>
|
|
171
|
+
</template>
|
|
172
|
+
</PsInput>
|
|
173
|
+
|
|
174
|
+
<PsInput v-bind="{...$props, label: 'Active/Disabled', disabled: true, active: true }" hint="Between 8 and 16 characters">
|
|
175
|
+
<template v-slot:append>
|
|
176
|
+
<span class="material-icons-round psui-text-gray-50 psui-mr-2">
|
|
177
|
+
visibility_off
|
|
178
|
+
</span>
|
|
179
|
+
</template>
|
|
180
|
+
</PsInput>
|
|
181
|
+
</div>
|
|
182
|
+
`
|
|
183
|
+
});
|
|
184
|
+
const TemplateSlots = (args, { argTypes }) => ({
|
|
185
|
+
props: Object.keys(argTypes),
|
|
186
|
+
components: { PsInput },
|
|
187
|
+
template: `
|
|
188
|
+
<div class="psui-p-8 psui-bg-gray-10">
|
|
189
|
+
<PsInput v-bind="$props" class="psui-mb-4">
|
|
190
|
+
<template v-slot:append>
|
|
191
|
+
ft²
|
|
192
|
+
</template>
|
|
193
|
+
</PsInput>
|
|
194
|
+
<PsInput v-bind="$props" class="psui-mb-4">
|
|
195
|
+
<template v-slot:prepend>
|
|
196
|
+
ft²
|
|
197
|
+
</template>
|
|
198
|
+
</PsInput>
|
|
199
|
+
<PsInput v-bind="$props" class="psui-mb-4">
|
|
200
|
+
<template v-slot:prepend>
|
|
201
|
+
ft²
|
|
202
|
+
</template>
|
|
203
|
+
<template v-slot:append>
|
|
204
|
+
ft²
|
|
205
|
+
</template>
|
|
206
|
+
</PsInput>
|
|
207
|
+
</div>
|
|
208
|
+
`
|
|
209
|
+
});
|
|
210
|
+
export const InputText = TemplateInputText.bind({});
|
|
211
|
+
InputText.args = {
|
|
212
|
+
label: 'Input Text',
|
|
213
|
+
placeholder: 'Placeholder',
|
|
214
|
+
hint: 'Optional Assistive text',
|
|
215
|
+
disabled: false,
|
|
216
|
+
required: false,
|
|
217
|
+
value: 10,
|
|
218
|
+
};
|
|
219
|
+
export const InputPassword = TemplateInputPassword.bind({});
|
|
220
|
+
InputPassword.args = {
|
|
221
|
+
type: 'password',
|
|
222
|
+
label: 'Password',
|
|
223
|
+
hint: 'Optional Assistive text',
|
|
224
|
+
disabled: false,
|
|
225
|
+
required: false,
|
|
226
|
+
};
|
|
227
|
+
export const InputSlots = TemplateSlots.bind({});
|
|
228
|
+
InputSlots.args = {
|
|
229
|
+
label: 'Label',
|
|
230
|
+
placeholder: 'Placeholder',
|
|
231
|
+
hint: 'Optional Assistive text',
|
|
232
|
+
disabled: false,
|
|
233
|
+
required: false,
|
|
234
|
+
};
|
|
235
|
+
//# sourceMappingURL=Input.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.stories.js","sourceRoot":"","sources":["../../src/stories/Input.stories.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,iCAAiC,CAAA;AACrD,eAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAED,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,OAAO,EAAE;IACvB,IAAI,EAAE,GAAG,EAAE;QACT,OAAO;YACL,SAAS,EAAE;gBACT,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,gBAAgB;aACxB;SACF,CAAA;IACH,CAAC;IACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DT;CACF,CAAC,CAAA;AAEF,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACrD,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,OAAO,EAAE;IACvB,IAAI,EAAE,GAAG,EAAE;QACT,OAAO;YACL,SAAS,EAAE;gBACT,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,gBAAgB;aACxB;SACF,CAAA;IACH,CAAC;IACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FT;CACF,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,OAAO,EAAE;IACvB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;GAqBT;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACnD,SAAS,CAAC,IAAI,GAAG;IACf,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE;CACV,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3D,aAAa,CAAC,IAAI,GAAG;IACnB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;CAChB,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAChD,UAAU,CAAC,IAAI,GAAG;IAChB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;CAChB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PsInputSelect from '../components/forms/PsInputSelect.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Text fields & Forms/InputSelect',
|
|
4
|
+
component: PsInputSelect
|
|
5
|
+
};
|
|
6
|
+
const TemplateDefault = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsInputSelect },
|
|
9
|
+
template: `
|
|
10
|
+
<div style='display:flex; gap: 30px;'>
|
|
11
|
+
<div style='width:300px; display:flex; flex-direction: column; gap:20px;'>
|
|
12
|
+
<span>Default Select</span>
|
|
13
|
+
<PsInputSelect v-bind="$props" label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
14
|
+
<PsInputSelect v-bind="$props" disabled label="Gender" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
15
|
+
</div>
|
|
16
|
+
<div style='width:90px; display:flex; flex-direction: column; gap:20px;'>
|
|
17
|
+
<span>Mini Select</span>
|
|
18
|
+
<PsInputSelect v-bind="$props" layout="mini" keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
19
|
+
<PsInputSelect v-bind="$props" layout="mini" disabled keyLabel="title" keyValue="value" optionalLabel="Optional helper/feedback text"/>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`
|
|
23
|
+
});
|
|
24
|
+
export const Default = TemplateDefault.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
items: [{ title: 'Text 1', value: 'Value 1' }, { title: 'Text 2', value: 'Value 2' }]
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=InputSelect.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputSelect.stories.js","sourceRoot":"","sources":["../../src/stories/InputSelect.stories.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,uCAAuC,CAAA;AAEjE,eAAe;IACb,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,aAAa;CACzB,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,EAAC,QAAQ,EAAC,EAAC,EAAE,CAAC,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAC,aAAa,EAAC;IAC3B,QAAQ,EAAE;;;;;;;;;;;;;KAaT;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,OAAO,CAAC,IAAI,GAAG;IACX,KAAK,EAAE,CAAC,EAAC,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,SAAS,EAAC,CAAC;CAChF,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import PsInputTextArea from '../components/forms/PsInputTextArea.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Text fields & Forms/Input Textarea',
|
|
4
|
+
component: PsInputTextArea,
|
|
5
|
+
};
|
|
6
|
+
const Template = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsInputTextArea },
|
|
9
|
+
template: `
|
|
10
|
+
<div style='background-color:#F3F6F9; width:400px; height: 100%; padding: 20px 20px; display: flex: display; flex-direction: column;'>
|
|
11
|
+
<div style='display: flex; align-items:center; gap:30px;'>
|
|
12
|
+
<h1>Default</h1>
|
|
13
|
+
<PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" optionalLabel="Optional helper/feedback text"></PsInputTextArea>
|
|
14
|
+
</div>
|
|
15
|
+
<div style='display: flex; align-items:center; gap:30px; margin-top:40px;'>
|
|
16
|
+
<h1>Disable</h1>
|
|
17
|
+
<PsInputTextArea v-bind='$props' placeholder='Optional placeholder' label='Drop us a line' rows="${10}" disabled ></PsInputTextArea>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
`
|
|
21
|
+
});
|
|
22
|
+
export const Default = Template.bind({});
|
|
23
|
+
//# sourceMappingURL=InputTextArea.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputTextArea.stories.js","sourceRoot":"","sources":["../../src/stories/InputTextArea.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,yCAAyC,CAAA;AAErE,eAAe;IACb,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,eAAe;CAC3B,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAQ,EAAE,EAAC,QAAQ,EAAgB,EAAE,EAAE,CAAC,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAC,eAAe,EAAC;IAC7B,QAAQ,EAAE;;;;6GAIiG,EAAE;;;;6GAIF,EAAE;;;GAG5G;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import PsMiniTag, { typeOptions, } from '../components/badges-and-tags/PsMiniTag.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Badges & Tags/Tags/Mini Tag',
|
|
4
|
+
component: PsMiniTag,
|
|
5
|
+
argTypes: {
|
|
6
|
+
type: {
|
|
7
|
+
control: {
|
|
8
|
+
type: 'select',
|
|
9
|
+
options: typeOptions,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
const Template = (args, { argTypes }) => ({
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: { PsMiniTag },
|
|
17
|
+
template: '<PsMiniTag v-bind="$props" />',
|
|
18
|
+
});
|
|
19
|
+
export const Info = Template.bind({});
|
|
20
|
+
Info.args = {
|
|
21
|
+
layout: 'info',
|
|
22
|
+
message: 'This is an info alert',
|
|
23
|
+
};
|
|
24
|
+
export const Success = Template.bind({});
|
|
25
|
+
Success.args = {
|
|
26
|
+
layout: 'success',
|
|
27
|
+
message: 'This is a success alert',
|
|
28
|
+
};
|
|
29
|
+
export const Warning = Template.bind({});
|
|
30
|
+
Warning.args = {
|
|
31
|
+
layout: 'warning',
|
|
32
|
+
message: 'This is a warning alert',
|
|
33
|
+
};
|
|
34
|
+
export const Error = Template.bind({});
|
|
35
|
+
Error.args = {
|
|
36
|
+
layout: 'error',
|
|
37
|
+
message: 'This is an error alert',
|
|
38
|
+
};
|
|
39
|
+
export const Default = Template.bind({});
|
|
40
|
+
Default.args = {
|
|
41
|
+
layout: 'default',
|
|
42
|
+
message: 'This is a default color',
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=MiniTag.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MiniTag.stories.js","sourceRoot":"","sources":["../../src/stories/MiniTag.stories.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAChB,WAAW,GACZ,MAAM,6CAA6C,CAAA;AAEpD,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;aACrB;SACF;KACF;CACF,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,SAAS,EAAE;IACzB,QAAQ,EAAE,+BAA+B;CAC1C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACrC,IAAI,CAAC,IAAI,GAAG;IACV,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,uBAAuB;CACjC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,yBAAyB;CACnC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,yBAAyB;CACnC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,wBAAwB;CAClC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,yBAAyB;CACnC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import PsScrollBar from '../components/playground/PsScrollBar.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Playground',
|
|
4
|
+
component: PsScrollBar
|
|
5
|
+
};
|
|
6
|
+
const Template = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsScrollBar },
|
|
9
|
+
template: `
|
|
10
|
+
<PsScrollBar v-bind='$props' scrollWidth='30'></PsScrollbar>
|
|
11
|
+
`
|
|
12
|
+
});
|
|
13
|
+
export const ScrollBar = Template.bind({});
|
|
14
|
+
//# sourceMappingURL=Playground.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Playground.stories.js","sourceRoot":"","sources":["../../src/stories/Playground.stories.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,0CAA0C,CAAA;AAElE,eAAe;IACX,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,WAAW;CACzB,CAAA;AAED,MAAM,QAAQ,GAAI,CAAC,IAAI,EAAE,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,WAAW,EAAC;IAC1B,QAAQ,EAAE;;KAET;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import PsProgressBar from '../components/badges-and-tags/PsProgressBar.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Badges & Tags/Badges/ProgressBar',
|
|
4
|
+
component: PsProgressBar,
|
|
5
|
+
argTypes: {
|
|
6
|
+
value: {
|
|
7
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
8
|
+
},
|
|
9
|
+
breakEven: {
|
|
10
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
const TemplateDefault = (args, { argTypes }) => ({
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: { PsProgressBar },
|
|
17
|
+
template: '<PsProgressBar v-bind="$props" />',
|
|
18
|
+
});
|
|
19
|
+
export const Default = TemplateDefault.bind({});
|
|
20
|
+
Default.args = {};
|
|
21
|
+
//# sourceMappingURL=ProgressBar.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.stories.js","sourceRoot":"","sources":["../../src/stories/ProgressBar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iDAAiD,CAAA;AAE3E,eAAe;IACb,KAAK,EAAE,kCAAkC;IACzC,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE;SAC9C;QACD,SAAS,EAAE;YACT,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE;SAC9C;KACF;CACF,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,aAAa,EAAE;IAC7B,QAAQ,EAAE,mCAAmC;CAC9C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import PsRadioButton from '../components/controls/PsRadioButton.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Controls & Selectors/Radio Button',
|
|
4
|
+
component: PsRadioButton,
|
|
5
|
+
};
|
|
6
|
+
const DefaultTemplate = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsRadioButton },
|
|
9
|
+
template: `
|
|
10
|
+
<div style='display: flex; gap: 20px;'>
|
|
11
|
+
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
12
|
+
<span>Resting</span>
|
|
13
|
+
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
14
|
+
<PsRadioButton v-bind='$props' label='Label 1' size='big'/>
|
|
15
|
+
<PsRadioButton v-bind='$props' label='Label 2' size='small'/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
19
|
+
<span>Active</span>
|
|
20
|
+
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
21
|
+
<PsRadioButton v-bind='$props' label='Label 3' size='big' checked/>
|
|
22
|
+
<PsRadioButton v-bind='$props' label='Label 4' size='small' checked/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div style='display: flex; flex-direction: column; gap:10px;'>
|
|
26
|
+
<span>Disable</span>
|
|
27
|
+
<div style='display: flex; flex-direction:column; gap:5px;'>
|
|
28
|
+
<PsRadioButton v-bind='$props' label='Label 5' size='big' disabled/>
|
|
29
|
+
<PsRadioButton v-bind='$props' label='Label 6' size='small' disabled/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`
|
|
34
|
+
});
|
|
35
|
+
export const Default = DefaultTemplate.bind({});
|
|
36
|
+
//# sourceMappingURL=RadioButton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButton.stories.js","sourceRoot":"","sources":["../../src/stories/RadioButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,0CAA0C,CAAA;AAEpE,eAAe;IACb,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,aAAa;CACxB,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAC,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,aAAa,EAAC;IAC5B,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;GAwBV;CACD,CAAC,CAAA;AAGH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import PsRadioButtonSimple from '../components/controls/PsRadioButtonSimple.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Text fields & Forms/Inputs V2/RadioButton',
|
|
4
|
+
component: PsRadioButtonSimple,
|
|
5
|
+
};
|
|
6
|
+
const defaultTemplate = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsRadioButtonSimple },
|
|
9
|
+
data: () => ({
|
|
10
|
+
checkBox1: true
|
|
11
|
+
}),
|
|
12
|
+
template: `
|
|
13
|
+
<div style='display:flex; gap: 20px;'>
|
|
14
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
15
|
+
<p>Resting</p>
|
|
16
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
17
|
+
<PsRadioButtonSimple :checked="radioButton1" @click="radioButton1 = true" label='Label 1' />
|
|
18
|
+
<PsRadioButtonSimple :checked="radioButton2" @click="radioButton2 = true" label='Label 2' size='small' />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
22
|
+
<p>Active</p>
|
|
23
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
24
|
+
<PsRadioButtonSimple v-bind="$props" label='Label 3' checked />
|
|
25
|
+
<PsRadioButtonSimple v-bind="$props" label='Label 4' checked size='small'/>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div style='display:flex; flex-direction:column; gap:5px;'>
|
|
29
|
+
<p>Disabled</p>
|
|
30
|
+
<div style='display: flex; flex-direction:column; gap: 10px;'>
|
|
31
|
+
<PsRadioButtonSimple v-bind="$props" label='Input via inputAttrs' :inputAttrs="{ id: 'my-input-id' }" disabled/>
|
|
32
|
+
<PsRadioButtonSimple v-bind="$props" label='Input via component id' size='small' id="my-component-id" data-test="test" disabled/>
|
|
33
|
+
<PsRadioButtonSimple v-bind="$props" label='Input fallback' size='small' disabled/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
`
|
|
38
|
+
});
|
|
39
|
+
export const Default = defaultTemplate.bind({});
|
|
40
|
+
//# sourceMappingURL=RadioButtonSimple.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButtonSimple.stories.js","sourceRoot":"","sources":["../../src/stories/RadioButtonSimple.stories.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,gDAAgD,CAAA;AAEhF,eAAe;IACX,KAAK,EAAE,2CAA2C;IAClD,SAAS,EAAE,mBAAmB;CAC/B,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,IAAQ,EAAE,EAAC,QAAQ,EAAgB,EAAE,EAAE,CAAC,CAAC;IAChE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,mBAAmB,EAAE;IACnC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAG,IAAI;KACjB,CAAC;IACF,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;OAyBP;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import PsSimpleAlert from '../components/notifications/PsSimpleAlert.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Notifications/Simple Alert',
|
|
4
|
+
component: PsSimpleAlert,
|
|
5
|
+
};
|
|
6
|
+
const TemplateDefault = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsSimpleAlert },
|
|
9
|
+
template: `
|
|
10
|
+
<div style="width:300px;">
|
|
11
|
+
<PsSimpleAlert v-bind="$props" class="psui-text-blue-60 psui-bg-blue-20"/>
|
|
12
|
+
</div>
|
|
13
|
+
`,
|
|
14
|
+
});
|
|
15
|
+
export const Default = TemplateDefault.bind({});
|
|
16
|
+
Default.args = {
|
|
17
|
+
message: 'lorem'
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=SimpleAlert.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleAlert.stories.js","sourceRoot":"","sources":["../../src/stories/SimpleAlert.stories.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+CAA+C,CAAA;AAEzE,eAAe;IACX,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,aAAa;CACzB,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,aAAa,EAAE;IAC7B,QAAQ,EAAE;;;;SAIL;CACN,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAC,OAAO;CAChB,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import PsSlider from '../components/controls/PsSlider.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Text fields & Forms/Slider',
|
|
4
|
+
component: PsSlider,
|
|
5
|
+
// argTypes: {
|
|
6
|
+
// layout: { control: { type: 'inline-radio', options: sliderLayout } },
|
|
7
|
+
// },
|
|
8
|
+
};
|
|
9
|
+
const Template = (args, { argTypes }) => ({
|
|
10
|
+
props: Object.keys(argTypes),
|
|
11
|
+
components: { PsSlider },
|
|
12
|
+
template: `
|
|
13
|
+
<div style="width: 500px;display:block;margin:0 auto;">
|
|
14
|
+
<PsSlider
|
|
15
|
+
v-if="$props['layout'] == 'rich'"
|
|
16
|
+
v-bind="$props"
|
|
17
|
+
:value.sync="value"
|
|
18
|
+
class="psui-bg-gray-10 psui-p-10 psui-rounded psui-border psui-border-gray-30 psui-border-dashed"
|
|
19
|
+
/>
|
|
20
|
+
<PsSlider
|
|
21
|
+
v-else
|
|
22
|
+
v-bind="$props"
|
|
23
|
+
:value.sync="value"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
`
|
|
27
|
+
});
|
|
28
|
+
export const Label = Template.bind({});
|
|
29
|
+
Label.args = {
|
|
30
|
+
min: 0,
|
|
31
|
+
max: 200,
|
|
32
|
+
maxValue: 200,
|
|
33
|
+
value: 30,
|
|
34
|
+
label: 'Score Label',
|
|
35
|
+
layout: 'default'
|
|
36
|
+
};
|
|
37
|
+
export const NoLabel = Template.bind({});
|
|
38
|
+
NoLabel.args = {
|
|
39
|
+
min: 0,
|
|
40
|
+
max: 200,
|
|
41
|
+
maxValue: 200,
|
|
42
|
+
value: 15,
|
|
43
|
+
layout: 'default'
|
|
44
|
+
};
|
|
45
|
+
export const Bubble = Template.bind({});
|
|
46
|
+
Bubble.args = {
|
|
47
|
+
min: 0,
|
|
48
|
+
max: 200,
|
|
49
|
+
maxValue: 200,
|
|
50
|
+
value: 23,
|
|
51
|
+
bubble: true,
|
|
52
|
+
layout: 'default'
|
|
53
|
+
};
|
|
54
|
+
const sliderColors = [
|
|
55
|
+
{ start: 140, end: 170, bgColor: '#FF906D' },
|
|
56
|
+
{ start: 170, end: 200, bgColor: '#D65C5A' },
|
|
57
|
+
];
|
|
58
|
+
export const Rich = Template.bind({});
|
|
59
|
+
Rich.args = {
|
|
60
|
+
min: 0,
|
|
61
|
+
max: 200,
|
|
62
|
+
maxValue: 200,
|
|
63
|
+
value: 20,
|
|
64
|
+
bubble: true,
|
|
65
|
+
dividers: true,
|
|
66
|
+
layout: 'rich',
|
|
67
|
+
sliderColors: sliderColors,
|
|
68
|
+
gridData: [0, 30, 55, 80, 100]
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=Slider.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.stories.js","sourceRoot":"","sources":["../../src/stories/Slider.stories.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,qCAAqC,CAAA;AAE1D,eAAe;IACb,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,QAAQ;IACnB,cAAc;IACd,0EAA0E;IAC1E,KAAK;CACN,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,QAAQ,EAAE;IACxB,QAAQ,EAAE;;;;;;;;;;;;;;GAcT;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,CAAC,IAAI,GAAG;IACZ,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,MAAM,YAAY,GAAG;IACnB,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE;IAC5C,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE;CAC7C,CAAA;AACD,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACrC,IAAI,CAAC,IAAI,GAAG;IACV,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,YAAY;IAC1B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;CAC/B,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import PsSwitch from '../components/controls/PsSwitch.vue';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Controls & Selectors/Switch',
|
|
4
|
+
component: PsSwitch,
|
|
5
|
+
};
|
|
6
|
+
const Template = (args, { argTypes }) => ({
|
|
7
|
+
props: Object.keys(argTypes),
|
|
8
|
+
components: { PsSwitch },
|
|
9
|
+
data() {
|
|
10
|
+
return {
|
|
11
|
+
dt: false
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
template: `
|
|
15
|
+
<div style='display: flex; gap:10px;'>
|
|
16
|
+
<div style='display: flex; gap: 10px; flex-direction: column; margin-right: 10px;'>
|
|
17
|
+
<span>Size</span>
|
|
18
|
+
<span>BIG</span>
|
|
19
|
+
<span>SMALL</span>
|
|
20
|
+
</div>
|
|
21
|
+
<div style='display: flex; gap: 10px; flex-direction: column;'>
|
|
22
|
+
<span>Disable</span>
|
|
23
|
+
<PsSwitch v-bind="$props" v-model="dt" label='Switch1' disabled size='big'/>
|
|
24
|
+
<PsSwitch v-bind="$props" v-model="dt" label='Switch2' disabled size='small'/>
|
|
25
|
+
</div>
|
|
26
|
+
<div style='display: flex; gap: 10px; flex-direction: column;'>
|
|
27
|
+
<span>Enable</span>
|
|
28
|
+
<PsSwitch v-bind="$props" label='Switch3' value size='big'/>
|
|
29
|
+
<PsSwitch v-bind="$props" label='Switch4' value size='small'/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
`
|
|
33
|
+
});
|
|
34
|
+
export const Default = Template.bind({});
|
|
35
|
+
//# sourceMappingURL=Switch.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.stories.js","sourceRoot":"","sources":["../../src/stories/Switch.stories.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,qCAAqC,CAAA;AAC1D,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,QAAQ;CACpB,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5B,UAAU,EAAE,EAAE,QAAQ,EAAE;IACxB,IAAI;QACF,OAAO;YACL,EAAE,EAAE,KAAK;SAEV,CAAA;IACH,CAAC;IACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;GAkBT;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
|