@indielayer/ui 1.4.0 → 1.5.1
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/docs/components/common/CodePreview.vue +1 -1
- package/docs/components/common/CodeSnippet.vue +5 -7
- package/docs/components/common/DocumentPage.vue +89 -93
- package/docs/components/menu/DocsMenu.vue +75 -122
- package/docs/components/toolbar/PreToolbar.vue +10 -12
- package/docs/components/toolbar/Toolbar.vue +21 -8
- package/docs/layouts/default.vue +7 -3
- package/docs/pages/colors.vue +49 -54
- package/docs/pages/component/button/button-group.vue +6 -2
- package/docs/pages/component/button/size.vue +1 -1
- package/docs/pages/component/carousel/usage.vue +2 -2
- package/docs/pages/component/form/usage.vue +3 -3
- package/docs/pages/component/formGroup/usage.vue +1 -0
- package/docs/pages/component/input/usage.vue +8 -9
- package/docs/pages/component/modal/composed.vue +10 -2
- package/docs/pages/component/modal/usage.vue +11 -6
- package/docs/pages/component/popover/usage.vue +3 -3
- package/docs/pages/component/select/usage.vue +1 -0
- package/docs/pages/component/tabs/usage.vue +6 -1
- package/docs/pages/component/textarea/usage.vue +10 -13
- package/docs/pages/component/toggle/usage.vue +9 -11
- package/docs/pages/component/tooltip/index.vue +2 -2
- package/docs/pages/component/tooltip/usage.vue +4 -8
- package/docs/pages/icons.vue +54 -58
- package/docs/pages/index.vue +73 -77
- package/docs/pages/play.vue +2 -14
- package/docs/pages/typography.vue +26 -30
- package/docs/router/index.ts +2 -0
- package/exports/tailwind.preset.js +0 -1
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
- package/lib/components/badge/Badge.vue.js +7 -7
- package/lib/components/breadcrumbs/theme/Breadcrumbs.base.theme.js +1 -1
- package/lib/components/button/Button.vue.js +2 -2
- package/lib/components/button/Button.vue2.js +26 -26
- package/lib/components/button/theme/Button.base.theme.js +7 -7
- package/lib/components/card/theme/Card.base.theme.js +1 -1
- package/lib/components/checkbox/Checkbox.vue.d.ts +3 -0
- package/lib/components/checkbox/Checkbox.vue2.js +23 -23
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +6 -6
- package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
- package/lib/components/container/theme/Container.base.theme.js +2 -2
- package/lib/components/divider/Divider.vue.js +14 -14
- package/lib/components/divider/theme/Divider.base.theme.js +2 -2
- package/lib/components/drawer/Drawer.vue.js +2 -2
- package/lib/components/drawer/theme/Drawer.base.theme.js +1 -1
- package/lib/components/form/Form.vue.js +1 -1
- package/lib/components/form/theme/Form.base.theme.js +4 -4
- package/lib/components/form/theme/Form.carbon.theme.js +4 -4
- package/lib/components/formGroup/FormGroup.vue.d.ts +3 -0
- package/lib/components/formGroup/FormGroup.vue.js +16 -15
- package/lib/components/formGroup/theme/FormGroup.base.theme.js +1 -1
- package/lib/components/icon/theme/Icon.base.theme.js +1 -1
- package/lib/components/index.js +108 -107
- package/lib/components/input/Input.vue.d.ts +3 -0
- package/lib/components/input/Input.vue.js +4 -3
- package/lib/components/input/theme/Input.base.theme.js +10 -10
- package/lib/components/input/theme/Input.carbon.theme.js +10 -10
- package/lib/components/inputFooter/theme/InputFooter.base.theme.js +3 -3
- package/lib/components/inputFooter/theme/InputFooter.carbon.theme.js +2 -2
- package/lib/components/label/Label.vue.d.ts +3 -0
- package/lib/components/label/Label.vue.js +26 -20
- package/lib/components/label/theme/Label.base.theme.js +1 -1
- package/lib/components/label/theme/Label.carbon.theme.js +3 -3
- package/lib/components/link/Link.vue.js +2 -2
- package/lib/components/link/Link.vue2.js +4 -4
- package/lib/components/loader/theme/Loader.base.theme.js +1 -1
- package/lib/components/loader/theme/Loader.carbon.theme.js +1 -1
- package/lib/components/menu/Menu.vue.js +19 -19
- package/lib/components/menu/theme/MenuItem.base.theme.js +21 -31
- package/lib/components/modal/Modal.vue.d.ts +4 -0
- package/lib/components/modal/Modal.vue.js +80 -74
- package/lib/components/modal/theme/Modal.base.theme.js +10 -10
- package/lib/components/modal/theme/Modal.carbon.theme.js +3 -3
- package/lib/components/notifications/Notifications.vue.js +1 -1
- package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
- package/lib/components/notifications/theme/Notifications.carbon.theme.js +3 -3
- package/lib/components/pagination/Pagination.vue.js +27 -27
- package/lib/components/popover/Popover.vue.d.ts +13 -0
- package/lib/components/popover/Popover.vue.js +13 -8
- package/lib/components/popover/Popover.vue2.js +3 -2
- package/lib/components/popover/Popover.vue3.js +2 -3
- package/lib/components/popover/theme/PopoverContainer.base.theme.js +4 -4
- package/lib/components/popover/theme/PopoverContainer.carbon.theme.js +4 -4
- package/lib/components/progress/Progress.vue.js +11 -11
- package/lib/components/progress/theme/Progress.base.theme.js +10 -10
- package/lib/components/radio/Radio.vue.d.ts +3 -0
- package/lib/components/radio/theme/Radio.base.theme.js +28 -28
- package/lib/components/radio/theme/Radio.carbon.theme.js +8 -8
- package/lib/components/select/Select.vue.d.ts +16 -0
- package/lib/components/select/Select.vue.js +95 -92
- package/lib/components/select/theme/Select.base.theme.js +11 -11
- package/lib/components/select/theme/Select.carbon.theme.js +10 -10
- package/lib/components/skeleton/theme/Skeleton.base.theme.js +1 -1
- package/lib/components/slider/Slider.vue.d.ts +3 -0
- package/lib/components/slider/Slider.vue.js +1 -1
- package/lib/components/slider/theme/Slider.carbon.theme.js +6 -6
- package/lib/components/stepper/Stepper.vue.js +14 -14
- package/lib/components/tab/Tab.vue.js +55 -54
- package/lib/components/tab/theme/TabGroup.base.theme.js +15 -15
- package/lib/components/tab/theme/TabGroup.carbon.theme.js +8 -8
- package/lib/components/table/Table.vue.js +192 -194
- package/lib/components/table/theme/Table.base.theme.js +3 -3
- package/lib/components/table/theme/Table.carbon.theme.js +7 -7
- package/lib/components/table/theme/TableHead.base.theme.js +1 -1
- package/lib/components/table/theme/TableHead.carbon.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.carbon.theme.js +2 -2
- package/lib/components/table/theme/TableRow.base.theme.js +3 -3
- package/lib/components/table/theme/TableRow.carbon.theme.js +3 -3
- package/lib/components/tag/Tag.vue.js +4 -4
- package/lib/components/textarea/Textarea.vue.d.ts +7 -0
- package/lib/components/textarea/Textarea.vue.js +23 -21
- package/lib/components/textarea/theme/Textarea.base.theme.js +6 -6
- package/lib/components/textarea/theme/Textarea.carbon.theme.js +6 -6
- package/lib/components/toggle/Toggle.vue.d.ts +3 -0
- package/lib/components/toggle/Toggle.vue.js +26 -26
- package/lib/components/toggle/theme/Toggle.base.theme.js +1 -1
- package/lib/components/tooltip/ToggleTip.vue.d.ts +14 -0
- package/lib/components/tooltip/ToggleTip.vue.js +29 -0
- package/lib/components/tooltip/ToggleTip.vue2.js +4 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +22 -3
- package/lib/components/tooltip/Tooltip.vue.js +26 -17
- package/lib/components/tooltip/__tests__/ToggleTip.spec.d.ts +1 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/composables/useColors.js +9 -9
- package/lib/composables/useInputtable.d.ts +1 -0
- package/lib/composables/useInputtable.js +20 -19
- package/lib/index.js +37 -35
- package/lib/index.umd.js +7 -3
- package/lib/tailwind.preset.js +0 -1
- package/lib/themes/base/index.js +3 -6
- package/lib/themes/base/styles.css.js +4 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -1
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
- package/src/components/badge/Badge.vue +1 -1
- package/src/components/breadcrumbs/theme/Breadcrumbs.base.theme.ts +1 -1
- package/src/components/button/Button.vue +1 -1
- package/src/components/button/theme/Button.base.theme.ts +2 -2
- package/src/components/card/theme/Card.base.theme.ts +1 -1
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +8 -8
- package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
- package/src/components/container/theme/Container.base.theme.ts +2 -2
- package/src/components/divider/Divider.vue +1 -1
- package/src/components/divider/theme/Divider.base.theme.ts +2 -2
- package/src/components/drawer/Drawer.vue +2 -2
- package/src/components/drawer/theme/Drawer.base.theme.ts +1 -1
- package/src/components/form/Form.vue +1 -1
- package/src/components/form/theme/Form.base.theme.ts +1 -1
- package/src/components/form/theme/Form.carbon.theme.ts +1 -1
- package/src/components/formGroup/FormGroup.vue +1 -0
- package/src/components/formGroup/theme/FormGroup.base.theme.ts +1 -1
- package/src/components/icon/theme/Icon.base.theme.ts +2 -2
- package/src/components/input/Input.vue +2 -1
- package/src/components/input/theme/Input.base.theme.ts +5 -5
- package/src/components/input/theme/Input.carbon.theme.ts +6 -6
- package/src/components/inputFooter/theme/InputFooter.base.theme.ts +3 -3
- package/src/components/inputFooter/theme/InputFooter.carbon.theme.ts +2 -2
- package/src/components/label/Label.vue +4 -1
- package/src/components/label/theme/Label.base.theme.ts +1 -1
- package/src/components/label/theme/Label.carbon.theme.ts +1 -1
- package/src/components/link/Link.vue +1 -1
- package/src/components/loader/theme/Loader.base.theme.ts +1 -1
- package/src/components/loader/theme/Loader.carbon.theme.ts +1 -1
- package/src/components/menu/Menu.vue +3 -3
- package/src/components/menu/theme/MenuItem.base.theme.ts +30 -34
- package/src/components/modal/Modal.vue +11 -4
- package/src/components/modal/theme/Modal.base.theme.ts +9 -6
- package/src/components/modal/theme/Modal.carbon.theme.ts +3 -3
- package/src/components/notifications/Notifications.vue +1 -1
- package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
- package/src/components/notifications/theme/Notifications.carbon.theme.ts +1 -1
- package/src/components/pagination/Pagination.vue +3 -3
- package/src/components/popover/Popover.vue +77 -2
- package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
- package/src/components/popover/theme/PopoverContainer.carbon.theme.ts +1 -1
- package/src/components/progress/Progress.vue +1 -1
- package/src/components/progress/theme/Progress.base.theme.ts +2 -2
- package/src/components/radio/theme/Radio.base.theme.ts +8 -8
- package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
- package/src/components/select/Select.vue +7 -4
- package/src/components/select/theme/Select.base.theme.ts +8 -8
- package/src/components/select/theme/Select.carbon.theme.ts +8 -8
- package/src/components/skeleton/theme/Skeleton.base.theme.ts +1 -1
- package/src/components/slider/Slider.vue +1 -1
- package/src/components/slider/theme/Slider.carbon.theme.ts +1 -1
- package/src/components/stepper/Stepper.vue +3 -3
- package/src/components/tab/Tab.vue +3 -3
- package/src/components/tab/theme/TabGroup.base.theme.ts +4 -4
- package/src/components/tab/theme/TabGroup.carbon.theme.ts +3 -3
- package/src/components/table/Table.vue +2 -0
- package/src/components/table/theme/Table.base.theme.ts +1 -1
- package/src/components/table/theme/Table.carbon.theme.ts +2 -2
- package/src/components/table/theme/TableHead.base.theme.ts +1 -1
- package/src/components/table/theme/TableHead.carbon.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.carbon.theme.ts +2 -2
- package/src/components/table/theme/TableRow.base.theme.ts +3 -3
- package/src/components/table/theme/TableRow.carbon.theme.ts +3 -3
- package/src/components/tag/Tag.vue +1 -1
- package/src/components/textarea/Textarea.vue +3 -1
- package/src/components/textarea/theme/Textarea.base.theme.ts +5 -4
- package/src/components/textarea/theme/Textarea.carbon.theme.ts +5 -5
- package/src/components/toggle/Toggle.vue +3 -3
- package/src/components/toggle/theme/Toggle.base.theme.ts +1 -1
- package/src/components/tooltip/ToggleTip.vue +31 -0
- package/src/components/tooltip/Tooltip.vue +14 -4
- package/src/components/tooltip/__tests__/ToggleTip.spec.ts +11 -0
- package/src/components/tooltip/index.ts +3 -0
- package/src/composables/useColors.ts +1 -1
- package/src/composables/useInputtable.ts +1 -0
- package/src/themes/base/index.ts +0 -3
- package/src/themes/base/styles.css +4 -0
- package/src/version.ts +1 -1
- package/volar.d.ts +1 -0
package/lib/tailwind.preset.js
CHANGED
|
@@ -28,7 +28,6 @@ module.exports = () => ({
|
|
|
28
28
|
secondary: getColorVarPallete('secondary'),
|
|
29
29
|
success: getColorVarPallete('success'),
|
|
30
30
|
warning: getColorVarPallete('warning'),
|
|
31
|
-
danger: getColorVarPallete('error'),
|
|
32
31
|
error: getColorVarPallete('error'),
|
|
33
32
|
},
|
|
34
33
|
borderColor: getColorVar('border'),
|
package/lib/themes/base/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as e from "./components.js";
|
|
2
2
|
import s from "./styles.css.js";
|
|
3
|
-
const
|
|
3
|
+
const t = {
|
|
4
4
|
name: "Base",
|
|
5
|
-
colors: {
|
|
6
|
-
primary: { 50: "#ecfdf5", 100: "#d1fae5", 200: "#a7f3d0", 300: "#6ee7b7", 400: "#34d399", 500: "#10b981", 600: "#059669", 700: "#047857", 800: "#065f46", 900: "#064e3b", 950: "#022c22" }
|
|
7
|
-
},
|
|
8
5
|
styles: `${s}`,
|
|
9
6
|
classPrefix: "x-",
|
|
10
7
|
components: e
|
|
11
|
-
},
|
|
8
|
+
}, m = t;
|
|
12
9
|
export {
|
|
13
|
-
|
|
10
|
+
m as default
|
|
14
11
|
};
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.5.1";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indielayer/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Indielayer UI Components with Tailwind CSS build for Vue 3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "João Teixeira",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"require": "./lib/index.umd.js",
|
|
36
36
|
"types": "./lib/index.d.ts"
|
|
37
37
|
},
|
|
38
|
+
"./docs/*": "./docs/*",
|
|
38
39
|
"./nuxt": "./exports/nuxt.mjs",
|
|
39
40
|
"./nuxt.plugin": "./exports/nuxt.plugin.js",
|
|
40
41
|
"./nuxt.plugin.js": "./exports/nuxt.plugin.js",
|
|
@@ -11,7 +11,7 @@ const theme: AccordionItemTheme = {
|
|
|
11
11
|
if (props.iconAlign === 'left') classes.push('pl-8 pr-4')
|
|
12
12
|
else classes.push('pr-8 pl-4')
|
|
13
13
|
classes.push('py-2')
|
|
14
|
-
if (!props.disabled) classes.push('hover:bg-
|
|
14
|
+
if (!props.disabled) classes.push('hover:bg-secondary-50 dark:hover:bg-secondary-600')
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
if (!props.disabled) classes.push('cursor-pointer')
|
|
@@ -23,7 +23,7 @@ const theme: AccordionItemTheme = {
|
|
|
23
23
|
const classes = ['absolute flex transform transition-transform duration-150']
|
|
24
24
|
|
|
25
25
|
if (!data.collapsed) classes.push('rotate-180')
|
|
26
|
-
if (props.disabled) classes.push('text-
|
|
26
|
+
if (props.disabled) classes.push('text-secondary-300')
|
|
27
27
|
|
|
28
28
|
if (props.iconAlign === 'left') classes.push('left-2')
|
|
29
29
|
else classes.push('right-2')
|
|
@@ -101,7 +101,7 @@ const { styles, classes, className } = useTheme('Badge', {}, props)
|
|
|
101
101
|
:class="[
|
|
102
102
|
positionClasses,
|
|
103
103
|
{
|
|
104
|
-
'border-2 border-
|
|
104
|
+
'border-2 border-secondary-50 dark:border-secondary-900': outlined,
|
|
105
105
|
}
|
|
106
106
|
]"
|
|
107
107
|
>
|
|
@@ -122,7 +122,7 @@ defineExpose({ focus, blur })
|
|
|
122
122
|
:label="loadingLabel"
|
|
123
123
|
:status="loadingStatus"
|
|
124
124
|
/>
|
|
125
|
-
<div :class="{ 'invisible': loading }">
|
|
125
|
+
<div class="inline-flex items-center justify-center" :class="{ 'invisible': loading }">
|
|
126
126
|
<x-icon
|
|
127
127
|
v-if="computedIconLeft"
|
|
128
128
|
:size="computedSize"
|
|
@@ -193,10 +193,10 @@ const theme: ButtonTheme = {
|
|
|
193
193
|
// filled
|
|
194
194
|
vars.push(css.variables({
|
|
195
195
|
text: '#fff',
|
|
196
|
-
border:
|
|
196
|
+
border: color[600],
|
|
197
197
|
dark: {
|
|
198
198
|
text: '#fff',
|
|
199
|
-
border:
|
|
199
|
+
border: color[500],
|
|
200
200
|
},
|
|
201
201
|
}))
|
|
202
202
|
if (props.disabled) {
|
|
@@ -2,7 +2,7 @@ import type { CardTheme } from '../Card.vue'
|
|
|
2
2
|
|
|
3
3
|
const theme: CardTheme = {
|
|
4
4
|
classes: {
|
|
5
|
-
wrapper: ({ props }) => `
|
|
5
|
+
wrapper: ({ props }) => `bg-slate-50 dark:bg-slate-800 rounded-md ${props.flat ? '' : 'shadow'}`,
|
|
6
6
|
},
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -149,7 +149,7 @@ defineExpose({ focus, blur, toggle, reset, validate, setError })
|
|
|
149
149
|
]"
|
|
150
150
|
>
|
|
151
151
|
<x-spinner v-if="loading" :size="size" class="absolute" />
|
|
152
|
-
<span v-else-if="indeterminate" name="check-icon" class="w-2/3 h-[2px] bg-white dark:bg-
|
|
152
|
+
<span v-else-if="indeterminate" name="check-icon" class="w-2/3 h-[2px] bg-white dark:bg-secondary-900"></span>
|
|
153
153
|
<slot v-else name="icon">
|
|
154
154
|
<svg
|
|
155
155
|
viewBox="0 0 20 20"
|
|
@@ -11,17 +11,17 @@ const theme: CheckboxTheme = {
|
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
box: ({ props }) => {
|
|
14
|
-
const classes = ['rounded flex justify-center items-center shrink-0 border
|
|
14
|
+
const classes = ['rounded flex justify-center items-center shrink-0 border border-[color:var(--x-checkbox-border)] bg-[color:var(--x-checkbox-bg)] dark:border-[color:var(--x-checkbox-dark-border)] dark:bg-[color:var(--x-checkbox-dark-bg)]']
|
|
15
15
|
|
|
16
|
-
if (props.size === '
|
|
16
|
+
if (props.size === 'lg') classes.push('h-5 w-5')
|
|
17
17
|
else if (props.size === 'xl') classes.push('h-6 w-6')
|
|
18
|
-
else classes.push('h-
|
|
18
|
+
else classes.push('h-4 w-4')
|
|
19
19
|
|
|
20
20
|
return classes
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
content: ({ props }) => {
|
|
24
|
-
const classes = ['flex items-
|
|
24
|
+
const classes = ['flex items-baseline']
|
|
25
25
|
|
|
26
26
|
if (props.disabled) classes.push('cursor-not-allowed')
|
|
27
27
|
|
|
@@ -29,17 +29,17 @@ const theme: CheckboxTheme = {
|
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
icon: ({ props }) => {
|
|
32
|
-
const classes = ['fill-current text-white
|
|
32
|
+
const classes = ['fill-current text-white']
|
|
33
33
|
|
|
34
|
-
if (props.size === '
|
|
34
|
+
if (props.size === 'lg') classes.push('h-3 w-3')
|
|
35
35
|
else if (props.size === 'xl') classes.push('h-4 w-4')
|
|
36
|
-
else classes.push('h-
|
|
36
|
+
else classes.push('h-2.5 w-2.5')
|
|
37
37
|
|
|
38
38
|
return classes
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
label: ({ props }) => {
|
|
42
|
-
const classes = ['inline-block font-medium text-
|
|
42
|
+
const classes = ['inline-block font-medium text-secondary-800 dark:text-secondary-200 pl-2']
|
|
43
43
|
|
|
44
44
|
if (props.size === 'xs') classes.push('text-xs')
|
|
45
45
|
else if (props.size === 'sm') classes.push('text-sm')
|
|
@@ -29,7 +29,7 @@ const theme: CheckboxTheme = {
|
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
icon: ({ props }) => {
|
|
32
|
-
const classes = ['fill-current text-white dark:text-
|
|
32
|
+
const classes = ['fill-current text-white dark:text-secondary-900']
|
|
33
33
|
|
|
34
34
|
if (props.size === 'xs' || props.size === 'sm') classes.push('h-2 w-2')
|
|
35
35
|
else if (props.size === 'xl') classes.push('h-3.5 w-3.5')
|
|
@@ -39,7 +39,7 @@ const theme: CheckboxTheme = {
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
label: ({ props }) => {
|
|
42
|
-
const classes = ['text-
|
|
42
|
+
const classes = ['text-secondary-800 dark:text-secondary-200 pl-2 text-sm']
|
|
43
43
|
|
|
44
44
|
if (props.size === 'xs') classes.push('text-xs')
|
|
45
45
|
else if (props.size === 'sm') classes.push('text-sm')
|
|
@@ -3,9 +3,9 @@ import type { ContainerTheme } from '../Container.vue'
|
|
|
3
3
|
const theme: ContainerTheme = {
|
|
4
4
|
classes: {
|
|
5
5
|
wrapper: ({ props }) => {
|
|
6
|
-
const classes = ['px-4 md:px-
|
|
6
|
+
const classes = ['px-4 md:px-6']
|
|
7
7
|
|
|
8
|
-
if (!props.fluid) classes.push('max-w-screen-
|
|
8
|
+
if (!props.fluid) classes.push('max-w-screen-lg mx-auto')
|
|
9
9
|
|
|
10
10
|
return classes
|
|
11
11
|
},
|
|
@@ -40,7 +40,7 @@ const { styles, classes, className } = useTheme('Divider', {}, props)
|
|
|
40
40
|
></div>
|
|
41
41
|
<div
|
|
42
42
|
v-if="label"
|
|
43
|
-
class="font-medium text-sm text-
|
|
43
|
+
class="font-medium text-sm text-secondary-600 dark:text-secondary-300"
|
|
44
44
|
:class="[
|
|
45
45
|
classes.label,
|
|
46
46
|
{
|
|
@@ -4,9 +4,9 @@ const theme: DividerTheme = {
|
|
|
4
4
|
classes: {
|
|
5
5
|
wrapper: ({ props }) => `flex justify-center items-center ${props.vertical ? 'h-full flex-col' : 'w-full'}`,
|
|
6
6
|
|
|
7
|
-
label: 'font-medium text-sm text-
|
|
7
|
+
label: 'font-medium text-sm text-secondary-600 dark:text-secondary-300',
|
|
8
8
|
|
|
9
|
-
line: 'bg-
|
|
9
|
+
line: 'bg-secondary-200 dark:bg-secondary-700 flex-grow',
|
|
10
10
|
},
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -155,7 +155,7 @@ function onEnter(el: Element, done: () => void) {
|
|
|
155
155
|
}
|
|
156
156
|
el.addEventListener('transitionend', done)
|
|
157
157
|
setTimeout(() => {
|
|
158
|
-
if (props.backdrop) el.classList.add('bg-
|
|
158
|
+
if (props.backdrop) el.classList.add('bg-slate-500/30')
|
|
159
159
|
if (props.position === 'top') (el as HTMLElement).style.top = '0'
|
|
160
160
|
else if (props.position === 'bottom') (el as HTMLElement).style.bottom = '0'
|
|
161
161
|
else if (props.position === 'left') (el as HTMLElement).style.left = '0'
|
|
@@ -168,7 +168,7 @@ function onBeforeLeave(el: Element) {}
|
|
|
168
168
|
function onLeave(el: Element, done: () => void) {
|
|
169
169
|
el.addEventListener('transitionend', done)
|
|
170
170
|
setTimeout(() => {
|
|
171
|
-
if (props.backdrop) el.classList.remove('bg-
|
|
171
|
+
if (props.backdrop) el.classList.remove('bg-slate-500/30')
|
|
172
172
|
if (props.position === 'top') (el as HTMLElement).style.top = `-${props.height}px`
|
|
173
173
|
else if (props.position === 'bottom') (el as HTMLElement).style.bottom = `-${props.height}px`
|
|
174
174
|
else if (props.position === 'left') (el as HTMLElement).style.left = `-${props.width}px`
|
|
@@ -2,7 +2,7 @@ import type { DrawerTheme } from '../Drawer.vue'
|
|
|
2
2
|
|
|
3
3
|
const theme: DrawerTheme = {
|
|
4
4
|
classes: {
|
|
5
|
-
wrapper: 'flex flex-col max-h-full bg-white dark:bg-
|
|
5
|
+
wrapper: 'flex flex-col max-h-full bg-white dark:bg-secondary-800',
|
|
6
6
|
|
|
7
7
|
backdrop: 'duration-150 ease-in-out',
|
|
8
8
|
},
|
|
@@ -139,7 +139,7 @@ const { styles, classes, className } = useTheme('Form', {}, props)
|
|
|
139
139
|
@submit="submit"
|
|
140
140
|
>
|
|
141
141
|
<slot name="header">
|
|
142
|
-
<div v-if="title || description" class="mb-
|
|
142
|
+
<div v-if="title || description" class="mb-6">
|
|
143
143
|
<p v-if="title" :class="classes.title">{{ title }}</p>
|
|
144
144
|
<p v-if="description" :class="classes.description">{{ description }}</p>
|
|
145
145
|
</div>
|
|
@@ -8,9 +8,9 @@ const theme: IconTheme = {
|
|
|
8
8
|
if (props.size === 'xs') return classes + ' h-3 w-3'
|
|
9
9
|
else if (props.size === 'sm') return classes + ' h-4 w-4'
|
|
10
10
|
else if (props.size === 'lg') return classes + ' h-6 w-6'
|
|
11
|
-
else if (props.size === 'xl') return classes + ' h-
|
|
11
|
+
else if (props.size === 'xl') return classes + ' h-7 w-7'
|
|
12
12
|
|
|
13
|
-
return classes + ' h-
|
|
13
|
+
return classes + ' h-4 w-4'
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
}
|
|
@@ -114,6 +114,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
114
114
|
className,
|
|
115
115
|
classes.wrapper,
|
|
116
116
|
]"
|
|
117
|
+
:tooltip="tooltip"
|
|
117
118
|
>
|
|
118
119
|
<div class="relative">
|
|
119
120
|
<slot name="prefix">
|
|
@@ -134,7 +135,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
134
135
|
type === 'password' ? 'pr-10' : '',
|
|
135
136
|
// error
|
|
136
137
|
errorInternal
|
|
137
|
-
? 'border-
|
|
138
|
+
? 'border-error-500 dark:border-error-400 focus:outline-error-500'
|
|
138
139
|
: 'focus:outline-[color:var(--x-input-border)]',
|
|
139
140
|
{
|
|
140
141
|
'!pl-10': iconLeft,
|
|
@@ -5,9 +5,9 @@ const theme: InputTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
input: ({ props, data }) => {
|
|
8
|
-
const classes = ['appearance-none block w-full placeholder-
|
|
8
|
+
const classes = ['appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border shadow-sm rounded-md']
|
|
9
9
|
|
|
10
|
-
if (!data.errorInternal && !props.disabled) classes.push('hover:border-
|
|
10
|
+
if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
|
|
11
11
|
|
|
12
12
|
if (props.size === 'xs') classes.push('px-2 py-1 text-xs')
|
|
13
13
|
else if (props.size === 'sm') classes.push('px-2 py-2 text-sm')
|
|
@@ -16,13 +16,13 @@ const theme: InputTheme = {
|
|
|
16
16
|
else classes.push('px-3 py-2')
|
|
17
17
|
|
|
18
18
|
classes.push(props.disabled
|
|
19
|
-
? 'bg-
|
|
20
|
-
: 'bg-white dark:bg-
|
|
19
|
+
? 'bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed'
|
|
20
|
+
: 'bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
|
|
21
21
|
|
|
22
22
|
return classes
|
|
23
23
|
},
|
|
24
24
|
|
|
25
|
-
icon: 'text-
|
|
25
|
+
icon: 'text-secondary-600 dark:text-secondary-300 absolute my-auto inset-y-0',
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
styles: ({ colors, props, css }) => {
|
|
@@ -5,26 +5,26 @@ const theme: InputTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
input: ({ props, data }) => {
|
|
8
|
-
const classes = ['appearance-none block w-full placeholder-
|
|
8
|
+
const classes = ['appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border-b text-sm px-4']
|
|
9
9
|
|
|
10
|
-
if (!data.errorInternal && !props.disabled) classes.push('hover:border-
|
|
10
|
+
if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
|
|
11
11
|
|
|
12
12
|
if (props.size === 'xs' || props.size === 'sm') classes.push('py-1.5')
|
|
13
13
|
else if (props.size === 'lg' || props.size === 'xl') classes.push('py-3.5')
|
|
14
14
|
else classes.push('py-2.5')
|
|
15
15
|
|
|
16
16
|
if (props.disabled) {
|
|
17
|
-
classes.push('bg-
|
|
17
|
+
classes.push('bg-secondary-100 dark:bg-secondary-900 text-secondary-300 cursor-not-allowed')
|
|
18
18
|
} else if (props.readonly) {
|
|
19
|
-
classes.push('bg-white dark:bg-
|
|
19
|
+
classes.push('bg-white dark:bg-secondary-900 text-secondary-700')
|
|
20
20
|
} else {
|
|
21
|
-
classes.push('bg-
|
|
21
|
+
classes.push('bg-secondary-50 dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return classes
|
|
25
25
|
},
|
|
26
26
|
|
|
27
|
-
icon: 'text-
|
|
27
|
+
icon: 'text-secondary-600 dark:text-secondary-300 absolute my-auto inset-y-0',
|
|
28
28
|
},
|
|
29
29
|
|
|
30
30
|
styles: ({ colors, props, css }) => {
|
|
@@ -2,9 +2,9 @@ import type { InputFooterTheme } from '../InputFooter.vue'
|
|
|
2
2
|
|
|
3
3
|
const theme: InputFooterTheme = {
|
|
4
4
|
classes: {
|
|
5
|
-
wrapper: 'min-h-[1.3rem] text-
|
|
6
|
-
helperText: 'text-
|
|
7
|
-
errorText: 'text-
|
|
5
|
+
wrapper: 'min-h-[1.3rem] text-xs mt-1',
|
|
6
|
+
helperText: 'text-secondary-500 dark:text-secondary-400',
|
|
7
|
+
errorText: 'text-error-500 dark:text-error-400',
|
|
8
8
|
},
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@ import type { InputFooterTheme } from '../InputFooter.vue'
|
|
|
3
3
|
const theme: InputFooterTheme = {
|
|
4
4
|
classes: {
|
|
5
5
|
wrapper: 'text-xs mt-1',
|
|
6
|
-
helperText: 'text-
|
|
7
|
-
errorText: 'text-
|
|
6
|
+
helperText: 'text-secondary-500 dark:text-secondary-400',
|
|
7
|
+
errorText: 'text-error-500 dark:text-error-400',
|
|
8
8
|
},
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -10,6 +10,7 @@ const labelProps = {
|
|
|
10
10
|
type: String,
|
|
11
11
|
default: 'label',
|
|
12
12
|
},
|
|
13
|
+
tooltip: String,
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export type LabelProps = ExtractPublicPropTypes<typeof labelProps>
|
|
@@ -29,6 +30,7 @@ export default {
|
|
|
29
30
|
import type { ExtractPublicPropTypes } from 'vue'
|
|
30
31
|
import { useTheme, type ThemeComponent } from '../../composables/useTheme'
|
|
31
32
|
import { useCommon } from '../../composables/useCommon'
|
|
33
|
+
import XToggleTip from '../tooltip/ToggleTip.vue'
|
|
32
34
|
|
|
33
35
|
const props = defineProps(labelProps)
|
|
34
36
|
|
|
@@ -47,7 +49,8 @@ const { styles, classes, className } = useTheme('Label', {}, props)
|
|
|
47
49
|
:title="label"
|
|
48
50
|
:class="classes.label"
|
|
49
51
|
>
|
|
50
|
-
{{ label }}
|
|
52
|
+
<span>{{ label }}</span>
|
|
53
|
+
<x-toggle-tip v-if="tooltip" :content="tooltip"/>
|
|
51
54
|
</component>
|
|
52
55
|
<slot></slot>
|
|
53
56
|
</component>
|
|
@@ -12,7 +12,7 @@ const theme: LabelTheme = {
|
|
|
12
12
|
},
|
|
13
13
|
|
|
14
14
|
label: ({ props }) => {
|
|
15
|
-
const classes = 'font-medium text-
|
|
15
|
+
const classes = 'flex items-center gap-2 font-medium text-secondary-800 dark:text-secondary-200 mb-1'
|
|
16
16
|
|
|
17
17
|
if (props.size === 'xs') return classes + ' text-xs'
|
|
18
18
|
else if (props.size === 'sm') return classes + ' text-sm'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
const menuProps = {
|
|
3
3
|
...useCommon.props(),
|
|
4
|
-
...useColors.props('
|
|
4
|
+
...useColors.props('secondary'),
|
|
5
5
|
items: Array as PropType<MenuArrayItem[]>,
|
|
6
6
|
collapsible: {
|
|
7
7
|
type: Boolean,
|
|
@@ -109,7 +109,7 @@ const { styles, classes, className } = useTheme('Menu', {}, props)
|
|
|
109
109
|
</template>
|
|
110
110
|
<template #content="{ expand }">
|
|
111
111
|
<x-menu
|
|
112
|
-
class="border-l ml-4 border-
|
|
112
|
+
class="border-l ml-4 border-secondary-100 dark:border-secondary-700"
|
|
113
113
|
:class="{ 'pl-1': filled }"
|
|
114
114
|
:items="item.items"
|
|
115
115
|
:color="item.color || color"
|
|
@@ -138,7 +138,7 @@ const { styles, classes, className } = useTheme('Menu', {}, props)
|
|
|
138
138
|
@click="$emit('item-click')"
|
|
139
139
|
/>
|
|
140
140
|
<x-menu
|
|
141
|
-
class="x-menu-inner space-y-1 ml-4 border-l border-
|
|
141
|
+
class="x-menu-inner space-y-1 ml-4 border-l border-secondary-100 dark:border-secondary-700"
|
|
142
142
|
:class="{ 'pl-1': filled }"
|
|
143
143
|
:items="item.items"
|
|
144
144
|
:color="item.color || color"
|