@citizenplane/pimp 10.7.0 → 10.9.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/package.json
CHANGED
|
@@ -105,6 +105,7 @@ const handleClear = () => emit('onClear')
|
|
|
105
105
|
display: inline-flex;
|
|
106
106
|
padding: var(--cp-spacing-sm-md);
|
|
107
107
|
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
108
109
|
border-radius: var(--cp-radius-full);
|
|
109
110
|
background-color: var(--cp-background-tertiary);
|
|
110
111
|
color: var(--cp-text-primary);
|
|
@@ -110,6 +110,7 @@ const dynamicClasses = computed(() => {
|
|
|
110
110
|
&__body {
|
|
111
111
|
display: inline-flex;
|
|
112
112
|
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
113
114
|
padding: var(--cp-selectable-body-padding);
|
|
114
115
|
gap: var(--cp-selectable-body-gap);
|
|
115
116
|
background-color: var(--cp-selectable-body-background-color);
|
|
@@ -118,6 +119,7 @@ const dynamicClasses = computed(() => {
|
|
|
118
119
|
background-color 0.1s ease-out,
|
|
119
120
|
box-shadow 0.1s ease-out,
|
|
120
121
|
color 0.1s ease-out;
|
|
122
|
+
width: 100%;
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
&__icon i,
|
|
@@ -242,3 +242,27 @@ export const WithSlot: Story = {
|
|
|
242
242
|
`,
|
|
243
243
|
}),
|
|
244
244
|
}
|
|
245
|
+
|
|
246
|
+
export const FullWidth: Story = {
|
|
247
|
+
render: (args: Args) => ({
|
|
248
|
+
components: { CpBadge },
|
|
249
|
+
setup() {
|
|
250
|
+
return { args }
|
|
251
|
+
},
|
|
252
|
+
template: `
|
|
253
|
+
<div style="width: 300px;">
|
|
254
|
+
<CpBadge v-bind="args" style="width: 100%;">
|
|
255
|
+
<template #leading-icon>
|
|
256
|
+
<span style="font-size: 16px; margin-right: 4px;">🌟</span>
|
|
257
|
+
</template>
|
|
258
|
+
<div>
|
|
259
|
+
Label
|
|
260
|
+
</div>
|
|
261
|
+
<template #trailing-icon>
|
|
262
|
+
<span style="font-size: 16px; margin-left: 4px;">🚀</span>
|
|
263
|
+
</template>
|
|
264
|
+
</CpBadge>
|
|
265
|
+
</div>
|
|
266
|
+
`,
|
|
267
|
+
}),
|
|
268
|
+
}
|
|
@@ -97,6 +97,38 @@ export const WithIcons: Story = {
|
|
|
97
97
|
}),
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
export const FullWidth: Story = {
|
|
101
|
+
args: {
|
|
102
|
+
appearance: 'secondary',
|
|
103
|
+
size: Sizes.MD,
|
|
104
|
+
disabled: false,
|
|
105
|
+
label: 'Label',
|
|
106
|
+
isSelected: true,
|
|
107
|
+
isExpanded: false,
|
|
108
|
+
},
|
|
109
|
+
render: (args) => ({
|
|
110
|
+
components: { CpSelectableButton },
|
|
111
|
+
setup() {
|
|
112
|
+
return { args }
|
|
113
|
+
},
|
|
114
|
+
template: `
|
|
115
|
+
<div style="display: flex; justify-content: center; align-items: center; min-height: 240px; width:500px;">
|
|
116
|
+
<CpSelectableButton
|
|
117
|
+
style="width: 100%;"
|
|
118
|
+
v-bind="args"
|
|
119
|
+
>
|
|
120
|
+
<template #leading-icon>
|
|
121
|
+
<CpIcon type="circle" />
|
|
122
|
+
</template>
|
|
123
|
+
<template #trailing-icon>
|
|
124
|
+
<CpIcon type="circle" />
|
|
125
|
+
</template>
|
|
126
|
+
</CpSelectableButton>
|
|
127
|
+
</div>
|
|
128
|
+
`,
|
|
129
|
+
}),
|
|
130
|
+
}
|
|
131
|
+
|
|
100
132
|
export const Sizing: Story = {
|
|
101
133
|
args: {
|
|
102
134
|
disabled: false,
|