Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kup-Radio & minor fixes #1780

Merged
merged 22 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8a5b258
kup-radio : Redesign
Leonardo-Signorelli Feb 14, 2024
8d45d80
kup-list & kup-combobox : fixes
Leonardo-Signorelli Feb 14, 2024
0fbf92d
Code cleaning
Leonardo-Signorelli Feb 14, 2024
c408fd9
f-radio : disabled token
Leonardo-Signorelli Feb 14, 2024
0584cc5
Kup-list : fixes
Leonardo-Signorelli Feb 16, 2024
2641eed
kup-date-picker: redesign
Leonardo-Signorelli Feb 16, 2024
a05e91a
kup-date-picker : token fix
Leonardo-Signorelli Feb 16, 2024
20e95fd
General advance pt1
Leonardo-Signorelli Feb 19, 2024
2172e53
kup-chip : esempi showcase and redesign
Leonardo-Signorelli Feb 20, 2024
130db1b
f-button : design system correction
Leonardo-Signorelli Feb 21, 2024
289d1e9
Remove Token 100
Leonardo-Signorelli Feb 21, 2024
70b5c1c
f-button : fixes token
Leonardo-Signorelli Feb 21, 2024
f947ece
f-switch : design and DS application
Leonardo-Signorelli Feb 21, 2024
9101e1a
kup-switch/f-switch : redesign
Leonardo-Signorelli Feb 21, 2024
61e1928
kup-switch : fixes and examples
Leonardo-Signorelli Feb 22, 2024
f56ea88
f-radio/kup-radio : fixes
Leonardo-Signorelli Feb 22, 2024
7e821e8
kup-date-picker : token naming
Leonardo-Signorelli Feb 22, 2024
c511183
Showcase example
Leonardo-Signorelli Feb 23, 2024
b137dc2
Kup-date-picker : design and layout
Leonardo-Signorelli Feb 23, 2024
b0fcc2d
kup-accordion : design token
Leonardo-Signorelli Feb 23, 2024
a0ce48c
kup-accordion : design and token application
Leonardo-Signorelli Feb 23, 2024
3efde59
kup-tab-bar : design and token application
Leonardo-Signorelli Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions packages/ketchup-showcase/public/showcase.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,24 @@
}

code.flat {
background: none;
border-radius: 0;
box-shadow: 0 0 2px 0px rgb(128, 128, 128);
color: var(--kup-primary-color);
background: var(--kup-gray-color-10);
border-radius: var(--kup-radius-00);
border: 1px solid var(--kup-gray-color-30);
color: var(--kup-gray-color-90);
display: flex;
font-family: var(--kup-font-family-monospace);
font-size: 16px;
font-size: 14px;
font-weight: 500;
margin: auto;
max-width: 100%;
padding: 20px 10px;
padding: var(--kup-space-04) var(--kup-space-03);
width: max-content;
}

.code-word {
color: var(--kup-primary-color);
font-family: var(--kup-font-family-monospace);
font-size: 1.2em;
color: var(--kup-primary-color-60);
/* font-family: var(--kup-font-family-monospace); */
font-weight: 600;
word-break: break-word;
}

.sample-section .code-word {
Expand Down
18 changes: 14 additions & 4 deletions packages/ketchup-showcase/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default {
) {
dom.ketchupInit = {
...dom.ketchupInit,
theme: { name: 'dark' },
theme: { name: 'octane' },
};
}
document.addEventListener('kup-theme-change', () => {
Expand Down Expand Up @@ -161,9 +161,9 @@ export default {
methods: {
changeTheme(e: CustomEvent<KupSwitchEventPayload>): void {
if (e.detail.value === 'on') {
dom.ketchup.theme.set('dark');
dom.ketchup.theme.set('darkOctaneGray');
} else {
dom.ketchup.theme.set('ketchup');
dom.ketchup.theme.set('octane');
}
},
drawerReady(): void {
Expand Down Expand Up @@ -197,7 +197,7 @@ export default {
},
removeSpinner(): void {
setTimeout(() => {
if (dom.ketchup.theme.name === 'dark') {
if (dom.ketchup.theme.name === 'darkOctaneGray') {
theme.checked = true;
}
spinnerLabel.innerHTML = 'Ready!';
Expand Down Expand Up @@ -877,6 +877,16 @@ export default {
value: 'KupTheme',
visible: true,
},
{
cells: {
ROUTE: {
value: 'kup-token',
},
},
icon: 'token',
value: 'KupToken',
visible: true,
},
{
cells: {
ROUTE: {
Expand Down
5 changes: 5 additions & 0 deletions packages/ketchup-showcase/src/plugins/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ const frameworkRoutes = [
name: 'kup-theme',
component: () => import(`@/views/framework/kup-theme/KupTheme.vue`),
},
{
path: `/kup-token`,
name: 'kup-token',
component: () => import(`@/views/framework/kup-token/KupToken.vue`),
},
{
path: `/kup-toolbar`,
name: 'kup-toolbar',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@
<template v-slot:4>
<chip-input></chip-input>
</template>
<template v-slot:5>
<chip-size></chip-size>
</template>
<template v-slot:6>
<chip-variant></chip-variant>
</template>
<template v-slot:7>
<chip-color></chip-color>
</template>
<template v-slot:8>
<chip-structure></chip-structure>
</template>
<template v-slot:9>
<chip-combination></chip-combination>
</template>
</comp>
</template>

Expand All @@ -24,6 +39,11 @@ import ChipBasic from '@/views/components/basic/chip/examples/ChipBasic';
import ChipChoice from '@/views/components/basic/chip/examples/ChipChoice';
import ChipFilter from '@/views/components/basic/chip/examples/ChipFilter';
import ChipInput from '@/views/components/basic/chip/examples/ChipInput';
import ChipSize from '@/views/components/basic/chip/examples/ChipSize';
import ChipVariant from '@/views/components/basic/chip/examples/ChipVariant';
import ChipColor from '@/views/components/basic/chip/examples/ChipColor';
import ChipStructure from '@/views/components/basic/chip/examples/ChipStructure';
import ChipCombination from '@/views/components/basic/chip/examples/ChipCombination';
import Comp from '@/views/templates/Comp';
export default {
components: {
Expand All @@ -32,6 +52,11 @@ export default {
ChipChoice,
ChipFilter,
ChipInput,
ChipSize,
ChipVariant,
ChipColor,
ChipStructure,
ChipCombination,
Comp,
},
data() {
Expand All @@ -45,6 +70,11 @@ export default {
'Choice chips',
'Filter chips',
'Input chips',
'Chip Size',
'Chip Variant',
'Chip Color',
'Chip Structure',
'Chip Combination',
],
};
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<template>
<div>
<div class="demo-wrapper">
<p>
You can use the <span class="code-word">kup-primary</span> class to set
the color of the chip. The default is
<span class="code-word">neutral</span>.
</p>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data"></kup-chip>
</div>
<p class="centered">Default color 'neutral'</p>
<code class="flat">{{ markupBasic }}</code>
</div>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data" class="kup-primary"></kup-chip>
</div>
<p class="centered">Set color to 'primary'</p>
<code class="flat">{{ markupBasicSmall }}</code>
</div>
</div>
</div>
</template>

<script>
export default {
name: 'ChipInput',
data() {
return {
data: [
{
id: 'input1',
value: 'First filter',
},
{
id: 'input2',
value: 'Second filter',
},
{
id: 'input3',
value: 'Third filter',
},
],
markupBasic: '<kup-chip></kup-chip>',
markupBasicSmall: '<kup-chip class="kup-primary"></kup-chip>',
};
},
};
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div>
<div class="demo-wrapper">
<p> You can use all the styling above to get some advanced chip: </p>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip
:data.prop="data"
styling="raised"
class="kup-primary"
></kup-chip>
</div>
<p class="centered">Primary Raised Chip with icon</p>
<code class="flat">{{ markupBasic }}</code>
<code class="flat">{{ markupBasicData }}</code>
</div>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data2" styling="outlined"></kup-chip>
</div>
<p class="centered">Neutral outlined Chips'</p>
<code class="flat">{{ markupBasic2 }}</code>
<code class="flat">{{ markupBasicData2 }}</code>
</div>
</div>
</div>
</template>

<script>
export default {
name: 'ChipInput',
data() {
return {
data: [
{
icon: 'widgets',
id: 'input1',
value: 'IconChip',
},
],
data2: [
{
id: 'input1',
value: 'Outlined Chip',
},
{
id: 'input2',
value: 'Outlined Chip 2',
},
{
id: 'input2',
value: 'Outlined Chip 3',
},
],
markupBasic: '<kup-chip styling="raised" class="kup-primary"></kup-chip>',
markupBasicData: '{ icon: "widgets", id: "input1", value: "IconChip"}',
markupBasic2: '<kup-chip styling="outlined"></kup-chip>',
markupBasicData2:
'{ id: "input1", value: "Outlined Chip"},{ id: "input2", value: "Outlined Chip 2"},{ id: "input3", value: "Outlined Chip 3"}',
};
},
};
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<template>
<div>
<div class="demo-wrapper">
<p>
You can use the <span class="code-word">sizing</span> attribute to
decide the size of the chip. The default is
<span class="code-word">medium</span>.
</p>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data"></kup-chip>
</div>
<p class="centered">Default Sizing medium</p>
<code class="flat">{{ markupBasic }}</code>
</div>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data" sizing="small"></kup-chip>
</div>
<p class="centered">Set sizing to 'small'</p>
<code class="flat">{{ markupBasicSmall }}</code>
</div>
</div>
</div>
</template>

<script>
export default {
name: 'ChipInput',
data() {
return {
data: [
{
id: 'input1',
value: 'First filter',
},
{
id: 'input2',
value: 'Second filter',
},
{
id: 'input3',
value: 'Third filter',
},
],
markupBasic: '<kup-chip></kup-chip>',
markupBasicSmall: '<kup-chip sizing="small"></kup-chip>',
};
},
};
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<div>
<div class="demo-wrapper">
<p>
The Chip component is build on 3 part: A leading optional icon, a text
and a trailing optional clear icon [#input chips].
</p>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data"></kup-chip>
</div>
<p class="centered"
>You can change or remove the icon. In this case is passed the
'widgets' icon</p
>
<code class="flat">{{ markupBasic }}</code>
</div>
<br />
<div class="demo-container">
<div class="kup-container">
<kup-chip :data.prop="data2"></kup-chip>
</div>
<p class="centered">Without icon</p>
<code class="flat">{{ markupBasicWihoutIcon }}</code>
</div>
</div>
</div>
</template>

<script>
export default {
name: 'ChipInput',
data() {
return {
data: [
{
icon: 'widgets',
id: 'input1',
value: 'IconChip',
},
],
data2: [
{
id: 'input1',
value: 'TextChip',
},
],
markupBasic: '{ icon: "widgets", id: "input1", value: "IconChip"}',
markupBasicWihoutIcon: '{ id: "input1", value: "TextChip"}',
};
},
};
</script>
Loading