bonkers-ui 1.0.60 → 1.0.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonkers-ui",
3
- "version": "v1.0.60",
3
+ "version": "v1.0.61",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "storybook": "storybook dev -p 6006",
@@ -22,31 +22,31 @@
22
22
  "eslint-plugin-tailwindcss": "^3.13.0",
23
23
  "storybook-addon-designs": "^6.3.1",
24
24
  "vue": "^3.3.4",
25
- "vue-router": "^4.2.4"
25
+ "vue-router": "^4.2.5"
26
26
  },
27
27
  "devDependencies": {
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",
28
+ "@storybook/addon-essentials": "^7.4.5",
29
+ "@storybook/addon-links": "^7.4.5",
30
+ "@storybook/addon-mdx-gfm": "^7.4.5",
31
+ "@storybook/vue3": "^7.4.5",
32
+ "@storybook/vue3-vite": "^7.4.5",
33
33
  "@typescript-eslint/eslint-plugin": "^5.59.9",
34
34
  "@typescript-eslint/parser": "^5.59.9",
35
- "@vitejs/plugin-vue": "^4.3.3",
36
- "@vue/eslint-config-typescript": "^11.0.3",
35
+ "@vitejs/plugin-vue": "^4.3.4",
36
+ "@vue/eslint-config-typescript": "^12.0.0",
37
37
  "@vue/test-utils": "^2.4.1",
38
- "eslint": "8.47.0",
39
- "eslint-plugin-storybook": "^0.6.13",
38
+ "eslint": "8.50.0",
39
+ "eslint-plugin-storybook": "^0.6.14",
40
40
  "eslint-plugin-vue": "^9.17.0",
41
41
  "gh-pages": "^6.0.0",
42
42
  "husky": "4.3.8",
43
43
  "jsdom": "^22.1.0",
44
44
  "lint-staged": "^14.0.1",
45
- "postcss": "^8.4.28",
45
+ "postcss": "^8.4.30",
46
46
  "postcss-html": "^1.4.1",
47
47
  "react": "^18.2.0",
48
48
  "react-dom": "^18.2.0",
49
- "storybook": "^7.3.2",
49
+ "storybook": "^7.4.5",
50
50
  "storybook-tailwind-dark-mode": "^1.0.22",
51
51
  "stylelint": "^15.10.3",
52
52
  "stylelint-config-recommended": "^13.0.0",
@@ -54,12 +54,12 @@
54
54
  "stylelint-config-standard": "^34.0.0",
55
55
  "tailwindcss": "^3.3.3",
56
56
  "ts-node": "^10.9.1",
57
- "typescript": "^5.1.6",
57
+ "typescript": "^5.2.2",
58
58
  "vite": "^4.4.9",
59
- "vitest": "^0.34.2",
59
+ "vitest": "^0.34.5",
60
60
  "vue-eslint-parser": "^9.3.1",
61
61
  "vue-loader": "^17.2.2",
62
- "vue-tsc": "^1.8.8"
62
+ "vue-tsc": "^1.8.13"
63
63
  },
64
64
  "resolutions": {
65
65
  "strip-ansi": "^6.0.1",
@@ -1,53 +1,20 @@
1
+ import { ICON_DEFAULT } from "../../CONSTANTS";
1
2
  import UiCardCta from "../ui-card-cta";
2
- import type { Story } from "@storybook/vue3";
3
+ import type { Meta } from "@storybook/vue3";
3
4
 
4
5
  export default {
5
6
  title: "Components/ui-card-cta",
6
7
  component: UiCardCta,
7
8
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
- argTypes: {
9
- invertOrder: {
10
- control: {
11
- type: "boolean"
12
- },
13
- description: "The Element order",
14
- },
15
- disabled: {
16
- control: {
17
- type: "boolean"
18
- },
19
- description: "The full width size",
20
- },
21
- },
9
+ } satisfies Meta<typeof UiCardCta>;
10
+
11
+ export const Default = {
22
12
  args: {
13
+ iconName: ICON_DEFAULT,
23
14
  slot: "Description",
24
15
  invertOrder: false,
25
- disabled: false
16
+ disabled: false,
17
+ title: "Title",
18
+ description: "Description"
26
19
  },
27
20
  };
28
-
29
- type TComponentProps = InstanceType<typeof UiCardCta>["$props"];
30
-
31
- const Template: Story<TComponentProps> = (args) => ({
32
- components: {
33
- UiCardCta
34
- },
35
- setup() {
36
- return {
37
- args
38
- };
39
- },
40
- template: /*html*/ `
41
- <ui-card-cta v-bind="args" :icon-name="['far', 'face-smile']">
42
- <template #title>
43
- Title
44
- </template>
45
-
46
- <template #description>
47
- {{args.slot}}
48
- </template>
49
- </ui-card-cta>
50
- `
51
- });
52
-
53
- export const Default = Template.bind({});
@@ -2,12 +2,14 @@
2
2
  <button
3
3
  class="
4
4
  ui-card-cta
5
+ group
5
6
  w-full
6
7
  rounded-2xl
7
8
  border
8
9
  border-secondary-alt-500
9
10
  bg-white
10
11
  p-sm
12
+ text-left
11
13
  shadow-md
12
14
  outline-0
13
15
  hover:border-secondary-700
@@ -18,12 +20,13 @@
18
20
  :disabled="disabled"
19
21
  >
20
22
  <span
21
- class="ui-card-cta__wrapper grid w-full items-center gap-sm"
22
- :class="[
23
- invertOrder && 'ui-card-cta_inverted',
24
- ]"
23
+ class="group-disabled:opcity-50 grid w-full items-center gap-sm"
24
+ :class="{
25
+ 'grid-cols-[auto,1fr]': !invertOrder,
26
+ 'grid-cols-[1fr,auto]': invertOrder,
27
+ }"
25
28
  >
26
- <slot name="icon">
29
+ <slot name="iconSlot">
27
30
  <ui-icon-wrapper>
28
31
  <ui-icon
29
32
  v-if="iconName"
@@ -34,25 +37,28 @@
34
37
  </ui-icon-wrapper>
35
38
  </slot>
36
39
  <span
37
- v-if="$slots.title && $slots.description"
38
40
  class="w-full"
39
41
  :class="invertOrder && 'order-first'"
40
42
  >
41
- <ui-typography
42
- :kind="EColors.SECONDARY_400"
43
- class="mb-xxs"
44
- line-height
45
- >
46
- <slot name="title" />
47
- </ui-typography>
43
+ <slot name="titleSlot">
44
+ <ui-typography
45
+ :kind="EColors.SECONDARY_400"
46
+ class="mb-xxs"
47
+ line-height
48
+ >
49
+ {{ title }}
50
+ </ui-typography>
51
+ </slot>
48
52
 
49
- <ui-typography
50
- :kind="EColors.SECONDARY_300"
51
- :size="ETypographySizes.SM"
52
- line-height
53
- >
54
- <slot name="description" />
55
- </ui-typography>
53
+ <slot name="descriptionSlot">
54
+ <ui-typography
55
+ :kind="EColors.SECONDARY_300"
56
+ :size="ETypographySizes.SM"
57
+ line-height
58
+ >
59
+ {{ description }}
60
+ </ui-typography>
61
+ </slot>
56
62
  </span>
57
63
  </span>
58
64
  </button>
@@ -70,25 +76,8 @@
70
76
  defineProps<{
71
77
  invertOrder?: boolean;
72
78
  disabled?: boolean;
73
- iconName?: TIconName
79
+ iconName?: TIconName;
80
+ title?: string;
81
+ description?: string;
74
82
  }>();
75
-
76
83
  </script>
77
-
78
- <style scoped>
79
- .ui-card-cta {
80
- text-align: unset;
81
- }
82
-
83
- .ui-card-cta__wrapper {
84
- grid-template-columns: auto 1fr;
85
- }
86
-
87
- .ui-card-cta:disabled .ui-card-cta__wrapper {
88
- opacity: 0.5;
89
- }
90
-
91
- .ui-card-cta_inverted {
92
- grid-template-columns: 1fr auto;
93
- }
94
- </style>
@@ -2,7 +2,7 @@ import type { Story } from "@storybook/vue3";
2
2
  import UiInput from "./ui-input.vue";
3
3
  import Icon from "../../_samples/icon.vue";
4
4
  import { ref } from "vue";
5
- import { EInputKinds, EInputType } from "./_typings";
5
+ import { EInputKinds, EInputType, EAutocomplete } from "./_typings";
6
6
 
7
7
  export default {
8
8
  title: "Components/ui-input",
@@ -11,36 +11,44 @@ export default {
11
11
  argTypes: {
12
12
  placeholder: {
13
13
  control: {
14
- type: "text"
14
+ type: "text"
15
15
  },
16
16
  description: "Placeholder",
17
17
  },
18
18
  kind: {
19
19
  control: {
20
- type: "select"
20
+ type: "select"
21
21
  },
22
22
  options: Object.values(EInputKinds),
23
23
  description: "The input kinds",
24
24
  },
25
25
  type: {
26
26
  control: {
27
- type: "select"
27
+ type: "select"
28
28
  },
29
29
  options: Object.values(EInputType),
30
30
  description: "The input type",
31
31
  },
32
32
  disabled: {
33
33
  control: {
34
- type: "boolean"
34
+ type: "boolean"
35
35
  },
36
36
  description: "The Element disabled state",
37
37
  },
38
+ autocomplete: {
39
+ control: {
40
+ type: "select"
41
+ },
42
+ option: Object.values(EAutocomplete),
43
+ description: "The Element autocomplete state",
44
+ }
38
45
  },
39
46
  args: {
40
47
  placeholder: "Placeholder",
41
48
  kind: undefined,
42
49
  disabled: false,
43
- type: EInputType.TEXT
50
+ type: EInputType.TEXT,
51
+ autocomplete: EAutocomplete.OFF
44
52
  }
45
53
  };
46
54
 
@@ -8,7 +8,7 @@ export default {
8
8
  argTypes: {
9
9
  disabled: {
10
10
  control: {
11
- type: "boolean"
11
+ type: "boolean"
12
12
  },
13
13
  description: "The Element disabled state",
14
14
  }
@@ -22,7 +22,7 @@ type TComponentProps = InstanceType<typeof UiSelect>["$props"];
22
22
 
23
23
  const Template: Story<TComponentProps> = (args) => ({
24
24
  components: {
25
- UiSelect
25
+ UiSelect
26
26
  },
27
27
  setup() {
28
28
  const list = ["Option 1", "Option 2", "Option 3"];
@@ -30,17 +30,11 @@ const Template: Story<TComponentProps> = (args) => ({
30
30
  return {
31
31
  args,
32
32
  valueModel,
33
- list
33
+ list
34
34
  };
35
35
  },
36
36
  template: /*html*/`
37
37
  <ui-select v-bind="args" v-model="valueModel" heading="Heading" subLabel="Sub Label">
38
- <template #postfix-icon>
39
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
40
- <path d="M13.25 6.8125L8.5 11.2812C8.34375 11.4375 8.15625 11.5 8 11.5C7.8125 11.5 7.625 11.4375 7.46875 11.3125L2.71875 6.8125C2.40625 6.53125 2.40625 6.0625 2.6875 5.75C2.96875 5.4375 3.4375 5.4375 3.75 5.71875L8 9.71875L12.2188 5.71875C12.5312 5.4375 13 5.4375 13.2812 5.75C13.5625 6.0625 13.5625 6.53125 13.25 6.8125Z" fill="currentColor"/>
41
- </svg>
42
- </template>
43
-
44
38
  <option
45
39
  v-for="item in list"
46
40
  :key="item"
@@ -32,7 +32,20 @@
32
32
  </select>
33
33
 
34
34
  <div class="absolute right-sm top-1/2 -translate-y-1/2">
35
- <slot name="postfix-icon" />
35
+ <slot name="postfix-icon">
36
+ <svg
37
+ width="16"
38
+ height="16"
39
+ viewBox="0 0 16 16"
40
+ fill="none"
41
+ xmlns="http://www.w3.org/2000/svg"
42
+ >
43
+ <path
44
+ d="M13.25 6.8125L8.5 11.2812C8.34375 11.4375 8.15625 11.5 8 11.5C7.8125 11.5 7.625 11.4375 7.46875 11.3125L2.71875 6.8125C2.40625 6.53125 2.40625 6.0625 2.6875 5.75C2.96875 5.4375 3.4375 5.4375 3.75 5.71875L8 9.71875L12.2188 5.71875C12.5312 5.4375 13 5.4375 13.2812 5.75C13.5625 6.0625 13.5625 6.53125 13.25 6.8125Z"
45
+ fill="currentColor"
46
+ />
47
+ </svg>
48
+ </slot>
36
49
  </div>
37
50
  </div>
38
51
  <slot name="subLabel">
@@ -93,6 +93,7 @@
93
93
  </template>
94
94
 
95
95
  <script lang="ts" setup>
96
+ import type { Component } from "vue";
96
97
  import { ETextAlign, ETextTransform, ETextWeight, ETypographySizes } from "./_typings";
97
98
  import { EColors } from "../../_types/colors";
98
99
 
@@ -104,6 +105,6 @@
104
105
  lineHeight?: boolean;
105
106
  textTransform?: ETextTransform;
106
107
  underline?: boolean;
107
- is?: string;
108
+ is?: string | Component;
108
109
  }>();
109
110
  </script>