diff options
-rw-r--r-- | src/objects/_action-menu.scss | 2 | ||||
-rw-r--r-- | src/objects/_avatar.scss | 37 | ||||
-rw-r--r-- | src/objects/_icon.scss | 14 | ||||
-rw-r--r-- | tpl/objects/backdrop.pug | 7 | ||||
-rw-r--r-- | tpl/objects/bubble-group.pug | 2 | ||||
-rw-r--r-- | tpl/objects/bubble.pug | 2 | ||||
-rw-r--r-- | tpl/objects/dialog.pug | 4 | ||||
-rw-r--r-- | tpl/objects/icon.pug | 2 | ||||
-rw-r--r-- | tpl/views/avatar.pug | 16 | ||||
-rw-r--r-- | tpl/views/dialog.pug | 12 |
10 files changed, 61 insertions, 37 deletions
diff --git a/src/objects/_action-menu.scss b/src/objects/_action-menu.scss index a3e1ca1..3943252 100644 --- a/src/objects/_action-menu.scss +++ b/src/objects/_action-menu.scss | |||
@@ -117,7 +117,7 @@ | |||
117 | @include iro.bem-elem('icon-slot') { | 117 | @include iro.bem-elem('icon-slot') { |
118 | display: flex; | 118 | display: flex; |
119 | justify-content: center; | 119 | justify-content: center; |
120 | width: 1em; | 120 | width: 1.2em; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | } | 123 | } |
diff --git a/src/objects/_avatar.scss b/src/objects/_avatar.scss index 5a65fbf..526912f 100644 --- a/src/objects/_avatar.scss +++ b/src/objects/_avatar.scss | |||
@@ -21,6 +21,11 @@ | |||
21 | @include iro.props-namespace('avatar') { | 21 | @include iro.props-namespace('avatar') { |
22 | @include iro.props-store(( | 22 | @include iro.props-store(( |
23 | --dims: ( | 23 | --dims: ( |
24 | --150: ( | ||
25 | --size: fn.global-dim(--size --600), | ||
26 | --font-size: fn.global-dim(--font-size --150), | ||
27 | --indicator-size: fn.global-dim(--size --175), | ||
28 | ), | ||
24 | --100: ( | 29 | --100: ( |
25 | --size: fn.global-dim(--size --450), | 30 | --size: fn.global-dim(--size --450), |
26 | --font-size: fn.global-dim(--font-size --100), | 31 | --font-size: fn.global-dim(--font-size --100), |
@@ -89,27 +94,17 @@ | |||
89 | } | 94 | } |
90 | } | 95 | } |
91 | 96 | ||
92 | @include iro.bem-modifier('75') { | 97 | @each $size in 50 75 150 { |
93 | font-size: fn.dim(--75 --font-size); | 98 | @include iro.bem-modifier($size) { |
94 | 99 | font-size: fn.dim(--#{$size} --font-size); | |
95 | @include status(75); | 100 | |
96 | 101 | @include status($size); | |
97 | @include iro.bem-elem('content') { | 102 | |
98 | width: fn.dim(--75 --size); | 103 | @include iro.bem-elem('content') { |
99 | height: fn.dim(--75 --size); | 104 | width: fn.dim(--#{$size} --size); |
100 | line-height: fn.dim(--75 --size); | 105 | height: fn.dim(--#{$size} --size); |
101 | } | 106 | line-height: fn.dim(--#{$size} --size); |
102 | } | 107 | } |
103 | |||
104 | @include iro.bem-modifier('50') { | ||
105 | font-size: fn.dim(--50 --font-size); | ||
106 | |||
107 | @include status(50); | ||
108 | |||
109 | @include iro.bem-elem('content') { | ||
110 | width: fn.dim(--50 --size); | ||
111 | height: fn.dim(--50 --size); | ||
112 | line-height: fn.dim(--50 --size); | ||
113 | } | 108 | } |
114 | } | 109 | } |
115 | } | 110 | } |
diff --git a/src/objects/_icon.scss b/src/objects/_icon.scss index e613ec2..12baeba 100644 --- a/src/objects/_icon.scss +++ b/src/objects/_icon.scss | |||
@@ -1,11 +1,19 @@ | |||
1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
2 | @use '../functions' as fn; | ||
2 | 3 | ||
3 | @include iro.props-namespace('icon') { | 4 | @include iro.props-namespace('icon') { |
5 | @include iro.props-store(( | ||
6 | --dims: ( | ||
7 | --stroke: 1.5px, | ||
8 | --size: calc(1 / 14 * 16em), | ||
9 | ) | ||
10 | ), 'dims'); | ||
11 | |||
4 | @include iro.bem-object(iro.props-namespace()) { | 12 | @include iro.bem-object(iro.props-namespace()) { |
5 | display: inline-block; | 13 | display: inline-block; |
6 | width: 1em; | 14 | width: fn.dim(--size); |
7 | height: 1em; | 15 | height: fn.dim(--size); |
8 | stroke-width: var(--icon-stroke-width, 1.5px); | 16 | stroke-width: fn.dim(--stroke); |
9 | stroke-linecap: round; | 17 | stroke-linecap: round; |
10 | stroke-linejoin: round; | 18 | stroke-linejoin: round; |
11 | vertical-align: -.12em; | 19 | vertical-align: -.12em; |
diff --git a/tpl/objects/backdrop.pug b/tpl/objects/backdrop.pug index cbe8866..227700c 100644 --- a/tpl/objects/backdrop.pug +++ b/tpl/objects/backdrop.pug | |||
@@ -8,5 +8,10 @@ mixin backdrop | |||
8 | classes[attributes.class] = true; | 8 | classes[attributes.class] = true; |
9 | } | 9 | } |
10 | 10 | ||
11 | div(class=classes, style={ width: '100%', 'min-height': '5em', 'max-height': '40em' }) | 11 | let styles = { width: '100%', 'min-height': '5em', 'max-height': '40em' } |
12 | if (attributes.pad) { | ||
13 | styles['padding'] = '2em'; | ||
14 | } | ||
15 | |||
16 | div(class=classes, style=styles) | ||
12 | block | 17 | block |
diff --git a/tpl/objects/bubble-group.pug b/tpl/objects/bubble-group.pug index a1a8c00..e6a6d19 100644 --- a/tpl/objects/bubble-group.pug +++ b/tpl/objects/bubble-group.pug | |||
@@ -10,6 +10,6 @@ mixin bubble-group(user) | |||
10 | } | 10 | } |
11 | 11 | ||
12 | section(class=classes) | 12 | section(class=classes) |
13 | .l-bubble-group__avatar.u-sticky-top | 13 | .l-bubble-group__avatar.u-p-sticky-top |
14 | +avatar= user.slice(0, 2) | 14 | +avatar= user.slice(0, 2) |
15 | block | 15 | block |
diff --git a/tpl/objects/bubble.pug b/tpl/objects/bubble.pug index bec6e9e..d04f06b 100644 --- a/tpl/objects/bubble.pug +++ b/tpl/objects/bubble.pug | |||
@@ -43,7 +43,7 @@ mixin bubble(user) | |||
43 | article(class=classes) | 43 | article(class=classes) |
44 | if user && attributes.avatar | 44 | if user && attributes.avatar |
45 | .l-media.l-media--flush.l-flex--align-start | 45 | .l-media.l-media--flush.l-flex--align-start |
46 | .l-media__block.u-mt-50.u-sticky-top | 46 | .l-media__block.u-mt-50.u-p-sticky-top |
47 | +avatar= user.slice(0, 2) | 47 | +avatar= user.slice(0, 2) |
48 | .l-media__block.l-media__block--main | 48 | .l-media__block.l-media__block--main |
49 | +content | 49 | +content |
diff --git a/tpl/objects/dialog.pug b/tpl/objects/dialog.pug index 95aa41c..ece0d67 100644 --- a/tpl/objects/dialog.pug +++ b/tpl/objects/dialog.pug | |||
@@ -40,7 +40,7 @@ mixin dialog(title) | |||
40 | if slots['sidebar-header'] | 40 | if slots['sidebar-header'] |
41 | - slots['sidebar-header']() | 41 | - slots['sidebar-header']() |
42 | else | 42 | else |
43 | +div-heading('sm')(class='o-dialog__title l-media__block l-media__block--main')= attributes.sidebarTitle | 43 | +div-heading('xl')(class='o-dialog__title u-mt-0 l-media__block l-media__block--main')= attributes.sidebarTitle |
44 | 44 | ||
45 | if slots.sidebar | 45 | if slots.sidebar |
46 | .o-dialog__sidebar.l-overflow | 46 | .o-dialog__sidebar.l-overflow |
@@ -51,7 +51,7 @@ mixin dialog(title) | |||
51 | - slots.header() | 51 | - slots.header() |
52 | else | 52 | else |
53 | if title | 53 | if title |
54 | +div-heading('sm')(class='o-dialog__title l-media__block l-media__block--main')= title | 54 | +div-heading('xl')(class='o-dialog__title u-mt-0 l-media__block l-media__block--main')= title |
55 | +action-button(round=true quiet=true icon='x' class='o-dialog__close-btn l-media__block') | 55 | +action-button(round=true quiet=true icon='x' class='o-dialog__close-btn l-media__block') |
56 | 56 | ||
57 | section(class=bodyClass) | 57 | section(class=bodyClass) |
diff --git a/tpl/objects/icon.pug b/tpl/objects/icon.pug index 67bcf37..98d51ad 100644 --- a/tpl/objects/icon.pug +++ b/tpl/objects/icon.pug | |||
@@ -9,5 +9,5 @@ mixin icon(id) | |||
9 | classes[attributes.class] = true; | 9 | classes[attributes.class] = true; |
10 | } | 10 | } |
11 | 11 | ||
12 | svg(class=classes width='1em' height='1em') | 12 | svg(class=classes) |
13 | use(href=href) | 13 | use(href=href) |
diff --git a/tpl/views/avatar.pug b/tpl/views/avatar.pug index 01aaf93..7941649 100644 --- a/tpl/views/avatar.pug +++ b/tpl/views/avatar.pug | |||
@@ -2,6 +2,14 @@ mixin view-avatar | |||
2 | +view('avatar', 'Avatar') | 2 | +view('avatar', 'Avatar') |
3 | .c-box | 3 | .c-box |
4 | div(style={ display: 'flex', gap: '.3em' }) | 4 | div(style={ display: 'flex', gap: '.3em' }) |
5 | +avatar(size='150' hue=180) | ||
6 | = 'Vo' | ||
7 | +avatar(size='150' hue=225) | ||
8 | = 'lp' | ||
9 | +avatar(size='150' src='avatar.png') | ||
10 | br | ||
11 | br | ||
12 | div(style={ display: 'flex', gap: '.3em' }) | ||
5 | +avatar | 13 | +avatar |
6 | = 'Vo' | 14 | = 'Vo' |
7 | +avatar(status='green' hue=45) | 15 | +avatar(status='green' hue=45) |
@@ -28,6 +36,14 @@ mixin view-avatar | |||
28 | 36 | ||
29 | .c-box | 37 | .c-box |
30 | div(style={ display: 'flex', gap: '.3em' }) | 38 | div(style={ display: 'flex', gap: '.3em' }) |
39 | +avatar(circle=true size='150' hue=180) | ||
40 | = 'Vo' | ||
41 | +avatar(circle=true size='150' hue=225) | ||
42 | = 'lp' | ||
43 | +avatar(circle=true size='150' src='avatar.png') | ||
44 | br | ||
45 | br | ||
46 | div(style={ display: 'flex', gap: '.3em' }) | ||
31 | +avatar(circle=true) | 47 | +avatar(circle=true) |
32 | = 'Vo' | 48 | = 'Vo' |
33 | +avatar(circle=true status='green' hue=45) | 49 | +avatar(circle=true status='green' hue=45) |
diff --git a/tpl/views/dialog.pug b/tpl/views/dialog.pug index 9d6061d..6ef06df 100644 --- a/tpl/views/dialog.pug +++ b/tpl/views/dialog.pug | |||
@@ -1,13 +1,13 @@ | |||
1 | mixin view-dialog | 1 | mixin view-dialog |
2 | +view('dialog', 'Dialog') | 2 | +view('dialog', 'Dialog') |
3 | .c-box | 3 | .c-box |
4 | +backdrop | 4 | +backdrop(pad=true) |
5 | +dialog('Lorem ipsum')(flat=true) | 5 | +dialog('Lorem ipsum')(flat=true) |
6 | +slot('body') | 6 | +slot('body') |
7 | = loremIpsum | 7 | = loremIpsum |
8 | 8 | ||
9 | .c-box | 9 | .c-box |
10 | +backdrop | 10 | +backdrop(pad=true) |
11 | +dialog('Lorem ipsum')(bodyClass='l-overflow') | 11 | +dialog('Lorem ipsum')(bodyClass='l-overflow') |
12 | +slot('body') | 12 | +slot('body') |
13 | p.u-mt-0= loremIpsum | 13 | p.u-mt-0= loremIpsum |
@@ -17,7 +17,7 @@ mixin view-dialog | |||
17 | p= loremIpsum | 17 | p= loremIpsum |
18 | 18 | ||
19 | .c-box | 19 | .c-box |
20 | +backdrop | 20 | +backdrop(pad=true) |
21 | +dialog('Tags')(sidebarTitle='#channel') | 21 | +dialog('Tags')(sidebarTitle='#channel') |
22 | +slot('sidebar') | 22 | +slot('sidebar') |
23 | +menu(style={ 'min-width': '10em' }) | 23 | +menu(style={ 'min-width': '10em' }) |
@@ -28,7 +28,7 @@ mixin view-dialog | |||
28 | p.u-mt-0= loremIpsum | 28 | p.u-mt-0= loremIpsum |
29 | 29 | ||
30 | .c-box | 30 | .c-box |
31 | +backdrop | 31 | +backdrop(pad=true) |
32 | +dialog('#channel') | 32 | +dialog('#channel') |
33 | +slot('sidebar') | 33 | +slot('sidebar') |
34 | +menu(style={ 'min-width': '10em' }) | 34 | +menu(style={ 'min-width': '10em' }) |
@@ -39,14 +39,14 @@ mixin view-dialog | |||
39 | p.u-mt-0= loremIpsum | 39 | p.u-mt-0= loremIpsum |
40 | 40 | ||
41 | .c-box | 41 | .c-box |
42 | +backdrop | 42 | +backdrop(pad=true) |
43 | +dialog | 43 | +dialog |
44 | +slot('header') | 44 | +slot('header') |
45 | .l-media__block.l-flex | 45 | .l-media__block.l-flex |
46 | +action-button(quiet=true icon='chevron-left') | 46 | +action-button(quiet=true icon='chevron-left') |
47 | +action-button(quiet=true icon='chevron-right') | 47 | +action-button(quiet=true icon='chevron-right') |
48 | .l-media__block.l-media__block--main | 48 | .l-media__block.l-media__block--main |
49 | +div-heading('sm')= 'Tags' | 49 | +div-heading('xl')(class="u-mt-0")= 'Tags' |
50 | +slot('sidebar') | 50 | +slot('sidebar') |
51 | +menu(style={ 'min-width': '10em' }) | 51 | +menu(style={ 'min-width': '10em' }) |
52 | +menu-item(icon='bookmark')= 'Bookmark' | 52 | +menu-item(icon='bookmark')= 'Bookmark' |