Skip to content

Commit

Permalink
♻️ chore(types): update type naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
csc530 committed Dec 18, 2023
1 parent 05b62f5 commit f5f7ac1
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/demos/components/DemoMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@

<v-bulma-form-field is-horizontal label="Size">
<v-bulma-form-control>
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-control>
</v-bulma-form-field>
</fieldset>
</v-bulma-box>
</template>
<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 47 in src/demos/components/DemoMessage.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaColour, BulmaSize, getBulmaColours, getBulmaSizes} from "../../types";
import {BulmaColour, BulmaSize, getBulmaColours, BULMA_SIZES} from "../../types";
import VBulmaMessage from "../../vbComponents/components/VBulmaMessage.vue";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
6 changes: 3 additions & 3 deletions src/demos/components/DemoPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
</v-bulma-form-control-group>
</v-bulma-form-field>
<v-bulma-form-field is-horizontal label="Alignment/Order">
<v-bulma-select :options="getBulmaAlignments()" v-model="align" />
<v-bulma-select :options="BULMA_ALIGNMENTS" v-model="align" />
</v-bulma-form-field>
<v-bulma-form-field is-horizontal label="Size">
<v-bulma-select :options="getBulmaSizes()" v-model="size" />
<v-bulma-select :options="BULMA_SIZES" v-model="size" />

</v-bulma-form-field>
<v-bulma-form-field is-horizontal label="Rounded">
Expand All @@ -41,7 +41,7 @@
<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 43 in src/demos/components/DemoPagination.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaAlignment, BulmaLink, BulmaSize, getBulmaAlignments, getBulmaSizes} from "../../types";
import {BulmaAlignment, BulmaLink, BulmaSize, BULMA_ALIGNMENTS, BULMA_SIZES} from "../../types";
import VBulmaPagination from "../../vbComponents/components/VBulmaPagination.vue";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
14 changes: 7 additions & 7 deletions src/demos/elements/DemoButton.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<v-bulma-box style="background-image: linear-gradient(120deg, #00D1B2 0%, #41B883 100%);">
<v-bulma-button :is-responsive="respons" :colour="colour" :is-full-width="fullwidth" :is-inverted="inverted"
:is-light="light" :is-loading="loading" :is-outlined="outlined" :is-rounded="rounded"
:is-static="isStatic" :label="text" :size="size" :state="state" />
<v-bulma-button :is-responsive="response" :colour="colour" :is-full-width="fullwidth" :is-inverted="inverted"
:is-light="light" :is-loading="loading" :is-outlined="outlined" :is-rounded="rounded"
:is-static="isStatic" :label="text" :size="size" :state="state" />
</v-bulma-box>

<v-bulma-box>
Expand All @@ -18,7 +18,7 @@

<v-bulma-form-field is-horizontal label="Size">
<v-bulma-form-control>
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-control>
</v-bulma-form-field>

Expand Down Expand Up @@ -76,7 +76,7 @@

<v-bulma-form-field is-horizontal label="Responsive">
<v-bulma-form-control>
<input v-model="respons" type="checkbox" />
<input v-model="response" type="checkbox" />
</v-bulma-form-control>
</v-bulma-form-field>
</fieldset>
Expand All @@ -87,7 +87,7 @@
<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 89 in src/demos/elements/DemoButton.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaColour, BulmaSize, BulmaState, getBulmaSizes, getBulmaStates} from "../../types";
import {BulmaColour, BulmaSize, BulmaState, BULMA_SIZES, getBulmaStates} from "../../types";
import {getBulmaButtonColours} from "../../types/ButtonTypes";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaButton from "../../vbComponents/elements/VBulmaButton.vue";
Expand All @@ -108,6 +108,6 @@
const isStatic = ref<boolean>(false);
const fullwidth = ref<boolean>(false);
const state = ref<BulmaState>("default");
const respons = ref<boolean>(false);
const response = ref<boolean>(false);
</script>

4 changes: 2 additions & 2 deletions src/demos/elements/DemoDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<fieldset class="is-flex-mobile is-justify-content-center is-justify-content-space-between is-flex-wrap-wrap-reverse"
name="props">
<v-bulma-form-field is-horizontal label="size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>
</fieldset>
</v-bulma-box>
Expand All @@ -18,7 +18,7 @@
<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 20 in src/demos/elements/DemoDelete.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaSize, getBulmaSizes} from "../../types";
import {BulmaSize, BULMA_SIZES} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaDelete from "../../vbComponents/elements/VBulmaDelete.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
4 changes: 2 additions & 2 deletions src/demos/elements/DemoIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


<v-bulma-form-field is-horizontal label="Container Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field help="" is-horizontal label="Flex">
Expand All @@ -37,7 +37,7 @@
BulmaSize,
BulmaStateColour,
getBulmaShades,
getBulmaSizes,
BULMA_SIZES,
getBulmaStateColours
} from "../../types";
import {BulmaColouredIcon} from "../../types/IconTypes";
Expand Down
2 changes: 1 addition & 1 deletion src/demos/elements/DemoNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<template v-if="del" #delete>
<v-bulma-delete />
</template>
Hey just letting you know <em>this a notification</em> courtesy of <a href="http://bulma.io">Bulma</a>
Hey just letting you know <em>this a notification</em> courtesy of <a href="https://bulma.io">Bulma</a>
brought to
you by me Chris 😃
</v-bulma-notification>
Expand Down
4 changes: 2 additions & 2 deletions src/demos/elements/DemoProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Colour">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Value">
Expand All @@ -33,7 +33,7 @@
<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 35 in src/demos/elements/DemoProgress.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaColour, BulmaSize, getBulmaColours, getBulmaSizes} from "../../types";
import {BulmaColour, BulmaSize, getBulmaColours, BULMA_SIZES} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
import VBulmaProgressbar from "../../vbComponents/elements/VBulmaProgressbar.vue";
Expand Down
6 changes: 3 additions & 3 deletions src/demos/form/DemoControlGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
<VBulmaFormField is-horizontal label="Alignment">
<VBulmaFormControlGroup has-addons>
<v-bulma-form-control is-expanded>
<v-bulma-input :max="getBulmaAlignments().length" :model-value="alignment" min="1" type="range"
@update:model-value="(newVal)=> alignment = getBulmaAlignments()[newVal-1]" />
<v-bulma-input :max="BULMA_ALIGNMENTS.length" :model-value="alignment" min="1" type="range"
@update:model-value="(newVal)=> alignment = BULMA_ALIGNMENTS[newVal-1]" />
</v-bulma-form-control>
<v-bulma-form-control>
<VBulmaButton is-static>{{ alignment }}</VBulmaButton>
Expand All @@ -101,7 +101,7 @@

<script setup lang="ts">
import {ref} from "vue";

Check failure on line 103 in src/demos/form/DemoControlGroup.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaAlignment, getBulmaAlignments} from "../../types";
import {BulmaAlignment, BULMA_ALIGNMENTS} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaButton from "../../vbComponents/elements/VBulmaButton.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
4 changes: 2 additions & 2 deletions src/demos/form/DemoField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@


<v-bulma-form-field is-horizontal label="Label Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>
<v-bulma-form-field is-horizontal label="Horizontal">
<input v-model="horz" type="checkbox" />
Expand All @@ -109,7 +109,7 @@

<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 111 in src/demos/form/DemoField.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaSize, getBulmaSizes} from "../../types";
import {BulmaSize, BULMA_SIZES} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaButton from "../../vbComponents/elements/VBulmaButton.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
8 changes: 4 additions & 4 deletions src/demos/form/DemoFileInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
class="is-flex-mobile is-justify-content-center is-justify-content-space-between is-flex-wrap-wrap-reverse"
name="props">
<v-bulma-form-field is-horizontal label="Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Colour">
<v-bulma-select v-model="colour" :options="getBulmaColours()" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Alignment">
<v-bulma-select v-model="align" :options="getBulmaAlignments()" />
<v-bulma-select v-model="align" :options="BULMA_ALIGNMENTS" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Label">
Expand Down Expand Up @@ -66,9 +66,9 @@
BulmaAlignment,
BulmaColour,
BulmaSize,
getBulmaAlignments,
BULMA_ALIGNMENTS,
getBulmaColours,
getBulmaSizes
BULMA_SIZES
} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaButton from "../../vbComponents/elements/VBulmaButton.vue";
Expand Down
4 changes: 2 additions & 2 deletions src/demos/form/DemoInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Static">
Expand All @@ -52,7 +52,7 @@

<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 54 in src/demos/form/DemoInput.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaColour, BulmaSize, BulmaState, getBulmaColours, getBulmaSizes, getBulmaStates} from "../../types";
import {BulmaColour, BulmaSize, BulmaState, getBulmaColours, BULMA_SIZES, getBulmaStates} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
import VBulmaInput from "../../vbComponents/form/VBulmaInput.vue";
Expand Down
4 changes: 2 additions & 2 deletions src/demos/form/DemoSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class="is-flex-mobile is-justify-content-center is-justify-content-space-between is-flex-wrap-wrap-reverse"
name="props">
<v-bulma-form-field is-horizontal label="Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="State">
Expand Down Expand Up @@ -62,7 +62,7 @@
BulmaSize,
getBulmaColours,
getBulmaInputStates,
getBulmaSizes
BULMA_SIZES
} from "../../types";
import {BulmaOptionGroup} from "../../types/SelectTypes";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
Expand Down
4 changes: 2 additions & 2 deletions src/demos/form/DemoTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="State">
Expand All @@ -30,7 +30,7 @@

<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 32 in src/demos/form/DemoTextArea.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaColour, BulmaSize, BulmaState, getBulmaColours, getBulmaSizes, getBulmaStates} from "../../types";
import {BulmaColour, BulmaSize, BulmaState, getBulmaColours, BULMA_SIZES, getBulmaStates} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
6 changes: 3 additions & 3 deletions src/demos/layouts/DemoButtonGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
class="is-flex-mobile is-justify-content-center is-justify-content-space-between is-flex-wrap-wrap-reverse"
name="props">
<v-bulma-form-field is-horizontal label="Alignment">
<v-bulma-select v-model="align" :options="getBulmaAlignments()" />
<v-bulma-select v-model="align" :options="BULMA_ALIGNMENTS" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Size">
<v-bulma-select v-model="size" :options="getBulmaSizes()" />
<v-bulma-select v-model="size" :options="BULMA_SIZES" />
</v-bulma-form-field>

<v-bulma-form-field is-horizontal label="Tag">
Expand All @@ -37,7 +37,7 @@

<script lang="ts" setup>
import {ref} from "vue";

Check failure on line 39 in src/demos/layouts/DemoButtonGroup.vue

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved imported name

Cannot resolve file vue
import {BulmaAlignment, BulmaSize, getBulmaAlignments, getBulmaSizes} from "../../types";
import {BulmaAlignment, BulmaSize, BULMA_ALIGNMENTS, BULMA_SIZES} from "../../types";
import VBulmaBox from "../../vbComponents/elements/VBulmaBox.vue";
import VBulmaButton from "../../vbComponents/elements/VBulmaButton.vue";
import VBulmaHeading from "../../vbComponents/elements/VBulmaHeading.vue";
Expand Down
6 changes: 3 additions & 3 deletions src/types/HeroTypes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {BulmaSize, getBulmaSizes} from "../types";
import {BulmaSize, BULMA_SIZES} from "../types";

// todo: see if I can just change the case/actions in props tranfomrer method to simplify last type
// todo: see if I can just change the case/actions in props transformer method to simplify last type
export type BulmaHeroSize = BulmaSize | 'halfheight' | 'fullheight' | 'fullheight-with-navbar'

export function getBulmaHeroSizes(): BulmaHeroSize[] {
return [...getBulmaSizes(), 'halfheight', 'fullheight', 'fullheight-with-navbar']
return [...BULMA_SIZES, 'halfheight', 'fullheight', 'fullheight-with-navbar']
}

0 comments on commit f5f7ac1

Please sign in to comment.