bonkers-ui 1.0.54 → 1.0.55
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 +82 -41
- package/package.json +25 -24
- package/src/components/ui-alert/ui-alert.vue +1 -1
- package/src/components/ui-badge/ui-badge.vue +4 -4
- package/src/components/ui-ber-rank/ui-ber-rank.vue +2 -2
- package/src/components/ui-button/ui-button.test.ts +1 -1
- package/src/components/ui-button/ui-button.vue +35 -13
- package/src/components/ui-card-cta/ui-card-cta.vue +6 -6
- package/src/components/ui-card-result/ui-card-result.vue +20 -7
- package/src/components/ui-card-simple/ui-card-simple.vue +1 -1
- package/src/components/ui-checkbox/ui-checkbox.vue +15 -3
- package/src/components/ui-icon-wrapper/ui-icon-wrapper.vue +8 -8
- package/src/components/ui-input/ui-input.vue +2 -2
- package/src/components/ui-input-range/ui-input-range.vue +11 -11
- package/src/components/ui-list-item/ui-list-item.vue +14 -3
- package/src/components/ui-modal/ui-backdrop/ui-backdrop.vue +2 -2
- package/src/components/ui-modal/ui-modal.vue +12 -12
- package/src/components/ui-notification-badge/ui-notification-badge.vue +17 -3
- package/src/components/ui-order-card/ui-order-card.vue +4 -4
- package/src/components/ui-plain-radio/ui-plain-radio.vue +22 -23
- package/src/components/ui-progress/_types.ts +0 -0
- package/src/components/ui-progress/index.ts +1 -0
- package/src/components/ui-progress/ui-progress.stories.ts +34 -0
- package/src/components/ui-progress/ui-progress.vue +43 -0
- package/src/components/ui-radio/ui-radio.vue +14 -14
- package/src/components/ui-radio-fancy/ui-radio-fancy.vue +22 -20
- package/src/components/ui-result-card-range/ui-result-card-range.vue +3 -3
- package/src/components/ui-select/ui-select.vue +14 -3
- package/src/components/ui-snackbar/ui-snackbar.vue +1 -1
- package/src/components/ui-table/index.ts +2 -0
- package/src/components/ui-table/ui-table.vue +3 -5
- package/src/components/ui-tabs/ui-tabs.vue +3 -3
- package/src/components/ui-toggle/ui-toggle.vue +7 -7
- package/src/stories/colors/ui-colors.vue +2 -2
package/.eslintrc.js
CHANGED
|
@@ -1,51 +1,92 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
browser: true,
|
|
5
|
+
es2021: true,
|
|
6
|
+
node: true,
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
8
|
+
extends: [
|
|
9
|
+
"plugin:vue/vue3-recommended",
|
|
10
|
+
"eslint:recommended",
|
|
11
|
+
"@vue/typescript/recommended",
|
|
12
|
+
"plugin:storybook/recommended",
|
|
13
|
+
"plugin:tailwindcss/recommended"
|
|
14
|
+
],
|
|
15
|
+
parserOptions: {
|
|
16
|
+
ecmaVersion: 2021,
|
|
11
17
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
parser: "vue-eslint-parser",
|
|
19
|
+
plugins: [
|
|
20
|
+
"tailwindcss",
|
|
21
|
+
],
|
|
22
|
+
overrides: [
|
|
23
|
+
{
|
|
24
|
+
files: ["*.vue"],
|
|
25
|
+
rules: {
|
|
26
|
+
indent: "off",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
rules: {
|
|
31
|
+
indent: [
|
|
32
|
+
"error",
|
|
33
|
+
"tab",
|
|
34
|
+
{
|
|
35
|
+
VariableDeclarator: "first",
|
|
36
|
+
MemberExpression: 1,
|
|
37
|
+
ObjectExpression: 1,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
"vue/html-indent": [
|
|
41
|
+
"error",
|
|
42
|
+
"tab",
|
|
43
|
+
{
|
|
44
|
+
attribute: 1,
|
|
45
|
+
baseIndent: 1,
|
|
46
|
+
closeBracket: 0,
|
|
47
|
+
alignAttributesVertically: true,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
"vue/script-indent": [
|
|
51
|
+
"error",
|
|
52
|
+
"tab",
|
|
53
|
+
{
|
|
54
|
+
baseIndent: 1,
|
|
55
|
+
switchCase: 1,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
36
58
|
"eol-last": ["error", "always"],
|
|
37
59
|
"no-console": "warn",
|
|
38
60
|
"no-debugger": "warn",
|
|
39
61
|
"vue/multi-word-component-names": 0,
|
|
40
62
|
"object-curly-spacing": ["error", "always"],
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
63
|
+
quotes: [
|
|
64
|
+
"error",
|
|
65
|
+
"double",
|
|
66
|
+
{
|
|
67
|
+
avoidEscape: true,
|
|
68
|
+
allowTemplateLiterals: true,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
"no-multiple-empty-lines": [
|
|
72
|
+
"error",
|
|
73
|
+
{
|
|
74
|
+
max: 1,
|
|
75
|
+
maxEOF: 0,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
semi: ["error", "always"],
|
|
79
|
+
"max-len": ["error", {
|
|
80
|
+
"code": 120,
|
|
81
|
+
"tabWidth": 4,
|
|
82
|
+
"ignoreStrings": true,
|
|
83
|
+
"ignoreTemplateLiterals": true,
|
|
84
|
+
"ignoreRegExpLiterals": true,
|
|
85
|
+
"ignoreUrls": true,
|
|
86
|
+
"ignoreComments": true,
|
|
87
|
+
"ignoreTrailingComments": true,
|
|
88
|
+
ignorePattern: 'd="([\\s\\S]*?)"',
|
|
44
89
|
}],
|
|
45
|
-
"no-
|
|
46
|
-
|
|
47
|
-
"maxEOF": 0
|
|
48
|
-
}],
|
|
49
|
-
semi: ["error", "always"]
|
|
50
|
-
}
|
|
90
|
+
"tailwindcss/no-custom-classname": "off",
|
|
91
|
+
},
|
|
51
92
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bonkers-ui",
|
|
3
|
-
"version": "v1.0.
|
|
3
|
+
"version": "v1.0.55",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"storybook": "storybook dev -p 6006",
|
|
@@ -19,50 +19,51 @@
|
|
|
19
19
|
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
|
20
20
|
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
21
21
|
"@fortawesome/vue-fontawesome": "^3.0.3",
|
|
22
|
+
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
22
23
|
"storybook-addon-designs": "^6.3.1",
|
|
23
24
|
"vue": "^3.3.4",
|
|
24
|
-
"vue-router": "^4.2.
|
|
25
|
+
"vue-router": "^4.2.4"
|
|
25
26
|
},
|
|
26
27
|
"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.
|
|
28
|
+
"@storybook/addon-essentials": "^7.0.27",
|
|
29
|
+
"@storybook/addon-links": "^7.0.27",
|
|
30
|
+
"@storybook/addon-mdx-gfm": "^7.0.27",
|
|
31
|
+
"@storybook/vue3": "^7.0.27",
|
|
32
|
+
"@storybook/vue3-vite": "^7.0.27",
|
|
32
33
|
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
33
34
|
"@typescript-eslint/parser": "^5.59.9",
|
|
34
35
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
35
36
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
36
|
-
"@vue/test-utils": "^2.
|
|
37
|
-
"eslint": "8.
|
|
37
|
+
"@vue/test-utils": "^2.4.0",
|
|
38
|
+
"eslint": "8.44.0",
|
|
38
39
|
"eslint-plugin-storybook": "^0.6.12",
|
|
39
|
-
"eslint-plugin-vue": "^9.
|
|
40
|
+
"eslint-plugin-vue": "^9.15.1",
|
|
40
41
|
"gh-pages": "^5.0.0",
|
|
41
42
|
"husky": "4.3.8",
|
|
42
43
|
"jsdom": "^22.1.0",
|
|
43
|
-
"lint-staged": "^13.2.
|
|
44
|
-
"postcss": "^8.4.
|
|
44
|
+
"lint-staged": "^13.2.3",
|
|
45
|
+
"postcss": "^8.4.26",
|
|
45
46
|
"postcss-html": "^1.4.1",
|
|
46
47
|
"react": "^18.2.0",
|
|
47
48
|
"react-dom": "^18.2.0",
|
|
48
|
-
"storybook": "^7.0.
|
|
49
|
+
"storybook": "^7.0.27",
|
|
49
50
|
"storybook-tailwind-dark-mode": "^1.0.22",
|
|
50
|
-
"stylelint": "^15.
|
|
51
|
-
"stylelint-config-recommended": "^
|
|
52
|
-
"stylelint-config-recommended-vue": "^1.
|
|
53
|
-
"stylelint-config-standard": "^
|
|
54
|
-
"tailwindcss": "^3.3.
|
|
51
|
+
"stylelint": "^15.10.1",
|
|
52
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
53
|
+
"stylelint-config-recommended-vue": "^1.5.0",
|
|
54
|
+
"stylelint-config-standard": "^34.0.0",
|
|
55
|
+
"tailwindcss": "^3.3.3",
|
|
55
56
|
"ts-node": "^10.9.1",
|
|
56
|
-
"typescript": "^5.1.
|
|
57
|
-
"vite": "^4.
|
|
58
|
-
"vitest": "^0.
|
|
59
|
-
"vue-eslint-parser": "^9.3.
|
|
57
|
+
"typescript": "^5.1.6",
|
|
58
|
+
"vite": "^4.4.4",
|
|
59
|
+
"vitest": "^0.33.0",
|
|
60
|
+
"vue-eslint-parser": "^9.3.1",
|
|
60
61
|
"vue-loader": "^17.2.2",
|
|
61
|
-
"vue-tsc": "^1.
|
|
62
|
+
"vue-tsc": "^1.8.4"
|
|
62
63
|
},
|
|
63
64
|
"lint-staged": {
|
|
64
65
|
"*.{ts,tsx,vue}": [
|
|
65
|
-
"eslint --fix",
|
|
66
|
+
"yarn eslint --fix",
|
|
66
67
|
"bash -c 'yarn typecheck'"
|
|
67
68
|
],
|
|
68
69
|
"*.{css,vue,tsx}": "stylelint --fix"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-alert flex gap-sm
|
|
3
|
+
class="ui-alert flex gap-sm rounded-lg border bg-white p-sm"
|
|
4
4
|
:class="[
|
|
5
5
|
(!kind || kind === EAlertTypes.PRIMARY) && 'border-primary',
|
|
6
6
|
kind === EAlertTypes.WARNING && 'border-warning',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-badge relative text-white
|
|
3
|
+
class="ui-badge relative overflow-hidden text-white"
|
|
4
4
|
>
|
|
5
|
-
<div class="relative z-[1] flex
|
|
5
|
+
<div class="relative z-[1] flex content-center items-center gap-xxs px-xs py-xxs">
|
|
6
6
|
<ui-icon
|
|
7
7
|
v-if="icon"
|
|
8
8
|
:size="ESize.XS"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="whitespace-nowrap"
|
|
17
17
|
line-height
|
|
18
18
|
:class="[
|
|
19
|
-
elipsis && 'overflow-hidden
|
|
19
|
+
elipsis && 'overflow-hidden text-ellipsis',
|
|
20
20
|
]"
|
|
21
21
|
>
|
|
22
22
|
<slot />
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div
|
|
27
|
-
class="absolute
|
|
27
|
+
class="absolute left-0 top-0 h-full w-full rounded-full"
|
|
28
28
|
:class="[
|
|
29
29
|
(!kind || kind === EBadgeKind.PRIMARY) && 'bg-primary-600',
|
|
30
30
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:weight="ETextWeight.BOLD"
|
|
23
23
|
:size="textSize"
|
|
24
24
|
:text-transform="ETextTransform.UPPERCASE"
|
|
25
|
-
class="absolute
|
|
25
|
+
class="absolute left-0 top-0 flex h-full w-full items-center justify-center"
|
|
26
26
|
>
|
|
27
27
|
ber
|
|
28
28
|
</ui-typography>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
:weight="ETextWeight.BOLD"
|
|
53
53
|
:size="textSize"
|
|
54
54
|
:text-transform="ETextTransform.UPPERCASE"
|
|
55
|
-
class="absolute
|
|
55
|
+
class="absolute left-0 top-0 flex h-full w-full items-center justify-center"
|
|
56
56
|
>
|
|
57
57
|
{{ berRankDictionary[+rank]?.text || berRankDictionary[0].text }}
|
|
58
58
|
</ui-typography>
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
-
class="ui-button
|
|
3
|
+
class="ui-button
|
|
4
|
+
text-base
|
|
5
|
+
grid
|
|
6
|
+
touch-manipulation
|
|
7
|
+
grid-flow-col
|
|
8
|
+
items-center
|
|
9
|
+
justify-center
|
|
10
|
+
whitespace-nowrap
|
|
11
|
+
rounded-lg
|
|
12
|
+
font-bold
|
|
13
|
+
leading-none
|
|
14
|
+
"
|
|
4
15
|
:disabled="disabled"
|
|
5
16
|
:class="[
|
|
6
17
|
(!kind || kind === EButtonTypes.PRIMARY) && [primaryColor, primaryColorHover, primaryColorActive].join(' '),
|
|
7
18
|
kind === EButtonTypes.SECONDARY
|
|
8
|
-
&& 'text-white
|
|
9
|
-
kind === EButtonTypes.WARNING
|
|
10
|
-
|
|
19
|
+
&& 'bg-secondary text-white hover:bg-secondary-600 active:bg-secondary-700 disabled:bg-secondary-300',
|
|
20
|
+
kind === EButtonTypes.WARNING
|
|
21
|
+
&& 'bg-warning text-white hover:bg-warning-600 active:bg-warning-700 disabled:bg-warning-300',
|
|
22
|
+
kind === EButtonTypes.ERROR
|
|
23
|
+
&& 'bg-error text-white hover:bg-error-600 active:bg-error-700 disabled:bg-error-300',
|
|
11
24
|
kind === EButtonTypes.PRIMARY_OVERLAY
|
|
12
|
-
&& '
|
|
25
|
+
&& 'border border-primary text-primary hover:border-transparent hover:bg-primary-600'
|
|
26
|
+
+ 'hover:text-white active:border-transparent active:bg-primary-700'
|
|
27
|
+
+ 'active:text-white disabled:border-primary-300 disabled:text-primary-300',
|
|
13
28
|
kind === EButtonTypes.SECONDARY_OVERLAY
|
|
14
|
-
&& '
|
|
29
|
+
&& 'border border-secondary text-secondary hover:border-transparent hover:bg-secondary-600'
|
|
30
|
+
+ 'hover:text-white active:border-transparent active:bg-secondary-700'
|
|
31
|
+
+ 'active:text-white disabled:border-secondary-300 disabled:text-secondary-300',
|
|
15
32
|
kind === EButtonTypes.WARNING_OVERLAY
|
|
16
|
-
&& '
|
|
33
|
+
&& 'border border-warning text-warning hover:border-transparent hover:bg-warning-600'
|
|
34
|
+
+ 'hover:text-white active:border-transparent active:bg-warning-700'
|
|
35
|
+
+ 'active:text-white disabled:border-warning-300 disabled:text-warning-300',
|
|
17
36
|
kind === EButtonTypes.ERROR_OVERLAY
|
|
18
|
-
&& '
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
size === EButtonSizes.
|
|
37
|
+
&& 'border border-error text-error hover:border-transparent hover:bg-error-600'
|
|
38
|
+
+'hover:text-white active:border-transparent active:bg-error-700'
|
|
39
|
+
+'active:text-white disabled:border-error-300 disabled:text-error-300',
|
|
40
|
+
kind === EButtonTypes.LINK && 'hover:text-accent-alt-600 active:text-accent-alt-700'
|
|
41
|
+
+'disabled:text-accent-alt-300 text-accent-alt',
|
|
42
|
+
(!size || size === EButtonSizes.DEFAULT) && 'px-md py-sm',
|
|
43
|
+
size === EButtonSizes.SMALL && 'px-md py-xs',
|
|
44
|
+
size === EButtonSizes.MEDIUM && 'p-sm',
|
|
45
|
+
size === EButtonSizes.LARGE && 'p-md',
|
|
24
46
|
($slots.default || $slots.postfix) && 'gap-sm',
|
|
25
47
|
fullWidth && 'w-full',
|
|
26
48
|
disabled && 'pointer-events-none',
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
class="
|
|
4
4
|
ui-card-cta
|
|
5
5
|
w-full
|
|
6
|
-
|
|
6
|
+
rounded-2xl
|
|
7
7
|
border
|
|
8
8
|
border-secondary-alt-500
|
|
9
|
-
|
|
9
|
+
bg-white
|
|
10
10
|
p-sm
|
|
11
11
|
shadow-md
|
|
12
|
-
|
|
12
|
+
outline-0
|
|
13
13
|
hover:border-secondary-700
|
|
14
14
|
focus:shadow-border-primary
|
|
15
15
|
active:bg-secondary-alt-200
|
|
16
|
-
disabled:
|
|
17
|
-
disabled:
|
|
16
|
+
disabled:pointer-events-none
|
|
17
|
+
disabled:bg-secondary-alt-200"
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
>
|
|
20
20
|
<span
|
|
21
|
-
class="ui-card-cta__wrapper w-full
|
|
21
|
+
class="ui-card-cta__wrapper grid w-full items-center gap-sm"
|
|
22
22
|
:class="[
|
|
23
23
|
invertOrder && 'ui-card-cta_inverted',
|
|
24
24
|
]"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="ui-card-result">
|
|
3
3
|
<div
|
|
4
4
|
v-if="exclusiveText"
|
|
5
|
-
class="
|
|
5
|
+
class="-mb-lg rounded-2xl bg-primary px-sm pb-lg"
|
|
6
6
|
@click="exclusiveClickAction"
|
|
7
7
|
>
|
|
8
8
|
<ui-typography
|
|
@@ -11,18 +11,31 @@
|
|
|
11
11
|
:size="ETypographySizes.XXS"
|
|
12
12
|
:kind="EColors.WHITE"
|
|
13
13
|
:align="ETextAlign.CENTER"
|
|
14
|
-
:weight="ETextWeight.
|
|
14
|
+
:weight="ETextWeight.BOLD"
|
|
15
15
|
>
|
|
16
16
|
{{ exclusiveText }}
|
|
17
17
|
</ui-typography>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
<div class="grid
|
|
21
|
-
<div
|
|
20
|
+
<div class="relative grid overflow-hidden rounded-2xl border border-secondary-alt-400 bg-white">
|
|
21
|
+
<div
|
|
22
|
+
class="
|
|
23
|
+
ui-card-result__header
|
|
24
|
+
m-xs
|
|
25
|
+
mb-sm
|
|
26
|
+
grid
|
|
27
|
+
items-center
|
|
28
|
+
justify-between
|
|
29
|
+
gap-xs
|
|
30
|
+
rounded-lg
|
|
31
|
+
bg-secondary-alt-200
|
|
32
|
+
p-xs
|
|
33
|
+
"
|
|
34
|
+
>
|
|
22
35
|
<ui-typography
|
|
23
36
|
v-if="header"
|
|
24
37
|
line-height
|
|
25
|
-
class="flex-1
|
|
38
|
+
class="line-clamp flex-1"
|
|
26
39
|
:size="ETypographySizes.SM"
|
|
27
40
|
:weight="ETextWeight.SEMI_BOLD"
|
|
28
41
|
:kind="EColors.SECONDARY"
|
|
@@ -33,14 +46,14 @@
|
|
|
33
46
|
<slot name="sidebar" />
|
|
34
47
|
</div>
|
|
35
48
|
|
|
36
|
-
<main class="
|
|
49
|
+
<main class="w-full overflow-hidden bg-white p-sm pt-0">
|
|
37
50
|
<slot />
|
|
38
51
|
</main>
|
|
39
52
|
</div>
|
|
40
53
|
|
|
41
54
|
<div
|
|
42
55
|
v-if="exclusiveTextBottom"
|
|
43
|
-
class="
|
|
56
|
+
class="-mt-lg rounded-2xl border border-secondary-alt-400 bg-secondary-alt-200 px-sm pt-lg"
|
|
44
57
|
@click="exclusiveBottomClickAction"
|
|
45
58
|
>
|
|
46
59
|
<ui-typography
|
|
@@ -14,13 +14,25 @@
|
|
|
14
14
|
>
|
|
15
15
|
<input
|
|
16
16
|
v-model="checkboxModel"
|
|
17
|
-
class="appearance-none
|
|
17
|
+
class="absolute appearance-none"
|
|
18
18
|
type="checkbox"
|
|
19
19
|
:value="value"
|
|
20
20
|
:disabled="disabled"
|
|
21
21
|
>
|
|
22
22
|
<span
|
|
23
|
-
class="
|
|
23
|
+
class="
|
|
24
|
+
ui-checkbox_custom
|
|
25
|
+
relative
|
|
26
|
+
flex
|
|
27
|
+
h-md
|
|
28
|
+
w-md
|
|
29
|
+
items-center
|
|
30
|
+
justify-center
|
|
31
|
+
rounded
|
|
32
|
+
border
|
|
33
|
+
border-secondary-alt-500
|
|
34
|
+
hover:border-secondary-alt-700
|
|
35
|
+
"
|
|
24
36
|
:class="invertOrder && 'order-last'"
|
|
25
37
|
>
|
|
26
38
|
<svg
|
|
@@ -64,7 +76,7 @@
|
|
|
64
76
|
}>();
|
|
65
77
|
|
|
66
78
|
const emit = defineEmits<{
|
|
67
|
-
(e: "update:modelValue", state:
|
|
79
|
+
(e: "update:modelValue", state: typeof props.modelValue): void
|
|
68
80
|
}>();
|
|
69
81
|
|
|
70
82
|
const checkboxModel = computed({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="icon-wrapper
|
|
3
|
+
class="icon-wrapper relative grid h-fit w-fit place-items-center rounded-2xl"
|
|
4
4
|
:class="[
|
|
5
|
-
kind === EIconWrapperTypes.PRIMARY && 'text-white
|
|
6
|
-
kind === EIconWrapperTypes.SECONDARY && '
|
|
7
|
-
kind === EIconWrapperTypes.DEFAULT && '
|
|
5
|
+
kind === EIconWrapperTypes.PRIMARY && 'bg-primary text-white',
|
|
6
|
+
kind === EIconWrapperTypes.SECONDARY && 'bg-secondary-alt-200 text-black',
|
|
7
|
+
kind === EIconWrapperTypes.DEFAULT && 'border-2 border-primary bg-white text-primary ',
|
|
8
8
|
|
|
9
|
-
size === EIconWrapperSizes.DEFAULT && '
|
|
10
|
-
size === EIconWrapperSizes.SMALL && '
|
|
11
|
-
size === EIconWrapperSizes.MEDIUM && '
|
|
12
|
-
size === EIconWrapperSizes.LARGE && '
|
|
9
|
+
size === EIconWrapperSizes.DEFAULT && 'p-sm',
|
|
10
|
+
size === EIconWrapperSizes.SMALL && 'p-xs',
|
|
11
|
+
size === EIconWrapperSizes.MEDIUM && 'icon-wrapper_offset-md p-md',
|
|
12
|
+
size === EIconWrapperSizes.LARGE && 'icon-wrapper_offset-lg p-lg',
|
|
13
13
|
]"
|
|
14
14
|
>
|
|
15
15
|
<slot />
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</ui-typography>
|
|
11
11
|
</slot>
|
|
12
12
|
<label
|
|
13
|
-
class="ui-input__wrapper flex w-full rounded-lg border bg-white
|
|
13
|
+
class="ui-input__wrapper flex w-full items-center gap-xs rounded-lg border bg-white p-sm"
|
|
14
14
|
:class="[
|
|
15
15
|
kind === EInputKinds.SECONDARY && 'border-secondary-alt-500 hover:border-secondary-alt-700',
|
|
16
16
|
kind === EInputKinds.PRIMARY && 'border-primary',
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:autocomplete="getAutoComplete()"
|
|
26
26
|
:value="modelValue"
|
|
27
27
|
:pattern="pattern"
|
|
28
|
-
class="
|
|
28
|
+
class="w-full border-0 bg-transparent outline-none placeholder:italic placeholder:text-secondary-alt"
|
|
29
29
|
:type="type"
|
|
30
30
|
:placeholder="placeholder"
|
|
31
31
|
:maxlength="maxlength"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-input-range relative h-lg py-xs
|
|
3
|
+
class="ui-input-range relative box-content h-lg py-xs"
|
|
4
4
|
>
|
|
5
5
|
<input
|
|
6
6
|
ref="track"
|
|
7
7
|
v-model.number="rangeModel"
|
|
8
|
-
class="
|
|
8
|
+
class="absolute left-0 top-0 h-full w-full cursor-pointer appearance-none bg-transparent"
|
|
9
9
|
type="range"
|
|
10
10
|
:min="min"
|
|
11
11
|
:max="max"
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
>
|
|
15
15
|
|
|
16
16
|
<div
|
|
17
|
-
class="
|
|
17
|
+
class="pointer-events-none absolute left-0 top-1/2 h-xs w-full -translate-y-1/2 rounded bg-secondary-alt"
|
|
18
18
|
/>
|
|
19
19
|
|
|
20
20
|
<div
|
|
21
|
-
class="
|
|
21
|
+
class="pointer-events-none absolute left-0 top-1/2 h-xs -translate-y-1/2 rounded bg-primary"
|
|
22
22
|
:style="{
|
|
23
23
|
width: getPercentage + '%',
|
|
24
24
|
}"
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
<div
|
|
28
28
|
class="
|
|
29
29
|
ui-input-range__thumb
|
|
30
|
-
|
|
31
|
-
h-xs
|
|
32
|
-
bg-primary
|
|
30
|
+
pointer-events-none
|
|
33
31
|
absolute
|
|
34
|
-
border-white
|
|
35
|
-
rounded-full
|
|
36
32
|
box-content
|
|
37
|
-
-
|
|
33
|
+
h-xs
|
|
34
|
+
w-xs
|
|
38
35
|
-translate-x-1/2
|
|
39
|
-
|
|
36
|
+
-translate-y-1/2
|
|
37
|
+
rounded-full
|
|
38
|
+
border-white
|
|
39
|
+
bg-primary
|
|
40
40
|
"
|
|
41
41
|
:style="{left: getPercentage + '%'}"
|
|
42
42
|
/>
|
|
@@ -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
|
|
4
|
+
class="ui-list-item group relative grid grid-flow-col justify-start gap-xs text-secondary"
|
|
5
5
|
:class="[
|
|
6
6
|
size === EListItemSize.SM && 'text-sm',
|
|
7
7
|
size === EListItemSize.MD && 'text-md',
|
|
@@ -11,7 +11,17 @@
|
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
13
|
v-if="kind === EListItemTypes.PROGRESS"
|
|
14
|
-
class="
|
|
14
|
+
class="
|
|
15
|
+
ui-list-item__line
|
|
16
|
+
absolute
|
|
17
|
+
left-xs
|
|
18
|
+
top-sm
|
|
19
|
+
h-full
|
|
20
|
+
w-xxs
|
|
21
|
+
-translate-x-2/4
|
|
22
|
+
bg-primary-300
|
|
23
|
+
group-last:hidden
|
|
24
|
+
"
|
|
15
25
|
/>
|
|
16
26
|
|
|
17
27
|
<slot name="icon">
|
|
@@ -48,6 +58,7 @@
|
|
|
48
58
|
import UiTypography, { ETextWeight } from "../ui-typography";
|
|
49
59
|
import { ESize } from "../../_types/sizing";
|
|
50
60
|
import { EListItemTypes, EListItemSpacing, EListItemSize } from "./_types";
|
|
61
|
+
import { HTMLAttributes } from "vue";
|
|
51
62
|
|
|
52
63
|
withDefaults(defineProps<{
|
|
53
64
|
icon?: TIconName
|
|
@@ -55,7 +66,7 @@
|
|
|
55
66
|
kind?: EListItemTypes
|
|
56
67
|
size?: EListItemSize
|
|
57
68
|
spacing?: EListItemSpacing
|
|
58
|
-
iconClass?:
|
|
69
|
+
iconClass?: HTMLAttributes["class"]
|
|
59
70
|
}>(), {
|
|
60
71
|
kind: EListItemTypes.DEFAULT,
|
|
61
72
|
size: EListItemSize.SM,
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="
|
|
4
4
|
ui-modal
|
|
5
|
-
|
|
6
|
-
items-center
|
|
7
|
-
w-full
|
|
8
|
-
z-10
|
|
5
|
+
max-height max-width
|
|
9
6
|
inset-0
|
|
7
|
+
z-10
|
|
8
|
+
flex
|
|
9
|
+
w-full
|
|
10
|
+
flex-col
|
|
11
|
+
items-center
|
|
12
|
+
overflow-y-scroll
|
|
10
13
|
rounded-2xl
|
|
11
|
-
shadow-md
|
|
12
|
-
p-md
|
|
13
14
|
bg-white
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
max-width
|
|
15
|
+
p-md
|
|
16
|
+
shadow-md
|
|
17
17
|
"
|
|
18
18
|
:class="[
|
|
19
19
|
modalSize === EModalSizes.SM &&'h-fit max-w-[24rem]',
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
>
|
|
25
25
|
<div
|
|
26
26
|
v-if="$slots.icon"
|
|
27
|
-
class="mt-md
|
|
27
|
+
class="mb-sm mt-md"
|
|
28
28
|
>
|
|
29
29
|
<slot name="icon" />
|
|
30
30
|
</div>
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
:weight="ETextWeight.REGULAR"
|
|
48
48
|
:align="ETextAlign.CENTER"
|
|
49
49
|
line-height
|
|
50
|
-
class="w-full
|
|
50
|
+
class="mb-md w-full overflow-y-auto text-secondary"
|
|
51
51
|
>
|
|
52
52
|
<slot />
|
|
53
53
|
</ui-typography>
|
|
54
54
|
|
|
55
55
|
<div
|
|
56
56
|
v-if="$slots.footer"
|
|
57
|
-
class="w-full
|
|
57
|
+
class="mt-auto w-full"
|
|
58
58
|
>
|
|
59
59
|
<slot name="footer" />
|
|
60
60
|
</div>
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="
|
|
3
|
+
class="
|
|
4
|
+
notification-badge
|
|
5
|
+
absolute
|
|
6
|
+
h-sm
|
|
7
|
+
min-w-sm
|
|
8
|
+
rounded-full
|
|
9
|
+
border
|
|
10
|
+
border-white
|
|
11
|
+
bg-error
|
|
12
|
+
text-center
|
|
13
|
+
text-xxs
|
|
14
|
+
font-bold
|
|
15
|
+
leading-none
|
|
16
|
+
text-white
|
|
17
|
+
"
|
|
4
18
|
:class="[
|
|
5
|
-
origin === EBadgeOrigin.DEFAULT && '
|
|
6
|
-
origin === EBadgeOrigin.OFFSET_TOP_RIGHT && '-
|
|
19
|
+
origin === EBadgeOrigin.DEFAULT && 'right-0 top-0',
|
|
20
|
+
origin === EBadgeOrigin.OFFSET_TOP_RIGHT && '-right-xxs -top-xxs',
|
|
7
21
|
]"
|
|
8
22
|
>
|
|
9
23
|
<slot />
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-order-card relative
|
|
3
|
+
class="ui-order-card relative mt-sm rounded-md pt-md text-center"
|
|
4
4
|
:class="[
|
|
5
|
-
kind === EOrderCardTypes.DEFAULT && '
|
|
5
|
+
kind === EOrderCardTypes.DEFAULT && 'bg-primary-300 text-white',
|
|
6
6
|
kind === EOrderCardTypes.WARNING && 'bg-warning-300 text-warning-700'
|
|
7
7
|
]"
|
|
8
8
|
>
|
|
9
9
|
<ui-icon
|
|
10
10
|
:icon-name="iconName"
|
|
11
11
|
:size="ESize.LG"
|
|
12
|
-
class="absolute
|
|
12
|
+
class="absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-300"
|
|
13
13
|
:class="[
|
|
14
14
|
kind === EOrderCardTypes.DEFAULT && 'text-white',
|
|
15
15
|
kind === EOrderCardTypes.WARNING && 'bg-warning-300 text-white'
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
<ui-typography
|
|
46
46
|
v-if="$slots.footer"
|
|
47
|
-
class="py-sm text-white
|
|
47
|
+
class="rounded-b-lg py-sm text-white"
|
|
48
48
|
:class="[
|
|
49
49
|
kind === EOrderCardTypes.DEFAULT && 'bg-primary-700',
|
|
50
50
|
kind === EOrderCardTypes.WARNING && 'bg-warning-700'
|
|
@@ -11,54 +11,53 @@
|
|
|
11
11
|
name="ui-plain-radio"
|
|
12
12
|
type="radio"
|
|
13
13
|
:disabled="disabled"
|
|
14
|
-
class="appearance-none
|
|
14
|
+
class="peer absolute appearance-none"
|
|
15
15
|
>
|
|
16
16
|
|
|
17
17
|
<div
|
|
18
18
|
class="ui-plain-radio__content
|
|
19
|
+
box-border
|
|
19
20
|
grid
|
|
21
|
+
h-full
|
|
22
|
+
w-full
|
|
23
|
+
cursor-pointer
|
|
20
24
|
grid-flow-col
|
|
21
|
-
justify-start
|
|
22
25
|
items-center
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
w-full
|
|
26
|
-
h-full
|
|
27
|
-
py-sm px-sm
|
|
26
|
+
justify-start
|
|
27
|
+
gap-sm rounded-xl
|
|
28
28
|
border
|
|
29
29
|
border-secondary-alt-500
|
|
30
30
|
bg-white
|
|
31
|
-
|
|
32
|
-
cursor-pointer
|
|
33
|
-
rounded-xl
|
|
34
|
-
|
|
31
|
+
p-sm
|
|
35
32
|
before:absolute
|
|
36
33
|
before:-z-10
|
|
34
|
+
|
|
37
35
|
before:box-border
|
|
38
36
|
before:rounded-[16px]
|
|
39
37
|
before:bg-primary-300
|
|
40
|
-
|
|
38
|
+
hover:border-secondary-alt-700
|
|
41
39
|
peer-checked:border-transparent
|
|
40
|
+
|
|
41
|
+
peer-checked:shadow-selected-shadow
|
|
42
|
+
peer-checked:hover:shadow-border-selected
|
|
42
43
|
peer-checked:active:shadow-border-primary
|
|
43
|
-
peer-checked:active:before:-top-xs
|
|
44
44
|
peer-checked:active:before:-bottom-xs
|
|
45
45
|
peer-checked:active:before:-left-xs
|
|
46
46
|
peer-checked:active:before:-right-xs
|
|
47
47
|
|
|
48
|
-
peer-checked:
|
|
49
|
-
peer-
|
|
48
|
+
peer-checked:active:before:-top-xs
|
|
49
|
+
peer-focus:before:-bottom-xs
|
|
50
50
|
|
|
51
|
-
peer-
|
|
51
|
+
peer-focus:before:-left-xs
|
|
52
|
+
peer-focus:before:-right-xs
|
|
53
|
+
peer-focus:before:-top-xs
|
|
52
54
|
peer-active:before:-bottom-xxs
|
|
55
|
+
|
|
53
56
|
peer-active:before:-left-xxs
|
|
54
57
|
peer-active:before:-right-xxs
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
peer-
|
|
58
|
-
peer-focus:before:-left-xs
|
|
59
|
-
peer-focus:before:-right-xs
|
|
60
|
-
"
|
|
61
|
-
:class="disabled && 'pointer-events-none border-secondary-alt-400 peer-checked:shadow-border-primary-disabled'"
|
|
58
|
+
peer-active:before:-top-xxs"
|
|
59
|
+
:class="disabled
|
|
60
|
+
&& 'pointer-events-none border-secondary-alt-400 peer-checked:shadow-border-primary-disabled'"
|
|
62
61
|
>
|
|
63
62
|
<ui-radio
|
|
64
63
|
v-model="radioModel"
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ui-progress.vue";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/vue3";
|
|
2
|
+
import UiProgress from ".";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/ui-progress",
|
|
6
|
+
component: UiProgress,
|
|
7
|
+
|
|
8
|
+
argTypes: {
|
|
9
|
+
// kind: {
|
|
10
|
+
// control: { type: "select" },
|
|
11
|
+
// options: Object.values(EAlertTypes),
|
|
12
|
+
// description: "The button kinds",
|
|
13
|
+
// },
|
|
14
|
+
min: {
|
|
15
|
+
control: { type: "number" },
|
|
16
|
+
description: "The minimum value",
|
|
17
|
+
},
|
|
18
|
+
max: {
|
|
19
|
+
control: { type: "number" },
|
|
20
|
+
description: "The maximum value",
|
|
21
|
+
},
|
|
22
|
+
current: {
|
|
23
|
+
control: { type: "number" },
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
} satisfies Meta<typeof UiProgress>;
|
|
27
|
+
|
|
28
|
+
export const Default = {
|
|
29
|
+
args: {
|
|
30
|
+
min: 0,
|
|
31
|
+
max: 10,
|
|
32
|
+
current: 3,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-progress">
|
|
3
|
+
<div
|
|
4
|
+
class="relative h-xs w-full overflow-hidden rounded-lg bg-primary-alt-300"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
class="
|
|
8
|
+
ui-progress__bar-fill
|
|
9
|
+
absolute
|
|
10
|
+
left-0
|
|
11
|
+
top-0
|
|
12
|
+
z-10
|
|
13
|
+
h-full
|
|
14
|
+
rounded-lg
|
|
15
|
+
bg-primary-alt-700
|
|
16
|
+
transition-all
|
|
17
|
+
duration-300
|
|
18
|
+
"
|
|
19
|
+
:style="{
|
|
20
|
+
width: filler + '%'
|
|
21
|
+
}"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script lang="ts" setup>
|
|
28
|
+
import { computed } from "vue";
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<{
|
|
31
|
+
min: number
|
|
32
|
+
max: number
|
|
33
|
+
current: number
|
|
34
|
+
}>(),{
|
|
35
|
+
min: 0,
|
|
36
|
+
max: 100,
|
|
37
|
+
current: 0
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const filler = computed(() => {
|
|
41
|
+
return ((props.current - props.min) / (props.max - props.min)) * 100;
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label
|
|
3
|
-
class="ui-radio grid cursor-pointer
|
|
3
|
+
class="ui-radio group grid cursor-pointer grid-flow-col"
|
|
4
4
|
:class="[
|
|
5
5
|
slots.default && 'items-center gap-xs',
|
|
6
6
|
(!justify || justify === EJustify.START) && 'justify-start',
|
|
@@ -19,40 +19,40 @@
|
|
|
19
19
|
:name="name.toString()"
|
|
20
20
|
:value="value"
|
|
21
21
|
:disabled="disabled"
|
|
22
|
-
class="appearance-none
|
|
22
|
+
class="peer absolute appearance-none"
|
|
23
23
|
>
|
|
24
24
|
<span
|
|
25
25
|
class="
|
|
26
26
|
ui-radio_custom
|
|
27
27
|
relative
|
|
28
28
|
block
|
|
29
|
-
w-md
|
|
30
29
|
h-md
|
|
30
|
+
w-md
|
|
31
|
+
rounded-full
|
|
31
32
|
border
|
|
32
33
|
border-secondary-alt
|
|
33
|
-
rounded-full
|
|
34
34
|
bg-white
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
peer-checked:border-primary
|
|
35
|
+
group-hover:border-secondary-alt-700
|
|
36
|
+
group-focus:border-secondary-alt-700
|
|
38
37
|
peer-checked:border-2
|
|
38
|
+
peer-checked:border-primary
|
|
39
39
|
peer-checked:hover:border-primary-600
|
|
40
40
|
peer-focus:shadow-border-primary
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
peer-disabled:border-secondary-alt-400
|
|
42
|
+
peer-disabled:bg-secondary-alt-200"
|
|
43
43
|
:class="invertOrder && 'order-last'"
|
|
44
44
|
>
|
|
45
45
|
<span
|
|
46
46
|
class="
|
|
47
47
|
ui-radio__dot
|
|
48
48
|
absolute
|
|
49
|
-
top-2/4
|
|
50
49
|
left-2/4
|
|
51
|
-
|
|
52
|
-
h-xs
|
|
50
|
+
top-2/4
|
|
53
51
|
block
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
h-xs
|
|
53
|
+
w-xs
|
|
54
|
+
rounded-full
|
|
55
|
+
bg-primary"
|
|
56
56
|
/>
|
|
57
57
|
</span>
|
|
58
58
|
<slot />
|
|
@@ -12,52 +12,54 @@
|
|
|
12
12
|
type="radio"
|
|
13
13
|
:name="name"
|
|
14
14
|
:value="value"
|
|
15
|
-
class="peer
|
|
15
|
+
class="group peer absolute appearance-none"
|
|
16
16
|
:disabled="disabled"
|
|
17
17
|
>
|
|
18
18
|
<div
|
|
19
19
|
class="
|
|
20
20
|
ui-radio-fancy__content
|
|
21
21
|
box-border
|
|
22
|
-
w-full
|
|
23
22
|
h-full
|
|
24
|
-
|
|
23
|
+
w-full
|
|
24
|
+
cursor-pointer rounded-xl
|
|
25
25
|
border
|
|
26
26
|
border-secondary-alt-500
|
|
27
27
|
bg-white
|
|
28
|
-
|
|
29
|
-
cursor-pointer
|
|
30
|
-
rounded-xl
|
|
31
|
-
|
|
28
|
+
p-sm
|
|
32
29
|
before:absolute
|
|
33
30
|
before:-z-10
|
|
31
|
+
|
|
34
32
|
before:box-border
|
|
35
33
|
before:rounded-[16px]
|
|
36
34
|
before:bg-primary-300
|
|
37
|
-
|
|
35
|
+
hover:border-secondary-alt-700
|
|
38
36
|
peer-checked:border-transparent
|
|
37
|
+
|
|
38
|
+
peer-checked:shadow-selected-shadow
|
|
39
|
+
peer-checked:hover:shadow-border-selected
|
|
39
40
|
peer-checked:active:shadow-border-primary
|
|
40
|
-
peer-checked:active:before:-top-xs
|
|
41
41
|
peer-checked:active:before:-bottom-xs
|
|
42
42
|
peer-checked:active:before:-left-xs
|
|
43
43
|
peer-checked:active:before:-right-xs
|
|
44
44
|
|
|
45
|
-
peer-checked:
|
|
46
|
-
peer-
|
|
45
|
+
peer-checked:active:before:-top-xs
|
|
46
|
+
peer-focus:before:-bottom-xs
|
|
47
47
|
|
|
48
|
-
peer-
|
|
48
|
+
peer-focus:before:-left-xs
|
|
49
|
+
peer-focus:before:-right-xs
|
|
50
|
+
peer-focus:before:-top-xs
|
|
49
51
|
peer-active:before:-bottom-xxs
|
|
52
|
+
|
|
50
53
|
peer-active:before:-left-xxs
|
|
51
54
|
peer-active:before:-right-xxs
|
|
52
|
-
|
|
53
|
-
peer-focus:before:-top-xs
|
|
54
|
-
peer-focus:before:-bottom-xs
|
|
55
|
-
peer-focus:before:-left-xs
|
|
56
|
-
peer-focus:before:-right-xs
|
|
55
|
+
peer-active:before:-top-xxs
|
|
57
56
|
"
|
|
58
|
-
:class="[
|
|
57
|
+
:class="[
|
|
58
|
+
disabled
|
|
59
|
+
&& 'pointer-events-none border-secondary-alt-400 peer-checked:shadow-border-primary-disabled',
|
|
59
60
|
radioSize === ERadioSizes.DEFAULT && 'default',
|
|
60
|
-
radioSize === ERadioSizes.MINIMAL && 'flex gap-sm align-middle'
|
|
61
|
+
radioSize === ERadioSizes.MINIMAL && 'flex gap-sm align-middle'
|
|
62
|
+
]"
|
|
61
63
|
>
|
|
62
64
|
<div
|
|
63
65
|
v-if="radioSize === ERadioSizes.DEFAULT"
|
|
@@ -96,7 +98,7 @@
|
|
|
96
98
|
|
|
97
99
|
<script lang="ts" setup>
|
|
98
100
|
import { computed } from "vue";
|
|
99
|
-
import UiTypography, { ETypographySizes
|
|
101
|
+
import UiTypography, { ETypographySizes } from "../ui-typography";
|
|
100
102
|
import type { TIconName } from "../ui-icon";
|
|
101
103
|
import { ESize } from "../../_types/sizing";
|
|
102
104
|
import { EColors } from "../../_types/colors";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="
|
|
4
4
|
ui-result-card-range
|
|
5
|
-
w-full
|
|
6
5
|
flex
|
|
6
|
+
w-full
|
|
7
7
|
flex-col
|
|
8
8
|
items-center
|
|
9
|
+
rounded-3xl
|
|
9
10
|
border-4
|
|
10
11
|
border-secondary-alt-300
|
|
11
12
|
bg-secondary-alt-200
|
|
12
|
-
|
|
13
|
-
text-secondary-500 p-md"
|
|
13
|
+
p-md text-secondary-500"
|
|
14
14
|
>
|
|
15
15
|
<ui-icon
|
|
16
16
|
v-if="iconName"
|
|
@@ -10,12 +10,23 @@
|
|
|
10
10
|
</ui-typography>
|
|
11
11
|
</slot>
|
|
12
12
|
<div
|
|
13
|
-
class="relative rounded-lg border
|
|
14
|
-
:class="[disabled && 'pointer-events-none
|
|
13
|
+
class="relative rounded-lg border border-secondary-alt-500 bg-white hover:border-secondary-alt-700"
|
|
14
|
+
:class="[disabled && 'pointer-events-none border-secondary-alt-300 bg-secondary-alt-200']"
|
|
15
15
|
>
|
|
16
16
|
<select
|
|
17
17
|
v-model="radioModel"
|
|
18
|
-
class="
|
|
18
|
+
class="
|
|
19
|
+
m-0
|
|
20
|
+
w-full
|
|
21
|
+
cursor-pointer
|
|
22
|
+
appearance-none
|
|
23
|
+
border-0
|
|
24
|
+
bg-transparent
|
|
25
|
+
p-sm
|
|
26
|
+
italic
|
|
27
|
+
text-secondary-alt
|
|
28
|
+
outline-0
|
|
29
|
+
"
|
|
19
30
|
>
|
|
20
31
|
<slot />
|
|
21
32
|
</select>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="ui-snackbar flex
|
|
3
|
+
class="ui-snackbar flex w-full justify-between rounded-lg p-sm shadow-md"
|
|
4
4
|
:class="[
|
|
5
5
|
kind === ESnackbarTypes.DEFAULT && 'bg-white',
|
|
6
6
|
kind === ESnackbarTypes.PRIMARY && 'bg-primary text-white',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { ETextAlign, ETextWeight } from "../ui-typography";
|
|
2
2
|
export { default as UiTableCell } from "./ui-table-cell";
|
|
3
3
|
export { default as UiTableRow, ERowKind } from "./ui-table-row";
|
|
4
|
+
export { default as UiTable } from "./ui-table.vue";
|
|
5
|
+
export { ETableKind } from "./_types";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<table
|
|
3
3
|
:class="[
|
|
4
|
-
'ui-table',
|
|
4
|
+
'ui-table rounded-lg',
|
|
5
5
|
kind === ETableKind.SECONDARY && 'ui-table__secondary',
|
|
6
6
|
kind === ETableKind.SECONDARY_INVERTED && 'ui-table__secondary-inverted',
|
|
7
7
|
]"
|
|
@@ -21,13 +21,11 @@
|
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<style scoped>
|
|
24
|
-
.ui-table__secondary::v-deep
|
|
24
|
+
.ui-table__secondary::v-deep(tr:nth-child(odd)){
|
|
25
25
|
background-color: var(--color-secondary-alt-200);
|
|
26
|
-
border-radius: var(--xs);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
.ui-table__secondary-inverted::v-deep
|
|
28
|
+
.ui-table__secondary-inverted::v-deep(tr:nth-child(even)){
|
|
30
29
|
background-color: var(--color-secondary-alt-200);
|
|
31
|
-
border-radius: var(--xs);
|
|
32
30
|
}
|
|
33
31
|
</style>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ul class="ui-tabs
|
|
2
|
+
<ul class="ui-tabs grid grid-flow-col rounded-full bg-secondary-alt-200">
|
|
3
3
|
<li
|
|
4
4
|
v-for="tab in tabs"
|
|
5
5
|
:key="tab"
|
|
6
6
|
class="rounded-full text-center"
|
|
7
7
|
:class="[tabsModel === tab && 'bg-white']"
|
|
8
8
|
>
|
|
9
|
-
<label class="block cursor-pointer py-xs
|
|
9
|
+
<label class="block cursor-pointer px-md py-xs">
|
|
10
10
|
<input
|
|
11
11
|
v-model="tabsModel"
|
|
12
12
|
type="radio"
|
|
13
|
-
class="appearance-none
|
|
13
|
+
class="absolute appearance-none"
|
|
14
14
|
:value="tab"
|
|
15
15
|
:name="name"
|
|
16
16
|
>
|
|
@@ -12,26 +12,26 @@
|
|
|
12
12
|
</slot>
|
|
13
13
|
|
|
14
14
|
<label
|
|
15
|
-
class="
|
|
15
|
+
class="flex cursor-pointer gap-sm rounded-full"
|
|
16
16
|
:class="[
|
|
17
|
-
disabled && 'pointer-events-none
|
|
17
|
+
disabled && 'ui-toggle_disabled pointer-events-none',
|
|
18
18
|
invertOrder && 'flex-row-reverse',
|
|
19
19
|
alignCenter && 'items-center'
|
|
20
20
|
]"
|
|
21
21
|
>
|
|
22
22
|
<span
|
|
23
|
-
class="ui-input__input-wrapper block
|
|
23
|
+
class="ui-input__input-wrapper relative block h-md"
|
|
24
24
|
>
|
|
25
25
|
<input
|
|
26
26
|
v-model="checkboxModel"
|
|
27
27
|
type="checkbox"
|
|
28
|
-
class="
|
|
28
|
+
class="absolute h-0 w-0 appearance-none border-0"
|
|
29
29
|
:value="value"
|
|
30
30
|
>
|
|
31
31
|
|
|
32
|
-
<span class="ui-toggle__bg-block w-lg
|
|
32
|
+
<span class="ui-toggle__bg-block block h-md w-lg rounded-full bg-secondary-alt" />
|
|
33
33
|
|
|
34
|
-
<span class="ui-toggle__dot
|
|
34
|
+
<span class="ui-toggle__dot absolute top-0 block rounded-full bg-white">
|
|
35
35
|
<svg
|
|
36
36
|
class="ui-toggle__check-icon absolute"
|
|
37
37
|
:class="disabled ? 'text-primary-300' : 'text-primary'"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
67
|
<script lang="ts" setup>
|
|
68
|
-
import UiTypography, { ETypographySizes
|
|
68
|
+
import UiTypography, { ETypographySizes } from "../ui-typography";
|
|
69
69
|
import { computed } from "vue";
|
|
70
70
|
|
|
71
71
|
const props = defineProps<{
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
class="grid"
|
|
24
24
|
>
|
|
25
25
|
<span
|
|
26
|
-
class="block h-xxl w-xxl rounded-full
|
|
26
|
+
class="relative block h-xxl w-xxl rounded-full"
|
|
27
27
|
:style="{
|
|
28
28
|
backgroundColor: value2
|
|
29
29
|
}"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
<div v-else>
|
|
44
44
|
<span
|
|
45
|
-
class="block h-xxl w-xxl rounded-full
|
|
45
|
+
class="relative block h-xxl w-xxl rounded-full"
|
|
46
46
|
:style="{
|
|
47
47
|
backgroundColor: value
|
|
48
48
|
}"
|