@citizenplane/pimp 18.9.15 → 18.9.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenplane/pimp",
3
- "version": "18.9.15",
3
+ "version": "18.9.17",
4
4
  "scripts": {
5
5
  "dev": "storybook dev -p 8081",
6
6
  "build-storybook": "storybook build --output-dir ./docs",
@@ -261,7 +261,7 @@ onMounted(async () => {
261
261
  }
262
262
 
263
263
  &--isDisabled {
264
- color: var(--cp-foreground-disabled);
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,
@@ -97,11 +97,6 @@ const pageLastResultIndex = computed(() => {
97
97
 
98
98
  <style scoped lang="scss">
99
99
  .cpTableFooter {
100
- position: sticky;
101
- z-index: 3;
102
- bottom: var(--cp-spacing-md);
103
- padding: 0 var(--cp-spacing-xl);
104
-
105
100
  &__loader {
106
101
  display: inline-flex;
107
102
  align-items: center;
@@ -128,7 +123,6 @@ const pageLastResultIndex = computed(() => {
128
123
 
129
124
  @media (min-width: 650px) {
130
125
  .cpTableFooter {
131
- position: static;
132
126
  z-index: auto;
133
127
  padding: var(--cp-spacing-xl) var(--cp-spacing-lg) 0;
134
128
 
@@ -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
+ }