@weni/unnnic-system 3.10.0 → 3.11.1-alpha.0
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/CHANGELOG.md +80 -0
- package/dist/assets/tokens/colors.json.d.ts +376 -0
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +17 -116
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Alert/Version1dot1.vue.d.ts +2 -38
- package/dist/components/Alert/Version1dot1.vue.d.ts.map +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +111 -20
- package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +223 -41
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +3 -3
- package/dist/components/Banner/Banner.vue.d.ts +1 -1
- package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +3 -3
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/AccountCard.vue.d.ts +4 -4
- package/dist/components/Card/BlankCard.vue.d.ts +1 -1
- package/dist/components/Card/Card.vue.d.ts +128 -37
- package/dist/components/Card/CardCompany.vue.d.ts +12 -415
- package/dist/components/Card/CardData.vue.d.ts +1 -1
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +114 -23
- package/dist/components/Card/ContentCard.vue.d.ts +2 -2
- package/dist/components/Card/DashCard.vue.d.ts +4 -4
- package/dist/components/Card/MarketplaceCard.vue.d.ts +1 -1
- package/dist/components/Card/SimpleCard.vue.d.ts +112 -21
- package/dist/components/Card/StatusCard.vue.d.ts +1 -1
- package/dist/components/Card/TitleCard.vue.d.ts +112 -21
- package/dist/components/CardImage/CardImage.vue.d.ts +23 -30
- package/dist/components/CardInformation/CardInformation.vue.d.ts +114 -23
- package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
- package/dist/components/Carousel/Carousel.vue.d.ts +14 -417
- package/dist/components/Carousel/TagCarousel.vue.d.ts +13 -416
- package/dist/components/ChartBar/ChartBar.vue.d.ts +120 -29
- package/dist/components/ChartLine/ChartLine.vue.d.ts +110 -19
- package/dist/components/ChatText/ChatText.vue.d.ts +111 -20
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +22 -447
- package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +114 -23
- package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
- package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.vue.d.ts +17 -24
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +28 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -0
- package/dist/components/Comment/Comment.vue.d.ts +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +111 -20
- package/dist/components/DataTable/index.vue.d.ts +2 -2
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +172 -41
- package/dist/components/DatePicker/DatePicker.vue.d.ts +10 -10
- package/dist/components/Drawer/Drawer.vue.d.ts +35 -207
- package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
- package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
- package/dist/components/Flag.vue.d.ts +2 -2
- package/dist/components/FormElement/FormElement.vue.d.ts +50 -27
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/Icon.vue.d.ts.map +1 -1
- package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +10 -10
- package/dist/components/Input/BaseInput.vue.d.ts +11 -2
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +171 -40
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +33 -24
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +182 -51
- package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
- package/dist/components/Label/Label.vue.d.ts +9 -15
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +214 -40
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +182 -51
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +21 -21
- package/dist/components/MoodRating/MoodRating.vue.d.ts +110 -19
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +26 -14
- package/dist/components/PageHeader/PageHeader.vue.d.ts +28 -0
- package/dist/components/PageHeader/PageHeader.vue.d.ts.map +1 -0
- package/dist/components/PageHeader/index.d.ts +3 -0
- package/dist/components/PageHeader/index.d.ts.map +1 -0
- package/dist/components/PageHeader/types.d.ts +9 -0
- package/dist/components/PageHeader/types.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.vue.d.ts +9 -9
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +10 -6
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +67 -468
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +12 -415
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +18 -25
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts.map +1 -1
- package/dist/components/SelectTime/index.vue.d.ts +34 -25
- package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +111 -20
- package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +56 -22
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/Tab/Tab.vue.d.ts +122 -20
- package/dist/components/TableNext/TablePagination.vue.d.ts +9 -9
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/DefaultTag.vue.d.ts +4 -83
- package/dist/components/Tag/DefaultTag.vue.d.ts.map +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +13 -415
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Tag/types.d.ts +18 -0
- package/dist/components/Tag/types.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.vue.d.ts +78 -33
- package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
- package/dist/components/Toast/Toast.vue.d.ts +16 -0
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -0
- package/dist/components/Toast/ToastManager.d.ts +14 -0
- package/dist/components/Toast/ToastManager.d.ts.map +1 -0
- package/dist/components/Toast/types.d.ts +35 -0
- package/dist/components/Toast/types.d.ts.map +1 -0
- package/dist/components/ToolTip/ToolTip.vue.d.ts +110 -19
- package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +9 -9
- package/dist/components/Tour/TourPopover.vue.d.ts +9 -9
- package/dist/components/UploadArea/UploadArea.vue.d.ts +10 -10
- package/dist/components/index.d.ts +12880 -11199
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +8 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +42 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/index.d.ts +11 -0
- package/dist/components/ui/drawer/index.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/segmented-control/SegmentedControlList.vue.d.ts +26 -0
- package/dist/components/ui/segmented-control/SegmentedControlList.vue.d.ts.map +1 -0
- package/dist/components/ui/segmented-control/SegmentedControlTrigger.vue.d.ts +24 -0
- package/dist/components/ui/segmented-control/SegmentedControlTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/segmented-control/index.d.ts +5 -0
- package/dist/components/ui/segmented-control/index.d.ts.map +1 -0
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts.map +1 -1
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +19 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +19 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +5 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/{es-4b899f97.mjs → es-5af54117.mjs} +1 -1
- package/dist/{index-23489897.mjs → index-eb28c19c.mjs} +99655 -96333
- package/dist/{pt-br-5a914a63.mjs → pt-br-e0368966.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +216 -179
- package/dist/unnnic.umd.js +48 -45
- package/dist/utils/call.d.ts +2 -1
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/assets/icons/checkbox-checked-disabled.svg +3 -0
- package/src/assets/icons/checkbox-checked.svg +3 -0
- package/src/assets/icons/checkbox-less-disabled.svg +3 -0
- package/src/assets/icons/checkbox-less.svg +3 -0
- package/src/assets/icons/radio-checked.svg +3 -0
- package/src/assets/icons/switch-checked-disabled.svg +3 -0
- package/src/assets/icons/switch-checked.svg +3 -0
- package/src/assets/scss/tailwind.scss +8 -0
- package/src/components/Alert/Alert.vue +26 -135
- package/src/components/Alert/Version1dot1.vue +0 -36
- package/src/components/Alert/__tests__/Alert.spec.js +2 -45
- package/src/components/Alert/__tests__/Version1dot1.spec.js +0 -21
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +11 -7
- package/src/components/Alert/__tests__/__snapshots__/AlertBanner.spec.js.snap +2 -2
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +1 -1
- package/src/components/Button/Button.vue +67 -117
- package/src/components/Button/types.ts +0 -1
- package/src/components/ChatsContact/ChatsContact.vue +10 -6
- package/src/components/Checkbox/Checkbox.vue +117 -65
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +6 -21
- package/src/components/CheckboxGroup/CheckboxGroup.vue +96 -0
- package/src/components/Drawer/Drawer.vue +174 -271
- package/src/components/Drawer/__tests__/Drawer.spec.js +32 -43
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
- package/src/components/FormElement/FormElement.vue +63 -93
- package/src/components/Icon.vue +2 -0
- package/src/components/Input/BaseInput.vue +12 -12
- package/src/components/Input/Input.scss +19 -20
- package/src/components/Input/Input.vue +60 -55
- package/src/components/Input/TextInput.vue +25 -54
- package/src/components/Input/__test__/Input.spec.js +13 -33
- package/src/components/Input/__test__/TextInput.spec.js +6 -8
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +14 -5
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/Label/Label.vue +52 -21
- package/src/components/Label/__tests__/Label.spec.js +1 -1
- package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
- package/src/components/ModalDialog/ModalDialog.vue +62 -148
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
- package/src/components/PageHeader/PageHeader.vue +148 -0
- package/src/components/PageHeader/index.ts +2 -0
- package/src/components/PageHeader/types.ts +10 -0
- package/src/components/Radio/Radio.vue +118 -66
- package/src/components/Radio/__test__/Radio.spec.js +14 -20
- package/src/components/Radio/__test__/__snapshots__/Radio.spec.js.snap +4 -3
- package/src/components/RadioGroup/RadioGroup.vue +142 -0
- package/src/components/SelectSmart/SelectSmart.vue +4 -3
- package/src/components/Switch/Switch.vue +132 -91
- package/src/components/Switch/__tests__/Switch.spec.js +8 -75
- package/src/components/Switch/__tests__/__snapshots__/Switch.spec.js.snap +5 -6
- package/src/components/Tab/Tab.vue +37 -23
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
- package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
- package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
- package/src/components/Tag/DefaultTag.vue +51 -107
- package/src/components/Tag/Tag.vue +32 -79
- package/src/components/Tag/types.ts +19 -0
- package/src/components/TextArea/TextArea.vue +41 -12
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +11 -3
- package/src/components/Toast/Toast.vue +246 -0
- package/src/components/Toast/ToastManager.ts +110 -0
- package/src/components/Toast/__tests__/Toast.spec.js +291 -0
- package/src/components/Toast/__tests__/ToastManager.spec.js +294 -0
- package/src/components/Toast/types.ts +57 -0
- package/src/components/ToolTip/ToolTip.vue +41 -188
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +345 -61
- package/src/components/index.ts +88 -5
- package/src/components/ui/dialog/Dialog.vue +15 -0
- package/src/components/ui/dialog/DialogClose.vue +25 -0
- package/src/components/ui/dialog/DialogContent.vue +133 -0
- package/src/components/ui/dialog/DialogFooter.vue +46 -0
- package/src/components/ui/dialog/DialogHeader.vue +79 -0
- package/src/components/ui/dialog/DialogTitle.vue +34 -0
- package/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/src/components/ui/dialog/index.ts +7 -0
- package/src/components/ui/drawer/Drawer.vue +23 -0
- package/src/components/ui/drawer/DrawerClose.vue +33 -0
- package/src/components/ui/drawer/DrawerContent.vue +98 -0
- package/src/components/ui/drawer/DrawerDescription.vue +36 -0
- package/src/components/ui/drawer/DrawerFooter.vue +34 -0
- package/src/components/ui/drawer/DrawerHeader.vue +53 -0
- package/src/components/ui/drawer/DrawerOverlay.vue +30 -0
- package/src/components/ui/drawer/DrawerTitle.vue +33 -0
- package/src/components/ui/drawer/DrawerTrigger.vue +27 -0
- package/src/components/ui/drawer/index.ts +10 -0
- package/src/components/ui/segmented-control/SegmentedControlList.vue +51 -0
- package/src/components/ui/segmented-control/SegmentedControlTrigger.vue +81 -0
- package/src/components/ui/segmented-control/index.ts +4 -0
- package/src/components/ui/tabs/TabsTrigger.vue +4 -20
- package/src/components/ui/tooltip/Tooltip.vue +15 -0
- package/src/components/ui/tooltip/TooltipContent.vue +73 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +15 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +22 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/stories/Alert.stories.js +6 -67
- package/src/stories/Button.stories.js +29 -39
- package/src/stories/Checkbox.stories.js +11 -4
- package/src/stories/CheckboxGroup.stories.js +105 -0
- package/src/stories/Dialog.stories.js +832 -0
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/DrawerNext.stories.js +610 -0
- package/src/stories/Input.stories.js +71 -76
- package/src/stories/Label.stories.js +7 -0
- package/src/stories/ModalDialog.mdx +3 -0
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/PageHeader.stories.js +330 -0
- package/src/stories/Radio.stories.js +28 -1
- package/src/stories/RadioGroup.stories.js +144 -0
- package/src/stories/SegmentedControl.stories.js +253 -0
- package/src/stories/Switch.stories.js +10 -5
- package/src/stories/Tab.stories.js +11 -4
- package/src/stories/Tabs.stories.js +1 -1
- package/src/stories/Tag.stories.js +24 -43
- package/src/stories/TextArea.stories.js +14 -2
- package/src/stories/Toast.mdx +123 -0
- package/src/stories/Toast.stories.js +126 -0
- package/src/types/scheme-colors.d.ts +1 -0
- package/src/utils/call.js +46 -18
- package/dist/components/Tag/BrandTag.vue.d.ts +0 -51
- package/dist/components/Tag/BrandTag.vue.d.ts.map +0 -1
- package/dist/components/Tag/IndicatorTag.vue.d.ts +0 -151
- package/dist/components/Tag/IndicatorTag.vue.d.ts.map +0 -1
- package/dist/components/Tag/TagNext.vue.d.ts +0 -24
- package/dist/components/Tag/TagNext.vue.d.ts.map +0 -1
- package/src/components/Alert/AlertBanner.vue +0 -182
- package/src/components/Alert/AlertCaller.vue +0 -49
- package/src/components/Alert/__tests__/AlertBanner.spec.js +0 -89
- package/src/components/Alert/__tests__/AlertCaller.spec.js +0 -98
- package/src/components/Tag/BrandTag.vue +0 -96
- package/src/components/Tag/IndicatorTag.vue +0 -107
- package/src/components/Tag/TagNext.vue +0 -60
|
@@ -5,6 +5,19 @@ import Drawer from '../Drawer.vue';
|
|
|
5
5
|
describe('Drawer.vue', () => {
|
|
6
6
|
let wrapper;
|
|
7
7
|
|
|
8
|
+
const templateSlot = { template: `<div><slot /></div>` };
|
|
9
|
+
const globalStubs = {
|
|
10
|
+
UnnnicIcon: true,
|
|
11
|
+
UnnnicButton: true,
|
|
12
|
+
Teleport: templateSlot,
|
|
13
|
+
Drawer: templateSlot,
|
|
14
|
+
DrawerContent: templateSlot,
|
|
15
|
+
DrawerFooter: templateSlot,
|
|
16
|
+
DrawerClose: templateSlot,
|
|
17
|
+
DrawerTitle: templateSlot,
|
|
18
|
+
DrawerDescription: templateSlot,
|
|
19
|
+
};
|
|
20
|
+
|
|
8
21
|
beforeEach(() => {
|
|
9
22
|
wrapper = mount(Drawer, {
|
|
10
23
|
props: {
|
|
@@ -15,7 +28,7 @@ describe('Drawer.vue', () => {
|
|
|
15
28
|
secondaryButtonText: 'Secondary Action',
|
|
16
29
|
},
|
|
17
30
|
global: {
|
|
18
|
-
stubs:
|
|
31
|
+
stubs: globalStubs,
|
|
19
32
|
},
|
|
20
33
|
});
|
|
21
34
|
});
|
|
@@ -23,7 +36,6 @@ describe('Drawer.vue', () => {
|
|
|
23
36
|
const element = (id) => wrapper.find(`[data-testid="${id}"]`);
|
|
24
37
|
const component = (id) => wrapper.findComponent(`[data-testid="${id}"]`);
|
|
25
38
|
const drawer = () => element('drawer');
|
|
26
|
-
const overlay = () => element('overlay');
|
|
27
39
|
const title = () => element('drawer-title');
|
|
28
40
|
const description = () => element('drawer-description');
|
|
29
41
|
const primaryButton = () => component('primary-button');
|
|
@@ -39,21 +51,23 @@ describe('Drawer.vue', () => {
|
|
|
39
51
|
});
|
|
40
52
|
|
|
41
53
|
it('should render the drawer when modelValue is true', () => {
|
|
42
|
-
expect(drawer().
|
|
54
|
+
expect(drawer().attributes('open')).toBe('true');
|
|
43
55
|
});
|
|
44
56
|
|
|
45
57
|
it('should not render the drawer when modelValue is false', async () => {
|
|
46
58
|
await wrapper.setProps({ modelValue: false });
|
|
47
|
-
expect(drawer().
|
|
59
|
+
expect(drawer().attributes('open')).toBe('false');
|
|
48
60
|
});
|
|
49
61
|
|
|
50
62
|
it('should render the overlay when withoutOverlay is false', () => {
|
|
51
|
-
|
|
63
|
+
console.log('wrapper.html()', wrapper.html());
|
|
64
|
+
|
|
65
|
+
expect(drawerContainer().attributes('showoverlay')).toBe('true');
|
|
52
66
|
});
|
|
53
67
|
|
|
54
68
|
it('should not render the overlay when withoutOverlay is true', async () => {
|
|
55
69
|
await wrapper.setProps({ withoutOverlay: true });
|
|
56
|
-
expect(
|
|
70
|
+
expect(drawerContainer().attributes('showoverlay')).toBe('false');
|
|
57
71
|
});
|
|
58
72
|
|
|
59
73
|
it('should display the title and description correctly', () => {
|
|
@@ -75,7 +89,11 @@ describe('Drawer.vue', () => {
|
|
|
75
89
|
slots: {
|
|
76
90
|
content: '<div data-testid="slot-content">Slot Content</div>',
|
|
77
91
|
},
|
|
92
|
+
global: {
|
|
93
|
+
stubs: globalStubs,
|
|
94
|
+
},
|
|
78
95
|
});
|
|
96
|
+
|
|
79
97
|
expect(wrapper.find('[data-testid="slot-content"]').exists()).toBe(
|
|
80
98
|
true,
|
|
81
99
|
);
|
|
@@ -93,6 +111,9 @@ describe('Drawer.vue', () => {
|
|
|
93
111
|
slots: {
|
|
94
112
|
title: '<h2 data-testid="custom-title">Custom Title Content</h2>',
|
|
95
113
|
},
|
|
114
|
+
global: {
|
|
115
|
+
stubs: globalStubs,
|
|
116
|
+
},
|
|
96
117
|
});
|
|
97
118
|
|
|
98
119
|
expect(title().exists()).toBe(false);
|
|
@@ -113,6 +134,9 @@ describe('Drawer.vue', () => {
|
|
|
113
134
|
slots: {
|
|
114
135
|
title: '<div data-testid="custom-title">Slot Title</div>',
|
|
115
136
|
},
|
|
137
|
+
global: {
|
|
138
|
+
stubs: globalStubs,
|
|
139
|
+
},
|
|
116
140
|
});
|
|
117
141
|
|
|
118
142
|
expect(title().exists()).toBe(false);
|
|
@@ -164,7 +188,7 @@ describe('Drawer.vue', () => {
|
|
|
164
188
|
});
|
|
165
189
|
});
|
|
166
190
|
|
|
167
|
-
describe('Interactions
|
|
191
|
+
describe('Interactions', () => {
|
|
168
192
|
beforeEach(() => {
|
|
169
193
|
vi.useFakeTimers();
|
|
170
194
|
});
|
|
@@ -174,9 +198,6 @@ describe('Drawer.vue', () => {
|
|
|
174
198
|
|
|
175
199
|
it('should close the drawer when the close icon is clicked', async () => {
|
|
176
200
|
await closeIcon().trigger('click');
|
|
177
|
-
|
|
178
|
-
vi.advanceTimersByTime(200);
|
|
179
|
-
|
|
180
201
|
expect(wrapper.emitted('close')).toBeTruthy();
|
|
181
202
|
});
|
|
182
203
|
|
|
@@ -184,8 +205,6 @@ describe('Drawer.vue', () => {
|
|
|
184
205
|
await wrapper.setProps({ distinctCloseBack: true });
|
|
185
206
|
await closeIcon().trigger('click');
|
|
186
207
|
|
|
187
|
-
vi.advanceTimersByTime(200);
|
|
188
|
-
|
|
189
208
|
expect(wrapper.emitted('back')).toBeTruthy();
|
|
190
209
|
});
|
|
191
210
|
|
|
@@ -193,36 +212,6 @@ describe('Drawer.vue', () => {
|
|
|
193
212
|
await closeIcon().trigger('click');
|
|
194
213
|
expect(wrapper.emitted('back')).toBeUndefined();
|
|
195
214
|
});
|
|
196
|
-
|
|
197
|
-
it('should correctly handle transitions when closing the drawer', async () => {
|
|
198
|
-
await wrapper.vm.close();
|
|
199
|
-
expect(wrapper.vm.showDrawer).toBe(false);
|
|
200
|
-
|
|
201
|
-
setTimeout(() => {
|
|
202
|
-
expect(drawer().exists()).toBe(false);
|
|
203
|
-
}, 200);
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
it('should handle overlay clicks to close the drawer when withoutOverlay is false', async () => {
|
|
207
|
-
expect(overlay().exists()).toBe(true);
|
|
208
|
-
await overlay().trigger('click');
|
|
209
|
-
|
|
210
|
-
vi.advanceTimersByTime(200);
|
|
211
|
-
|
|
212
|
-
expect(wrapper.emitted('close')).toBeTruthy();
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
it('should execute the callback after 200ms timeout and reset showDrawer', async () => {
|
|
216
|
-
const callbackMock = vi.fn();
|
|
217
|
-
wrapper.vm.transitionClose(callbackMock);
|
|
218
|
-
|
|
219
|
-
expect(wrapper.vm.showDrawer).toBe(false);
|
|
220
|
-
|
|
221
|
-
vi.advanceTimersByTime(200);
|
|
222
|
-
|
|
223
|
-
expect(callbackMock).toHaveBeenCalled();
|
|
224
|
-
expect(wrapper.vm.showDrawer).toBe(true);
|
|
225
|
-
});
|
|
226
215
|
});
|
|
227
216
|
|
|
228
217
|
describe('Props and Computed Properties', () => {
|
|
@@ -275,7 +264,7 @@ describe('Drawer.vue', () => {
|
|
|
275
264
|
|
|
276
265
|
it('should use correct icon for close button based on closeIcon prop', async () => {
|
|
277
266
|
await wrapper.setProps({ closeIcon: 'custom_close_icon' });
|
|
278
|
-
expect(closeIcon().props('
|
|
267
|
+
expect(closeIcon().props('iconCenter')).toBe('custom_close_icon');
|
|
279
268
|
});
|
|
280
269
|
|
|
281
270
|
it('should validate all size prop values correctly', () => {
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Drawer.vue > Component Rendering > Component Rendering > matches the snapshot 1`] = `
|
|
4
|
-
"<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</aside>"
|
|
4
|
+
"<div data-v-196de012="" open="true" class="unnnic-drawer" data-testid="drawer">
|
|
5
|
+
<div data-v-196de012="" showoverlay="true" data-testid="drawer-container" size="medium" class="unnnic-drawer__container unnnic-drawer__container--md">
|
|
6
|
+
<header data-v-39d0dfb8="" data-v-196de012="" class="unnnic-drawer__header unnnic-drawer__header">
|
|
7
|
+
<section data-v-196de012="" class="unnnic-drawer__title-container">
|
|
8
|
+
<div data-v-196de012="" class="unnnic-drawer__title" data-testid="drawer-title">Test Title</div>
|
|
9
|
+
<div data-v-196de012="" class="unnnic-drawer__description" data-testid="drawer-description">Test Description</div>
|
|
10
|
+
</section>
|
|
11
|
+
<div data-v-196de012="">
|
|
12
|
+
<unnnic-button-stub data-v-196de012="" size="small" text="" type="tertiary" float="false" iconleft="" iconright="" iconcenter="arrow_forward" iconsfilled="false" disabled="false" loading="false" class="unnnic-drawer__close-icon" data-testid="close-icon"></unnnic-button-stub>
|
|
13
|
+
</div>
|
|
14
|
+
</header>
|
|
15
|
+
<section data-v-196de012="" class="unnnic-drawer__content"></section>
|
|
16
|
+
<div data-v-196de012="" class="unnnic-drawer__footer" data-testid="footer">
|
|
17
|
+
<unnnic-button-stub data-v-196de012="" size="large" text="Secondary Action" type="tertiary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="secondary-button"></unnnic-button-stub>
|
|
18
|
+
<unnnic-button-stub data-v-196de012="" size="large" text="Primary Action" type="primary" float="false" iconleft="" iconright="" iconcenter="" iconsfilled="false" disabled="false" loading="false" data-testid="primary-button"></unnnic-button-stub>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>"
|
|
23
22
|
`;
|
|
@@ -3,66 +3,53 @@
|
|
|
3
3
|
class="unnnic-form-element"
|
|
4
4
|
:class="{ 'unnnic-form-element--disabled': disabled }"
|
|
5
5
|
>
|
|
6
|
-
<
|
|
6
|
+
<UnnnicLabel
|
|
7
7
|
v-if="label"
|
|
8
|
+
:label="label"
|
|
9
|
+
:tooltip="tooltip"
|
|
8
10
|
:class="[
|
|
9
11
|
'unnnic-form-element__label',
|
|
10
12
|
{
|
|
11
13
|
'unnnic-form-element__label--fixed': fixedLabel,
|
|
12
14
|
},
|
|
13
15
|
]"
|
|
14
|
-
|
|
15
|
-
{{ fullySanitize(label) }}
|
|
16
|
-
</p>
|
|
16
|
+
/>
|
|
17
17
|
|
|
18
18
|
<slot></slot>
|
|
19
19
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
<template v-if="error !== true">
|
|
25
|
-
<UnnnicIcon
|
|
26
|
-
size="sm"
|
|
27
|
-
icon="warning"
|
|
28
|
-
scheme="aux-red-500"
|
|
29
|
-
/>
|
|
30
|
-
|
|
31
|
-
{{ fullySanitize(error) }}
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<span
|
|
35
|
-
v-if="!!$slots.rightMessage"
|
|
36
|
-
class="unnnic-form-element__right-message"
|
|
37
|
-
>
|
|
38
|
-
<slot name="rightMessage"></slot>
|
|
39
|
-
</span>
|
|
40
|
-
</p>
|
|
41
|
-
|
|
42
|
-
<p
|
|
43
|
-
v-if="message || !!$slots.rightMessage"
|
|
44
|
-
class="unnnic-form-element__message"
|
|
20
|
+
<section
|
|
21
|
+
class="unnnic-form-element__hints-container"
|
|
22
|
+
v-if="message || error || !!$slots.rightMessage"
|
|
45
23
|
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
24
|
+
<section class="unnnic-form-element__message-container">
|
|
25
|
+
<p
|
|
26
|
+
v-if="message"
|
|
27
|
+
class="unnnic-form-element__message"
|
|
28
|
+
>
|
|
29
|
+
{{ fullySanitize(message) }}
|
|
30
|
+
</p>
|
|
31
|
+
<p
|
|
32
|
+
v-if="!!error?.length"
|
|
33
|
+
class="unnnic-form-element__message error"
|
|
34
|
+
>
|
|
35
|
+
{{ Array.isArray(error) ? error.join(', ') : error }}
|
|
36
|
+
</p>
|
|
37
|
+
</section>
|
|
38
|
+
<p v-if="!!$slots.rightMessage">
|
|
39
|
+
<slot name="rightMessage" />
|
|
40
|
+
</p>
|
|
41
|
+
</section>
|
|
55
42
|
</section>
|
|
56
43
|
</template>
|
|
57
44
|
|
|
58
|
-
<script>
|
|
59
|
-
import UnnnicIcon from '../../components/Icon.vue';
|
|
45
|
+
<script lang="js">
|
|
60
46
|
import { fullySanitize } from '../../utils/sanitize';
|
|
47
|
+
import UnnnicLabel from '../Label/Label.vue';
|
|
48
|
+
|
|
61
49
|
export default {
|
|
62
50
|
components: {
|
|
63
|
-
|
|
51
|
+
UnnnicLabel,
|
|
64
52
|
},
|
|
65
|
-
|
|
66
53
|
props: {
|
|
67
54
|
size: {
|
|
68
55
|
type: String,
|
|
@@ -70,28 +57,20 @@ export default {
|
|
|
70
57
|
validator: (size) => ['md', 'sm'].includes(size),
|
|
71
58
|
},
|
|
72
59
|
|
|
73
|
-
label: String,
|
|
60
|
+
label: { type: String, default: '' },
|
|
74
61
|
|
|
75
|
-
fixedLabel: Boolean,
|
|
62
|
+
fixedLabel: { type: Boolean, default: false },
|
|
76
63
|
|
|
77
64
|
error: {
|
|
78
65
|
type: [Boolean, String],
|
|
79
66
|
default: false,
|
|
80
67
|
},
|
|
81
68
|
|
|
82
|
-
message: String,
|
|
69
|
+
message: { type: String, default: '' },
|
|
83
70
|
|
|
84
|
-
disabled: Boolean,
|
|
85
|
-
},
|
|
71
|
+
disabled: { type: Boolean, default: false },
|
|
86
72
|
|
|
87
|
-
|
|
88
|
-
return {};
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
computed: {
|
|
92
|
-
shouldShowErrorSection() {
|
|
93
|
-
return this.error && (this.error !== true || !!this.$slots.rightMessage);
|
|
94
|
-
},
|
|
73
|
+
tooltip: { type: String, default: '' },
|
|
95
74
|
},
|
|
96
75
|
methods: {
|
|
97
76
|
fullySanitize,
|
|
@@ -102,75 +81,66 @@ export default {
|
|
|
102
81
|
<style lang="scss" scoped>
|
|
103
82
|
@use '@/assets/scss/unnnic' as *;
|
|
104
83
|
|
|
84
|
+
* {
|
|
85
|
+
margin: $unnnic-space-0;
|
|
86
|
+
padding: $unnnic-space-0;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
}
|
|
89
|
+
|
|
105
90
|
.unnnic-form-element {
|
|
106
91
|
&__label {
|
|
107
|
-
|
|
108
|
-
margin-bottom: $unnnic-spacing-nano;
|
|
109
|
-
|
|
92
|
+
font: $unnnic-font-body;
|
|
110
93
|
color: $unnnic-color-neutral-cloudy;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
$label-bottom-spacing: 3px;
|
|
94
|
+
margin-bottom: $unnnic-space-1;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: $unnnic-space-2;
|
|
117
98
|
|
|
118
99
|
&--fixed {
|
|
119
|
-
margin-top: -$unnnic-font-size-body-gt - $unnnic-
|
|
120
|
-
$label-bottom-spacing;
|
|
100
|
+
margin-top: -$unnnic-font-size-body-gt - $unnnic-space-2 + $unnnic-space-1;
|
|
121
101
|
}
|
|
122
102
|
|
|
123
103
|
&--fixed {
|
|
124
|
-
margin-bottom: 0;
|
|
104
|
+
margin-bottom: $unnnic-space-0;
|
|
125
105
|
position: absolute;
|
|
126
|
-
padding: 0 $unnnic-
|
|
127
|
-
margin-left: $unnnic-
|
|
106
|
+
padding: $unnnic-space-0 $unnnic-space-1;
|
|
107
|
+
margin-left: $unnnic-space-2;
|
|
128
108
|
|
|
129
109
|
&:after {
|
|
130
110
|
content: ' ';
|
|
131
111
|
position: absolute;
|
|
132
|
-
left: 0;
|
|
133
|
-
bottom: $
|
|
112
|
+
left: $unnnic-space-0;
|
|
113
|
+
bottom: $unnnic-space-1 - $unnnic-border-width-thinner;
|
|
134
114
|
width: 100%;
|
|
135
115
|
height: $unnnic-border-width-thinner;
|
|
136
|
-
background-color: $unnnic-color-
|
|
116
|
+
background-color: $unnnic-color-white;
|
|
137
117
|
}
|
|
138
118
|
}
|
|
139
119
|
}
|
|
140
120
|
|
|
141
|
-
&__error,
|
|
142
121
|
&__message {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
color: $unnnic-color-neutral-cloudy;
|
|
147
|
-
font-family: $unnnic-font-family-secondary;
|
|
148
|
-
font-weight: $unnnic-font-weight-regular;
|
|
149
|
-
font-size: $unnnic-font-size-body-md;
|
|
150
|
-
line-height: $unnnic-font-size-body-md + $unnnic-line-height-md;
|
|
122
|
+
&.error {
|
|
123
|
+
color: $unnnic-color-fg-critical;
|
|
124
|
+
}
|
|
151
125
|
}
|
|
152
126
|
|
|
153
|
-
&
|
|
127
|
+
&__hints-container {
|
|
154
128
|
display: flex;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
margin-left: auto;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
margin-top: $unnnic-space-1;
|
|
131
|
+
font: $unnnic-font-caption-2;
|
|
132
|
+
color: $unnnic-color-fg-base;
|
|
160
133
|
}
|
|
161
134
|
|
|
162
|
-
&
|
|
135
|
+
&__message-container {
|
|
163
136
|
display: flex;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
color: $unnnic-color-aux-red-500;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
gap: $unnnic-space-1;
|
|
168
139
|
}
|
|
169
140
|
|
|
170
141
|
&--disabled .unnnic-form-element__label,
|
|
171
142
|
&--disabled .unnnic-form-element__message {
|
|
172
143
|
user-select: none;
|
|
173
|
-
color: $unnnic-color-neutral-cleanest;
|
|
174
144
|
}
|
|
175
145
|
}
|
|
176
146
|
</style>
|
package/src/components/Icon.vue
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
:class="classes"
|
|
8
8
|
:type="nativeType"
|
|
9
9
|
/>
|
|
10
|
-
|
|
11
10
|
<input
|
|
12
11
|
v-else
|
|
13
12
|
v-bind="attributes"
|
|
14
13
|
:value="fullySanitize(modelValue)"
|
|
15
14
|
:class="classes"
|
|
16
15
|
:type="nativeType"
|
|
16
|
+
:maxlength="maxlength"
|
|
17
17
|
/>
|
|
18
18
|
</template>
|
|
19
19
|
|
|
@@ -49,6 +49,10 @@ export default {
|
|
|
49
49
|
},
|
|
50
50
|
hasIconLeft: Boolean,
|
|
51
51
|
hasIconRight: Boolean,
|
|
52
|
+
maxlength: {
|
|
53
|
+
type: Number,
|
|
54
|
+
default: null,
|
|
55
|
+
},
|
|
52
56
|
},
|
|
53
57
|
emits: ['update:modelValue'],
|
|
54
58
|
data() {
|
|
@@ -96,27 +100,23 @@ export default {
|
|
|
96
100
|
&.size {
|
|
97
101
|
&-md {
|
|
98
102
|
@include input-md-font;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
($unnnic-spacing-sm - $unnnic-border-width-thinner);
|
|
103
|
+
padding: $unnnic-space-3 $unnnic-space-4;
|
|
104
|
+
height: 45px;
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
&-sm {
|
|
105
108
|
@include input-sm-font;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
($unnnic-spacing-sm - $unnnic-border-width-thinner);
|
|
109
|
+
padding: $unnnic-space-2 $unnnic-space-4;
|
|
110
|
+
height: 37px;
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
&.input--has-icon-left {
|
|
113
|
-
padding-left: $unnnic-
|
|
114
|
-
$unnnic-spacing-xs - $unnnic-border-width-thinner;
|
|
115
|
+
padding-left: $unnnic-space-10;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
&.input--has-icon-right {
|
|
118
|
-
padding-right: $unnnic-
|
|
119
|
-
$unnnic-spacing-xs - $unnnic-border-width-thinner;
|
|
119
|
+
padding-right: $unnnic-space-10;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
&.error {
|
|
@@ -126,7 +126,7 @@ export default {
|
|
|
126
126
|
&:-ms-input-placeholder,
|
|
127
127
|
&::-ms-input-placeholder {
|
|
128
128
|
/* Internet Explorer 10-11 */
|
|
129
|
-
color: $unnnic-color-
|
|
129
|
+
color: $unnnic-color-fg-muted;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
</style>
|
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
@use '@/assets/scss/unnnic' as *;
|
|
2
2
|
|
|
3
3
|
@mixin input-base {
|
|
4
|
-
background: $unnnic-color-
|
|
5
|
-
border: $unnnic-border-width-thinner solid $unnnic-color-
|
|
4
|
+
background: $unnnic-color-white;
|
|
5
|
+
border: $unnnic-border-width-thinner solid $unnnic-color-border-base;
|
|
6
6
|
outline: none;
|
|
7
|
-
border-radius: $unnnic-
|
|
8
|
-
color: $unnnic-color-
|
|
9
|
-
caret-color: $unnnic-color-
|
|
10
|
-
font
|
|
11
|
-
|
|
7
|
+
border-radius: $unnnic-radius-2;
|
|
8
|
+
color: $unnnic-color-fg-emphasized;
|
|
9
|
+
caret-color: $unnnic-color-fg-muted;
|
|
10
|
+
font: $unnnic-font-body;
|
|
11
|
+
|
|
12
|
+
transition: border-color 0.1s ease-in-out;
|
|
12
13
|
|
|
13
14
|
&:focus {
|
|
14
|
-
border-color: $unnnic-color-
|
|
15
|
+
border-color: $unnnic-color-border-active;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
&::placeholder {
|
|
18
|
-
color: $unnnic-color-
|
|
19
|
-
opacity: 1;
|
|
19
|
+
color: $unnnic-color-fg-muted;
|
|
20
|
+
opacity: 1;
|
|
21
|
+
/* Firefox */
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
&:disabled {
|
|
23
|
-
border-color: $unnnic-color-
|
|
24
|
-
background-color: $unnnic-color-
|
|
25
|
+
border-color: $unnnic-color-border-muted;
|
|
26
|
+
background-color: $unnnic-color-bg-muted;
|
|
25
27
|
cursor: not-allowed;
|
|
26
|
-
color: $unnnic-color-
|
|
28
|
+
color: $unnnic-color-fg-muted;
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
@mixin input-sm-font {
|
|
31
|
-
font
|
|
32
|
-
line-height: $unnnic-font-size-body-md + $unnnic-line-height-medium;
|
|
33
|
+
font: $unnnic-font-body;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
@mixin input-md-font {
|
|
36
|
-
font
|
|
37
|
-
line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
|
|
37
|
+
font: $unnnic-font-body;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
@mixin input-error {
|
|
41
|
-
border-color: $unnnic-color-
|
|
42
|
-
|
|
43
|
-
}
|
|
41
|
+
border-color: $unnnic-color-border-critical;
|
|
42
|
+
}
|