bonkers-ui 1.0.57 → 1.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -27,6 +27,12 @@ module.exports = {
27
27
  indent: "off",
28
28
  },
29
29
  },
30
+ {
31
+ files: ["*.ts"],
32
+ rules: {
33
+ "@typescript-eslint/indent": ["error", "tab"],
34
+ }
35
+ }
30
36
  ],
31
37
  rules: {
32
38
  indent: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonkers-ui",
3
- "version": "v1.0.57",
3
+ "version": "v1.0.58",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "storybook": "storybook dev -p 6006",
@@ -14,10 +14,10 @@
14
14
  "i": "yarn install --frozen-lockfile"
15
15
  },
16
16
  "dependencies": {
17
- "@fortawesome/fontawesome-svg-core": "^6.4.0",
18
- "@fortawesome/free-brands-svg-icons": "^6.4.0",
19
- "@fortawesome/free-regular-svg-icons": "^6.4.0",
20
- "@fortawesome/free-solid-svg-icons": "^6.4.0",
17
+ "@fortawesome/fontawesome-svg-core": "^6.4.2",
18
+ "@fortawesome/free-brands-svg-icons": "^6.4.2",
19
+ "@fortawesome/free-regular-svg-icons": "^6.4.2",
20
+ "@fortawesome/free-solid-svg-icons": "^6.4.2",
21
21
  "@fortawesome/vue-fontawesome": "^3.0.3",
22
22
  "eslint-plugin-tailwindcss": "^3.13.0",
23
23
  "storybook-addon-designs": "^6.3.1",
@@ -25,38 +25,38 @@
25
25
  "vue-router": "^4.2.4"
26
26
  },
27
27
  "devDependencies": {
28
- "@storybook/addon-essentials": "^7.2.0",
29
- "@storybook/addon-links": "^7.2.0",
30
- "@storybook/addon-mdx-gfm": "^7.2.0",
31
- "@storybook/vue3": "^7.2.0",
32
- "@storybook/vue3-vite": "^7.2.0",
28
+ "@storybook/addon-essentials": "^7.3.2",
29
+ "@storybook/addon-links": "^7.3.2",
30
+ "@storybook/addon-mdx-gfm": "^7.3.2",
31
+ "@storybook/vue3": "^7.3.2",
32
+ "@storybook/vue3-vite": "^7.3.2",
33
33
  "@typescript-eslint/eslint-plugin": "^5.59.9",
34
34
  "@typescript-eslint/parser": "^5.59.9",
35
- "@vitejs/plugin-vue": "^4.2.3",
35
+ "@vitejs/plugin-vue": "^4.3.3",
36
36
  "@vue/eslint-config-typescript": "^11.0.3",
37
37
  "@vue/test-utils": "^2.4.1",
38
- "eslint": "8.46.0",
38
+ "eslint": "8.47.0",
39
39
  "eslint-plugin-storybook": "^0.6.13",
40
- "eslint-plugin-vue": "^9.16.1",
41
- "gh-pages": "^5.0.0",
40
+ "eslint-plugin-vue": "^9.17.0",
41
+ "gh-pages": "^6.0.0",
42
42
  "husky": "4.3.8",
43
43
  "jsdom": "^22.1.0",
44
- "lint-staged": "^13.2.3",
45
- "postcss": "^8.4.27",
44
+ "lint-staged": "^14.0.1",
45
+ "postcss": "^8.4.28",
46
46
  "postcss-html": "^1.4.1",
47
47
  "react": "^18.2.0",
48
48
  "react-dom": "^18.2.0",
49
- "storybook": "^7.2.0",
49
+ "storybook": "^7.3.2",
50
50
  "storybook-tailwind-dark-mode": "^1.0.22",
51
- "stylelint": "^15.10.2",
51
+ "stylelint": "^15.10.3",
52
52
  "stylelint-config-recommended": "^13.0.0",
53
53
  "stylelint-config-recommended-vue": "^1.5.0",
54
54
  "stylelint-config-standard": "^34.0.0",
55
55
  "tailwindcss": "^3.3.3",
56
56
  "ts-node": "^10.9.1",
57
57
  "typescript": "^5.1.6",
58
- "vite": "^4.4.8",
59
- "vitest": "^0.34.1",
58
+ "vite": "^4.4.9",
59
+ "vitest": "^0.34.2",
60
60
  "vue-eslint-parser": "^9.3.1",
61
61
  "vue-loader": "^17.2.2",
62
62
  "vue-tsc": "^1.8.8"
@@ -1,58 +1,58 @@
1
1
  export enum EColors {
2
- WHITE = "white",
3
- BLACK = "black",
4
- TRANSPARENT = "transparent",
5
- CURRENT = "current",
6
-
7
- PRIMARY = "primary",
8
- PRIMARY_300 = "primary-300",
9
- PRIMARY_400 = "primary-400",
10
- PRIMARY_500 = "primary-500",
11
- PRIMARY_600 = "primary-600",
12
- PRIMARY_700 = "primary-700",
13
-
14
- PRIMARY_ALT = "primary-alt",
15
- PRIMARY_ALT_300 = "primary-alt-300",
16
- PRIMARY_ALT_400 = "primary-alt-400",
17
- PRIMARY_ALT_500 = "primary-alt-500",
18
- PRIMARY_ALT_600 = "primary-alt-600",
19
- PRIMARY_ALT_700 = "primary-alt-700",
20
-
21
- SECONDARY = "secondary",
22
- SECONDARY_300 = "secondary-300",
23
- SECONDARY_400 = "secondary-400",
24
- SECONDARY_500 = "secondary-500",
25
- SECONDARY_600 = "secondary-600",
26
- SECONDARY_700 = "secondary-700",
27
-
28
- WARNING = "warning",
29
- WARNING_300 = "warning-300",
30
- WARNING_400 = "warning-400",
31
- WARNING_500 = "warning-500",
32
- WARNING_600 = "warning-600",
33
- WARNING_700 = "warning-700",
34
-
35
- ERROR = "error",
36
- ERROR_300 = "error-300",
37
- ERROR_400 = "error-400",
38
- ERROR_500 = "error-500",
39
- ERROR_600 = "error-600",
40
- ERROR_700 = "error-700",
41
-
42
- ACCENT = "accent",
43
- ACCENT_300 = "accent-300",
44
- ACCENT_500 = "accent-500",
45
- ACCENT_600 = "accent-600",
46
- ACCENT_700 = "accent-700",
47
-
48
- ACCENT_ALT = "accent-alt",
49
- ACCENT_ALT_500 = "accent-alt-500",
50
-
51
- SECONDARY_ALT = "secondary-alt",
52
- SECONDARY_ALT_200 = "secondary-alt-200",
53
- SECONDARY_ALT_300 = "secondary-alt-300",
54
- SECONDARY_ALT_400 = "secondary-alt-400",
55
- SECONDARY_ALT_500 = "secondary-alt-500",
56
- SECONDARY_ALT_600 = "secondary-alt-600",
57
- SECONDARY_ALT_700 = "secondary-alt-700",
2
+ WHITE = "--color-white",
3
+ BLACK = "--color-black",
4
+ TRANSPARENT = "--color-transparent",
5
+ CURRENT = "--color-current",
6
+
7
+ PRIMARY = "--color-primary",
8
+ PRIMARY_300 = "--color-primary-300",
9
+ PRIMARY_400 = "--color-primary-400",
10
+ PRIMARY_500 = "--color-primary-500",
11
+ PRIMARY_600 = "--color-primary-600",
12
+ PRIMARY_700 = "--color-primary-700",
13
+
14
+ PRIMARY_ALT = "--color-primary-alt",
15
+ PRIMARY_ALT_300 = "--color-primary-alt-300",
16
+ PRIMARY_ALT_400 = "--color-primary-alt-400",
17
+ PRIMARY_ALT_500 = "--color-primary-alt-500",
18
+ PRIMARY_ALT_600 = "--color-primary-alt-600",
19
+ PRIMARY_ALT_700 = "--color-primary-alt-700",
20
+
21
+ SECONDARY = "--color-secondary",
22
+ SECONDARY_300 = "--color-secondary-300",
23
+ SECONDARY_400 = "--color-secondary-400",
24
+ SECONDARY_500 = "--color-secondary-500",
25
+ SECONDARY_600 = "--color-secondary-600",
26
+ SECONDARY_700 = "--color-secondary-700",
27
+
28
+ WARNING = "--color-warning",
29
+ WARNING_300 = "--color-warning-300",
30
+ WARNING_400 = "--color-warning-400",
31
+ WARNING_500 = "--color-warning-500",
32
+ WARNING_600 = "--color-warning-600",
33
+ WARNING_700 = "--color-warning-700",
34
+
35
+ ERROR = "--color-error",
36
+ ERROR_300 = "--color-error-300",
37
+ ERROR_400 = "--color-error-400",
38
+ ERROR_500 = "--color-error-500",
39
+ ERROR_600 = "--color-error-600",
40
+ ERROR_700 = "--color-error-700",
41
+
42
+ ACCENT = "--color-accent",
43
+ ACCENT_300 = "--color-accent-300",
44
+ ACCENT_500 = "--color-accent-500",
45
+ ACCENT_600 = "--color-accent-600",
46
+ ACCENT_700 = "--color-accent-700",
47
+
48
+ ACCENT_ALT = "--color-accent-alt",
49
+ ACCENT_ALT_500 = "--color-accent-alt-500",
50
+
51
+ SECONDARY_ALT = "--color-secondary-alt",
52
+ SECONDARY_ALT_200 = "--color-secondary-alt-200",
53
+ SECONDARY_ALT_300 = "--color-secondary-alt-300",
54
+ SECONDARY_ALT_400 = "--color-secondary-alt-400",
55
+ SECONDARY_ALT_500 = "--color-secondary-alt-500",
56
+ SECONDARY_ALT_600 = "--color-secondary-alt-600",
57
+ SECONDARY_ALT_700 = "--color-secondary-alt-700",
58
58
  }
@@ -3,11 +3,11 @@ export enum EListItemTypes {
3
3
  PROGRESS = "PROGRESS"
4
4
  }
5
5
  export enum EListItemSpacing {
6
- DEFAULT = "DEFAULT",
6
+ DEFAULT = "DEFAULT",
7
7
  COMPACT = "COMPACT"
8
8
  }
9
9
 
10
10
  export enum EListItemSize {
11
- SM = "SM",
11
+ SM = "SM",
12
12
  MD = "MD"
13
13
  }
@@ -1,4 +1,4 @@
1
1
  export enum EOrderCardTypes {
2
- DEFAULT = "DEFAULT",
3
- WARNING = "WARNING"
2
+ DEFAULT = "DEFAULT",
3
+ WARNING = "WARNING"
4
4
  }
@@ -0,0 +1 @@
1
+ export { default } from "./ui-radio-compact.vue";
@@ -0,0 +1,51 @@
1
+ import UiRadioCompact from "../ui-radio-compact";
2
+ import UiTypography, { ETypographySizes, ETextAlign } from "../ui-typography";
3
+ import { ref } from "vue";
4
+ import type { Meta } from "@storybook/vue3";
5
+
6
+ const meta: Meta<typeof UiRadioCompact> = {
7
+ title: "Components/ui-radio-compact",
8
+ component: UiRadioCompact,
9
+ argTypes: {}
10
+ };
11
+
12
+ export default meta;
13
+
14
+ export const Default = {
15
+ args: {
16
+ default: "1"
17
+ },
18
+ render: (args) => ({
19
+ components: {
20
+ UiRadioCompact,
21
+ UiTypography
22
+ },
23
+ setup() {
24
+ const modelValue = ref("1");
25
+ return {
26
+ args,
27
+ ETypographySizes,
28
+ ETextAlign,
29
+ modelValue
30
+ };
31
+ },
32
+ template: /*html*/`
33
+ <div class="flex flex-row gap-sm align-middle" :style="{}">
34
+ <ui-radio-compact v-for="item in 8"
35
+ :key="item"
36
+ :value="String(item)"
37
+ v-model="modelValue"
38
+ name="radio" title="title"
39
+
40
+ >
41
+ {{item}}
42
+ </ui-radio-compact>
43
+
44
+ </div>
45
+ `,
46
+ args: {
47
+ default: "1"
48
+ },
49
+ }),
50
+
51
+ };
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <label
3
+ class="
4
+ ui-radio-compact
5
+ relative
6
+ "
7
+ >
8
+ <input
9
+ v-model="radioModel"
10
+ type="radio"
11
+ :name="name"
12
+ :value="value"
13
+ class="group peer absolute appearance-none"
14
+ :disabled="disabled"
15
+ >
16
+ <div
17
+ class="
18
+ ui-radio-compact_content
19
+ box-border
20
+ grid
21
+ cursor-pointer
22
+ items-center
23
+ justify-items-center
24
+ rounded-xl
25
+ border
26
+ border-secondary-alt-500
27
+ bg-white
28
+ before:absolute
29
+ before:-z-10
30
+ before:box-border
31
+ before:rounded-[16px]
32
+
33
+ before:bg-primary-300
34
+ hover:border-secondary-alt-700
35
+ peer-checked:border-transparent
36
+ peer-checked:shadow-selected-shadow
37
+ peer-checked:hover:shadow-border-selected
38
+
39
+ peer-checked:active:shadow-border-primary
40
+ peer-checked:active:before:-bottom-xs
41
+ peer-checked:active:before:-left-xs
42
+ peer-checked:active:before:-right-xs
43
+ peer-checked:active:before:-top-xs
44
+ peer-focus:before:-bottom-xs
45
+
46
+ peer-focus:before:-left-xs
47
+ peer-focus:before:-right-xs
48
+
49
+ peer-focus:before:-top-xs
50
+ peer-active:before:-bottom-xxs
51
+ peer-active:before:-left-xxs
52
+ peer-active:before:-right-xxs
53
+
54
+ peer-active:before:-top-xxs
55
+ "
56
+ >
57
+
58
+ <ui-typography
59
+ class="px-md py-sm"
60
+ :size="ETypographySizes.MD"
61
+ line-height
62
+ :align="ETextAlign.CENTER"
63
+ >
64
+ <slot />
65
+ </ui-typography>
66
+
67
+ </div>
68
+ </label>
69
+ </template>
70
+
71
+ <script lang="ts" setup>
72
+ import { computed } from "vue";
73
+ import UiTypography, { ETypographySizes, ETextAlign } from "../ui-typography";
74
+
75
+ const props = defineProps<{
76
+ modelValue: string | number | boolean;
77
+ name: string;
78
+ value: string | number | boolean;
79
+ disabled?: boolean;
80
+ }>();
81
+
82
+ const emit = defineEmits(["update:modelValue"]);
83
+
84
+ const radioModel = computed({
85
+ get() {
86
+ return props.modelValue;
87
+ },
88
+ set(value) {
89
+ emit("update:modelValue", value);
90
+ }
91
+ });
92
+ </script>
@@ -1,8 +1,8 @@
1
1
  export enum EResultCardRangeSizes {
2
- DEFAULT = "DEFAULT",
2
+ DEFAULT = "DEFAULT",
3
3
  }
4
4
 
5
5
  export enum EResultCardRangeTypes {
6
- DEFAULT = "DEFAULT",
7
- FULL = "FULL",
6
+ DEFAULT = "DEFAULT",
7
+ FULL = "FULL",
8
8
  }
@@ -0,0 +1,4 @@
1
+ export enum ESkeletonKind {
2
+ RESULT_CARD = "RESULT_CARD",
3
+ FILTER_MENU = "FILTER_MENU"
4
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./ui-skeleton.vue";
@@ -0,0 +1,42 @@
1
+ import UiSkeleton from "../ui-skeleton";
2
+ import type { Meta } from "@storybook/vue3";
3
+ import { ESkeletonKind } from "./_typings";
4
+
5
+ export default {
6
+ title: "Components/ui-skeleton",
7
+ component: UiSkeleton,
8
+ argTypes: {
9
+ kind: {
10
+ control: {
11
+ type: "select"
12
+ },
13
+ options: Object.values(ESkeletonKind),
14
+ description: "The skeleton kind",
15
+ }
16
+ },
17
+ args: {
18
+ kind: ESkeletonKind.RESULT_CARD
19
+ },
20
+ render: (args) => ({
21
+ components: {
22
+ UiSkeleton
23
+ },
24
+ setup() {
25
+ return {
26
+ args
27
+ };
28
+ },
29
+ template: /*html*/`
30
+ <ui-skeleton :kind="args.kind" />
31
+ `,
32
+ args: {
33
+ kind: ESkeletonKind.RESULT_CARD
34
+ },
35
+ })
36
+ } satisfies Meta<typeof UiSkeleton>;
37
+
38
+ export const Default = {
39
+ args: {
40
+ kind: ESkeletonKind.RESULT_CARD
41
+ }
42
+ };
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <div
3
+ v-if="props.kind === ESkeletonKind.RESULT_CARD"
4
+ class="ui-skeleton-card animate-pulse rounded-2xl border-2 border-secondary-alt-300 p-xs"
5
+ >
6
+ <div
7
+ class="ui-skeleton-card__header flex items-center
8
+ justify-between rounded-lg bg-secondary-alt-200 p-xs"
9
+ >
10
+ <div class="flex w-full flex-col items-start">
11
+ <div class="ui-skeleton-card__content__text my-xs h-md w-full rounded-md bg-secondary-alt-300" />
12
+ <div class="ui-skeleton-card__content__text h-md w-5/6 rounded-md bg-secondary-alt-300" />
13
+ </div>
14
+ <div class="ui-skeleton-card__header__image my-xxs ml-sm h-xl w-xxl rounded-xl bg-secondary-alt-300" />
15
+ </div>
16
+
17
+ <div class="ui-skeleton-card__content flex flex-col items-start justify-start rounded-lg pt-sm">
18
+ <div
19
+ v-for="i in ['w-1/2', 'w-1/3', 'w-2/3', 'w-3/4']"
20
+ :key="i"
21
+ :class="`${i}`"
22
+ class="ui-skeleton-card__content__text mb-xs h-md rounded-md bg-secondary-alt-300"
23
+ />
24
+ </div>
25
+
26
+ <div class="ui-skeleton-card__footer flex flex-row justify-between">
27
+ <div class="ui-skeleton-card__footer__text h-md w-1/4 self-end rounded-lg bg-secondary-alt-300" />
28
+ <div class="ui-skeleton-card__footer__text h-lg w-1/4 rounded-lg bg-secondary-alt-300" />
29
+ </div>
30
+
31
+ <div
32
+ class="ui-skeleton-card__button mt-xs flex h-md w-full items-center
33
+ justify-center rounded-lg bg-secondary-alt-300 py-md"
34
+ />
35
+ </div>
36
+ <div
37
+ v-else
38
+ class="ui-skeleton-menu mb-sm flex animate-pulse flex-row items-center justify-between"
39
+ >
40
+ <div class="ui-skeleton-menu__result-count h-sm w-full max-w-xxl rounded-md bg-secondary-alt-300" />
41
+ <div class="ui-skeleton-menu__filters relative flex h-lg w-xxl flex-row gap-x-sm">
42
+ <div
43
+ v-for="i in 2"
44
+ :key="i"
45
+ class="ui-skeleton-menu__filters__item relative w-xl rounded-md bg-secondary-alt-300"
46
+ />
47
+ </div>
48
+ </div>
49
+ </template>
50
+
51
+ <script lang="ts" setup>
52
+ import { ESkeletonKind } from "./_typings";
53
+
54
+ const props = withDefaults(
55
+ defineProps<{
56
+ kind?: ESkeletonKind
57
+ }>(),
58
+ {
59
+ kind: ESkeletonKind.RESULT_CARD,
60
+ });
61
+ </script>
@@ -54,7 +54,7 @@
54
54
 
55
55
  <slot name="title">
56
56
  <ui-typography
57
- :size="ETypographySizes.SM"
57
+ :size="ETypographySizes.MD"
58
58
  class="w-full"
59
59
  line-height
60
60
  >
@@ -18,6 +18,12 @@ module.exports = {
18
18
  minWidth: (theme) => ({
19
19
  ...theme("spacing"),
20
20
  }),
21
+ maxHeight: (theme) => ({
22
+ ...theme("spacing"),
23
+ }),
24
+ maxWidth: (theme) => ({
25
+ ...theme("spacing"),
26
+ }),
21
27
  },
22
28
  },
23
29
  plugins: [],