@citizenplane/pimp 18.9.14 → 18.9.16
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/components/CpAlert.vue.d.ts.map +1 -1
- package/dist/components/CpInput.vue.d.ts.map +1 -1
- package/dist/components/CpTelInput.vue.d.ts.map +1 -1
- package/dist/components/CpTextarea.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CpAlert.vue +1 -4
- package/src/components/CpInput.vue +5 -1
- package/src/components/CpTelInput.vue +4 -0
- package/src/components/CpTextarea.vue +4 -0
- package/src/stories/CpInput.stories.ts +22 -0
package/package.json
CHANGED
|
@@ -220,15 +220,12 @@ const dynamicClasses = computed(() => [
|
|
|
220
220
|
.cpAlert__body {
|
|
221
221
|
flex-flow: row wrap;
|
|
222
222
|
align-items: center;
|
|
223
|
+
justify-content: space-between;
|
|
223
224
|
}
|
|
224
225
|
|
|
225
226
|
.cpAlert__content {
|
|
226
227
|
flex: 0 1 auto;
|
|
227
228
|
}
|
|
228
|
-
|
|
229
|
-
.cpAlert__actions {
|
|
230
|
-
flex-shrink: 0;
|
|
231
|
-
}
|
|
232
229
|
}
|
|
233
230
|
|
|
234
231
|
&--isNeutral {
|
|
@@ -261,7 +261,7 @@ onMounted(async () => {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
&--isDisabled {
|
|
264
|
-
color: var(--cp-
|
|
264
|
+
color: var(--cp-text-disabled);
|
|
265
265
|
|
|
266
266
|
.cpInput__container * {
|
|
267
267
|
cursor: not-allowed;
|
|
@@ -269,6 +269,10 @@ onMounted(async () => {
|
|
|
269
269
|
|
|
270
270
|
.cpInput__inner {
|
|
271
271
|
background: var(--cp-background-disabled);
|
|
272
|
+
|
|
273
|
+
&::placeholder {
|
|
274
|
+
color: var(--cp-text-disabled);
|
|
275
|
+
}
|
|
272
276
|
}
|
|
273
277
|
|
|
274
278
|
.cpInput__inner,
|
|
@@ -259,6 +259,10 @@ const handleOnValidate = (phoneObject: PhoneObject) => emit('validate', phoneObj
|
|
|
259
259
|
&--isDisabled {
|
|
260
260
|
background-color: var(--cp-background-disabled);
|
|
261
261
|
pointer-events: none;
|
|
262
|
+
|
|
263
|
+
&::placeholder {
|
|
264
|
+
color: var(--cp-text-disabled);
|
|
265
|
+
}
|
|
262
266
|
}
|
|
263
267
|
}
|
|
264
268
|
|
|
@@ -119,6 +119,10 @@ const handleChange = (newValue: string) => emit('update:modelValue', newValue)
|
|
|
119
119
|
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-disabled);
|
|
120
120
|
color: var(--cp-text-disabled);
|
|
121
121
|
cursor: not-allowed;
|
|
122
|
+
|
|
123
|
+
&::placeholder {
|
|
124
|
+
color: var(--cp-text-disabled);
|
|
125
|
+
}
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
&::placeholder {
|
|
@@ -320,3 +320,25 @@ export const WithUnits: Story = {
|
|
|
320
320
|
`,
|
|
321
321
|
}),
|
|
322
322
|
}
|
|
323
|
+
|
|
324
|
+
export const VisualTestingBetweenDisabledAndPlaceholder: Story = {
|
|
325
|
+
args: {
|
|
326
|
+
...Default.args,
|
|
327
|
+
placeholder: 'Enter something',
|
|
328
|
+
},
|
|
329
|
+
render: (args: StoryArgs) => ({
|
|
330
|
+
components: { CpInput },
|
|
331
|
+
setup() {
|
|
332
|
+
const value = ref('Test')
|
|
333
|
+
return { args, value }
|
|
334
|
+
},
|
|
335
|
+
template: `
|
|
336
|
+
<div style="display: flex; flex-direction: column; gap: 10px; max-width: 400px; padding: 20px;">
|
|
337
|
+
<CpInput v-model="value" v-bind="args" label="Disabled / Not placeholder" :disabled="true" />
|
|
338
|
+
<CpInput v-bind="args" label="Disabled / Placeholder" :disabled="true" />
|
|
339
|
+
<CpInput v-model="value" v-bind="args" label="Not Disabled / Not Placeholder" :disabled="false" />
|
|
340
|
+
<CpInput v-bind="args" label="Not Disabled / Placeholder" :disabled="false" />
|
|
341
|
+
</div>
|
|
342
|
+
`,
|
|
343
|
+
}),
|
|
344
|
+
}
|