Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7066540
Seven shades of grey
Atiomi Feb 2, 2018
a5a57c6
Update input-width
raphpare Feb 2, 2018
564ca11
Merge remote-tracking branch 'refs/remotes/origin/release-1.0.0-beta.…
simardo Feb 6, 2018
ad91916
Update color
raphpare Feb 7, 2018
5de3b2f
/dialog-full-screen: textarea
raphpare Feb 7, 2018
82e9b63
Merge remote-tracking branch 'origin/develop' into develop
raphpare Feb 7, 2018
e4f4be0
Updates line-height and headings styles.
Atiomi Feb 9, 2018
a3bdca3
Add padding prop to dropdown to remove it
jpguilmette Feb 9, 2018
adeb240
Merge pull request #57 from ulaval/feature/fix-popupbody-padding
simardo Feb 9, 2018
9c7040b
/input-width: limit-text
raphpare Feb 9, 2018
84d63b3
Merge pull request #58 from ulaval/feature/limit-text
simardo Feb 10, 2018
8693b43
Merge branch 'develop' into feature/changes-to-typography
Atiomi Feb 12, 2018
42c7eca
Add full-height prop to list-item component
Atiomi Feb 12, 2018
eda77bb
Merge branch 'develop' into feature/seven-shades-of-grey
Atiomi Feb 12, 2018
0c7cee9
Has been added to link component : 'text' value to mode attribute, sk…
Atiomi Feb 12, 2018
78d40a6
Merge pull request #59 from ulaval/feature/list-item--full-height
simardo Feb 13, 2018
b355ced
Merge pull request #60 from ulaval/feature/changes-to-typography
simardo Feb 13, 2018
e68f830
Merge pull request #61 from ulaval/feature/seven-shades-of-grey
simardo Feb 13, 2018
0af8d28
Merge pull request #62 from ulaval/feature/link--color
simardo Feb 13, 2018
b015675
Merge branch 'develop' into feature/seven-shades-of-grey
Atiomi Feb 13, 2018
43f32ba
Quick fix, change edit-window grey variable
Atiomi Feb 13, 2018
d89c851
Merge pull request #64 from ulaval/feature/seven-shades-of-grey
simardo Feb 13, 2018
ddb4d4d
Feature/textarea (#55)
raphpare Feb 14, 2018
971951d
Feature/input width (#56)
raphpare Feb 14, 2018
6a648d3
Quick fix, the link must be white. (#65)
Atiomi Feb 14, 2018
fb5320d
Vertical align the label and his icon (#68)
Atiomi Feb 14, 2018
ba8a4c7
Quick fix, clean up useless code (#69)
Atiomi Feb 14, 2018
135a783
Feature/seven shades of grey (#70)
Atiomi Feb 14, 2018
a2fe09a
release 1.0.0-beta.18
simardo Feb 14, 2018
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
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulaval/modul-components",
"version": "1.0.0-beta.17",
"version": "1.0.0-beta.18",
"description": "Component library",
"author": "Martin Simard <martin.simard@dti.ulaval.ca>",
"private": false,
Expand Down
Binary file added src/assets/icons/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/accordion/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ $m-accordion--icon-l-width: 12px;
$m-accordion--icon-width: 10px;
$m-accordion--icon-l-height: 2px;
$m-accordion--icon-height: 1px;
$m-accordion--border-size: 2px;
$m-accordion--border-color: $m-color--grey-light;
$m-accordion--border-size: $m-border-width;
$m-accordion--border-color: $m-color--border;
$m-accordion--color: $m-color--accent;

.m-accordion {
Expand Down
2 changes: 1 addition & 1 deletion src/components/datepicker/datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $m-datepicker--item-dimension: $m-touch-size !default;

&:hover,
&:focus {
color: $m-color--black-grey-lighter;
color: $m-color--grey-darker;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ $m-dialog--max-width--s: 420px !default;

&__header {
position: relative;
background: $m-color--black-grey;
background-color: var(--m-color--header-dark);
color: $m-color--white;
display: flex;
align-items: center;
Expand Down
5 changes: 0 additions & 5 deletions src/components/dropdown-group/dropdown-group.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
@import 'abstracts/variables';
$m-dropdown--color-hover: $m-color--grey-lightest !default;
$m-dropdown--color-select: $m-color--grey-lighter !default;
$m-dropdown--color-focus: $m-color--interactive-lightest !default;
$m-dropdown--color-active: $m-color--interactive-lightest !default;
$m-dropdown--margin: $m-padding--xs !default;

.m-dropdown-group {
.m-dropdown-group__header {
Expand Down
5 changes: 3 additions & 2 deletions src/components/dropdown/dropdown.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="m-dropdown"
:class="{ 'm--is-open': open, 'm--is-disabled': disabled, 'm--is-waiting': waiting, 'm--is-filterable': filterable }"
:style="{ width: width, 'max-width': maxWidth }"
:style="{ width: inputWidth, maxWidth: inputMaxWidth }"
ref="mDropdown">
<m-input-style ref="mInputStyle"
:label="label"
Expand All @@ -10,7 +10,7 @@
:empty="isEmpty"
:error="hasError"
:valid="isValid"
:width="width"
width="100%"
:icon-name="iconName"
@mousedown="inputOnMousedown"
@mouseup="inputOnMouseup"
Expand Down Expand Up @@ -55,6 +55,7 @@
:leave="transitionLeave"
:padding-header="false"
:padding-body="false"
:padding="false"
:focus-management="isMqMaxS"
:close-on-backdrop="true">
<template slot="header" v-if="isMqMaxS && (hasLabel || filterable)">
Expand Down
6 changes: 3 additions & 3 deletions src/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import DropdownItemPlugin, { MDropdownInterface, MDropdownItem, BaseDropdown, Ba
import { MDropdownGroup } from '../dropdown-group/dropdown-group';
import { InputState, InputStateMixin } from '../../mixins/input-state/input-state';
import { InputPopup } from '../../mixins/input-popup/input-popup';
import { InputWidth, InputMaxWidth } from '../../mixins/input-width/input-width';
import { MediaQueries, MediaQueriesMixin } from '../../mixins/media-queries/media-queries';
import MediaQueriesPlugin from '../../utils/media-queries/media-queries';
import i18nPlugin from '../../utils/i18n/i18n';
Expand All @@ -26,7 +27,8 @@ const DROPDOWN_STYLE_TRANSITION: string = 'max-height 0.3s ease';
mixins: [
InputState,
InputPopup,
MediaQueries
MediaQueries,
InputWidth
]
})
export class MDropdown extends BaseDropdown implements MDropdownInterface {
Expand All @@ -41,8 +43,6 @@ export class MDropdown extends BaseDropdown implements MDropdownInterface {
public iconName: string;
@Prop()
public filterable: boolean;
@Prop({ default: DROPDOWN_MAX_WIDTH })
public width: string;
@Prop()
public textNoData: string;
@Prop()
Expand Down
2 changes: 1 addition & 1 deletion src/components/edit-window/edit-window.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
justify-content: space-between;
width: 100%;
color: $m-color--white;
background: $m-color--black-grey;
background-color: var(--m-color--header-dark);

h1,
h2,
Expand Down
2 changes: 1 addition & 1 deletion src/components/icon-button/icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

&::before {
background: $m-color--black-grey-light;
background: $m-color--grey-dark;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/input-style/input-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ $m-input-style--padding: 6px !default;
margin-bottom: 4px; // Magic number
font-size: $m-font-size;
font-weight: $m-font-weight;
color: $m-color--black-grey-lighter;
color: $m-color--grey-darker;
cursor: pointer;

.m-icon {
Expand Down
8 changes: 4 additions & 4 deletions src/components/limit-text/limit-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ export class MLimitText extends ModulVue {
private maxHeight: number = 0;
private overflow: boolean = false;

protected mounted() {
protected mounted(): void {
Vue.nextTick(() => {
this.computeHeight();
});
}

protected updated() {
protected updated(): void {
this.computeHeight();
}

private computeHeight() {
private computeHeight(): void {
this.contentHeight = (this.$refs.container as HTMLElement).scrollHeight;
this.maxHeight = (this.$refs.test as HTMLElement).clientHeight * this.lines;
this.overflow = this.contentHeight > this.maxHeight;
}

private get maxHeightStyle() {
private get maxHeightStyle(): string | undefined {
if (this.overflow) {
return this.propOpen ? this.contentHeight + 'px' : this.maxHeight + 'px';
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/link/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:class="{ 'm--is-unvisited': isUnvisited,
'm--is-disabled': disabled,
'm--no-underline': !underline,
'm--is-skin-light': isSkinLight,
'm--has-right-icon' : isIconPositionRight,
'm--has-left-icon' : !isIconPositionRight }"
:to="routerLinkUrl"
Expand All @@ -19,6 +20,8 @@
'm--is-disabled': disabled,
'm--no-underline': !underline,
'm--is-button': isButton,
'm--is-text-link': isTextLink,
'm--is-skin-light': isSkinLight,
'm--has-right-icon' : isIconPositionRight,
'm--has-left-icon' : !isIconPositionRight }"
:href="propUrl"
Expand Down
35 changes: 25 additions & 10 deletions src/components/link/link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,51 @@
}
}

&:not(.m--is-disabled) {
&:not(.m--is-disabled):not(.m--is-text-link) {
&:not(.m--no-underline) {
.m-link__text {
transition: box-shadow $m-transition-duration--s ease;
box-shadow: 0 0 rgba($m-color--interactive, 0);
box-shadow: 0 0 rgba($m-color--interactive, 0); // rgba doesn't seem to work with css variables in hex value... but in this case it doesn't matter though.
}

&:not(.m--is-unvisited):visited {
color: $m-color--interactive-darker;
color: var(--m-color--interactive-darker);
}

&:hover,
&:focus {
.m-link__text {
box-shadow: 0 1px $m-color--interactive-light;
box-shadow: 0 1px var(--m-color--interactive-light);
}
}

&:active {
.m-link__text {
box-shadow: 0 1px $m-color--interactive-dark;
box-shadow: 0 1px var(--m-color--interactive-dark);
}
}
}

&:not(.m--is-unvisited):visited {
color: $m-color--interactive-darker;
color: var(--m-color--interactive-darker);

&:hover,
&:focus {
color: $m-color--interactive-light;
color: var(--m-color--interactive-light);
}

&:active {
color: $m-color--interactive-dark;
color: var(--m-color--interactive-dark);
}
}

&:hover,
&:focus {
color: $m-color--interactive-light;
color: var(--m-color--interactive-light);
}

&:active {
color: $m-color--interactive-dark;
color: var(--m-color--interactive-dark);
}
}

Expand All @@ -76,6 +76,21 @@
cursor: default;
}

&.m--is-text-link {
color: $m-color--text;
}

&.m--is-skin-light {
--m-color--interactive-darker: $m-color--white;
--m-color--interactive-dark: $m-color--white;
--m-color--interactive: $m-color--white;
--m-color--interactive-light: $m-color--white;
--m-color--interactive-lighter: $m-color--white;
--m-color--interactive-lightest: $m-color--white;

color: $m-color--white;
}

&:focus {
outline: none;
}
Expand Down
19 changes: 19 additions & 0 deletions src/components/link/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import I18nPlugin from '../i18n/i18n';
export enum MLinkMode {
RouterLink = 'router-link',
Link = 'link',
Text = 'text',
Button = 'button'
}

Expand All @@ -18,6 +19,10 @@ export enum MLinkIconPosition {
Right = 'right'
}

export enum MLinkSkin {
light = 'light'
}

const ICON_NAME_DEFAULT: string = 'chevron';

@WithRender
Expand All @@ -31,6 +36,7 @@ export class MLink extends ModulVue {
validator: value =>
value == MLinkMode.RouterLink ||
value == MLinkMode.Link ||
value == MLinkMode.Text ||
value == MLinkMode.Button
})
public mode: MLinkMode;
Expand All @@ -43,6 +49,11 @@ export class MLink extends ModulVue {

@Prop({ default: true })
public underline: boolean;
@Prop({
validator: value =>
value == MLinkSkin.light
})
public skin: MLinkSkin;

@Prop()
public target: string;
Expand Down Expand Up @@ -82,6 +93,14 @@ export class MLink extends ModulVue {
return this.mode == MLinkMode.Button;
}

private get isTextLink(): boolean {
return this.mode == MLinkMode.Text;
}

private get isSkinLight(): boolean {
return this.skin == MLinkSkin.light;
}

private get isUnvisited(): boolean {
return this.isButton ? true : this.unvisited;
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/list-item/list-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
'm--has-border-top': borderTop,
'm--has-border-bottom': borderBottom,
'm--has-menu': $slots['menu'],
'm--is-full-width': fullWidth }">
'm--is-full-width': fullWidth,
'm--is-full-height': fullHeight }">
<div class="m-list-item__content">
<slot></slot>
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/components/list-item/list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
padding-right: 0;
padding-left: 0;

@media (min-width: $m-mq--min--s) {
@media (min-width: $m-mq--min--s + 1) {
padding-right: $m-spacing;
padding-left: $m-spacing;
}
Expand Down Expand Up @@ -46,6 +46,11 @@
padding-right: 0;
}

&.m--is-full-height {
padding-top: 0;
padding-bottom: 0;
}

&.m--has-icon,
&.m--has-menu,
&.m--is-waiting {
Expand Down
4 changes: 3 additions & 1 deletion src/components/list-item/list-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export class MListItem extends Vue {
public disabled: boolean;
@Prop()
public waiting: boolean;
@Prop()
@Prop({ default: false })
public fullWidth: boolean;
@Prop({ default: false })
public fullHeight: boolean;
@Prop({ default: false })
public borderTop: boolean;
@Prop({ default: false })
public borderBottom: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu-item/menu-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $m-menu-item--color-active: $m-color--grey-lightest !default;

.m-menu-item {
&__icon {
color: $m-color--black-grey;
color: $m-color--grey-darker;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export enum MOptionsMenuSkin {
export class MMenu extends BaseMenu implements MMenuInterface {

@Prop({
default: MPopperPlacement.BottomStart,
default: MPopperPlacement.Bottom,
validator: value =>
value == MPopperPlacement.Bottom ||
value == MPopperPlacement.BottomEnd ||
Expand Down
2 changes: 1 addition & 1 deletion src/components/navbar-item/navbar-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ a {
a,
button {
color: $m-color--white;
background: $m-color--black-grey-light;
background: $m-color--grey-dark;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panel/panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $m-panel--screen--min: 640px;
}

&.m--is-skin-darker {
background: $m-color--black-grey;
background: $m-color--grey-darker;
color: $m-color--white;
}

Expand Down
Loading