bonkers-ui 1.0.51 → 1.0.53
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/README.md +2 -1
- package/package.json +23 -23
- package/src/components/ui-badge/ui-badge.stories.ts +6 -1
- package/src/components/ui-badge/ui-badge.vue +41 -23
- package/src/components/ui-card-cta/ui-card-cta.vue +4 -5
- package/src/components/ui-card-result/ui-card-result.stories.ts +69 -25
- package/src/components/ui-card-result/ui-card-result.vue +5 -4
- package/src/components/ui-input/_typings.ts +2 -1
- package/src/components/ui-input/ui-input.vue +4 -0
- package/src/components/ui-input-range/ui-input-range.stories.ts +4 -2
- package/src/components/ui-input-range/ui-input-range.vue +5 -8
- package/src/components/ui-list-item/ui-list-item.stories.ts +3 -3
- package/src/components/ui-list-item/ui-list-item.vue +16 -9
- package/src/components/ui-modal/ui-modal.vue +2 -1
- package/src/components/ui-radio-fancy/ui-radio-fancy.vue +1 -1
- package/src/components/ui-toggle/ui-toggle.vue +4 -1
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Vue 3 + TypeScript + Vite
|
|
2
|
+
## [LINK](https://bonkers-ie.github.io/bonkers-ui/?path=/docs/example-introduction--docs)
|
|
2
3
|
|
|
3
4
|
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
5
|
|
|
@@ -28,7 +29,7 @@ This template should help get you started developing with Vue 3 and TypeScript i
|
|
|
28
29
|
- After you ready to push just `merge`(not `rebase`) develop to current branch
|
|
29
30
|
- Fix merge conflicts if you have
|
|
30
31
|
- Next create pull request to develop (you can do squash when merging)
|
|
31
|
-
- After pull request is merged to develop you can see it in staging [https://bonkers-ie.github.io/bonkers-ui](https://bonkers-ie.github.io/bonkers-ui/?path=/
|
|
32
|
+
- After pull request is merged to develop you can see it in staging [https://bonkers-ie.github.io/bonkers-ui](https://bonkers-ie.github.io/bonkers-ui/?path=/docs/example-introduction--docs)
|
|
32
33
|
- Only after test staging you can create merge request from `develop` to `master`
|
|
33
34
|
- After merge to master patch version will up x.x.^x and you can use this version in package
|
|
34
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bonkers-ui",
|
|
3
|
-
"version": "v1.0.
|
|
3
|
+
"version": "v1.0.53",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"storybook": "storybook dev -p 6006",
|
|
@@ -20,45 +20,45 @@
|
|
|
20
20
|
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
21
21
|
"@fortawesome/vue-fontawesome": "^3.0.3",
|
|
22
22
|
"storybook-addon-designs": "^6.3.1",
|
|
23
|
-
"vue": "^3.
|
|
24
|
-
"vue-router": "^4.
|
|
23
|
+
"vue": "^3.3.4",
|
|
24
|
+
"vue-router": "^4.2.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@storybook/addon-essentials": "^7.0.
|
|
28
|
-
"@storybook/addon-links": "^7.0.
|
|
29
|
-
"@storybook/addon-mdx-gfm": "^7.0.
|
|
30
|
-
"@storybook/vue3": "^7.0.
|
|
31
|
-
"@storybook/vue3-vite": "^7.0.
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
33
|
-
"@typescript-eslint/parser": "^5.59.
|
|
34
|
-
"@vitejs/plugin-vue": "^4.2.
|
|
27
|
+
"@storybook/addon-essentials": "^7.0.20",
|
|
28
|
+
"@storybook/addon-links": "^7.0.20",
|
|
29
|
+
"@storybook/addon-mdx-gfm": "^7.0.20",
|
|
30
|
+
"@storybook/vue3": "^7.0.20",
|
|
31
|
+
"@storybook/vue3-vite": "^7.0.20",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
33
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
34
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
35
35
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
36
36
|
"@vue/test-utils": "^2.3.2",
|
|
37
|
-
"eslint": "8.
|
|
37
|
+
"eslint": "8.42.0",
|
|
38
38
|
"eslint-plugin-storybook": "^0.6.12",
|
|
39
|
-
"eslint-plugin-vue": "^9.
|
|
39
|
+
"eslint-plugin-vue": "^9.14.1",
|
|
40
40
|
"gh-pages": "^5.0.0",
|
|
41
41
|
"husky": "4.3.8",
|
|
42
|
-
"jsdom": "^22.
|
|
42
|
+
"jsdom": "^22.1.0",
|
|
43
43
|
"lint-staged": "^13.2.2",
|
|
44
|
-
"postcss": "^8.4.
|
|
44
|
+
"postcss": "^8.4.24",
|
|
45
45
|
"postcss-html": "^1.4.1",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-dom": "^18.2.0",
|
|
48
|
-
"storybook": "^7.0.
|
|
48
|
+
"storybook": "^7.0.20",
|
|
49
49
|
"storybook-tailwind-dark-mode": "^1.0.22",
|
|
50
|
-
"stylelint": "^15.
|
|
50
|
+
"stylelint": "^15.7.0",
|
|
51
51
|
"stylelint-config-recommended": "^12.0.0",
|
|
52
52
|
"stylelint-config-recommended-vue": "^1.4.0",
|
|
53
53
|
"stylelint-config-standard": "^33.0.0",
|
|
54
54
|
"tailwindcss": "^3.3.2",
|
|
55
55
|
"ts-node": "^10.9.1",
|
|
56
|
-
"typescript": "^5.
|
|
57
|
-
"vite": "^4.3.
|
|
58
|
-
"vitest": "^0.
|
|
59
|
-
"vue-eslint-parser": "^9.
|
|
60
|
-
"vue-loader": "^17.
|
|
61
|
-
"vue-tsc": "^1.6.
|
|
56
|
+
"typescript": "^5.1.3",
|
|
57
|
+
"vite": "^4.3.9",
|
|
58
|
+
"vitest": "^0.32.0",
|
|
59
|
+
"vue-eslint-parser": "^9.3.0",
|
|
60
|
+
"vue-loader": "^17.2.2",
|
|
61
|
+
"vue-tsc": "^1.6.5"
|
|
62
62
|
},
|
|
63
63
|
"lint-staged": {
|
|
64
64
|
"*.{ts,tsx,vue}": [
|
|
@@ -15,12 +15,17 @@ export default {
|
|
|
15
15
|
control: { type: "select" },
|
|
16
16
|
options: Object.values(EBadgeSize),
|
|
17
17
|
description: "The Element size",
|
|
18
|
+
},
|
|
19
|
+
more: {
|
|
20
|
+
control: { type: "boolean" },
|
|
21
|
+
description: "The Element more",
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
24
|
args: {
|
|
21
25
|
slot: "default text",
|
|
22
26
|
kind: EBadgeKind.PRIMARY,
|
|
23
27
|
size: EBadgeSize.SMALL,
|
|
28
|
+
more: false,
|
|
24
29
|
},
|
|
25
30
|
};
|
|
26
31
|
|
|
@@ -31,7 +36,7 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
31
36
|
setup() {
|
|
32
37
|
return { args };
|
|
33
38
|
},
|
|
34
|
-
template:
|
|
39
|
+
template: /*html*/`
|
|
35
40
|
<ui-badge :icon="['far', 'face-smile']" v-bind="args" class="inline-flex">
|
|
36
41
|
{{ args.slot }}
|
|
37
42
|
</ui-badge>
|
|
@@ -1,35 +1,52 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-badge
|
|
3
|
+
class="ui-badge relative text-white overflow-hidden"
|
|
4
4
|
:class="[
|
|
5
|
-
|
|
6
|
-
(!kind || kind === EBadgeKind.PRIMARY) && 'bg-primary-600',
|
|
7
|
-
|
|
8
|
-
kind === EBadgeKind.ERROR && 'bg-error-600',
|
|
9
|
-
kind === EBadgeKind.ACCENT && 'bg-accent-600',
|
|
10
|
-
|
|
11
|
-
size === EBadgeSize.MEDIUM && 'px-xs py-xs',
|
|
12
|
-
size === EBadgeSize.LARGE && 'px-sm py-xs',
|
|
13
|
-
elipsis && 'max-w-full',
|
|
5
|
+
more && 'mr-sm',
|
|
14
6
|
]"
|
|
15
7
|
>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
<div class="relative z-[1] flex items-center content-center gap-xxs px-xs py-xxs">
|
|
9
|
+
<ui-icon
|
|
10
|
+
v-if="icon"
|
|
11
|
+
:size="ESize.XS"
|
|
12
|
+
:icon-name="icon"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<ui-typography
|
|
16
|
+
v-if="slots.default"
|
|
17
|
+
:size="getBadgeSize"
|
|
18
|
+
:weight="ETextWeight.SEMI_BOLD"
|
|
19
|
+
class="whitespace-nowrap"
|
|
20
|
+
line-height
|
|
21
|
+
:class="[
|
|
22
|
+
elipsis && 'overflow-hidden overflow-ellipsis',
|
|
23
|
+
]"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</ui-typography>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
v-if="more"
|
|
31
|
+
class="absolute top-0 left-[15px] w-full h-full bg-primary-300 rounded-full border border-white"
|
|
20
32
|
/>
|
|
21
33
|
|
|
22
|
-
<
|
|
23
|
-
v-if="
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
<div
|
|
35
|
+
v-if="more"
|
|
36
|
+
class="absolute top-0 left-xs w-full h-full bg-primary-400 rounded-full border border-white"
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<div
|
|
40
|
+
class="absolute rounded-full top-0 left-0 w-full h-full"
|
|
27
41
|
:class="[
|
|
28
|
-
|
|
42
|
+
(!kind || kind === EBadgeKind.PRIMARY) && 'bg-primary-600',
|
|
43
|
+
|
|
44
|
+
kind === EBadgeKind.ERROR && 'bg-error-600',
|
|
45
|
+
kind === EBadgeKind.ACCENT && 'bg-accent-600',
|
|
46
|
+
elipsis && 'max-w-full',
|
|
47
|
+
more && 'border border-white',
|
|
29
48
|
]"
|
|
30
|
-
|
|
31
|
-
<slot />
|
|
32
|
-
</ui-typography>
|
|
49
|
+
/>
|
|
33
50
|
</div>
|
|
34
51
|
</template>
|
|
35
52
|
|
|
@@ -45,6 +62,7 @@
|
|
|
45
62
|
kind?: EBadgeKind;
|
|
46
63
|
icon?: TIconName;
|
|
47
64
|
elipsis?: boolean;
|
|
65
|
+
more?: boolean;
|
|
48
66
|
}>();
|
|
49
67
|
|
|
50
68
|
const slots = useSlots();
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
<ui-icon
|
|
29
29
|
v-if="iconName"
|
|
30
30
|
:icon-name="iconName"
|
|
31
|
-
:size="ESize.
|
|
32
|
-
class="text-secondary-
|
|
31
|
+
:size="ESize.SM"
|
|
32
|
+
class="text-secondary-400"
|
|
33
33
|
/>
|
|
34
34
|
</ui-icon-wrapper>
|
|
35
35
|
</slot>
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
:class="invertOrder && 'order-first'"
|
|
40
40
|
>
|
|
41
41
|
<ui-typography
|
|
42
|
-
:kind="EColors.
|
|
43
|
-
:weight="ETextWeight.SEMI_BOLD"
|
|
42
|
+
:kind="EColors.SECONDARY_400"
|
|
44
43
|
class="mb-xxs"
|
|
45
44
|
line-height
|
|
46
45
|
>
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
import UiTypography from "../ui-typography";
|
|
64
63
|
import UiIcon from "../ui-icon";
|
|
65
64
|
import UiIconWrapper from "../ui-icon-wrapper";
|
|
66
|
-
import { ETypographySizes
|
|
65
|
+
import { ETypographySizes } from "../ui-typography";
|
|
67
66
|
import { EColors } from "../../_types/colors";
|
|
68
67
|
import type { TIconName } from "../ui-icon";
|
|
69
68
|
import { ESize } from "../../_types/sizing";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EColors } from "./../../_types/colors";
|
|
1
2
|
import UiCardResult from "./ui-card-result.vue";
|
|
2
3
|
import UiTypography, { ETypographySizes, ETextWeight, ETextAlign } from "../ui-typography";
|
|
3
4
|
import UiBadge from "../ui-badge";
|
|
@@ -32,7 +33,7 @@ type TComponentProps = InstanceType<typeof UiCardResult>["$props"];
|
|
|
32
33
|
const Template: Story<TComponentProps> = (args) => ({
|
|
33
34
|
components: { UiCardResult, UiTypography, UiBadge, UiListItem, UiButton, UiIcon },
|
|
34
35
|
setup() {
|
|
35
|
-
return { args, ETypographySizes, ETextWeight, ETextAlign, EButtonTypes, ESize };
|
|
36
|
+
return { args, ETypographySizes, ETextWeight, ETextAlign, EButtonTypes, ESize, EColors };
|
|
36
37
|
},
|
|
37
38
|
template:
|
|
38
39
|
/*html*/`
|
|
@@ -47,54 +48,97 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
47
48
|
: undefined"
|
|
48
49
|
>
|
|
49
50
|
<template #sidebar>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
<div class="flex gap-sm">
|
|
52
|
+
<ui-typography :size='ETypographySizes.XXS' line-height :style="{height: '64px', width: '64px', border: '1px solid black'}" class="flex items-center p-sm text-center">
|
|
53
|
+
Special offer text
|
|
54
|
+
</ui-typography>
|
|
55
|
+
|
|
56
|
+
<ui-typography :size='ETypographySizes.XXS' line-height :style="{height: '64px', width: '64px', border: '1px solid black'}" class="flex items-center p-sm text-center">
|
|
57
|
+
Special offer text
|
|
58
|
+
</ui-typography>
|
|
59
|
+
</div>
|
|
53
60
|
</template>
|
|
54
61
|
|
|
55
62
|
<template #default>
|
|
56
|
-
<div class="flex flex-wrap gap-xs mb-
|
|
63
|
+
<div class="flex flex-wrap gap-xs mb-sm">
|
|
57
64
|
<ui-badge
|
|
58
|
-
v-for="item in ['
|
|
65
|
+
v-for="item in ['Free bank tranfers']"
|
|
59
66
|
:icon="['far', 'face-smile']"
|
|
60
67
|
:key="item"
|
|
61
68
|
>
|
|
62
69
|
{{ item }}
|
|
63
70
|
</ui-badge>
|
|
71
|
+
|
|
72
|
+
<ui-badge
|
|
73
|
+
:icon="['far', 'face-smile']"
|
|
74
|
+
more
|
|
75
|
+
>
|
|
76
|
+
more...
|
|
77
|
+
</ui-badge>
|
|
78
|
+
|
|
79
|
+
<div
|
|
80
|
+
class="flex gap-xs items-center justify-center"
|
|
81
|
+
:style="{marginLeft: 'auto'}"
|
|
82
|
+
>
|
|
83
|
+
<ui-icon
|
|
84
|
+
class="text-primary"
|
|
85
|
+
:size="ESize.SM"
|
|
86
|
+
:icon-name="['far', 'face-smile']"
|
|
87
|
+
/>
|
|
88
|
+
|
|
89
|
+
<ui-icon
|
|
90
|
+
class="text-primary"
|
|
91
|
+
:size="ESize.SM"
|
|
92
|
+
:icon-name="['far', 'face-smile']"
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<ui-icon
|
|
96
|
+
class="text-secondary-alt-300"
|
|
97
|
+
:size="ESize.SM"
|
|
98
|
+
:icon-name="['far', 'face-smile']"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
64
101
|
</div>
|
|
65
102
|
|
|
66
103
|
<ul>
|
|
67
104
|
<ui-list-item
|
|
68
|
-
v-for="item in
|
|
69
|
-
class="mb-
|
|
105
|
+
v-for="item in 4"
|
|
106
|
+
class="mb-xxs items-center"
|
|
70
107
|
:key="item"
|
|
71
108
|
:icon="['far', 'face-smile']"
|
|
72
|
-
|
|
73
|
-
|
|
109
|
+
icon-class="text-secondary-alt"
|
|
110
|
+
>
|
|
111
|
+
<p>
|
|
112
|
+
<ui-typography is="span" :weight="ETextWeight.BOLD">
|
|
113
|
+
{{item}}
|
|
114
|
+
</ui-typography>
|
|
115
|
+
|
|
116
|
+
<span> Feature item</span>
|
|
117
|
+
</p>
|
|
118
|
+
</ui-list-item>
|
|
74
119
|
</ul>
|
|
75
120
|
|
|
121
|
+
<ui-typography class="mb-sm" underline :size="ETypographySizes.SM" :kind="EColors.SECONDARY">
|
|
122
|
+
Some link
|
|
123
|
+
</ui-typography>
|
|
124
|
+
|
|
76
125
|
<div :style="{display: 'grid', gridTemplateColumns: '1fr 1fr'}" class="items-center gap-sm">
|
|
77
126
|
<ui-typography
|
|
78
127
|
:weight="ETextWeight.BOLD"
|
|
79
|
-
:size="ETypographySizes.
|
|
128
|
+
:size="ETypographySizes.XL"
|
|
129
|
+
:kind="EColors.SECONDARY"
|
|
80
130
|
>
|
|
81
|
-
|
|
131
|
+
<p class="mb-xxs">€1004.63</p>
|
|
132
|
+
<ui-typography
|
|
133
|
+
:size="ETypographySizes.XS"
|
|
134
|
+
:kind="EColors.SECONDARY_400"
|
|
135
|
+
>
|
|
136
|
+
Monthly fee
|
|
137
|
+
</ui-typography>
|
|
82
138
|
</ui-typography>
|
|
83
139
|
|
|
84
|
-
<
|
|
85
|
-
<ui-button :kind="EButtonTypes.SECONDARY_OVERLAY">
|
|
86
|
-
<template #prefix>
|
|
87
|
-
<ui-icon
|
|
88
|
-
:icon-name="['far', 'face-smile']"
|
|
89
|
-
:size="ESize.SM"
|
|
90
|
-
/>
|
|
91
|
-
</template>
|
|
92
|
-
</ui-button>
|
|
93
|
-
|
|
94
|
-
<ui-button full-width>Some text</ui-button>
|
|
95
|
-
</div>
|
|
140
|
+
<ui-button full-width>Some text</ui-button>
|
|
96
141
|
</div>
|
|
97
|
-
|
|
98
142
|
</template>
|
|
99
143
|
</ui-card-result>
|
|
100
144
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</ui-typography>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
<div class="grid border border-secondary-alt-400 rounded-2xl overflow-hidden bg-white">
|
|
20
|
+
<div class="grid relative border border-secondary-alt-400 rounded-2xl overflow-hidden bg-white">
|
|
21
21
|
<div class="ui-card-result__header grid gap-xs justify-between items-center rounded-lg bg-secondary-alt-200 p-xs m-xs mb-sm">
|
|
22
22
|
<ui-typography
|
|
23
23
|
v-if="header"
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
class="flex-1 line-clamp"
|
|
26
26
|
:size="ETypographySizes.SM"
|
|
27
27
|
:weight="ETextWeight.SEMI_BOLD"
|
|
28
|
+
:kind="EColors.SECONDARY"
|
|
28
29
|
>
|
|
29
30
|
{{ header }}
|
|
30
31
|
</ui-typography>
|
|
@@ -32,20 +33,20 @@
|
|
|
32
33
|
<slot name="sidebar" />
|
|
33
34
|
</div>
|
|
34
35
|
|
|
35
|
-
<main class="p-sm w-full overflow-hidden bg-white">
|
|
36
|
+
<main class="p-sm pt-0 w-full overflow-hidden bg-white">
|
|
36
37
|
<slot />
|
|
37
38
|
</main>
|
|
38
39
|
</div>
|
|
39
40
|
|
|
40
41
|
<div
|
|
41
42
|
v-if="exclusiveTextBottom"
|
|
42
|
-
class="bg-secondary rounded-2xl px-sm pt-lg -mt-lg"
|
|
43
|
+
class="bg-secondary-alt-200 rounded-2xl px-sm pt-lg -mt-lg border border-secondary-alt-400"
|
|
43
44
|
@click="exclusiveBottomClickAction"
|
|
44
45
|
>
|
|
45
46
|
<ui-typography
|
|
46
47
|
class="py-xs"
|
|
47
48
|
:size="ETypographySizes.XXS"
|
|
48
|
-
:kind="EColors.
|
|
49
|
+
:kind="EColors.SECONDARY"
|
|
49
50
|
:align="ETextAlign.CENTER"
|
|
50
51
|
line-height
|
|
51
52
|
>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<slot name="prefix-icon" />
|
|
23
23
|
|
|
24
24
|
<input
|
|
25
|
+
:autocomplete="autocomplete"
|
|
25
26
|
:value="modelValue"
|
|
26
27
|
:pattern="pattern"
|
|
27
28
|
class="bg-transparent border-0 outline-none w-full placeholder:text-secondary-alt placeholder:italic"
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
<slot name="subLabel">
|
|
40
41
|
<ui-typography
|
|
41
42
|
v-if="subLabel"
|
|
43
|
+
line-height
|
|
42
44
|
:size="ETypographySizes.SM"
|
|
43
45
|
:kind="EColors.SECONDARY_ALT"
|
|
44
46
|
class="mt-xs"
|
|
@@ -65,9 +67,11 @@
|
|
|
65
67
|
maxlength?: string;
|
|
66
68
|
minlength?: string;
|
|
67
69
|
focusHandler?: (e:FocusEvent) => void;
|
|
70
|
+
autocomplete?: string;
|
|
68
71
|
}>(), {
|
|
69
72
|
modelValue: "",
|
|
70
73
|
placeholder: "",
|
|
74
|
+
autocomplete: "off",
|
|
71
75
|
heading: undefined,
|
|
72
76
|
subLabel: undefined,
|
|
73
77
|
pattern: undefined,
|
|
@@ -35,8 +35,10 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
35
35
|
|
|
36
36
|
return { args, modelValue };
|
|
37
37
|
},
|
|
38
|
-
template:
|
|
39
|
-
<
|
|
38
|
+
template: /*html*/`
|
|
39
|
+
<div :style="{border: '1px solid'}">
|
|
40
|
+
<ui-input-range v-bind="args" v-model:modelValue="modelValue"/>
|
|
41
|
+
</div>
|
|
40
42
|
<div>{{ modelValue }}</div>
|
|
41
43
|
`,
|
|
42
44
|
});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-input-range relative h-lg
|
|
3
|
+
class="ui-input-range relative h-lg py-xs box-content"
|
|
4
4
|
>
|
|
5
5
|
<input
|
|
6
|
-
ref="track"
|
|
7
6
|
v-model.number="rangeModel"
|
|
8
7
|
class="appearance-none absolute top-0 left-0 cursor-pointer bg-transparent w-full h-full"
|
|
9
8
|
type="range"
|
|
@@ -12,11 +11,13 @@
|
|
|
12
11
|
:step="step"
|
|
13
12
|
@touchmove="moveHandler"
|
|
14
13
|
>
|
|
14
|
+
|
|
15
15
|
<div
|
|
16
|
-
class="
|
|
16
|
+
class="h-xs w-full bg-secondary-alt rounded absolute top-1/2 left-0 -translate-y-1/2 pointer-events-none"
|
|
17
17
|
/>
|
|
18
|
+
|
|
18
19
|
<div
|
|
19
|
-
class="
|
|
20
|
+
class="h-xs bg-primary rounded absolute top-1/2 left-0 -translate-y-1/2 pointer-events-none"
|
|
20
21
|
:style="{
|
|
21
22
|
width: getPercentage + '%',
|
|
22
23
|
}"
|
|
@@ -116,10 +117,6 @@
|
|
|
116
117
|
box-shadow: none;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
.ui-input-range__line {
|
|
120
|
-
top: 50%;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
120
|
.ui-input-range__thumb {
|
|
124
121
|
top: 50%;
|
|
125
122
|
border-width: 12px;
|
|
@@ -46,9 +46,9 @@ export const Default = (args) => ({
|
|
|
46
46
|
},
|
|
47
47
|
template:/*html*/`
|
|
48
48
|
<ul>
|
|
49
|
-
<ui-list-item v-bind="args" :icon="ICON_DEFAULT" title="title only" />
|
|
49
|
+
<ui-list-item v-bind="args" :icon="ICON_DEFAULT" title="title only" icon-class="text-secondary-alt" />
|
|
50
50
|
|
|
51
|
-
<ui-list-item :icon="ICON_DEFAULT" :spacing="args.spacing">
|
|
51
|
+
<ui-list-item :icon="ICON_DEFAULT" :kind="args.kind" :spacing="args.spacing">
|
|
52
52
|
text only
|
|
53
53
|
</ui-list-item>
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ export const Default = (args) => ({
|
|
|
56
56
|
{{ args.title }}
|
|
57
57
|
</ui-list-item>
|
|
58
58
|
|
|
59
|
-
<ui-list-item v-bind="args" :icon="ICON_DEFAULT" />
|
|
59
|
+
<ui-list-item v-bind="args" icon-class="text-secondary-alt" :icon="ICON_DEFAULT" />
|
|
60
60
|
</ul>
|
|
61
61
|
`,
|
|
62
62
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
<template>
|
|
3
3
|
<li
|
|
4
|
-
class="ui-list-item grid grid-flow-col justify-start gap-xs relative group"
|
|
4
|
+
class="ui-list-item grid grid-flow-col justify-start gap-xs relative group text-secondary"
|
|
5
5
|
:class="[
|
|
6
6
|
size === EListItemSize.SM && 'text-sm',
|
|
7
7
|
size === EListItemSize.MD && 'text-md',
|
|
@@ -17,24 +17,29 @@
|
|
|
17
17
|
<slot name="icon">
|
|
18
18
|
<ui-icon
|
|
19
19
|
v-if="icon"
|
|
20
|
-
class="bg-white
|
|
20
|
+
class="bg-white"
|
|
21
|
+
:class="iconClass"
|
|
21
22
|
:icon-name="icon"
|
|
22
23
|
:size="ESize.SM"
|
|
23
24
|
/>
|
|
24
25
|
</slot>
|
|
25
26
|
|
|
26
|
-
<
|
|
27
|
-
:weight="ETextWeight.LIGHT"
|
|
28
|
-
class="grid gap-sm"
|
|
29
|
-
>
|
|
27
|
+
<div>
|
|
30
28
|
<ui-typography
|
|
31
29
|
v-if="title"
|
|
32
30
|
:weight="ETextWeight.SEMI_BOLD"
|
|
33
31
|
>
|
|
34
32
|
{{ title }}
|
|
35
33
|
</ui-typography>
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
|
|
35
|
+
<ui-typography
|
|
36
|
+
v-if="$slots.default"
|
|
37
|
+
:class="[title && 'mt-xxs']"
|
|
38
|
+
:weight="ETextWeight.LIGHT"
|
|
39
|
+
>
|
|
40
|
+
<slot />
|
|
41
|
+
</ui-typography>
|
|
42
|
+
</div>
|
|
38
43
|
</li>
|
|
39
44
|
</template>
|
|
40
45
|
|
|
@@ -50,12 +55,14 @@
|
|
|
50
55
|
kind?: EListItemTypes
|
|
51
56
|
size?: EListItemSize
|
|
52
57
|
spacing?: EListItemSpacing
|
|
58
|
+
iconClass?: string
|
|
53
59
|
}>(), {
|
|
54
60
|
kind: EListItemTypes.DEFAULT,
|
|
55
61
|
size: EListItemSize.SM,
|
|
56
62
|
spacing: EListItemSpacing.COMPACT,
|
|
57
63
|
title: "",
|
|
58
|
-
icon: undefined
|
|
64
|
+
icon: undefined,
|
|
65
|
+
iconClass: "",
|
|
59
66
|
});
|
|
60
67
|
|
|
61
68
|
</script>
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
bg-white
|
|
14
14
|
overflow-y-scroll
|
|
15
15
|
max-height
|
|
16
|
+
max-width
|
|
16
17
|
"
|
|
17
18
|
:class="[
|
|
18
19
|
modalSize === EModalSizes.SM &&'h-fit max-w-[24rem]',
|
|
19
20
|
modalSize === EModalSizes.MD &&'h-fit max-w-[32rem]',
|
|
20
21
|
modalSize === EModalSizes.LG &&'h-fit max-w-[40rem]',
|
|
21
|
-
modalSize === EModalSizes.RESPONSIVE && '
|
|
22
|
+
modalSize === EModalSizes.RESPONSIVE && 'h-full',
|
|
22
23
|
]"
|
|
23
24
|
>
|
|
24
25
|
<div
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<script lang="ts" setup>
|
|
99
|
-
import { computed
|
|
99
|
+
import { computed } from "vue";
|
|
100
100
|
import UiTypography, { ETypographySizes, ETextWeight } from "../ui-typography";
|
|
101
101
|
import type { TIconName } from "../ui-icon";
|
|
102
102
|
import { ESize } from "../../_types/sizing";
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<slot name="header">
|
|
6
6
|
<ui-typography
|
|
7
7
|
:weight="ETextWeight.BOLD"
|
|
8
|
+
line-height
|
|
8
9
|
class="mb-sm"
|
|
9
10
|
>
|
|
10
11
|
{{ header }}
|
|
@@ -56,7 +57,9 @@
|
|
|
56
57
|
:size="ETypographySizes.SM"
|
|
57
58
|
class="w-full"
|
|
58
59
|
line-height
|
|
59
|
-
>
|
|
60
|
+
>
|
|
61
|
+
{{ title }}
|
|
62
|
+
</ui-typography>
|
|
60
63
|
</slot>
|
|
61
64
|
</label>
|
|
62
65
|
</div>
|