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

Merge v4.6.0 into develop and update theme tokens #800

Merged
merged 8 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,41 @@ Changelog is rather internal in nature. See release notes for the public overvie

<!-- [DO NOT REMOVE-USED BY GH ACTION] PASTE CHANGELOG -->

- [#791]
- **Description:** Bump KDS version to 4.6.0.
- **Products impact:** -.
- **Addresses:** -.
- **Components:** -.
- **Breaking:** -.
- **Impacts a11y:** -.
- **Guidance:** -.

[#791]: https://github.com/learningequality/kolibri-design-system/pull/791

- [#782]
- **Description:** Update Theme Tokens to the latest specs to comply material design specifications.
- **Products impact:** Updated API.
- **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/775.
- **Components:** -.
- **Breaking:** yes.
- **Impacts a11y:** no.
- **Guidance:** Please update all `v_*` theme tokens using the mapping posted in https://github.com/learningequality/kolibri-design-system/issues/775.

[#782]: https://github.com/learningequality/kolibri-design-system/pull/782

- [#786]
- **Description:** Bump KDS version to 4.5.1.
- **Products impact:** -.
- **Addresses:** -.
- **Components:** -.
- **Breaking:** -.
- **Impacts a11y:** -.
- **Guidance:** -.

[#786]: https://github.com/learningequality/kolibri-design-system/pull/786

- [#784]
- **Description:** Adds `labelDir` prop to control rtl direction of label.
- **Description:** Add `labelDir` prop to control rtl direction of label.
- **Products impact:** new API.
- **Addresses:** https://github.com/learningequality/studio/issues/4728.
- **Components:** KCheckbox, KRadioButton.
Expand Down
2 changes: 1 addition & 1 deletion docs/common/DocsShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
return {
display: this.block ? 'block' : 'inline-block',
padding: this.padding ? '8px 24px' : null,
backgroundColor: this.dark ? this.$themePalette.grey.v_500 : undefined,
backgroundColor: this.dark ? this.$themePalette.grey.v_700 : undefined,
};
},
},
Expand Down
4 changes: 2 additions & 2 deletions docs/pages-components/DocsKCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
<div class="footer-wrapper">
<div class="pills" :style="{ 'color': $themeTokens.annotation }">
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
<KIcon icon="readSolid" :style="{ fontSize: '13px', position: 'relative', top: '3px' }" />
Read
</span>
<span
v-if="!showMenuInFooter"
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Short Activity
</span>
Expand Down
30 changes: 14 additions & 16 deletions docs/pages/colors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<DocsColorBlock name="tokens.text" />
<DocsColorBlock name="tokens.error" />
<DocsColorBlock name="tokens.primary" />
<DocsColorBlock name="brand.primary.v_1100" />
<DocsColorBlock name="brand.secondary.v_800" />
<DocsColorBlock name="brand.primary.v_600" />
<DocsColorBlock name="brand.secondary.v_400" />
<DocsColorBlock name="palette.grey.v_400" />

<p>
Expand Down Expand Up @@ -97,30 +97,30 @@
<p>You can apply darken utilities <code>$darken1</code>, <code>$darken2</code>, and <code>$darken3</code> to palette colors and tokens to achieve their darker shades. They are available on every Vue component.</p>

<DocsShowCode language="html">
<div :style="{ backgroundColor: $themePalette.red.v_1100 }">
<div :style="{ backgroundColor: $themePalette.red.v_600 }">
base
</div>
<div :style="{ backgroundColor: $darken1($themePalette.red.v_1100) }">
<div :style="{ backgroundColor: $darken1($themePalette.red.v_600) }">
$darken1
</div>
<div :style="{ backgroundColor: $darken2($themePalette.red.v_1100) }">
<div :style="{ backgroundColor: $darken2($themePalette.red.v_600) }">
$darken2
</div>
<div :style="{ backgroundColor: $darken3($themePalette.red.v_1100) }">
<div :style="{ backgroundColor: $darken3($themePalette.red.v_600) }">
$darken3
</div>
</DocsShowCode>
<DocsShow>
<div class="darken-block" :style="{ backgroundColor: $themePalette.red.v_1100 }">
<div class="darken-block" :style="{ backgroundColor: $themePalette.red.v_600 }">
<code>base</code>
</div>
<div class="darken-block" :style="{ backgroundColor: $darken1($themePalette.red.v_1100) }">
<div class="darken-block" :style="{ backgroundColor: $darken1($themePalette.red.v_600) }">
<code>$darken1</code>
</div>
<div class="darken-block" :style="{ backgroundColor: $darken2($themePalette.red.v_1100) }">
<div class="darken-block" :style="{ backgroundColor: $darken2($themePalette.red.v_600) }">
<code>$darken2</code>
</div>
<div class="darken-block" :style="{ backgroundColor: $darken3($themePalette.red.v_1100) }">
<div class="darken-block" :style="{ backgroundColor: $darken3($themePalette.red.v_600) }">
<code>$darken3</code>
</div>
</DocsShow>
Expand Down Expand Up @@ -236,16 +236,14 @@

<DocsPageSection title="Scales" anchor="#scales">
<p>
A color scale – sometimes called a color ramp – is an evenly-spaced ramp of shades for a particular color hue. In the Kolibri Design System, we follow <DocsExternalLink text="Google's Material convention" href="https://material.io/archive/guidelines/style/color.html" /> and segment colors into brightness levels, named <code>v_200</code>, <code>v_400</code>, <code>v_600</code>, <code>v_1000</code>, <code>v_1100</code>:
A color scale – sometimes called a color ramp – is an evenly-spaced ramp of shades for a particular color hue. In the Kolibri Design System, we follow <DocsExternalLink text="Google's Material convention" href="https://material.io/archive/guidelines/style/color.html" /> and segment colors into brightness levels, named <code>v_100</code>, <code>v_200</code>, <code>v_300</code>, <code>v_400</code>, <code>v_500</code>, <code>v_600</code>:
</p>
<DocsColorBlock name="palette.green.v_100" />
<DocsColorBlock name="palette.green.v_200" />
<DocsColorBlock name="palette.green.v_300" />
<DocsColorBlock name="palette.green.v_400" />
<DocsColorBlock name="palette.green.v_500" />
<DocsColorBlock name="palette.green.v_600" />
<p style="margin-left: 60px">
</p>
<DocsColorBlock name="palette.green.v_1000" />
<DocsColorBlock name="palette.green.v_1100" />
<p>
Due to the inconsistent way that humans perceive color and light, computing these scales is <DocsExternalLink text="both art and science" href="https://uxplanet.org/designing-systematic-colors-b5d2605b15c" />. It should not be done by simply sliding a "brightness" setting. We used <DocsExternalLink text="materialpalettes.com" href="https://materialpalettes.com/" /> to generate the scales for our primary and secondary brand colors. The same should be done for new themes.
</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/errors/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
For operations that imply risky permanent data loss, use modals for the user to confirm they really intend to remove that data. Be sure to clearly explain the consequences.
</p>
<p>
For conditions which partially block or interrupt the user experience, use a warning icon with <code>palette.orange.v_400</code> and informative language of the consequences under the current condition.
For conditions which partially block or interrupt the user experience, use a warning icon with <code>palette.orange.v_200</code> and informative language of the consequences under the current condition.
</p>
<img src="./warning.png">
<h3>
Expand Down
10 changes: 5 additions & 5 deletions docs/pages/kcard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,12 @@
<template #footer>
<div class="pills" :style="{ 'color': $themeTokens.annotation }">
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Short Activity
</span>
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Biology
</span>
Expand All @@ -281,7 +281,7 @@
<template #footer>
<div class="pills" :style="{ 'color': $themeTokens.annotation }">
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Short Activity
</span>
Expand Down Expand Up @@ -433,12 +433,12 @@
<template #footer>
<div class="pills" :style="{ 'color': $themeTokens.annotation }">
<span
:style="{ 'backgroundColor': $themePalette.grey.v_50 }"
:style="{ 'backgroundColor': $themePalette.grey.v_100 }"
>
Short Activity
</span>
<span
:style="{ 'backgroundColor': $themePalette.grey.v_50 }"
:style="{ 'backgroundColor': $themePalette.grey.v_100 }"
>
Biology
</span>
Expand Down
12 changes: 6 additions & 6 deletions docs/pages/kcardgrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
<span
v-for="(pill, i) in slicedPills"
:key="i"
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
{{ pill }}
</span>
Expand Down Expand Up @@ -325,7 +325,7 @@
<span
v-for="(pill, i) in slicedPills"
:key="i"
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
{{ pill }}
</span>
Expand Down Expand Up @@ -451,24 +451,24 @@
<template #footer>
<div class="pills" :style="{ 'color': $themeTokens.annotation }">
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
<KIcon icon="readSolid" :style="{ fontSize: '13px', position: 'relative', top: '3px' }" />
Read
</span>
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Short Activity
</span>
<template v-if="windowBreakpoint > 3">
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Biology
</span>
<span
:style="{ 'background-color': $themePalette.grey.v_50 }"
:style="{ 'background-color': $themePalette.grey.v_100 }"
>
Ecology
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/klinearloader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<DocsPageSection title="Specifications" anchor="#specifications">

<ul>
<li>Progress track uses palette.grey.v_100</li>
<li>Progress track uses palette.grey.v_200</li>
<li>Progress indicator uses palette.grey.v_800</li>
<li>Progress track height is 4px</li>
<li>Include a 2px corner radius</li>
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/kswitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
<ul>
<li>
Thumb ON color:
<DocsInternalLink code text="brand.primary.v_1000" href="/colors#brand-primary-v_1000" />
<DocsInternalLink code text="brand.primary.v_500" href="/colors#brand-primary-v_500" />
</li>
<li>
Track ON color:
<DocsInternalLink code text="brand.primary.v_400" href="/colors#brand-primary-v_400" />
<DocsInternalLink code text="brand.primary.v_200" href="/colors#brand-primary-v_200" />
</li>
<li>
Thumb OFF color:
<DocsInternalLink code text="palette.grey.v_50" href="/colors#palette-grey-v_50" />
<DocsInternalLink code text="palette.grey.v_100" href="/colors#palette-grey-v_100" />
</li>
<li>
Track OFF color:
<DocsInternalLink code text="palette.grey.v_200" href="/colors#palette-grey-v_200" />
<DocsInternalLink code text="palette.grey.v_300" href="/colors#palette-grey-v_300" />
</li>
</ul>
</DocsPageSection>
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/menus/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@
</li>
<li>
Option text color:
<DocsInternalLink code text="tokens.text" href="/colors#palette-grey-v_100" />
<DocsInternalLink code text="tokens.text" href="/colors#palette-grey-v_200" />
</li>
<li>
Option text hover color:
<DocsInternalLink code text="palette.grey.v_100" href="/colors#palette-grey-v_100" />
<DocsInternalLink code text="palette.grey.v_200" href="/colors#palette-grey-v_200" />
</li>
<li>
Iconography color:
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/textfields/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,19 @@
<li>Corner radius: 2px</li>
<li>
Fill color:
<DocsInternalLink code text="palette.grey.v_50" href="/colors#palette-grey-v_50" />
<DocsInternalLink code text="palette.grey.v_100" href="/colors#palette-grey-v_100" />
</li>
<li>
Bottom stroke color:
<DocsInternalLink code text="palette.grey.v_600" href="/colors#palette-grey-v_600" />
<DocsInternalLink code text="palette.grey.v_700" href="/colors#palette-grey-v_700" />
</li>
<li>
Bottom stroke focused color:
<DocsInternalLink code text="tokens.primary" href="/colors#tokens.primary" />
</li>
<li>
Label text color:
<DocsInternalLink code text="palette.grey.v_600" href="/colors#palette-grey-v_600" />
<DocsInternalLink code text="palette.grey.v_700" href="/colors#palette-grey-v_700" />
</li>
<li>
Focused text color:
Expand Down
4 changes: 2 additions & 2 deletions lib/KDateRange/KDateCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:style="[
(selectionOrder(weekIndex, dayInWeekIndex, 'first', activeMonthDay, activeMonthDate) === 'first') ||
(selectionOrder(weekIndex, dayInWeekIndex, 'first', activeMonthDay, activeMonthDate) === 'second') ?
{ backgroundColor: $themeBrand.primary.v_200 } : {}
{ backgroundColor: $themeBrand.primary.v_100 } : {}
]"
:class="[{
'calendar-days--disabled': isDateDisabled(weekIndex, dayInWeekIndex, activeMonthDay, activeMonthDate) || isDateDisabledLeft(weekIndex, dayInWeekIndex, activeMonthDay),
Expand Down Expand Up @@ -64,7 +64,7 @@
:style="[
(selectionOrder(weekIndex, dayInWeekIndex, 'second', nextActiveMonthDay, nextActiveMonthDate) === 'first') ||
(selectionOrder(weekIndex, dayInWeekIndex, 'second', nextActiveMonthDay, nextActiveMonthDate) === 'second') ?
{ backgroundColor: $themeBrand.primary.v_200 } : {}
{ backgroundColor: $themeBrand.primary.v_100 } : {}
]"
:class="[{
'calendar-days--disabled': isDateDisabled(weekIndex, dayInWeekIndex, nextActiveMonthDay, nextActiveMonthDate) || isDateDisabledRight(weekIndex, dayInWeekIndex, nextActiveMonthDay),
Expand Down
6 changes: 3 additions & 3 deletions lib/KDateRange/KDateDay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@
inRangeStyle() {
return this.isInRange
? {
backgroundColor: this.$themeBrand.primary.v_200,
backgroundColor: this.$themeBrand.primary.v_100,
':hover': {
backgroundColor: this.$themePalette.grey.v_200,
backgroundColor: this.$themePalette.grey.v_300,
},
}
: {};
},
selectedStyle() {
return this.isSelected
? {
backgroundColor: this.$themeBrand.primary.v_1000,
backgroundColor: this.$themeBrand.primary.v_500,
color: this.$themePalette.white + '!important',
}
: {};
Expand Down
4 changes: 2 additions & 2 deletions lib/KImg/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
* (3) a progressive loading experience as the colored background
* is displayed while an image is loading.
*
* Its default value is `$themePalette.grey.v_50`.
* Its default value is `$themePalette.grey.v_100`.
*/
backgroundColor: {
type: String,
Expand Down Expand Up @@ -175,7 +175,7 @@
baseStyles() {
const backgroundColor = this.backgroundColor
? this.backgroundColor
: this.$themePalette.grey.v_50;
: this.$themePalette.grey.v_100;
const borderRadius = this.borderRadius ? this.borderRadius : 0;

return {
Expand Down
12 changes: 6 additions & 6 deletions lib/KLogo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@

const colorScheme = {
default: {
blobColor: defaultBrandColors.secondary.v_1000,
strokeColor: defaultBrandColors.primary.v_1000,
blobColor: defaultBrandColors.secondary.v_500,
strokeColor: defaultBrandColors.primary.v_500,
},
monoBlack: {
blobColor: materialColors.black,
Expand All @@ -146,17 +146,17 @@
blobColor: materialColors.white,
},
monoPrimary: {
blobColor: defaultBrandColors.primary.v_1000,
blobColor: defaultBrandColors.primary.v_500,
},
monoSecondary: {
blobColor: defaultBrandColors.secondary.v_1000,
blobColor: defaultBrandColors.secondary.v_500,
},
whiteGrey: {
blobColor: materialColors.grey.v_200,
blobColor: materialColors.grey.v_300,
strokeColor: materialColors.white,
},
blackGrey: {
blobColor: materialColors.grey.v_200,
blobColor: materialColors.grey.v_300,
strokeColor: materialColors.black,
},
};
Expand Down
Loading