@citizenplane/pimp 8.11.3 → 8.12.0
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/README.md +0 -2
- package/dist/pimp.es.js +1146 -1139
- package/dist/pimp.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +26 -4
- package/src/README.md +0 -25
- package/src/assets/styles/base/_base.scss +1 -5
- package/src/assets/styles/utilities/_index.scss +19 -0
- package/src/components/core/BaseInputLabel.vue +0 -1
- package/src/components/date-pickers/CpDate.vue +8 -5
- package/src/components/inputs/CpInput.vue +5 -16
- package/src/components/inputs/CpTextarea.vue +4 -6
- package/src/components/selects/CpSelect.vue +5 -5
- package/src/stories/BaseInputLabel.stories.ts +35 -0
- package/src/stories/CpAlert.stories.ts +90 -0
- package/src/stories/CpBadge.stories.ts +158 -0
- package/src/stories/CpButton.stories.ts +134 -0
- package/src/stories/CpCheckbox.stories.ts +184 -0
- package/src/stories/CpDate.stories.ts +110 -0
- package/src/stories/CpDatepicker.stories.ts +162 -0
- package/src/stories/CpDialog.stories.ts +53 -0
- package/src/stories/CpHeading.stories.ts +77 -0
- package/src/stories/CpIcon.stories.ts +79 -0
- package/src/stories/CpInput.stories.ts +155 -0
- package/src/stories/CpLoader.stories.ts +29 -0
- package/src/stories/CpRadio.stories.ts +139 -0
- package/src/stories/CpSelect.stories.ts +147 -0
- package/src/stories/CpSelectMenu.stories.ts +132 -0
- package/src/stories/CpSwitch.stories.ts +137 -0
- package/src/stories/CpTable.stories.ts +192 -0
- package/src/stories/CpTableEmptyState.stories.ts +34 -0
- package/src/stories/CpTextarea.stories.ts +112 -0
- package/src/stories/CpToaster.stories.ts +147 -0
- package/src/stories/CpTooltip.stories.ts +101 -0
- package/src/stories/TransitionExpand.stories.ts +85 -0
- package/vitest.workspace.js +31 -0
- package/src/App.vue +0 -110
- package/src/components/core/playground-sections/SectionAtomicElements.vue +0 -83
- package/src/components/core/playground-sections/SectionButtons.vue +0 -142
- package/src/components/core/playground-sections/SectionContainer.vue +0 -50
- package/src/components/core/playground-sections/SectionDatePickers.vue +0 -160
- package/src/components/core/playground-sections/SectionDialog.vue +0 -47
- package/src/components/core/playground-sections/SectionFeedbackIndicators.vue +0 -47
- package/src/components/core/playground-sections/SectionInputs.vue +0 -46
- package/src/components/core/playground-sections/SectionListsAndTables.vue +0 -268
- package/src/components/core/playground-sections/SectionSelectMenus.vue +0 -98
- package/src/components/core/playground-sections/SectionSelects.vue +0 -120
- package/src/components/core/playground-sections/SectionSimpleInputs.vue +0 -305
- package/src/components/core/playground-sections/SectionToasters.vue +0 -68
- package/src/components/core/playground-sections/SectionToggles.vue +0 -158
- package/src/components/core/playground-sections/SectionTypography.vue +0 -40
- package/src/main.js +0 -15
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section-container section-title="Buttons" class="sectionButtons">
|
|
3
|
-
<div class="sectionButtons__type">
|
|
4
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Default</cp-heading>
|
|
5
|
-
<div class="sectionButtons__buttons">
|
|
6
|
-
<cp-button>Default button</cp-button>
|
|
7
|
-
<cp-button color="blue">Default blue button</cp-button>
|
|
8
|
-
<cp-button color="purple">Default purple button</cp-button>
|
|
9
|
-
<cp-button color="green">Default green button</cp-button>
|
|
10
|
-
<cp-button color="orange">Default orange button</cp-button>
|
|
11
|
-
<cp-button color="red">Default red button</cp-button>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="sectionButtons__type">
|
|
15
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Primary</cp-heading>
|
|
16
|
-
<div class="sectionButtons__buttons">
|
|
17
|
-
<cp-button appearance="primary" color="blue">Primary button</cp-button>
|
|
18
|
-
<cp-button appearance="primary" color="purple">Primary button</cp-button>
|
|
19
|
-
<cp-button appearance="primary" color="green">Primary button</cp-button>
|
|
20
|
-
<cp-button appearance="primary" color="orange">Primary button</cp-button>
|
|
21
|
-
<cp-button appearance="primary" color="red">Primary button</cp-button>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="sectionButtons__type">
|
|
25
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Minimal</cp-heading>
|
|
26
|
-
<div class="sectionButtons__buttons">
|
|
27
|
-
<cp-button appearance="minimal" color="blue">Minimal button</cp-button>
|
|
28
|
-
<cp-button appearance="minimal" color="purple">Minimal button</cp-button>
|
|
29
|
-
<cp-button appearance="minimal" color="green">Minimal button</cp-button>
|
|
30
|
-
<cp-button appearance="minimal" color="orange">Minimal button</cp-button>
|
|
31
|
-
<cp-button appearance="minimal" color="red">Minimal button</cp-button>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="sectionButtons__type">
|
|
35
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Buttons as links</cp-heading>
|
|
36
|
-
<div class="sectionButtons__buttons">
|
|
37
|
-
<cp-button color="purple" tag="a">Default button (link)</cp-button>
|
|
38
|
-
<cp-button appearance="primary" color="purple" tag="a">Primary button (link)</cp-button>
|
|
39
|
-
<cp-button appearance="minimal" color="purple" tag="a">Minimal button (link)</cp-button>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="sectionButtons__type">
|
|
43
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Disabled</cp-heading>
|
|
44
|
-
<div class="sectionButtons__buttons">
|
|
45
|
-
<cp-button disabled appearance="primary" color="green">Disabled button</cp-button>
|
|
46
|
-
<cp-button disabled appearance="minimal" color="green" tag="a">Disabled button (link)</cp-button>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="sectionButtons__type">
|
|
50
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">With icons</cp-heading>
|
|
51
|
-
<div class="sectionButtons__buttons">
|
|
52
|
-
<cp-button color="red">
|
|
53
|
-
<template #icon-before><cp-icon type="refresh-cw" /></template> Default button
|
|
54
|
-
</cp-button>
|
|
55
|
-
<cp-button appearance="primary" color="red">
|
|
56
|
-
<template #icon-after><cp-icon type="refresh-cw" /></template> Primary button
|
|
57
|
-
</cp-button>
|
|
58
|
-
<cp-button appearance="minimal" color="red">
|
|
59
|
-
<template #icon-after><cp-icon type="refresh-cw" /></template>
|
|
60
|
-
</cp-button>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="sectionButtons__type">
|
|
64
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Loading</cp-heading>
|
|
65
|
-
<div class="sectionButtons__buttons">
|
|
66
|
-
<cp-button color="orange" :is-loading="loaders.primary" @click="load('primary')">
|
|
67
|
-
<template #icon-before><cp-icon type="refresh-cw" /></template> Default button
|
|
68
|
-
</cp-button>
|
|
69
|
-
<cp-button appearance="primary" color="orange" :is-loading="loaders.secondary" @click="load('secondary')">
|
|
70
|
-
Default button
|
|
71
|
-
</cp-button>
|
|
72
|
-
<cp-button color="orange" appearance="minimal" :is-loading="loaders.secondary" @click="load('secondary')">
|
|
73
|
-
<template #icon-before><cp-icon type="refresh-cw" /></template>
|
|
74
|
-
</cp-button>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="sectionButtons__type">
|
|
78
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Square</cp-heading>
|
|
79
|
-
<div class="sectionButtons__buttons">
|
|
80
|
-
<cp-button is-square color="green">Square button</cp-button>
|
|
81
|
-
<cp-button is-square appearance="primary" color="green">Square button</cp-button>
|
|
82
|
-
<cp-button is-square color="green" appearance="minimal"> Square button </cp-button>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div class="sectionButtons__type">
|
|
86
|
-
<cp-heading heading-level="h3" :size="600" class="sectionButtons__title">Large</cp-heading>
|
|
87
|
-
<div class="sectionButtons__buttons">
|
|
88
|
-
<cp-button is-large color="green">
|
|
89
|
-
<template #icon-before><cp-icon type="refresh-cw" /></template> Large button
|
|
90
|
-
</cp-button>
|
|
91
|
-
<cp-button is-large appearance="primary" color="green">
|
|
92
|
-
Large button <template #icon-after><cp-icon type="refresh-cw" /></template>
|
|
93
|
-
</cp-button>
|
|
94
|
-
<cp-button is-large color="green" appearance="minimal"> Large button </cp-button>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</section-container>
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<script>
|
|
101
|
-
import SectionContainer from '@/components/core/playground-sections/SectionContainer.vue'
|
|
102
|
-
|
|
103
|
-
export default {
|
|
104
|
-
components: {
|
|
105
|
-
SectionContainer,
|
|
106
|
-
},
|
|
107
|
-
data() {
|
|
108
|
-
return {
|
|
109
|
-
loaders: {
|
|
110
|
-
primary: false,
|
|
111
|
-
secondary: false,
|
|
112
|
-
},
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
methods: {
|
|
116
|
-
load(index) {
|
|
117
|
-
this.loaders[index] = true
|
|
118
|
-
setTimeout(() => {
|
|
119
|
-
this.loaders[index] = false
|
|
120
|
-
}, 2000)
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
}
|
|
124
|
-
</script>
|
|
125
|
-
|
|
126
|
-
<style lang="scss">
|
|
127
|
-
.sectionButtons {
|
|
128
|
-
&__title {
|
|
129
|
-
margin-bottom: sp.$space-lg;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&__buttons {
|
|
133
|
-
display: flex;
|
|
134
|
-
align-items: center;
|
|
135
|
-
flex-wrap: wrap;
|
|
136
|
-
|
|
137
|
-
> * {
|
|
138
|
-
margin: 0 sp.$space-lg sp.$space-lg 0;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
</style>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="sectionContainer">
|
|
3
|
-
<cp-heading heading-level="h2" :size="700" class="sectionContainer__title">{{ sectionTitle }}</cp-heading>
|
|
4
|
-
<div class="sectionContainer__body">
|
|
5
|
-
<slot />
|
|
6
|
-
</div>
|
|
7
|
-
</section>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
props: {
|
|
13
|
-
sectionTitle: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: '',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style lang="scss">
|
|
22
|
-
.sectionContainer {
|
|
23
|
-
padding: sp.$space-xl;
|
|
24
|
-
width: 100%;
|
|
25
|
-
|
|
26
|
-
&:not(first-child) {
|
|
27
|
-
border-top: 1px solid colors.$neutral-dark-4;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&__title {
|
|
31
|
-
margin-bottom: sp.$space-xl;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.item {
|
|
35
|
-
width: 100%;
|
|
36
|
-
margin-bottom: 20px;
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
|
|
41
|
-
& > span {
|
|
42
|
-
margin-bottom: fn.px-to-rem(10);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
h3 {
|
|
46
|
-
margin-bottom: fn.px-to-rem(10);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section-container section-title="Date picker" class="sectionDatePickers">
|
|
3
|
-
<div class="sectionDatePickers__type">
|
|
4
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title">
|
|
5
|
-
Default date input: {{ cpDate }}
|
|
6
|
-
</cp-heading>
|
|
7
|
-
<div class="sectionDatePickers__datepickers">
|
|
8
|
-
<cp-date
|
|
9
|
-
v-model="cpDate"
|
|
10
|
-
label="default date input"
|
|
11
|
-
class="sectionDatePickers__date"
|
|
12
|
-
:is-invalid="false"
|
|
13
|
-
locale="fr"
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="sectionDatePickers__type">
|
|
18
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title">
|
|
19
|
-
Default datepicker: {{ date }}
|
|
20
|
-
</cp-heading>
|
|
21
|
-
<div class="sectionDatePickers__datepickers">
|
|
22
|
-
<cp-datepicker label="Simple datepicker" :init-date-one="date" @dates="setDate" />
|
|
23
|
-
<cp-button class="sectionDatePickers__button" @click="resetDate">Reset date</cp-button>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="sectionDatePickers__datepickers">
|
|
26
|
-
<div class="sectionDatePickers__wrapper">
|
|
27
|
-
<cp-input id="datepicker-trigger" label="CoreDatepicker" placeholder="CoreDatepicker" />
|
|
28
|
-
<cp-core-datepicker
|
|
29
|
-
class="sectionDatePickers__custom"
|
|
30
|
-
mode="range"
|
|
31
|
-
close-after-select
|
|
32
|
-
is-inline
|
|
33
|
-
@opened="() => (isDepartureDatepickerOpen = true)"
|
|
34
|
-
@closed="() => (isDepartureDatepickerOpen = false)"
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="sectionDatePickers__type">
|
|
40
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title">
|
|
41
|
-
Simple inline datepicker: {{ date }}
|
|
42
|
-
</cp-heading>
|
|
43
|
-
<div class="sectionDatePickers__datepickers">
|
|
44
|
-
<cp-datepicker label="Range datepicker" single-month is-inline :init-date-one="date" @dates="setDate" />
|
|
45
|
-
<cp-datepicker label="Range datepicker" is-inline :init-date-one="date" @dates="setDate" />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
<div class="sectionDatePickers__type">
|
|
49
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title"> Range datepicker </cp-heading>
|
|
50
|
-
<div class="sectionDatePickers__datepickers">
|
|
51
|
-
<cp-datepicker label="Range datepicker" mode="range" min-date="2020-10-10" />
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="sectionDatePickers__type">
|
|
55
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title">
|
|
56
|
-
Simple datepicker with custom placeholder
|
|
57
|
-
</cp-heading>
|
|
58
|
-
<div class="sectionDatePickers__datepickers">
|
|
59
|
-
<cp-datepicker
|
|
60
|
-
label="Simple datepicker with custom placeholder"
|
|
61
|
-
:init-date-one="date"
|
|
62
|
-
placeholder="Custom placeholder"
|
|
63
|
-
@dates="setDate"
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="sectionDatePickers__type">
|
|
68
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title">
|
|
69
|
-
Datepicker with set minDate & maxDate (2021-01-01 / 2021-01-10)
|
|
70
|
-
</cp-heading>
|
|
71
|
-
<div class="sectionDatePickers__datepickers">
|
|
72
|
-
<cp-datepicker
|
|
73
|
-
label="Datepicker with set minDate & maxDate"
|
|
74
|
-
min-date="2022-01-01"
|
|
75
|
-
max-date="2022-01-10"
|
|
76
|
-
placeholder="Custom placeholder"
|
|
77
|
-
@dates="setDate"
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="sectionDatePickers__type">
|
|
82
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title"> Allow-past-dates </cp-heading>
|
|
83
|
-
<div class="sectionDatePickers__datepickers">
|
|
84
|
-
<cp-datepicker label="Allow past dates" allow-past-dates placeholder="Custom placeholder" @dates="setDate" />
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="sectionDatePickers__type">
|
|
88
|
-
<cp-heading heading-level="h3" :size="600" class="sectionDatePickers__title"> Default CpCalendar </cp-heading>
|
|
89
|
-
<div class="sectionDatePickers__datepickers">
|
|
90
|
-
<cp-calendar label="Calendar" />
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</section-container>
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<script>
|
|
97
|
-
import SectionContainer from '@/components/core/playground-sections/SectionContainer.vue'
|
|
98
|
-
|
|
99
|
-
export default {
|
|
100
|
-
components: {
|
|
101
|
-
SectionContainer,
|
|
102
|
-
},
|
|
103
|
-
data() {
|
|
104
|
-
return {
|
|
105
|
-
cpDate: '',
|
|
106
|
-
date: null,
|
|
107
|
-
isDepartureDatepickerOpen: false,
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
methods: {
|
|
111
|
-
setDate(newValue) {
|
|
112
|
-
this.date = newValue[0]
|
|
113
|
-
},
|
|
114
|
-
resetDate() {
|
|
115
|
-
this.date = null
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
}
|
|
119
|
-
</script>
|
|
120
|
-
<style lang="scss">
|
|
121
|
-
.sectionDatePickers {
|
|
122
|
-
&__title {
|
|
123
|
-
margin-bottom: sp.$space-lg;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&__datepickers {
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: flex-end;
|
|
129
|
-
flex-wrap: wrap;
|
|
130
|
-
|
|
131
|
-
> * {
|
|
132
|
-
margin: 0 sp.$space-lg sp.$space-lg 0;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&__date {
|
|
137
|
-
width: min(100%, 450px);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&__item {
|
|
141
|
-
display: flex;
|
|
142
|
-
align-items: flex-end;
|
|
143
|
-
justify-content: center;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&__button {
|
|
147
|
-
margin-left: sp.$space-lg;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&__wrapper {
|
|
151
|
-
position: relative;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&__custom {
|
|
155
|
-
position: absolute;
|
|
156
|
-
top: calc(100% + 16px);
|
|
157
|
-
left: 0;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section-container section-title="Dialog" class="sectionDialog">
|
|
3
|
-
<cp-dialog-wrapper>
|
|
4
|
-
<cp-dialog v-if="isDialogVisible" @close="toggleDialog">
|
|
5
|
-
<template #header>
|
|
6
|
-
<h3 class="sectionDialog__header">Some dialog header...</h3>
|
|
7
|
-
</template>
|
|
8
|
-
<template #content>
|
|
9
|
-
<p class="sectionDialog__content">Some dialog content...</p>
|
|
10
|
-
</template>
|
|
11
|
-
<template #footer>
|
|
12
|
-
<div class="sectionDialog__footer">
|
|
13
|
-
<cp-button @click="toggleDialog">Close</cp-button>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
</cp-dialog>
|
|
17
|
-
</cp-dialog-wrapper>
|
|
18
|
-
<cp-button @click="toggleDialog">Show dialog</cp-button>
|
|
19
|
-
</section-container>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script setup>
|
|
23
|
-
import { ref } from 'vue'
|
|
24
|
-
|
|
25
|
-
import SectionContainer from '@/components/core/playground-sections/SectionContainer.vue'
|
|
26
|
-
import CpDialogWrapper from '@/components/atomic-elements/CpDialogWrapper.vue'
|
|
27
|
-
import CpDialog from '@/components/atomic-elements/CpDialog.vue'
|
|
28
|
-
|
|
29
|
-
const isDialogVisible = ref(false)
|
|
30
|
-
|
|
31
|
-
const toggleDialog = () => (isDialogVisible.value = !isDialogVisible.value)
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<style lang="scss">
|
|
35
|
-
.sectionDialog {
|
|
36
|
-
&__header,
|
|
37
|
-
&__content {
|
|
38
|
-
padding: sp.$space-xl;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&__footer {
|
|
42
|
-
display: flex;
|
|
43
|
-
justify-content: flex-end;
|
|
44
|
-
width: 100%;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section-container section-title="Feedback Indicators" class="sectionFeedbackIndicators">
|
|
3
|
-
<div class="sectionFeedbackIndicators__alertMessage">
|
|
4
|
-
<cp-heading heading-level="h3" :size="600" class="sectionFeedbackIndicators__title">Alert message</cp-heading>
|
|
5
|
-
<cp-alert
|
|
6
|
-
v-for="(alert, alertIndex) in alertMessages"
|
|
7
|
-
:key="alertIndex"
|
|
8
|
-
:intent="alert"
|
|
9
|
-
:title="`Alert intent: ${alert}`"
|
|
10
|
-
is-closable
|
|
11
|
-
>
|
|
12
|
-
The quick, brown fox jumps over a lazy dog.
|
|
13
|
-
</cp-alert>
|
|
14
|
-
</div>
|
|
15
|
-
</section-container>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import SectionContainer from '@/components/core/playground-sections/SectionContainer.vue'
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
components: {
|
|
23
|
-
SectionContainer,
|
|
24
|
-
},
|
|
25
|
-
data() {
|
|
26
|
-
return {
|
|
27
|
-
alertMessages: ['info', 'success', 'warning', 'critical'],
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
}
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<style lang="scss">
|
|
34
|
-
.sectionFeedbackIndicators {
|
|
35
|
-
&__alertMessage {
|
|
36
|
-
width: 100%;
|
|
37
|
-
|
|
38
|
-
> *:not(:last-of-type) {
|
|
39
|
-
margin-bottom: sp.$space;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&__title {
|
|
44
|
-
margin-bottom: sp.$space-lg;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section-container section-title="Inputs" class="sectionInputs">
|
|
3
|
-
<div class="sectionInputs__section">
|
|
4
|
-
<cp-heading heading-level="h3" :size="600" class="sectionInputs__title">Simple inputs</cp-heading>
|
|
5
|
-
<section-simple-inputs />
|
|
6
|
-
</div>
|
|
7
|
-
<div class="sectionInputs__section">
|
|
8
|
-
<cp-heading heading-level="h3" :size="600" class="sectionInputs__title">Textarea</cp-heading>
|
|
9
|
-
<cp-textarea
|
|
10
|
-
v-model="textarea"
|
|
11
|
-
label="Textarea label"
|
|
12
|
-
placeholder="The quick, brown fox jumps over a lazy dog."
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
</section-container>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import SectionContainer from '@/components/core/playground-sections/SectionContainer.vue'
|
|
20
|
-
import SectionSimpleInputs from '@/components/core/playground-sections/SectionSimpleInputs.vue'
|
|
21
|
-
import CpTextarea from '@/components/inputs/CpTextarea.vue'
|
|
22
|
-
|
|
23
|
-
export default {
|
|
24
|
-
components: {
|
|
25
|
-
CpTextarea,
|
|
26
|
-
SectionContainer,
|
|
27
|
-
SectionSimpleInputs,
|
|
28
|
-
},
|
|
29
|
-
data() {
|
|
30
|
-
return {
|
|
31
|
-
textarea: '',
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
<style lang="scss">
|
|
37
|
-
.sectionInputs {
|
|
38
|
-
&__section:not(:last-of-type) {
|
|
39
|
-
margin-bottom: sp.$space-lg;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&__title {
|
|
43
|
-
margin-bottom: sp.$space-lg;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</style>
|