bonkers-ui 1.0.8 → 1.0.9

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": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "scripts": {
5
5
  "storybook": "start-storybook -p 6006",
6
6
  "build-storybook": "build-storybook",
@@ -10,6 +10,7 @@ export enum EButtonTypes {
10
10
  LINK = "link",
11
11
  }
12
12
  export enum EButtonSizes {
13
+ DEFAULT = "default",
13
14
  SMALL = "sm",
14
15
  MEDIUM = "md",
15
16
  LARGE = "lg"
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <button
3
- class="ui-button justify-center grid text-base rounded-lg whitespace-nowrap font-bold leading-none touch-manipulation"
3
+ class="ui-button justify-center grid text-base rounded-lg whitespace-nowrap font-bold leading-none touch-manipulation items-center"
4
4
  :disabled="disabled"
5
5
  :class="[
6
6
  (!kind || kind === EButtonTypes.PRIMARY) && [primaryColor, primaryColorHover, primaryColorActive].join(' '),
@@ -16,8 +16,9 @@
16
16
  kind === EButtonTypes.ERROR_OVERLAY
17
17
  && 'text-error border border-error hover:bg-error-600 hover:border-transparent hover:text-white active:bg-error-700 active:border-transparent active:text-white disabled:text-error-300 disabled:border-error-300',
18
18
  kind === EButtonTypes.LINK && 'text-accent-alt hover:text-accent-alt-600 active:text-accent-alt-700 disabled:text-accent-alt-300',
19
- (!size || size === EButtonSizes.MEDIUM) && 'py-sm px-md',
19
+ (!size || size === EButtonSizes.DEFAULT) && 'py-sm px-md',
20
20
  size === EButtonSizes.SMALL && 'py-xs px-md',
21
+ size === EButtonSizes.MEDIUM && 'py-xs px-xs',
21
22
  size === EButtonSizes.LARGE && 'py-md px-md',
22
23
  fullWidth && 'w-full',
23
24
  disabled && 'pointer-events-none',
@@ -18,10 +18,6 @@ export default {
18
18
  options: Object.values(EInputTypes),
19
19
  description: "The input kinds",
20
20
  },
21
- fullWidth: {
22
- control: { type: "boolean" },
23
- description: "The full width size",
24
- },
25
21
  disabled: {
26
22
  control: { type: "boolean" },
27
23
  description: "The Element disabled state",
@@ -29,7 +25,6 @@ export default {
29
25
  },
30
26
  args: {
31
27
  placeholder: "Placeholder",
32
- fullWidth: false,
33
28
  kind: undefined,
34
29
  disabled: false,
35
30
  }
@@ -8,30 +8,26 @@
8
8
  {{ heading }}
9
9
  </ui-typography>
10
10
  <div
11
- class="ui-input__wrapper grid rounded-lg border bg-white max-w-xs items-center p-sm gap-xs"
11
+ class="ui-input__wrapper flex w-full rounded-lg border bg-white items-center p-sm gap-xs"
12
12
  :class="[
13
13
  !kind && 'border-secondary-alt-500 hover:border-secondary-alt-700',
14
14
  kind === EInputTypes.PRIMARY && 'border-primary',
15
15
  kind === EInputTypes.ERROR && 'border-error',
16
16
 
17
17
  disabled && 'border-secondary-alt-300 bg-secondary-alt-200',
18
-
19
- fullWidth && 'max-w-full',
20
18
  ]"
21
19
  >
22
- <div class="icon-wrapper">
23
- <slot name="prefix-icon" />
24
- </div>
20
+ <slot name="prefix-icon" />
21
+
25
22
  <input
26
- class="bg-transparent border-0 outline-none"
23
+ class="bg-transparent border-0 outline-none w-full"
27
24
  type="text"
28
25
  :placeholder="placeholder"
29
26
  :value="modelValue"
30
27
  @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement)?.value)"
31
28
  >
32
- <div class="icon-wrapper">
33
- <slot name="postfix-icon" />
34
- </div>
29
+
30
+ <slot name="postfix-icon" />
35
31
  </div>
36
32
  <ui-typography
37
33
  v-if="subLabel"
@@ -51,7 +47,6 @@
51
47
  placeholder?: string;
52
48
  modelValue: string;
53
49
  disabled?: boolean;
54
- fullWidth?: boolean;
55
50
  kind?: EInputTypes;
56
51
  heading?: string;
57
52
  subLabel?: string;
@@ -61,10 +56,6 @@
61
56
  </script>
62
57
 
63
58
  <style scoped>
64
- .ui-input__wrapper {
65
- grid-template-columns: auto 1fr auto;
66
- }
67
-
68
59
  .ui-input__wrapper input::placeholder {
69
60
  color: var(--color-secondary-alt-500);
70
61
  font-style: italic;
@@ -10,6 +10,10 @@ export default {
10
10
  control: { type: "boolean" },
11
11
  description: "The Element disabled state",
12
12
  },
13
+ alignCenter: {
14
+ control: { type: "boolean" },
15
+ description: "The Elements center align state",
16
+ },
13
17
  invertOrder: {
14
18
  control: { type: "boolean" },
15
19
  description: "The Element order state",
@@ -19,6 +23,7 @@ export default {
19
23
  slot: "default text",
20
24
  disabled: false,
21
25
  invertOrder: false,
26
+ alignCenter: false,
22
27
  },
23
28
  };
24
29
 
@@ -14,9 +14,12 @@
14
14
  :class="[
15
15
  disabled && 'pointer-events-none ui-toggle_disabled',
16
16
  invertOrder && 'flex-row-reverse',
17
+ alignCenter && 'items-center'
17
18
  ]"
18
19
  >
19
- <span class="ui-input__input-wrapper block relative h-md">
20
+ <span
21
+ class="ui-input__input-wrapper block relative h-md"
22
+ >
20
23
  <input
21
24
  type="checkbox"
22
25
  class="appearance-none absolute w-0 h-0 border-0"
@@ -64,6 +67,7 @@
64
67
  modelValue: boolean;
65
68
  disabled?: boolean;
66
69
  invertOrder?: boolean;
70
+ alignCenter?: boolean;
67
71
  }>();
68
72
 
69
73
  defineEmits<{