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

Improve FileDrop View #8511

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
be5db14
temporary changes
hurradieweltgehtunter Feb 28, 2023
2a4bb7b
add classes for absolute position setting top|right|bottom|left values
hurradieweltgehtunter Feb 28, 2023
219d88a
move css classes to remove margin/padding after setter classes to be …
hurradieweltgehtunter Feb 28, 2023
b2b194a
Make component controllable and reusable
hurradieweltgehtunter Feb 28, 2023
87d7dc4
Make component more customizable
hurradieweltgehtunter Feb 28, 2023
8301b3e
remove hard coded values to make it more customizable
hurradieweltgehtunter Feb 28, 2023
74a3763
re-Style FileDrop View
hurradieweltgehtunter Feb 28, 2023
12c8951
add scoped. Remove hiding app switcher
hurradieweltgehtunter Feb 28, 2023
61a4d22
Fix typo
Feb 28, 2023
89f0954
lint
hurradieweltgehtunter Feb 28, 2023
8d09a58
avoid local overwrite of prop
hurradieweltgehtunter Feb 28, 2023
bcb0497
rename prop to more self-explanatory name
hurradieweltgehtunter Mar 1, 2023
c488caa
usemore self-explanatory prop names
hurradieweltgehtunter Mar 1, 2023
8de869f
slot-ify
hurradieweltgehtunter Mar 1, 2023
54f0a80
set paragraph line height for better readability
hurradieweltgehtunter Mar 14, 2023
fae6dd2
make font weights important
hurradieweltgehtunter Mar 14, 2023
69a6321
update
hurradieweltgehtunter Mar 14, 2023
d72659f
add responsive spacing
hurradieweltgehtunter Mar 14, 2023
008810d
update
hurradieweltgehtunter Mar 14, 2023
6a7dab7
add url and dark logo
hurradieweltgehtunter Mar 14, 2023
6a74070
add url and dark logo
hurradieweltgehtunter Mar 14, 2023
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
4 changes: 2 additions & 2 deletions packages/design-system/src/components/OcButton/OcButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ export default defineComponent({
background-color: transparent;
border-style: none;
color: $color;
font-size: var(--oc-font-size-medium);
font-weight: normal;
font-size: inherit;
font-weight: inherit;
min-height: 0;
padding: 0;

Expand Down
7 changes: 7 additions & 0 deletions packages/design-system/src/styles/theme/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ $weights: (
"black": $oc-font-weight-black
);

$breakpoints: (
"s": $oc-breakpoint-small-default,
"m": $oc-breakpoint-medium-default,
"l": $oc-breakpoint-large-default,
"xl": $oc-breakpoint-xlarge
);

$global-control-height: 15px;
$global-border-width: 2px;
41 changes: 41 additions & 0 deletions packages/design-system/src/styles/theme/oc-position.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
.oc-inset-0,
.oc-inset-x-0 {
right:0;
left:0
}

.oc-inset-0,
.oc-inset-y-0
{
top:0;
bottom:0
}

.oc-top-0 {
top:0
}

.oc-right-0 {
right:0
}

.oc-bottom-0 {
bottom:0
}

.oc-left-0 {
left:0
}

@each $directionKey, $directionValues in $directions {
.oc-#{$directionKey} {
@each $sizeKey, $sizeValue in $sizes {
&-#{$sizeKey} {
@each $direction in $directionValues {
#{$direction}: $sizeValue !important;
}
}
}
}
}

[class*="oc-float-"] {
max-width: 100%;
}
Expand Down
46 changes: 42 additions & 4 deletions packages/design-system/src/styles/theme/oc-spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ $directives: ("m": "margin", "p": "padding");
#{$directiveValue}-#{$direction}: $sizeValue !important;
}
}

&-rm {
#{$directiveValue}-#{$direction}: 0 !important;
}
}
}
}
Expand All @@ -27,6 +23,48 @@ $directives: ("m": "margin", "p": "padding");
#{$directiveValue}: $sizeValue !important;
}
}
}
}

// Add responsive spacing
@each $breakpointKey, $breakpointValue in $breakpoints {
@media (min-width: $breakpointValue) {
@each $directiveKey, $directiveValue in $directives {
.oc-#{$directiveKey} {
@each $sizeKey, $sizeValue in $sizes {
&-#{$sizeKey}\@#{$breakpointKey} {
#{$directiveValue}: $sizeValue !important;
}
}

@each $directionKey, $directionValues in $directions {
&#{$directionKey} {
@each $direction in $directionValues {
@each $sizeKey, $sizeValue in $sizes {
&-#{$sizeKey}\@#{$breakpointKey} {
#{$directiveValue}-#{$direction}: $sizeValue !important;
}
}
}
}
}
}
}
}
}

// Add classes to remove spacing
@each $directiveKey, $directiveValue in $directives {
.oc-#{$directiveKey} {
@each $directionKey, $directionValues in $directions {
&#{$directionKey} {
@each $direction in $directionValues {
&-rm {
#{$directiveValue}-#{$direction}: 0 !important;
}
}
}
}

&-rm {
#{$directiveValue}: 0 !important;
Expand Down
4 changes: 4 additions & 0 deletions packages/design-system/src/styles/theme/oc-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ p {
color: var(--oc-color-text-default);
}

p {
line-height: 1.625;
}

html * {
font-family: var(--oc-font-family);
}
Expand Down
20 changes: 10 additions & 10 deletions packages/design-system/src/tokens/ods/font.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ font:
value: 1.29rem
weight:
default:
value: '400'
value: 400 !important
thin:
value: '100'
value: 100 !important
extralight:
value: '200'
value: 200 !important
light:
value: '300'
value: 300 !important
normal:
value: '400'
value: 400 !important
medium:
value: '500'
value: 500 !important
semibold:
value: '600'
value: 600 !important
bold:
value: '700'
value: 700 !important
extrabold:
value: '800'
value: 800 !important
black:
value: '900'
value: 900 !important
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<template>
<div>
<oc-button :class="btnClass" justify-content="left" appearance="raw" @click="triggerUpload">
<oc-resource-icon :resource="{ extension: '', isFolder }" size="medium" />
<span :id="uploadLabelId">{{ buttonLabel }}</span>
</oc-button>
<slot :triggerUpload="triggerUpload" :uploadLabelId="uploadLabelId" >
<div>
<oc-button :class="btnClass" justify-content="left" appearance="raw" @click="triggerUpload">
<oc-resource-icon :resource="{ extension: '', isFolder }" size="medium" />
<span :id="uploadLabelId">{{ buttonLabel }}</span>
</oc-button>
</div>
</slot>
<input
:id="inputId"
ref="input"
Expand Down Expand Up @@ -84,9 +88,16 @@ export default defineComponent({
})
</script>

<style scoped>
<style lang="scss" scoped>
.upload-input-target {
position: absolute;
left: -99999px;
}

button {
color: var(--oc-color-swatch-primary-default);
font-weight: 600;


}
</style>
Loading