@indielayer/ui 0.0.0-dev-20240129122517 → 0.0.0-dev-20240205224808
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/App.vue +25 -0
- package/docs/assets/css/hljs.css +302 -0
- package/docs/assets/css/tailwind.css +46 -0
- package/docs/assets/images/error.svg +1 -0
- package/docs/assets/images/logo.png +0 -0
- package/docs/assets/images/logo_mini.svg +10 -0
- package/docs/assets/images/logo_white.png +0 -0
- package/docs/assets/images/logo_word.svg +12 -0
- package/docs/assets/images/logo_word_dark.svg +12 -0
- package/docs/assets/images/photo1.jpeg +0 -0
- package/docs/assets/images/photo2.jpeg +0 -0
- package/docs/components/Cookies.vue +42 -0
- package/docs/components/common/CodePreview.vue +80 -0
- package/docs/components/common/CodeSnippet.vue +47 -0
- package/docs/components/common/CopyButton.vue +50 -0
- package/docs/components/common/DocumentPage.vue +285 -0
- package/docs/components/common/Indielayer-theme.json +702 -0
- package/docs/components/common/MultiSnippet.vue +26 -0
- package/docs/components/menu/DocsMenu.vue +96 -0
- package/docs/components/toolbar/PreToolbar.vue +16 -0
- package/docs/components/toolbar/Toolbar.vue +76 -0
- package/docs/components/toolbar/ToolbarColorToggle.vue +49 -0
- package/docs/icons.ts +61 -0
- package/docs/layouts/default.vue +33 -0
- package/docs/layouts/simple.vue +3 -0
- package/docs/main.ts +33 -0
- package/docs/pages/colors.vue +120 -0
- package/docs/pages/component/accordion/index.vue +29 -0
- package/docs/pages/component/accordion/usage.vue +30 -0
- package/docs/pages/component/alert/index.vue +29 -0
- package/docs/pages/component/alert/usage.vue +18 -0
- package/docs/pages/component/avatar/index.vue +43 -0
- package/docs/pages/component/avatar/size.vue +9 -0
- package/docs/pages/component/avatar/usage.vue +9 -0
- package/docs/pages/component/avatar/variants.vue +8 -0
- package/docs/pages/component/badge/index.vue +29 -0
- package/docs/pages/component/badge/usage.vue +50 -0
- package/docs/pages/component/breadcrumbs/index.vue +29 -0
- package/docs/pages/component/breadcrumbs/usage.vue +19 -0
- package/docs/pages/component/button/button-group.vue +22 -0
- package/docs/pages/component/button/icons.vue +9 -0
- package/docs/pages/component/button/index.vue +64 -0
- package/docs/pages/component/button/size.vue +9 -0
- package/docs/pages/component/button/states.vue +6 -0
- package/docs/pages/component/button/usage.vue +12 -0
- package/docs/pages/component/button/variants.vue +7 -0
- package/docs/pages/component/card/index.vue +29 -0
- package/docs/pages/component/card/usage.vue +6 -0
- package/docs/pages/component/carousel/index.vue +29 -0
- package/docs/pages/component/carousel/usage.vue +10 -0
- package/docs/pages/component/checkbox/index.vue +50 -0
- package/docs/pages/component/checkbox/size.vue +9 -0
- package/docs/pages/component/checkbox/states.vue +9 -0
- package/docs/pages/component/checkbox/usage.vue +15 -0
- package/docs/pages/component/checkbox/variants.vue +8 -0
- package/docs/pages/component/container/index.vue +29 -0
- package/docs/pages/component/container/usage.vue +3 -0
- package/docs/pages/component/divider/index.vue +43 -0
- package/docs/pages/component/divider/label.vue +12 -0
- package/docs/pages/component/divider/usage.vue +7 -0
- package/docs/pages/component/divider/vertical.vue +7 -0
- package/docs/pages/component/drawer/index.vue +29 -0
- package/docs/pages/component/drawer/usage.vue +56 -0
- package/docs/pages/component/form/index.vue +29 -0
- package/docs/pages/component/form/usage.vue +96 -0
- package/docs/pages/component/formGroup/index.vue +29 -0
- package/docs/pages/component/formGroup/usage.vue +47 -0
- package/docs/pages/component/icon/index.vue +36 -0
- package/docs/pages/component/icon/usage.vue +6 -0
- package/docs/pages/component/icon/variants.vue +14 -0
- package/docs/pages/component/image/index.vue +29 -0
- package/docs/pages/component/image/usage.vue +8 -0
- package/docs/pages/component/input/index.vue +50 -0
- package/docs/pages/component/input/size.vue +13 -0
- package/docs/pages/component/input/states.vue +12 -0
- package/docs/pages/component/input/usage.vue +14 -0
- package/docs/pages/component/input/variants.vue +18 -0
- package/docs/pages/component/link/index.vue +29 -0
- package/docs/pages/component/link/usage.vue +12 -0
- package/docs/pages/component/loader/index.vue +29 -0
- package/docs/pages/component/loader/usage.vue +7 -0
- package/docs/pages/component/menu/index.vue +29 -0
- package/docs/pages/component/menu/usage.vue +69 -0
- package/docs/pages/component/modal/composed.vue +78 -0
- package/docs/pages/component/modal/index.vue +36 -0
- package/docs/pages/component/modal/usage.vue +66 -0
- package/docs/pages/component/notifications/index.vue +29 -0
- package/docs/pages/component/notifications/usage.vue +56 -0
- package/docs/pages/component/pagination/index.vue +29 -0
- package/docs/pages/component/pagination/usage.vue +17 -0
- package/docs/pages/component/popover/index.vue +29 -0
- package/docs/pages/component/popover/usage.vue +21 -0
- package/docs/pages/component/progress/index.vue +36 -0
- package/docs/pages/component/progress/usage.vue +7 -0
- package/docs/pages/component/progress/variants.vue +18 -0
- package/docs/pages/component/radio/index.vue +50 -0
- package/docs/pages/component/radio/size.vue +15 -0
- package/docs/pages/component/radio/states.vue +13 -0
- package/docs/pages/component/radio/usage.vue +14 -0
- package/docs/pages/component/radio/variants.vue +39 -0
- package/docs/pages/component/scroll/horizontal.vue +14 -0
- package/docs/pages/component/scroll/index.vue +36 -0
- package/docs/pages/component/scroll/usage.vue +5 -0
- package/docs/pages/component/select/index.vue +43 -0
- package/docs/pages/component/select/states.vue +22 -0
- package/docs/pages/component/select/usage.vue +46 -0
- package/docs/pages/component/select/variants.vue +23 -0
- package/docs/pages/component/skeleton/index.vue +29 -0
- package/docs/pages/component/skeleton/usage.vue +10 -0
- package/docs/pages/component/slider/index.vue +29 -0
- package/docs/pages/component/slider/usage.vue +15 -0
- package/docs/pages/component/spacer/index.vue +29 -0
- package/docs/pages/component/spacer/usage.vue +8 -0
- package/docs/pages/component/spinner/index.vue +36 -0
- package/docs/pages/component/spinner/usage.vue +3 -0
- package/docs/pages/component/spinner/variants.vue +9 -0
- package/docs/pages/component/stepper/index.vue +29 -0
- package/docs/pages/component/stepper/usage.vue +21 -0
- package/docs/pages/component/table/index.vue +36 -0
- package/docs/pages/component/table/states.vue +28 -0
- package/docs/pages/component/table/usage.vue +107 -0
- package/docs/pages/component/tabs/index.vue +29 -0
- package/docs/pages/component/tabs/usage.vue +142 -0
- package/docs/pages/component/tag/index.vue +29 -0
- package/docs/pages/component/tag/usage.vue +27 -0
- package/docs/pages/component/textarea/index.vue +43 -0
- package/docs/pages/component/textarea/states.vue +13 -0
- package/docs/pages/component/textarea/usage.vue +19 -0
- package/docs/pages/component/textarea/variants.vue +15 -0
- package/docs/pages/component/toggle/index.vue +43 -0
- package/docs/pages/component/toggle/states.vue +13 -0
- package/docs/pages/component/toggle/usage.vue +12 -0
- package/docs/pages/component/toggle/variants.vue +15 -0
- package/docs/pages/component/tooltip/index.vue +29 -0
- package/docs/pages/component/tooltip/usage.vue +12 -0
- package/docs/pages/error.vue +6 -0
- package/docs/pages/icons.vue +101 -0
- package/docs/pages/index.vue +153 -0
- package/docs/pages/play.vue +7 -0
- package/docs/pages/typography.vue +91 -0
- package/docs/router/index.ts +77 -0
- package/exports/tailwind.preset.js +0 -1
- package/lib/components/accordion/Accordion.vue.d.ts +3 -0
- package/lib/components/accordion/Accordion.vue.js +7 -7
- package/lib/components/accordion/AccordionItem.vue.d.ts +1 -0
- package/lib/components/accordion/AccordionItem.vue.js +49 -47
- package/lib/components/accordion/index.d.ts +1 -1
- package/lib/components/accordion/theme/Accordion.carbon.theme.js +3 -6
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +9 -9
- package/lib/components/accordion/theme/AccordionItem.carbon.theme.js +3 -14
- 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/carousel/CarouselSlide.vue.d.ts +19 -8
- package/lib/components/carousel/CarouselSlide.vue.js +2 -2
- package/lib/components/carousel/CarouselSlide.vue2.js +25 -18
- 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 +10 -10
- package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
- package/lib/components/container/Container.vue.d.ts +13 -0
- package/lib/components/container/Container.vue.js +15 -11
- package/lib/components/container/theme/Container.base.theme.js +7 -4
- 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 +5 -5
- 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 +2 -2
- 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 +22 -22
- package/lib/components/menu/theme/MenuItem.base.theme.js +22 -32
- package/lib/components/modal/Modal.vue.d.ts +5 -1
- 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 +31 -31
- 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 +93 -93
- 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 +8 -8
- 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/keys.d.ts +2 -2
- 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 +4 -2
- package/src/components/accordion/Accordion.vue +5 -1
- package/src/components/accordion/AccordionItem.vue +5 -2
- package/src/components/accordion/index.ts +1 -1
- package/src/components/accordion/theme/Accordion.carbon.theme.ts +3 -5
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +11 -8
- package/src/components/accordion/theme/AccordionItem.carbon.theme.ts +2 -30
- 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/carousel/CarouselSlide.vue +9 -4
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +9 -9
- package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
- package/src/components/container/Container.vue +4 -0
- package/src/components/container/theme/Container.base.theme.ts +7 -1
- 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 +2 -2
- 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 +2 -2
- package/src/components/label/theme/Label.carbon.theme.ts +1 -3
- 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 +4 -4
- 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 +9 -9
- package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
- package/src/components/select/Select.vue +7 -7
- 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/keys.ts +2 -2
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
const selectProps = {
|
|
3
|
+
...useColors.props('primary'),
|
|
3
4
|
...useCommon.props(),
|
|
4
5
|
...useInteractive.props(),
|
|
5
6
|
...useInputtable.props(),
|
|
@@ -33,6 +34,7 @@ export default {
|
|
|
33
34
|
<script setup lang="ts">
|
|
34
35
|
import { computed, ref, watch, type PropType, type ExtractPublicPropTypes, type Ref, nextTick, unref } from 'vue'
|
|
35
36
|
import { useEventListener } from '@vueuse/core'
|
|
37
|
+
import { useColors } from '../../composables/useColors'
|
|
36
38
|
import { useCommon } from '../../composables/useCommon'
|
|
37
39
|
import { useInputtable } from '../../composables/useInputtable'
|
|
38
40
|
import { useInteractive } from '../../composables/useInteractive'
|
|
@@ -325,6 +327,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
325
327
|
className,
|
|
326
328
|
classes.wrapper,
|
|
327
329
|
]"
|
|
330
|
+
:tooltip="tooltip"
|
|
328
331
|
v-on="labelListeners"
|
|
329
332
|
>
|
|
330
333
|
<div class="relative">
|
|
@@ -347,7 +350,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
347
350
|
<template v-else>
|
|
348
351
|
<div
|
|
349
352
|
v-if="placeholder"
|
|
350
|
-
class="text-
|
|
353
|
+
class="text-secondary-400 dark:text-secondary-500"
|
|
351
354
|
>
|
|
352
355
|
{{ placeholder }}
|
|
353
356
|
</div>
|
|
@@ -357,10 +360,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
357
360
|
<x-popover
|
|
358
361
|
v-else
|
|
359
362
|
ref="popoverRef"
|
|
360
|
-
block
|
|
361
363
|
:disabled="disabled || loading || readonly"
|
|
362
|
-
:dismiss-on-click="!multiple"
|
|
363
|
-
align="left"
|
|
364
364
|
>
|
|
365
365
|
<div
|
|
366
366
|
:class="[classes.box]"
|
|
@@ -384,7 +384,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
384
384
|
<template v-else>
|
|
385
385
|
<div
|
|
386
386
|
v-if="placeholder"
|
|
387
|
-
class="text-
|
|
387
|
+
class="text-secondary-400 dark:text-secondary-500"
|
|
388
388
|
>
|
|
389
389
|
{{ placeholder }}
|
|
390
390
|
</div>
|
|
@@ -403,12 +403,12 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
403
403
|
:size="size"
|
|
404
404
|
:disabled="item.disabled"
|
|
405
405
|
:selected="index === selectedIndex"
|
|
406
|
-
color="
|
|
406
|
+
:color="color"
|
|
407
407
|
filled
|
|
408
408
|
@click="() => !multiple && popoverRef?.hide()"
|
|
409
409
|
/>
|
|
410
410
|
</template>
|
|
411
|
-
<div v-else class="px-2 text-center text-
|
|
411
|
+
<div v-else class="px-2 text-center text-secondary-400">
|
|
412
412
|
No options
|
|
413
413
|
</div>
|
|
414
414
|
</x-popover-container>
|
|
@@ -5,9 +5,9 @@ const theme: SelectTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
box: ({ props, data }) => {
|
|
8
|
-
const classes = ['w-full border border-
|
|
8
|
+
const classes = ['w-full border border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out rounded-md shadow-sm']
|
|
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')
|
|
@@ -15,11 +15,11 @@ const theme: SelectTheme = {
|
|
|
15
15
|
else if (props.size === 'xl') classes.push('px-5 py-4 text-xl')
|
|
16
16
|
else classes.push('px-3 py-2')
|
|
17
17
|
|
|
18
|
-
if (props.disabled) classes.push('bg-
|
|
19
|
-
else classes.push('bg-white dark:bg-
|
|
18
|
+
if (props.disabled) classes.push('bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed')
|
|
19
|
+
else classes.push('bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
|
|
20
20
|
|
|
21
21
|
if (data.errorInternal) {
|
|
22
|
-
classes.push('border-
|
|
22
|
+
classes.push('border-error-500 dark:border-error-400 group-focus:outline-error-500')
|
|
23
23
|
} else if (!props.disabled) {
|
|
24
24
|
classes.push('group-focus:outline-[color:var(--x-select-border)]')
|
|
25
25
|
}
|
|
@@ -27,7 +27,7 @@ const theme: SelectTheme = {
|
|
|
27
27
|
return classes
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
-
content: '
|
|
30
|
+
content: 'p-1 max-h-72 overflow-y-auto',
|
|
31
31
|
|
|
32
32
|
iconWrapper: 'pointer-events-none absolute inset-y-0 right-0 flex items-center px-2',
|
|
33
33
|
|
|
@@ -39,8 +39,8 @@ const theme: SelectTheme = {
|
|
|
39
39
|
else if (props.size === 'xl') classes.push('h-7 w-7')
|
|
40
40
|
else classes.push('h-5 w-5')
|
|
41
41
|
|
|
42
|
-
if (props.disabled) classes.push('text-
|
|
43
|
-
else classes.push('text-
|
|
42
|
+
if (props.disabled) classes.push('text-secondary-300 dark:text-secondary-500')
|
|
43
|
+
else classes.push('text-secondary-500 dark:text-secondary-400')
|
|
44
44
|
|
|
45
45
|
return classes
|
|
46
46
|
},
|
|
@@ -5,24 +5,24 @@ const theme: SelectTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
box: ({ props, data }) => {
|
|
8
|
-
const classes = ['w-full border-b text-sm px-4 border-
|
|
8
|
+
const classes = ['w-full border-b text-sm px-4 border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out']
|
|
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
|
if (data.errorInternal) {
|
|
25
|
-
classes.push('border-
|
|
25
|
+
classes.push('border-error-500 dark:border-error-400 group-focus:outline-error-500')
|
|
26
26
|
} else if (!props.disabled) {
|
|
27
27
|
classes.push('group-focus:outline-[color:var(--x-select-border)]')
|
|
28
28
|
}
|
|
@@ -37,8 +37,8 @@ const theme: SelectTheme = {
|
|
|
37
37
|
icon: ({ props }) => {
|
|
38
38
|
const classes = ['h-5 w-5']
|
|
39
39
|
|
|
40
|
-
if (props.disabled) classes.push('text-
|
|
41
|
-
else classes.push('text-
|
|
40
|
+
if (props.disabled) classes.push('text-secondary-300 dark:text-secondary-500')
|
|
41
|
+
else classes.push('text-secondary-500 dark:text-secondary-400')
|
|
42
42
|
|
|
43
43
|
return classes
|
|
44
44
|
},
|
|
@@ -3,7 +3,7 @@ import type { SkeletonTheme } from '../Skeleton.vue'
|
|
|
3
3
|
const theme: SkeletonTheme = {
|
|
4
4
|
classes: {
|
|
5
5
|
wrapper: ({ props }) => {
|
|
6
|
-
const classes = ['animate-pulse bg-
|
|
6
|
+
const classes = ['animate-pulse bg-secondary-300 dark:bg-secondary-600']
|
|
7
7
|
|
|
8
8
|
if (props.shape === 'circle') classes.push('w-8 h-8 rounded-full')
|
|
9
9
|
else classes.push('rounded-md')
|
|
@@ -211,6 +211,6 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
211
211
|
<slot name="suffix" :value="value"></slot>
|
|
212
212
|
</div>
|
|
213
213
|
|
|
214
|
-
<p v-if="errorInternal" class="text-sm text-
|
|
214
|
+
<p v-if="errorInternal" class="text-sm text-error-500 mt-1" v-text="errorInternal"></p>
|
|
215
215
|
</x-label>
|
|
216
216
|
</template>
|
|
@@ -4,7 +4,7 @@ const theme: SliderTheme = {
|
|
|
4
4
|
classes: {
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
|
-
drag: 'w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-
|
|
7
|
+
drag: 'w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-secondary-900 dark:bg-secondary-100',
|
|
8
8
|
},
|
|
9
9
|
|
|
10
10
|
styles: ({ props, colors, css }) => {
|
|
@@ -116,7 +116,7 @@ const { styles, classes, className } = useTheme('Stepper', {}, props)
|
|
|
116
116
|
:key="index"
|
|
117
117
|
:class="[classes.step, {
|
|
118
118
|
'cursor-pointer': interactive && !step.disabled,
|
|
119
|
-
'text-
|
|
119
|
+
'text-secondary-400 dark:text-secondary-600': step.disabled,
|
|
120
120
|
'flex-1': grow,
|
|
121
121
|
}]"
|
|
122
122
|
:disabled="step.disabled || !interactive"
|
|
@@ -125,7 +125,7 @@ const { styles, classes, className } = useTheme('Stepper', {}, props)
|
|
|
125
125
|
<div class="overflow-hidden">
|
|
126
126
|
<div
|
|
127
127
|
class="h-0.5 w-full mb-2"
|
|
128
|
-
:class="[step.status === 'complete' || step.status === 'incomplete' ? 'bg-primary-500' : 'bg-
|
|
128
|
+
:class="[step.status === 'complete' || step.status === 'incomplete' ? 'bg-primary-500' : 'bg-secondary-200 dark:bg-secondary-700']"
|
|
129
129
|
></div>
|
|
130
130
|
<div class="flex items-start pr-4">
|
|
131
131
|
<x-icon
|
|
@@ -138,7 +138,7 @@ const { styles, classes, className } = useTheme('Stepper', {}, props)
|
|
|
138
138
|
/>
|
|
139
139
|
<div class="grid text-left">
|
|
140
140
|
<div class="text-sm truncate">{{ step.label }}</div>
|
|
141
|
-
<div v-if="step.description" class="text-xs text-
|
|
141
|
+
<div v-if="step.description" class="text-xs text-secondary-500">{{ step.description }}</div>
|
|
142
142
|
</div>
|
|
143
143
|
</div>
|
|
144
144
|
</div>
|
|
@@ -139,7 +139,7 @@ const { styles, classes, className } = useTheme('Tab', {}, ref({
|
|
|
139
139
|
'text-[color:var(--x-tab-group-text)] dark:text-[color:var(--x-tab-group-dark-text)]': selected,
|
|
140
140
|
'cursor-pointer': !disabled,
|
|
141
141
|
'cursor-not-allowed': disabled,
|
|
142
|
-
'cursor-not-allowed text-
|
|
142
|
+
'cursor-not-allowed text-secondary-500': disabled && !selected,
|
|
143
143
|
},
|
|
144
144
|
]"
|
|
145
145
|
:aria-disabled="disabled ? 'true' : undefined"
|
|
@@ -165,13 +165,13 @@ const { styles, classes, className } = useTheme('Tab', {}, ref({
|
|
|
165
165
|
v-if="removable"
|
|
166
166
|
size="sm"
|
|
167
167
|
:icon="closeIcon"
|
|
168
|
-
class="ml-2 cursor-pointer hover:text-
|
|
168
|
+
class="ml-2 cursor-pointer hover:text-secondary-700 dark:hover:text-secondary-500 transition-colors duration-150"
|
|
169
169
|
@click="(e: Event) => $emit('remove', e)"
|
|
170
170
|
/>
|
|
171
171
|
</div>
|
|
172
172
|
</slot>
|
|
173
173
|
<teleport v-if="selected && teleportTo" :to="teleportTo">
|
|
174
|
-
<div role="tabpanel" :class="classes.tabpanel">
|
|
174
|
+
<div v-if="$slots.default" role="tabpanel" :class="classes.tabpanel">
|
|
175
175
|
<slot></slot>
|
|
176
176
|
</div>
|
|
177
177
|
</teleport>
|
|
@@ -9,7 +9,7 @@ const theme: TabGroupTheme = {
|
|
|
9
9
|
|
|
10
10
|
if (!props.fullWidth) c.push('!w-fit')
|
|
11
11
|
if (props.variant === 'block') c.push('rounded-md')
|
|
12
|
-
if (props.variant === 'block' && !props.ghost) c.push('bg-
|
|
12
|
+
if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-100 dark:bg-secondary-800 p-1')
|
|
13
13
|
|
|
14
14
|
return c
|
|
15
15
|
},
|
|
@@ -17,7 +17,7 @@ const theme: TabGroupTheme = {
|
|
|
17
17
|
list: ({ props }) => {
|
|
18
18
|
const c = ['flex min-w-full w-fit']
|
|
19
19
|
|
|
20
|
-
if (props.variant === 'line') c.push('border-b border-
|
|
20
|
+
if (props.variant === 'line') c.push('border-b border-secondary-200 dark:border-secondary-700')
|
|
21
21
|
if (props.variant === 'line' && !props.grow) c.push('space-x-8')
|
|
22
22
|
if (props.variant === 'block') c.push('z-[1]')
|
|
23
23
|
if (props.align === 'center') c.push('justify-center')
|
|
@@ -38,7 +38,7 @@ const theme: TabGroupTheme = {
|
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
styles: ({ props, colors, css }) => {
|
|
41
|
-
const
|
|
41
|
+
const secondary = colors.getPalette('secondary')
|
|
42
42
|
const color = colors.getPalette(props.color)
|
|
43
43
|
|
|
44
44
|
return css.variables({
|
|
@@ -46,7 +46,7 @@ const theme: TabGroupTheme = {
|
|
|
46
46
|
bg: props.ghost ? color[50] : '#fff',
|
|
47
47
|
dark: {
|
|
48
48
|
text: color[400],
|
|
49
|
-
bg: props.ghost ? color[900] :
|
|
49
|
+
bg: props.ghost ? color[900] : secondary[700],
|
|
50
50
|
},
|
|
51
51
|
})
|
|
52
52
|
},
|
|
@@ -9,7 +9,7 @@ const theme: TabGroupTheme = {
|
|
|
9
9
|
|
|
10
10
|
if (!props.fullWidth) c.push('!w-fit')
|
|
11
11
|
if (props.variant === 'block') c.push('')
|
|
12
|
-
if (props.variant === 'block' && !props.ghost) c.push('bg-
|
|
12
|
+
if (props.variant === 'block' && !props.ghost) c.push('bg-secondary-200 dark:bg-secondary-800')
|
|
13
13
|
|
|
14
14
|
return c
|
|
15
15
|
},
|
|
@@ -17,7 +17,7 @@ const theme: TabGroupTheme = {
|
|
|
17
17
|
list: ({ props }) => {
|
|
18
18
|
const c = ['flex min-w-full w-fit']
|
|
19
19
|
|
|
20
|
-
if (props.variant === 'line') c.push('border-b border-
|
|
20
|
+
if (props.variant === 'line') c.push('border-b border-secondary-200 dark:border-secondary-700')
|
|
21
21
|
if (props.variant === 'line' && !props.grow) c.push('')
|
|
22
22
|
if (props.variant === 'block') c.push('z-[1] py-1.5')
|
|
23
23
|
if (props.align === 'center') c.push('justify-center')
|
|
@@ -31,7 +31,7 @@ const theme: TabGroupTheme = {
|
|
|
31
31
|
|
|
32
32
|
if (props.variant === 'line') c.push('h-[2px] -mt-[2px] bg-[color:var(--x-tab-group-text)] dark:bg-[color:var(--x-tab-group-dark-text)]')
|
|
33
33
|
|
|
34
|
-
if (props.variant === 'block') c.push('border-t-2 border-[color:var(--x-tab-group-text)] dark:border-[color:var(--x-tab-group-dark-text)] h-full top-0 bg-
|
|
34
|
+
if (props.variant === 'block') c.push('border-t-2 border-solid border-[color:var(--x-tab-group-text)] dark:border-[color:var(--x-tab-group-dark-text)] h-full top-0 bg-secondary-100 dark:bg-secondary-700')
|
|
35
35
|
|
|
36
36
|
return c
|
|
37
37
|
},
|
|
@@ -66,6 +66,8 @@ import XSpinner from '../spinner/Spinner.vue'
|
|
|
66
66
|
import XSkeleton from '../skeleton/Skeleton.vue'
|
|
67
67
|
import type { SkeletonShape } from '../skeleton/Skeleton.vue'
|
|
68
68
|
|
|
69
|
+
import XIcon from '../icon/Icon.vue'
|
|
70
|
+
|
|
69
71
|
import { chevronDownIcon } from '../../common/icons'
|
|
70
72
|
|
|
71
73
|
const props = defineProps({
|
|
@@ -16,7 +16,7 @@ const theme: TableTheme = {
|
|
|
16
16
|
return classes
|
|
17
17
|
},
|
|
18
18
|
|
|
19
|
-
loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-
|
|
19
|
+
loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-secondary-300 dark:bg-secondary-600 rounded opacity-30',
|
|
20
20
|
},
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -2,7 +2,7 @@ import type { TableTheme } from '../Table.vue'
|
|
|
2
2
|
|
|
3
3
|
const theme: TableTheme = {
|
|
4
4
|
classes: {
|
|
5
|
-
wrapper: 'w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-
|
|
5
|
+
wrapper: 'w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-secondary-800',
|
|
6
6
|
|
|
7
7
|
table: ({ props }) => {
|
|
8
8
|
const classes = ['w-full relative']
|
|
@@ -16,7 +16,7 @@ const theme: TableTheme = {
|
|
|
16
16
|
return classes
|
|
17
17
|
},
|
|
18
18
|
|
|
19
|
-
loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-
|
|
19
|
+
loadingWrapper: 'absolute inset-0 flex items-center justify-center z-40 bg-secondary-300 dark:bg-secondary-600 rounded opacity-30',
|
|
20
20
|
},
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -5,7 +5,7 @@ const theme: TableHeaderTheme = {
|
|
|
5
5
|
th: ({ props }) => {
|
|
6
6
|
const classes = ['relative py-2 font-semibold tracking-widest uppercase text-xs px-3']
|
|
7
7
|
|
|
8
|
-
if (props.sortable) classes.push('cursor-pointer hover:text-
|
|
8
|
+
if (props.sortable) classes.push('cursor-pointer hover:text-secondary-800 dark:hover:text-secondary-300 transition-colors duration-150 ease-in-out')
|
|
9
9
|
|
|
10
10
|
if (props.stickyHeader) classes.push('sticky top-0')
|
|
11
11
|
|
|
@@ -3,9 +3,9 @@ import type { TableHeaderTheme } from '../TableHeader.vue'
|
|
|
3
3
|
const theme: TableHeaderTheme = {
|
|
4
4
|
classes: {
|
|
5
5
|
th: ({ props }) => {
|
|
6
|
-
const classes = ['relative py-3.5 font-semibold text-sm px-3 bg-
|
|
6
|
+
const classes = ['relative py-3.5 font-semibold text-sm px-3 bg-secondary-200 dark:bg-secondary-700 select-none']
|
|
7
7
|
|
|
8
|
-
if (props.sortable) classes.push('cursor-pointer hover:bg-
|
|
8
|
+
if (props.sortable) classes.push('cursor-pointer hover:bg-secondary-300 dark:hover:bg-secondary-600 transition-colors duration-150 ease-in-out pr-5')
|
|
9
9
|
|
|
10
10
|
if (props.stickyHeader) classes.push('sticky top-0')
|
|
11
11
|
|
|
@@ -6,12 +6,12 @@ const theme: TableRowTheme = {
|
|
|
6
6
|
const classes = []
|
|
7
7
|
|
|
8
8
|
if (props.striped) {
|
|
9
|
-
classes.push('odd:bg-
|
|
9
|
+
classes.push('odd:bg-secondary-50 dark:odd:bg-secondary-800')
|
|
10
10
|
} else {
|
|
11
|
-
classes.push('border-b border-
|
|
11
|
+
classes.push('border-b border-secondary-200 dark:border-secondary-700')
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
if (props.pointer) classes.push('hover:bg-
|
|
14
|
+
if (props.pointer) classes.push('hover:bg-secondary-50 dark:hover:bg-secondary-700 cursor-pointer')
|
|
15
15
|
|
|
16
16
|
return classes
|
|
17
17
|
},
|
|
@@ -6,12 +6,12 @@ const theme: TableRowTheme = {
|
|
|
6
6
|
const classes = []
|
|
7
7
|
|
|
8
8
|
if (props.striped) {
|
|
9
|
-
classes.push('odd:bg-
|
|
9
|
+
classes.push('odd:bg-secondary-50 dark:odd:bg-secondary-800')
|
|
10
10
|
} else {
|
|
11
|
-
classes.push('border-b border-
|
|
11
|
+
classes.push('border-b border-secondary-200 dark:border-secondary-700')
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
if (props.pointer) classes.push('hover:bg-
|
|
14
|
+
if (props.pointer) classes.push('hover:bg-secondary-50 dark:hover:bg-secondary-600 cursor-pointer')
|
|
15
15
|
|
|
16
16
|
return classes
|
|
17
17
|
},
|
|
@@ -70,7 +70,7 @@ const { styles, classes, className } = useTheme('Tag', {}, props)
|
|
|
70
70
|
<x-icon
|
|
71
71
|
:size="closeIconSize"
|
|
72
72
|
:icon="closeIcon"
|
|
73
|
-
class="ml-1.5 cursor-pointer hover:text-
|
|
73
|
+
class="ml-1.5 cursor-pointer hover:text-secondary-700 transition-colors duration-150"
|
|
74
74
|
@click="(e: Event) => $emit('remove', e)"
|
|
75
75
|
/>
|
|
76
76
|
</span>
|
|
@@ -19,6 +19,7 @@ const textareaProps = {
|
|
|
19
19
|
adjustToText: Boolean,
|
|
20
20
|
preventEnter: Boolean,
|
|
21
21
|
block: Boolean,
|
|
22
|
+
resizable: Boolean,
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export type TextareaProps = ExtractPublicPropTypes<typeof textareaProps>
|
|
@@ -114,6 +115,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
114
115
|
className,
|
|
115
116
|
classes.wrapper,
|
|
116
117
|
]"
|
|
118
|
+
:tooltip="tooltip"
|
|
117
119
|
>
|
|
118
120
|
<textarea
|
|
119
121
|
:id="id"
|
|
@@ -123,7 +125,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
123
125
|
:class="[
|
|
124
126
|
classes.input,
|
|
125
127
|
errorInternal
|
|
126
|
-
? 'border-
|
|
128
|
+
? 'border-error-500 dark:border-error-400 focus:outline-error-500'
|
|
127
129
|
: 'focus:outline-[color:var(--x-textarea-border)]',
|
|
128
130
|
]"
|
|
129
131
|
:disabled="disabled"
|
|
@@ -5,9 +5,10 @@ const theme: TextareaTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
input: ({ props, data }) => {
|
|
8
|
-
const classes = ['
|
|
8
|
+
const classes = ['appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border shadow-sm rounded-md']
|
|
9
9
|
|
|
10
|
-
if (!
|
|
10
|
+
if (!props.resizable) classes.push('resize-none')
|
|
11
|
+
if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
|
|
11
12
|
|
|
12
13
|
if (props.size === 'xs') classes.push('px-2 py-1 text-xs')
|
|
13
14
|
else if (props.size === 'sm') classes.push('px-2 py-2 text-sm')
|
|
@@ -16,8 +17,8 @@ const theme: TextareaTheme = {
|
|
|
16
17
|
else classes.push('px-3 py-2')
|
|
17
18
|
|
|
18
19
|
classes.push(props.disabled
|
|
19
|
-
? 'bg-
|
|
20
|
-
: 'bg-white dark:bg-
|
|
20
|
+
? 'bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed'
|
|
21
|
+
: 'bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
|
|
21
22
|
|
|
22
23
|
return classes
|
|
23
24
|
},
|
|
@@ -5,20 +5,20 @@ const theme: TextareaTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
input: ({ props, data }) => {
|
|
8
|
-
const classes = ['resize-none appearance-none block w-full placeholder-
|
|
8
|
+
const classes = ['resize-none appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition 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
|
|
@@ -76,8 +76,8 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
76
76
|
:style="styles"
|
|
77
77
|
:class="{
|
|
78
78
|
[`shadow-lg shadow-${color}-500/50`]: glow && modelValue,
|
|
79
|
-
'bg-
|
|
80
|
-
'bg-
|
|
79
|
+
'bg-secondary-300 dark:bg-secondary-500': !disabled && !checked && !loading,
|
|
80
|
+
'bg-secondary-100 dark:bg-secondary-700': disabled || loading,
|
|
81
81
|
'bg-[color:var(--x-toggle-bg)] dark:bg-[color:var(--x-toggle-dark-bg)]': !disabled && checked,
|
|
82
82
|
}"
|
|
83
83
|
>
|
|
@@ -102,7 +102,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
102
102
|
'translate-x-full': checked,
|
|
103
103
|
'shadow': !disabled
|
|
104
104
|
},
|
|
105
|
-
disabled ? 'bg-
|
|
105
|
+
disabled ? 'bg-secondary-50 dark:bg-secondary-800' : 'bg-white dark:bg-secondary-800'
|
|
106
106
|
]"
|
|
107
107
|
></div>
|
|
108
108
|
</div>
|
|
@@ -5,7 +5,7 @@ const theme: ToggleTheme = {
|
|
|
5
5
|
wrapper: '',
|
|
6
6
|
|
|
7
7
|
label: ({ props }) => {
|
|
8
|
-
const c = 'font-medium text-
|
|
8
|
+
const c = 'font-medium text-secondary-800 dark:text-secondary-200'
|
|
9
9
|
|
|
10
10
|
if (props.size === 'xs') return c + ' text-xs'
|
|
11
11
|
else if (props.size === 'sm') return c + ' text-sm'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
const toggleTipProps = {
|
|
3
|
+
content: String,
|
|
4
|
+
icon: String,
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type ToggleTipProps = ExtractPublicPropTypes<typeof toggleTipProps>
|
|
8
|
+
|
|
9
|
+
export default { name: 'XToggleTip' }
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { computed, type ExtractPublicPropTypes } from 'vue'
|
|
14
|
+
import XTooltip from './Tooltip.vue'
|
|
15
|
+
import XIcon from '../icon/Icon.vue'
|
|
16
|
+
|
|
17
|
+
import { infoIcon } from '../../common/icons'
|
|
18
|
+
|
|
19
|
+
const props = defineProps(toggleTipProps)
|
|
20
|
+
|
|
21
|
+
const computedIcon = computed(() => props.icon || infoIcon)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<x-tooltip placement="auto">
|
|
26
|
+
<x-icon :icon="computedIcon" class="text-secondary-500 dark:text-secondary-300 cursor-pointer" />
|
|
27
|
+
<template #tooltip>
|
|
28
|
+
<div v-html="content"></div>
|
|
29
|
+
</template>
|
|
30
|
+
</x-tooltip>
|
|
31
|
+
</template>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
const tooltipProps = {
|
|
2
|
+
const tooltipProps = {
|
|
3
|
+
placement: {
|
|
4
|
+
type: String as PropType<PopoverPlacement>,
|
|
5
|
+
default: 'bottom',
|
|
6
|
+
},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type PopoverPlacement = Placement
|
|
3
10
|
|
|
4
11
|
export type TooltipProps = ExtractPublicPropTypes<typeof tooltipProps>
|
|
5
12
|
|
|
@@ -7,17 +14,20 @@ export default { name: 'XTooltip' }
|
|
|
7
14
|
</script>
|
|
8
15
|
|
|
9
16
|
<script setup lang="ts">
|
|
10
|
-
import type { ExtractPublicPropTypes } from 'vue'
|
|
17
|
+
import type { ExtractPublicPropTypes, PropType } from 'vue'
|
|
11
18
|
import XPopover from '../../components/popover/Popover.vue'
|
|
12
19
|
import XPopoverContainer from '../../components/popover/PopoverContainer.vue'
|
|
20
|
+
import { type Placement } from 'floating-vue'
|
|
21
|
+
|
|
22
|
+
const props = defineProps(tooltipProps)
|
|
13
23
|
</script>
|
|
14
24
|
|
|
15
25
|
<template>
|
|
16
|
-
<x-popover :triggers="['hover']" class="inline-block">
|
|
26
|
+
<x-popover :triggers="['hover', 'click']" class="inline-block" :hide-arrow="false" :placement="placement">
|
|
17
27
|
<slot></slot>
|
|
18
28
|
<template #content>
|
|
19
29
|
<div class="dark">
|
|
20
|
-
<x-popover-container class="p-2 text-white text-
|
|
30
|
+
<x-popover-container class="p-2 text-white text-xs w-max max-w-xs">
|
|
21
31
|
<slot name="tooltip"></slot>
|
|
22
32
|
</x-popover-container>
|
|
23
33
|
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import ToggleTip from '../ToggleTip.vue'
|
|
4
|
+
|
|
5
|
+
describe('ToggleTip', () => {
|
|
6
|
+
it('renders without errors', () => {
|
|
7
|
+
const wrapper = mount(ToggleTip)
|
|
8
|
+
|
|
9
|
+
expect(wrapper.vm).toBeTruthy()
|
|
10
|
+
})
|
|
11
|
+
})
|