@hellobetterdigitalnz/betterui 0.0.2 → 0.0.3-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/dist/App.d.ts +2 -0
- package/dist/Components/DataDisplay/Accordion/Accordion.d.ts +3 -0
- package/dist/Components/DataDisplay/Accordion/AccordionContext.d.ts +4 -0
- package/dist/Components/DataDisplay/Accordion/AccordionContextInterface.d.ts +7 -0
- package/dist/Components/DataDisplay/Accordion/AccordionItem.d.ts +3 -0
- package/dist/Components/DataDisplay/Accordion/AccordionItemProps.d.ts +10 -0
- package/dist/Components/DataDisplay/Accordion/AccordionProps.d.ts +6 -0
- package/dist/Components/DataDisplay/Accordion/AccordionProvider.d.ts +3 -0
- package/dist/Components/DataDisplay/Accordion/AccordionProviderInterface.d.ts +6 -0
- package/dist/Components/DataDisplay/Badge/Badge.d.ts +3 -0
- package/dist/Components/DataDisplay/Badge/BadgeProps.d.ts +5 -0
- package/dist/Components/DataDisplay/Cards/BannerCard/BannerCard.d.ts +3 -0
- package/dist/Components/DataDisplay/Cards/BannerCard/BannerCardInterface.d.ts +13 -0
- package/dist/Components/DataDisplay/Cards/PathwayCard/PathwayCard.d.ts +2 -0
- package/dist/Components/DataDisplay/Cards/PathwayCard/PathwayCardInterface.d.ts +15 -0
- package/dist/Components/DataDisplay/Media/Media.d.ts +3 -0
- package/{src/Components/DataDisplay/Media/MediaProps.tsx → dist/Components/DataDisplay/Media/MediaProps.d.ts} +3 -5
- package/dist/Components/DataDisplay/Modal/Modal.d.ts +3 -0
- package/dist/Components/DataDisplay/Modal/ModalActions.d.ts +2 -0
- package/dist/Components/DataDisplay/Modal/ModalActionsLeft.d.ts +2 -0
- package/dist/Components/DataDisplay/Modal/ModalActionsRight.d.ts +2 -0
- package/dist/Components/DataDisplay/Modal/ModalBody.d.ts +3 -0
- package/{src/Components/DataDisplay/Modal/ModalBodyProps.tsx → dist/Components/DataDisplay/Modal/ModalBodyProps.d.ts} +5 -7
- package/dist/Components/DataDisplay/Modal/ModalCurtain.d.ts +2 -0
- package/dist/Components/DataDisplay/Modal/ModalHeader.d.ts +3 -0
- package/dist/Components/DataDisplay/Modal/ModalHeaderProps.d.ts +7 -0
- package/{src/Components/DataDisplay/Modal/ModalProps.tsx → dist/Components/DataDisplay/Modal/ModalProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/NotificationsBell/NotificationsBell.d.ts +3 -0
- package/{src/Components/DataDisplay/NotificationsBell/NotificationsBellProps.tsx → dist/Components/DataDisplay/NotificationsBell/NotificationsBellProps.d.ts} +3 -5
- package/dist/Components/DataDisplay/NotificationsPanel/Notification.d.ts +3 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationProps.d.ts +10 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsGroup.d.ts +3 -0
- package/{src/Components/DataDisplay/NotificationsPanel/NotificationsGroupProps.tsx → dist/Components/DataDisplay/NotificationsPanel/NotificationsGroupProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsGroups.d.ts +3 -0
- package/{src/Components/DataDisplay/NotificationsPanel/NotificationsGroupsProps.tsx → dist/Components/DataDisplay/NotificationsPanel/NotificationsGroupsProps.d.ts} +5 -7
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsHeader.d.ts +3 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsHeaderProps.d.ts +6 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsNone.d.ts +2 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsPanel.d.ts +3 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationsPanelProps.d.ts +5 -0
- package/dist/Components/DataDisplay/Tab/Tab.d.ts +2 -0
- package/dist/Components/DataDisplay/Tab/TabBody.d.ts +2 -0
- package/dist/Components/DataDisplay/Tab/TabBodyContent.d.ts +2 -0
- package/{src/Components/DataDisplay/Tab/TabBodyContentProps.tsx → dist/Components/DataDisplay/Tab/TabBodyContentProps.d.ts} +7 -9
- package/{src/Components/DataDisplay/Tab/TabBodyProps.tsx → dist/Components/DataDisplay/Tab/TabBodyProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/Tab/TabContext.d.ts +4 -0
- package/{src/Components/DataDisplay/Tab/TabContextProps.tsx → dist/Components/DataDisplay/Tab/TabContextProps.d.ts} +5 -6
- package/dist/Components/DataDisplay/Tab/TabNav.d.ts +2 -0
- package/dist/Components/DataDisplay/Tab/TabNavItem.d.ts +2 -0
- package/dist/Components/DataDisplay/Tab/TabNavItemProps.d.ts +8 -0
- package/{src/Components/DataDisplay/Tab/TabNavProps.tsx → dist/Components/DataDisplay/Tab/TabNavProps.d.ts} +6 -8
- package/{src/Components/DataDisplay/Tab/TabProps.tsx → dist/Components/DataDisplay/Tab/TabProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/Table/Table.d.ts +3 -0
- package/dist/Components/DataDisplay/Table/TableBody.d.ts +3 -0
- package/{src/Components/DataDisplay/Table/TableBodyProps.tsx → dist/Components/DataDisplay/Table/TableBodyProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/Table/TableCell.d.ts +3 -0
- package/dist/Components/DataDisplay/Table/TableCellAction.d.ts +3 -0
- package/dist/Components/DataDisplay/Table/TableCellActionProps.d.ts +9 -0
- package/dist/Components/DataDisplay/Table/TableCellProps.d.ts +9 -0
- package/dist/Components/DataDisplay/Table/TableCellWithDesc.d.ts +3 -0
- package/dist/Components/DataDisplay/Table/TableCellWithDescProps.d.ts +8 -0
- package/dist/Components/DataDisplay/Table/TableCellWithImage.d.ts +3 -0
- package/dist/Components/DataDisplay/Table/TableCellWithImageProps.d.ts +9 -0
- package/dist/Components/DataDisplay/Table/TableFooter.d.ts +2 -0
- package/dist/Components/DataDisplay/Table/TableHead.d.ts +3 -0
- package/{src/Components/DataDisplay/Table/TableHeadProps.tsx → dist/Components/DataDisplay/Table/TableHeadProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/Table/TableHeaderCell.d.ts +3 -0
- package/{src/Components/DataDisplay/Table/TableHeaderCellProps.tsx → dist/Components/DataDisplay/Table/TableHeaderCellProps.d.ts} +8 -10
- package/{src/Components/DataDisplay/Table/TableProps.tsx → dist/Components/DataDisplay/Table/TableProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/Table/TableRow.d.ts +3 -0
- package/{src/Components/DataDisplay/Table/TableRowProps.tsx → dist/Components/DataDisplay/Table/TableRowProps.d.ts} +6 -8
- package/dist/Components/DataDisplay/index.d.ts +12 -0
- package/dist/Components/Form/Button/Button.d.ts +6 -0
- package/dist/Components/Form/Button/ButtonProps.d.ts +15 -0
- package/dist/Components/Form/Checkbox/Checkbox.d.ts +3 -0
- package/dist/Components/Form/Checkbox/CheckboxProps.d.ts +20 -0
- package/dist/Components/Form/CheckboxSelect/CheckboxSelect.d.ts +2 -0
- package/dist/Components/Form/CheckboxSelect/CheckboxSelectItem.d.ts +2 -0
- package/dist/Components/Form/CheckboxSet/CheckboxSet.d.ts +3 -0
- package/dist/Components/Form/CheckboxSet/CheckboxSetItem.d.ts +3 -0
- package/{src/Components/Form/CheckboxSet/CheckboxSetProps.tsx → dist/Components/Form/CheckboxSet/CheckboxSetProps.d.ts} +7 -9
- package/dist/Components/Form/CurrencyField/CurrencyField.d.ts +3 -0
- package/{src/Components/Form/CurrencyField/CurrencyFieldProps.tsx → dist/Components/Form/CurrencyField/CurrencyFieldProps.d.ts} +6 -8
- package/dist/Components/Form/DateField/DateField.d.ts +3 -0
- package/dist/Components/Form/DropdownBadge/DropdownBadge.d.ts +3 -0
- package/dist/Components/Form/DropdownBadge/DropdownBadgeItem.d.ts +3 -0
- package/dist/Components/Form/DropdownBadge/DropdownBadgeItemProps.d.ts +8 -0
- package/dist/Components/Form/DropdownBadge/DropdownBadgeProps.d.ts +27 -0
- package/dist/Components/Form/DropdownBadge/DropdownBadgeSelector.d.ts +3 -0
- package/{src/Components/Form/DropdownBadge/DropdownBadgeSelectorProps.tsx → dist/Components/Form/DropdownBadge/DropdownBadgeSelectorProps.d.ts} +5 -7
- package/dist/Components/Form/DropdownField/DropdownField.d.ts +3 -0
- package/dist/Components/Form/DropdownField/DropdownFieldItem.d.ts +3 -0
- package/dist/Components/Form/DropdownField/DropdownFieldItemProps.d.ts +7 -0
- package/dist/Components/Form/DropdownField/DropdownFieldProps.d.ts +29 -0
- package/dist/Components/Form/DropdownField/DropdownFieldSelector.d.ts +3 -0
- package/{src/Components/Form/DropdownField/DropdownFieldSelectorProps.tsx → dist/Components/Form/DropdownField/DropdownFieldSelectorProps.d.ts} +5 -7
- package/dist/Components/Form/EmailField/EmailField.d.ts +3 -0
- package/dist/Components/Form/EmailField/EmailField.stories.d.ts +13 -0
- package/dist/Components/Form/ErrorMessage/ErrorMessage.d.ts +2 -0
- package/dist/Components/Form/FormFieldHolder/FormFieldHolder.d.ts +3 -0
- package/dist/Components/Form/FormFieldHolder/FormFieldHolderProps.d.ts +10 -0
- package/dist/Components/Form/IconButton/IconButton.d.ts +6 -0
- package/dist/Components/Form/IconButton/IconButtonProps.d.ts +13 -0
- package/dist/Components/Form/InputProps.d.ts +23 -0
- package/dist/Components/Form/MultiSelectField/MultiSelectField.d.ts +2 -0
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldItem.d.ts +2 -0
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldTag.d.ts +2 -0
- package/dist/Components/Form/PasswordField/PasswordField.d.ts +3 -0
- package/dist/Components/Form/RadioButtons/RadioButton.d.ts +3 -0
- package/dist/Components/Form/RadioButtons/RadioButtonProps.d.ts +20 -0
- package/dist/Components/Form/RadioButtons/RadioButtons.d.ts +3 -0
- package/{src/Components/Form/RadioButtons/RadioButtonsProps.tsx → dist/Components/Form/RadioButtons/RadioButtonsProps.d.ts} +8 -10
- package/dist/Components/Form/TextField/TextField.d.ts +3 -0
- package/dist/Components/Form/TextField/TextField.stories.d.ts +13 -0
- package/{src/Components/Form/TextField/TextFieldProps.tsx → dist/Components/Form/TextField/TextFieldProps.d.ts} +6 -8
- package/dist/Components/Form/Textarea/Textarea.d.ts +3 -0
- package/dist/Components/Form/Textarea/Textarea.stories.d.ts +14 -0
- package/dist/Components/Form/Textarea/TextareaProps.d.ts +25 -0
- package/dist/Components/Form/TimeField/TimeField.d.ts +3 -0
- package/dist/Components/Form/ToggleSwitch/ToggleSwitch.d.ts +3 -0
- package/dist/Components/Form/ToggleSwitch/ToggleSwitchProps.d.ts +20 -0
- package/dist/Components/Form/index.d.ts +17 -0
- package/dist/Components/Icons/Arrows/CaretDown/CaretDown.d.ts +3 -0
- package/dist/Components/Icons/Arrows/CaretLeft/CaretLeft.d.ts +3 -0
- package/dist/Components/Icons/Arrows/CaretRight/CaretRight.d.ts +3 -0
- package/dist/Components/Icons/Arrows/CaretUp/CaretUp.d.ts +3 -0
- package/dist/Components/Icons/Brand/WindowLogo/WindowLogo.d.ts +3 -0
- package/dist/Components/Icons/Commerce/CurrencyDollarSimple/CurrencyDollarSimple.d.ts +3 -0
- package/dist/Components/Icons/Communication/AddressBook/AddressBook.d.ts +3 -0
- package/dist/Components/Icons/Communication/AddressBook/AddressBook.stories.d.ts +21 -0
- package/dist/Components/Icons/Communication/Asterick/Asterisk.d.ts +3 -0
- package/dist/Components/Icons/Communication/Asterick/Asterisk.stories.d.ts +21 -0
- package/dist/Components/Icons/Communication/AsterickSimple/AsteriskSimple.d.ts +3 -0
- package/dist/Components/Icons/Communication/AsterickSimple/AsteriskSimple.stories.d.ts +21 -0
- package/dist/Components/Icons/Communication/At/At.d.ts +3 -0
- package/dist/Components/Icons/Communication/At/At.stories.d.ts +21 -0
- package/dist/Components/Icons/Communication/Broadcast/Broadcast.d.ts +3 -0
- package/dist/Components/Icons/Communication/Broadcast/Broadcast.stories.d.ts +21 -0
- package/dist/Components/Icons/Communication/Chat/Chat.d.ts +3 -0
- package/dist/Components/Icons/Communication/Chat/Chat.stories.d.ts +21 -0
- package/dist/Components/Icons/Design/Eye/Eye.d.ts +3 -0
- package/dist/Components/Icons/Design/EyeSlash/EyeSlash.d.ts +3 -0
- package/dist/Components/Icons/IconProps.d.ts +4 -0
- package/dist/Components/Icons/MathAndFinance/XIcon/XIcon.d.ts +3 -0
- package/dist/Components/Icons/SecurityAndWarnings/WarningCircle/WarningCircle.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/Bell/Bell.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/MagnifyingGlass/MagnifyingGlass.d.ts +3 -0
- package/dist/Components/Icons/Time/CalendarBank/CalendarBank.d.ts +3 -0
- package/dist/Components/Icons/Time/Clock/Clock.d.ts +3 -0
- package/dist/Components/Layout/CalloutPopup/CalloutPopup.d.ts +2 -0
- package/dist/Components/Layout/Header/Header.d.ts +3 -0
- package/dist/Components/Layout/Header/HeaderLeft.d.ts +3 -0
- package/dist/Components/Layout/Header/HeaderLeftProps.d.ts +6 -0
- package/dist/Components/Layout/Header/HeaderProps.d.ts +6 -0
- package/dist/Components/Layout/Header/HeaderRight.d.ts +3 -0
- package/dist/Components/Layout/Header/HeaderRightProps.d.ts +8 -0
- package/dist/Components/Layout/Pagination/Pagination.d.ts +2 -0
- package/dist/Components/Layout/Pagination/PaginationFirst.d.ts +2 -0
- package/dist/Components/Layout/Pagination/PaginationLast.d.ts +2 -0
- package/dist/Components/Layout/Pagination/PaginationNext.d.ts +2 -0
- package/dist/Components/Layout/Pagination/PaginationNumber.d.ts +2 -0
- package/dist/Components/Layout/Pagination/PaginationPrevious.d.ts +2 -0
- package/dist/Components/Layout/ProfileAvatar/ProfileAvatar.d.ts +3 -0
- package/dist/Components/Layout/ProfileAvatar/ProfileAvatarProps.d.ts +8 -0
- package/dist/Components/Layout/ProfileDropdown/ProfileDropdown.d.ts +3 -0
- package/{src/Components/Layout/ProfileDropdown/ProfileDropdownProps.tsx → dist/Components/Layout/ProfileDropdown/ProfileDropdownProps.d.ts} +6 -8
- package/dist/Components/Layout/ProfileDropdown/ProfileHeader.d.ts +3 -0
- package/dist/Components/Layout/ProfileDropdown/ProfileHeaderProps.d.ts +7 -0
- package/dist/Components/Layout/ProfileDropdown/ProfileLink.d.ts +3 -0
- package/{src/Components/Layout/ProfileDropdown/ProfileLinkProps.tsx → dist/Components/Layout/ProfileDropdown/ProfileLinkProps.d.ts} +5 -7
- package/dist/Components/Layout/ProfileDropdown/ProfileLinks.d.ts +3 -0
- package/{src/Components/Layout/ProfileDropdown/ProfileLinksProps.tsx → dist/Components/Layout/ProfileDropdown/ProfileLinksProps.d.ts} +5 -7
- package/dist/Components/Layout/ProfileDropdown/ProfileNavigationItem.d.ts +3 -0
- package/{src/Components/Layout/ProfileDropdown/ProfileNavigationItemProps.tsx → dist/Components/Layout/ProfileDropdown/ProfileNavigationItemProps.d.ts} +8 -10
- package/dist/Components/Layout/ProfileDropdown/ProfileSwitchPanel.d.ts +3 -0
- package/{src/Components/Layout/ProfileDropdown/ProfileSwitchPanelProps.tsx → dist/Components/Layout/ProfileDropdown/ProfileSwitchPanelProps.d.ts} +8 -10
- package/dist/Components/Layout/ProfileDropdown/ProfileSwitchUser.d.ts +3 -0
- package/{src/Components/Layout/ProfileDropdown/ProfileSwitchUserProps.tsx → dist/Components/Layout/ProfileDropdown/ProfileSwitchUserProps.d.ts} +6 -7
- package/dist/Components/Layout/Sidebar/Sidebar.d.ts +3 -0
- package/dist/Components/Layout/Sidebar/SidebarChevron.d.ts +3 -0
- package/dist/Components/Layout/Sidebar/SidebarChevronProps.d.ts +5 -0
- package/dist/Components/Layout/Sidebar/SidebarNavigation.d.ts +3 -0
- package/dist/Components/Layout/Sidebar/SidebarNavigationItem.d.ts +3 -0
- package/dist/Components/Layout/Sidebar/SidebarNavigationItemProps.d.ts +10 -0
- package/dist/Components/Layout/Sidebar/SidebarNavigationProps.d.ts +7 -0
- package/dist/Components/Layout/Sidebar/SidebarProps.d.ts +6 -0
- package/dist/Components/Layout/Sidebar/SidebarSubNavigation.d.ts +3 -0
- package/dist/Components/Layout/Sidebar/SidebarSubNavigationItem.d.ts +3 -0
- package/dist/Components/Layout/Sidebar/SidebarSubNavigationItemProps.d.ts +10 -0
- package/dist/Components/Layout/Sidebar/SidebarSubNavigationProps.d.ts +8 -0
- package/dist/image/logo-small.svg +4 -0
- package/dist/image/logo.svg +26 -0
- package/dist/image/table-image.png +0 -0
- package/dist/index.cjs.js +6 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +1232 -0
- package/dist/index.es.js.map +1 -0
- package/dist/main.d.ts +0 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +75 -48
- package/src/App.tsx +0 -30
- package/src/Components/DataDisplay/Accordion/Accordion.stories.tsx +0 -57
- package/src/Components/DataDisplay/Accordion/Accordion.tsx +0 -14
- package/src/Components/DataDisplay/Accordion/AccordionContext.tsx +0 -11
- package/src/Components/DataDisplay/Accordion/AccordionContextInterface.tsx +0 -8
- package/src/Components/DataDisplay/Accordion/AccordionItem.tsx +0 -62
- package/src/Components/DataDisplay/Accordion/AccordionItemProps.tsx +0 -12
- package/src/Components/DataDisplay/Accordion/AccordionProps.tsx +0 -8
- package/src/Components/DataDisplay/Accordion/AccordionProvider.tsx +0 -65
- package/src/Components/DataDisplay/Accordion/AccordionProviderInterface.tsx +0 -8
- package/src/Components/DataDisplay/Accordion/accordion.module.scss +0 -56
- package/src/Components/DataDisplay/Badge/Badge.stories.tsx +0 -44
- package/src/Components/DataDisplay/Badge/Badge.tsx +0 -32
- package/src/Components/DataDisplay/Badge/BadgeProps.tsx +0 -6
- package/src/Components/DataDisplay/Badge/badge.module.scss +0 -42
- package/src/Components/DataDisplay/Cards/BannerCard/BannerCard.stories.tsx +0 -26
- package/src/Components/DataDisplay/Cards/BannerCard/BannerCard.tsx +0 -47
- package/src/Components/DataDisplay/Cards/BannerCard/BannerCardInterface.tsx +0 -15
- package/src/Components/DataDisplay/Cards/BannerCard/banner-card.scss +0 -54
- package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCard.stories.tsx +0 -31
- package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCard.tsx +0 -53
- package/src/Components/DataDisplay/Cards/PathwayCard/PathwayCardInterface.tsx +0 -17
- package/src/Components/DataDisplay/Cards/PathwayCard/pathway-card-stories.scss +0 -3
- package/src/Components/DataDisplay/Cards/PathwayCard/pathway-card.scss +0 -62
- package/src/Components/DataDisplay/Media/Media.stories.tsx +0 -30
- package/src/Components/DataDisplay/Media/Media.tsx +0 -47
- package/src/Components/DataDisplay/Media/media.module.scss +0 -8
- package/src/Components/DataDisplay/Modal/Modal.stories.tsx +0 -27
- package/src/Components/DataDisplay/Modal/Modal.tsx +0 -16
- package/src/Components/DataDisplay/Modal/ModalActions.tsx +0 -5
- package/src/Components/DataDisplay/Modal/ModalActionsLeft.tsx +0 -5
- package/src/Components/DataDisplay/Modal/ModalActionsRight.tsx +0 -5
- package/src/Components/DataDisplay/Modal/ModalBody.tsx +0 -15
- package/src/Components/DataDisplay/Modal/ModalCurtain.tsx +0 -5
- package/src/Components/DataDisplay/Modal/ModalHeader.tsx +0 -32
- package/src/Components/DataDisplay/Modal/ModalHeaderProps.tsx +0 -8
- package/src/Components/DataDisplay/Modal/modal.module.scss +0 -58
- package/src/Components/DataDisplay/NotificationsBell/NotificationBell.stories.tsx +0 -27
- package/src/Components/DataDisplay/NotificationsBell/NotificationsBell.tsx +0 -51
- package/src/Components/DataDisplay/NotificationsBell/notificationBell.module.scss +0 -48
- package/src/Components/DataDisplay/NotificationsPanel/Notification.stories.tsx +0 -128
- package/src/Components/DataDisplay/NotificationsPanel/Notification.tsx +0 -59
- package/src/Components/DataDisplay/NotificationsPanel/NotificationProps.tsx +0 -11
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroup.tsx +0 -17
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsGroups.tsx +0 -42
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsHeader.tsx +0 -27
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsHeaderProps.tsx +0 -7
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsNone.tsx +0 -11
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsPanel.tsx +0 -8
- package/src/Components/DataDisplay/NotificationsPanel/NotificationsPanelProps.tsx +0 -7
- package/src/Components/DataDisplay/NotificationsPanel/notificationPanel.module.scss +0 -196
- package/src/Components/DataDisplay/Tab/Tab.stories.tsx +0 -72
- package/src/Components/DataDisplay/Tab/Tab.tsx +0 -20
- package/src/Components/DataDisplay/Tab/TabBody.tsx +0 -6
- package/src/Components/DataDisplay/Tab/TabBodyContent.tsx +0 -15
- package/src/Components/DataDisplay/Tab/TabContext.tsx +0 -9
- package/src/Components/DataDisplay/Tab/TabNav.tsx +0 -6
- package/src/Components/DataDisplay/Tab/TabNavItem.tsx +0 -49
- package/src/Components/DataDisplay/Tab/TabNavItemProps.tsx +0 -9
- package/src/Components/DataDisplay/Tab/tab.module.scss +0 -35
- package/src/Components/DataDisplay/Tab/tab.stories.scss +0 -3
- package/src/Components/DataDisplay/Table/Table.stories.tsx +0 -64
- package/src/Components/DataDisplay/Table/Table.tsx +0 -10
- package/src/Components/DataDisplay/Table/TableBody.tsx +0 -13
- package/src/Components/DataDisplay/Table/TableCell.tsx +0 -30
- package/src/Components/DataDisplay/Table/TableCellAction.tsx +0 -27
- package/src/Components/DataDisplay/Table/TableCellActionProps.tsx +0 -11
- package/src/Components/DataDisplay/Table/TableCellProps.tsx +0 -11
- package/src/Components/DataDisplay/Table/TableCellWithDesc.tsx +0 -21
- package/src/Components/DataDisplay/Table/TableCellWithDescProps.tsx +0 -9
- package/src/Components/DataDisplay/Table/TableCellWithImage.tsx +0 -39
- package/src/Components/DataDisplay/Table/TableCellWithImageProps.tsx +0 -10
- package/src/Components/DataDisplay/Table/TableFooter.tsx +0 -5
- package/src/Components/DataDisplay/Table/TableHead.tsx +0 -11
- package/src/Components/DataDisplay/Table/TableHeaderCell.tsx +0 -17
- package/src/Components/DataDisplay/Table/TableRow.tsx +0 -9
- package/src/Components/DataDisplay/Table/table.module.scss +0 -103
- package/src/Components/Form/Button/Button.stories.tsx +0 -66
- package/src/Components/Form/Button/Button.tsx +0 -64
- package/src/Components/Form/Button/ButtonProps.tsx +0 -18
- package/src/Components/Form/Button/button.module.scss +0 -142
- package/src/Components/Form/Checkbox/Checkbox.stories.tsx +0 -49
- package/src/Components/Form/Checkbox/Checkbox.tsx +0 -85
- package/src/Components/Form/Checkbox/CheckboxProps.tsx +0 -22
- package/src/Components/Form/Checkbox/checkbox.module.scss +0 -63
- package/src/Components/Form/CheckboxSelect/CheckboxSelect.tsx +0 -5
- package/src/Components/Form/CheckboxSelect/CheckboxSelectItem.tsx +0 -5
- package/src/Components/Form/CheckboxSet/CheckboxSet.stories.tsx +0 -93
- package/src/Components/Form/CheckboxSet/CheckboxSet.tsx +0 -14
- package/src/Components/Form/CheckboxSet/CheckboxSetItem.tsx +0 -88
- package/src/Components/Form/CheckboxSet/checkboxSet.module.scss +0 -13
- package/src/Components/Form/CurrencyField/CurrenctField.stories.tsx +0 -22
- package/src/Components/Form/CurrencyField/CurrencyField.tsx +0 -59
- package/src/Components/Form/DateField/DateField.stories.tsx +0 -22
- package/src/Components/Form/DateField/DateField.tsx +0 -58
- package/src/Components/Form/DropdownBadge/DropdownBadge.stories.tsx +0 -49
- package/src/Components/Form/DropdownBadge/DropdownBadge.tsx +0 -160
- package/src/Components/Form/DropdownBadge/DropdownBadgeItem.tsx +0 -40
- package/src/Components/Form/DropdownBadge/DropdownBadgeItemProps.tsx +0 -10
- package/src/Components/Form/DropdownBadge/DropdownBadgeProps.tsx +0 -31
- package/src/Components/Form/DropdownBadge/DropdownBadgeSelector.tsx +0 -11
- package/src/Components/Form/DropdownBadge/dropdownBadge.module.scss +0 -105
- package/src/Components/Form/DropdownField/DropdownField.stories.tsx +0 -50
- package/src/Components/Form/DropdownField/DropdownField.tsx +0 -118
- package/src/Components/Form/DropdownField/DropdownFieldItem.tsx +0 -26
- package/src/Components/Form/DropdownField/DropdownFieldItemProps.tsx +0 -9
- package/src/Components/Form/DropdownField/DropdownFieldProps.tsx +0 -33
- package/src/Components/Form/DropdownField/DropdownFieldSelector.tsx +0 -15
- package/src/Components/Form/DropdownField/dropdown.module.scss +0 -79
- package/src/Components/Form/EmailField/EmailField.stories.ts +0 -23
- package/src/Components/Form/EmailField/EmailField.tsx +0 -51
- package/src/Components/Form/ErrorMessage/ErrorMessage.tsx +0 -5
- package/src/Components/Form/FormFieldHolder/FormFieldHolder.stories.tsx +0 -30
- package/src/Components/Form/FormFieldHolder/FormFieldHolder.tsx +0 -40
- package/src/Components/Form/FormFieldHolder/FormFieldHolderProps.tsx +0 -12
- package/src/Components/Form/FormFieldHolder/formHolder.module.scss +0 -56
- package/src/Components/Form/IconButton/IconButton.stories.tsx +0 -45
- package/src/Components/Form/IconButton/IconButton.tsx +0 -58
- package/src/Components/Form/IconButton/IconButtonProps.tsx +0 -15
- package/src/Components/Form/IconButton/iconButton.module.scss +0 -111
- package/src/Components/Form/InputProps.tsx +0 -25
- package/src/Components/Form/MultiSelectField/MultiSelectField.tsx +0 -5
- package/src/Components/Form/MultiSelectField/MultiSelectFieldItem.tsx +0 -5
- package/src/Components/Form/MultiSelectField/MultiSelectFieldTag.tsx +0 -5
- package/src/Components/Form/PasswordField/PasswordField.stories.tsx +0 -22
- package/src/Components/Form/PasswordField/PasswordField.tsx +0 -70
- package/src/Components/Form/RadioButtons/RadioButton.tsx +0 -70
- package/src/Components/Form/RadioButtons/RadioButtonProps.tsx +0 -22
- package/src/Components/Form/RadioButtons/RadioButtons.stories.tsx +0 -64
- package/src/Components/Form/RadioButtons/RadioButtons.tsx +0 -18
- package/src/Components/Form/RadioButtons/radioButton.stories.scss +0 -3
- package/src/Components/Form/RadioButtons/radiobutton.module.scss +0 -63
- package/src/Components/Form/TextField/TextField.stories.ts +0 -22
- package/src/Components/Form/TextField/TextField.tsx +0 -56
- package/src/Components/Form/Textarea/Textarea.stories.ts +0 -31
- package/src/Components/Form/Textarea/Textarea.tsx +0 -71
- package/src/Components/Form/Textarea/TextareaProps.tsx +0 -27
- package/src/Components/Form/Textarea/textarea.module.scss +0 -49
- package/src/Components/Form/TimeField/TimeField.stories.tsx +0 -22
- package/src/Components/Form/TimeField/TimeField.tsx +0 -58
- package/src/Components/Form/ToggleSwitch/ToggleSwitch.stories.tsx +0 -49
- package/src/Components/Form/ToggleSwitch/ToggleSwitch.tsx +0 -87
- package/src/Components/Form/ToggleSwitch/ToggleSwitchProps.tsx +0 -22
- package/src/Components/Form/ToggleSwitch/toggleSwitch.module.scss +0 -82
- package/src/Components/Form/inputs.module.scss +0 -129
- package/src/Components/Icons/Arrows/CaretDown/CaretDown.tsx +0 -49
- package/src/Components/Icons/Arrows/CaretLeft/CaretLeft.tsx +0 -102
- package/src/Components/Icons/Arrows/CaretRight/CaretRight.tsx +0 -102
- package/src/Components/Icons/Arrows/CaretUp/CaretUp.tsx +0 -49
- package/src/Components/Icons/Brand/WindowLogo/WindowLogo.tsx +0 -105
- package/src/Components/Icons/Commerce/CurrencyDollarSimple/CurrencyDollarSimple.tsx +0 -105
- package/src/Components/Icons/Communication/AddressBook/AddressBook.stories.ts +0 -28
- package/src/Components/Icons/Communication/AddressBook/AddressBook.tsx +0 -50
- package/src/Components/Icons/Communication/Asterick/Asterisk.stories.ts +0 -28
- package/src/Components/Icons/Communication/Asterick/Asterisk.tsx +0 -50
- package/src/Components/Icons/Communication/AsterickSimple/AsteriskSimple.stories.ts +0 -28
- package/src/Components/Icons/Communication/AsterickSimple/AsteriskSimple.tsx +0 -49
- package/src/Components/Icons/Communication/At/At.stories.ts +0 -28
- package/src/Components/Icons/Communication/At/At.tsx +0 -49
- package/src/Components/Icons/Communication/Broadcast/Broadcast.stories.ts +0 -27
- package/src/Components/Icons/Communication/Broadcast/Broadcast.tsx +0 -49
- package/src/Components/Icons/Communication/Chat/Chat.stories.ts +0 -28
- package/src/Components/Icons/Communication/Chat/Chat.tsx +0 -49
- package/src/Components/Icons/Design/Eye/Eye.tsx +0 -105
- package/src/Components/Icons/Design/EyeSlash/EyeSlash.tsx +0 -105
- package/src/Components/Icons/IconProps.tsx +0 -5
- package/src/Components/Icons/MathAndFinance/XIcon/XIcon.tsx +0 -107
- package/src/Components/Icons/SecurityAndWarnings/WarningCircle/WarningCircle.tsx +0 -105
- package/src/Components/Icons/SystemAndDevice/Bell/Bell.tsx +0 -49
- package/src/Components/Icons/SystemAndDevice/MagnifyingGlass/MagnifyingGlass.tsx +0 -105
- package/src/Components/Icons/Time/CalendarBank/CalendarBank.tsx +0 -105
- package/src/Components/Icons/Time/Clock/Clock.tsx +0 -105
- package/src/Components/Layout/CalloutPopup/CalloutPopup.tsx +0 -5
- package/src/Components/Layout/Header/Header.tsx +0 -5
- package/src/Components/Layout/Header/HeaderLeft.tsx +0 -5
- package/src/Components/Layout/Header/HeaderRight.tsx +0 -5
- package/src/Components/Layout/Pagination/Pagination.tsx +0 -5
- package/src/Components/Layout/Pagination/PaginationFirst.tsx +0 -5
- package/src/Components/Layout/Pagination/PaginationLast.tsx +0 -5
- package/src/Components/Layout/Pagination/PaginationNext.tsx +0 -5
- package/src/Components/Layout/Pagination/PaginationNumber.tsx +0 -5
- package/src/Components/Layout/Pagination/PaginationPrevious.tsx +0 -5
- package/src/Components/Layout/ProfileAvatar/ProfileAvatar.stories.tsx +0 -22
- package/src/Components/Layout/ProfileAvatar/ProfileAvatar.tsx +0 -31
- package/src/Components/Layout/ProfileAvatar/ProfileAvatarProps.tsx +0 -10
- package/src/Components/Layout/ProfileAvatar/profileAvatar.module.scss +0 -35
- package/src/Components/Layout/ProfileDropdown/ProfileDropdown.stories.tsx +0 -67
- package/src/Components/Layout/ProfileDropdown/ProfileDropdown.tsx +0 -12
- package/src/Components/Layout/ProfileDropdown/ProfileHeader.tsx +0 -24
- package/src/Components/Layout/ProfileDropdown/ProfileHeaderProps.tsx +0 -8
- package/src/Components/Layout/ProfileDropdown/ProfileLink.tsx +0 -10
- package/src/Components/Layout/ProfileDropdown/ProfileLinks.tsx +0 -14
- package/src/Components/Layout/ProfileDropdown/ProfileNavigationItem.tsx +0 -29
- package/src/Components/Layout/ProfileDropdown/ProfileSwitchPanel.tsx +0 -79
- package/src/Components/Layout/ProfileDropdown/ProfileSwitchUser.tsx +0 -22
- package/src/Components/Layout/ProfileDropdown/profileDropdown.module.scss +0 -207
- package/src/Components/Layout/Sidebar/Sidebar.tsx +0 -5
- package/src/Components/Layout/Sidebar/SidebarChevron.tsx +0 -5
- package/src/Components/Layout/Sidebar/SidebarNavigation.tsx +0 -5
- package/src/Components/Layout/Sidebar/SidebarNavigationItem.tsx +0 -5
- package/src/Components/Layout/Sidebar/SidebarSubNavigation.tsx +0 -5
- package/src/Notification/Notification.tsx +0 -83
- package/src/Notification/NotificationInterface.tsx +0 -9
- package/src/Notification/NotificationList.tsx +0 -54
- package/src/Notification/NotificationListHolder.tsx +0 -14
- package/src/Notification/NotificationListHolderInterface.tsx +0 -8
- package/src/Notification/NotificationListInterface.tsx +0 -11
- package/src/Notification/notification.scss +0 -225
- package/src/global.scss +0 -224
- package/src/main.tsx +0 -10
- package/src/variables.scss +0 -2
- package/src/vite-env.d.ts +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MouseEvent } from "react";
|
|
2
|
-
|
|
3
|
-
interface DropdownBadgeItemProps {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string | number;
|
|
6
|
-
status?: "pending" | "inProgress" | "complete";
|
|
7
|
-
handleSelect: (e: MouseEvent, value: string | number) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default DropdownBadgeItemProps;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { MouseEvent, FocusEvent } from "react";
|
|
2
|
-
|
|
3
|
-
interface NameValueInterface {
|
|
4
|
-
label: string;
|
|
5
|
-
status?: "pending" | "inProgress" | "complete" | undefined;
|
|
6
|
-
value: string | number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface DropdownBadgeProps {
|
|
10
|
-
name?: string;
|
|
11
|
-
id?: string;
|
|
12
|
-
value?: string;
|
|
13
|
-
options: (NameValueInterface | string)[];
|
|
14
|
-
status?: "pending" | "inProgress" | "complete" | undefined;
|
|
15
|
-
extraClass?: string;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
readonly?: boolean;
|
|
18
|
-
autoComplete?: boolean;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
ariaLabel?: string;
|
|
21
|
-
ariaLabeledby?: string;
|
|
22
|
-
ariaDescribedby?: string;
|
|
23
|
-
onClick?: (e: MouseEvent) => void;
|
|
24
|
-
onChange?: (e: MouseEvent) => void;
|
|
25
|
-
onFocus?: (e: FocusEvent) => void;
|
|
26
|
-
onBlur?: (e: FocusEvent) => void;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type { NameValueInterface };
|
|
30
|
-
|
|
31
|
-
export default DropdownBadgeProps;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import cx from "classnames";
|
|
2
|
-
import styles from "./dropdownBadge.module.scss";
|
|
3
|
-
import DropdownBadgeSelectorProps from "./DropdownBadgeSelectorProps";
|
|
4
|
-
|
|
5
|
-
const DropdownBadgeSelector = (props: DropdownBadgeSelectorProps) => {
|
|
6
|
-
const classes = [styles.dropdownSelector];
|
|
7
|
-
|
|
8
|
-
return <div className={cx(classes)}>{props.children}</div>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default DropdownBadgeSelector;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
.dropdown {
|
|
2
|
-
position: relative;
|
|
3
|
-
|
|
4
|
-
.control {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 24px;
|
|
10
|
-
padding: 0 var(--spacing-1\/2);
|
|
11
|
-
border: 1px solid var(--color-gray-300);
|
|
12
|
-
border-radius: 6px;
|
|
13
|
-
font-family: var(--font);
|
|
14
|
-
font-size: var(--font-size-body-sm);
|
|
15
|
-
line-height: var(--line-height-body-sm);
|
|
16
|
-
font-weight: var(--font-weight-body-sm);
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.disabled {
|
|
21
|
-
cursor: not-allowed;
|
|
22
|
-
opacity: 0.3;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.labelWrapper {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.label {
|
|
32
|
-
flex-grow: 1;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
text-overflow: ellipsis;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
padding-right: calc(var(--space-unit) * 2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.chevron {
|
|
40
|
-
width: 12px;
|
|
41
|
-
height: 12px;
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
flex-shrink: 0;
|
|
46
|
-
margin-left: calc(var(--space-unit) * 2);
|
|
47
|
-
|
|
48
|
-
svg {
|
|
49
|
-
width: 100%;
|
|
50
|
-
height: auto;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.dropdownSelector {
|
|
56
|
-
width: 100%;
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
position: absolute;
|
|
60
|
-
padding: calc(var(--space-unit) * 2) 0;
|
|
61
|
-
border-radius: 4px;
|
|
62
|
-
background-color: var(--color-white);
|
|
63
|
-
box-shadow: var(--drop-shadow-default);
|
|
64
|
-
margin-top: var(--space-unit);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.dropdownItem {
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
padding: calc(var(--space-unit) * 2);
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
|
|
73
|
-
&.active,
|
|
74
|
-
&:hover {
|
|
75
|
-
background-color: var(--color-gray-50);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.circle {
|
|
80
|
-
width: 12px;
|
|
81
|
-
height: 12px;
|
|
82
|
-
border-radius: 100%;
|
|
83
|
-
flex-shrink: 0;
|
|
84
|
-
margin-right: 6px;
|
|
85
|
-
|
|
86
|
-
&Pending {
|
|
87
|
-
background: var(--color-gray-300);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&InProgress {
|
|
91
|
-
background: var(--color-inprogress);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&Complete {
|
|
95
|
-
background: var(--color-success);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.divider {
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: stretch;
|
|
102
|
-
height: 100%;
|
|
103
|
-
width: 1px;
|
|
104
|
-
background: var(--color-gray-300);
|
|
105
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import DropdownField from "./DropdownField";
|
|
3
|
-
import {NameValueInterface} from "./DropdownFieldProps";
|
|
4
|
-
|
|
5
|
-
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Form / Dropdown Field',
|
|
8
|
-
component: DropdownField,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
} satisfies Meta<typeof DropdownField>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof DropdownField>;
|
|
17
|
-
|
|
18
|
-
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
19
|
-
export const Default: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
name: 'dropdown-field',
|
|
22
|
-
placeholder: 'Super long placeholder text',
|
|
23
|
-
options: [
|
|
24
|
-
'Lorem ipsum',
|
|
25
|
-
'Suspendisse sit amet',
|
|
26
|
-
'In sagittis metus'
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Props: Story = {
|
|
32
|
-
args: {
|
|
33
|
-
name: 'dropdown-field',
|
|
34
|
-
placeholder: 'Placeholder text',
|
|
35
|
-
options: [
|
|
36
|
-
{
|
|
37
|
-
label: 'Lorem ipsum',
|
|
38
|
-
value: 1
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: 'In sagittis metus',
|
|
42
|
-
value: 2
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: 'Suspendisse potenti',
|
|
46
|
-
value: 3
|
|
47
|
-
},
|
|
48
|
-
] as NameValueInterface[]
|
|
49
|
-
},
|
|
50
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import cx from "classnames";
|
|
2
|
-
import DropdownFieldProps, { NameValueInterface } from "./DropdownFieldProps";
|
|
3
|
-
import styles from "./dropdown.module.scss";
|
|
4
|
-
import { useEffect, useState, MouseEvent } from "react";
|
|
5
|
-
import CaretDown from "../../Icons/Arrows/CaretDown/CaretDown";
|
|
6
|
-
import CaretUp from "../../Icons/Arrows/CaretUp/CaretUp";
|
|
7
|
-
import DropdownFieldSelector from "./DropdownFieldSelector";
|
|
8
|
-
import DropdownFieldItem from "./DropdownFieldItem";
|
|
9
|
-
|
|
10
|
-
const DropdownField = (props: DropdownFieldProps) => {
|
|
11
|
-
const {
|
|
12
|
-
name,
|
|
13
|
-
id,
|
|
14
|
-
value,
|
|
15
|
-
options,
|
|
16
|
-
placeholder,
|
|
17
|
-
extraClass,
|
|
18
|
-
disabled,
|
|
19
|
-
// error,
|
|
20
|
-
ariaLabel,
|
|
21
|
-
required,
|
|
22
|
-
// onClick,
|
|
23
|
-
// readonly,
|
|
24
|
-
onChange,
|
|
25
|
-
// ...args
|
|
26
|
-
} = props;
|
|
27
|
-
|
|
28
|
-
const [opened, setOpened] = useState(false);
|
|
29
|
-
const [selected, setSelected] = useState<string | number>();
|
|
30
|
-
const [label, setLabel] = useState("");
|
|
31
|
-
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
setSelected(value);
|
|
34
|
-
}, [value]);
|
|
35
|
-
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
// selected has changed, find the right value;
|
|
38
|
-
for (const option of options) {
|
|
39
|
-
let matched = null;
|
|
40
|
-
if (typeof option === "string") {
|
|
41
|
-
matched = option === selected ? option : null;
|
|
42
|
-
} else {
|
|
43
|
-
matched = option.value === selected ? option.label : null;
|
|
44
|
-
}
|
|
45
|
-
if (matched) {
|
|
46
|
-
setLabel(matched);
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}, [selected]);
|
|
51
|
-
|
|
52
|
-
const classNames = [styles.dropdown];
|
|
53
|
-
if (extraClass) {
|
|
54
|
-
classNames.push(extraClass);
|
|
55
|
-
}
|
|
56
|
-
if (disabled) {
|
|
57
|
-
classNames.push(styles.disabled);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const handleOpenClose = () => {
|
|
61
|
-
setOpened(!opened);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const handleSelect = (e: MouseEvent, value: string | number) => {
|
|
65
|
-
setSelected(value);
|
|
66
|
-
setOpened(false);
|
|
67
|
-
if (onChange) {
|
|
68
|
-
onChange(e);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<div className={cx(classNames)}>
|
|
74
|
-
<div className={styles.control} onClick={handleOpenClose}>
|
|
75
|
-
{!selected && placeholder && (
|
|
76
|
-
<div className={styles.placeholder} aria-label={ariaLabel}>
|
|
77
|
-
{placeholder}
|
|
78
|
-
</div>
|
|
79
|
-
)}
|
|
80
|
-
{(selected || !placeholder) && (
|
|
81
|
-
<div className={styles.label} aria-label={ariaLabel}>
|
|
82
|
-
{label}
|
|
83
|
-
{!!selected && <div className={styles.reset}></div>}
|
|
84
|
-
</div>
|
|
85
|
-
)}
|
|
86
|
-
<div className={styles.chevron}>
|
|
87
|
-
{!opened && <CaretDown />}
|
|
88
|
-
{!!opened && <CaretUp />}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
{!!opened && (
|
|
93
|
-
<DropdownFieldSelector>
|
|
94
|
-
{options.map((option: string | NameValueInterface, index: number) => {
|
|
95
|
-
return (
|
|
96
|
-
<DropdownFieldItem
|
|
97
|
-
key={index}
|
|
98
|
-
handleSelect={handleSelect}
|
|
99
|
-
label={typeof option === "object" ? option.label : option}
|
|
100
|
-
value={typeof option === "object" ? option.value : option}
|
|
101
|
-
/>
|
|
102
|
-
);
|
|
103
|
-
})}
|
|
104
|
-
</DropdownFieldSelector>
|
|
105
|
-
)}
|
|
106
|
-
|
|
107
|
-
<input
|
|
108
|
-
name={name}
|
|
109
|
-
value={selected}
|
|
110
|
-
id={id}
|
|
111
|
-
type={"hidden"}
|
|
112
|
-
required={required}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export default DropdownField;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import DropdownFieldItemProps from "./DropdownFieldItemProps";
|
|
2
|
-
import styles from './dropdown.module.scss'
|
|
3
|
-
import {MouseEvent} from "react";
|
|
4
|
-
|
|
5
|
-
const DropdownFieldItem = (props: DropdownFieldItemProps) => {
|
|
6
|
-
const {
|
|
7
|
-
label,
|
|
8
|
-
value,
|
|
9
|
-
handleSelect
|
|
10
|
-
} = props;
|
|
11
|
-
|
|
12
|
-
return <div
|
|
13
|
-
className={styles.dropdownItem}
|
|
14
|
-
data-value={value} aria-label={label}
|
|
15
|
-
onClick={(e: MouseEvent) => {
|
|
16
|
-
if (handleSelect) {
|
|
17
|
-
handleSelect(e, value);
|
|
18
|
-
}
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
{label}
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default DropdownFieldItem;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {MouseEvent, FocusEvent} from "react";
|
|
2
|
-
|
|
3
|
-
interface NameValueInterface {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string|number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface DropdownFieldProps {
|
|
9
|
-
name?: string;
|
|
10
|
-
id?: string;
|
|
11
|
-
value?: string;
|
|
12
|
-
options: NameValueInterface[]|string[]
|
|
13
|
-
extraClass?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
error?: boolean;
|
|
16
|
-
disabled?:boolean;
|
|
17
|
-
readonly?: boolean;
|
|
18
|
-
autoComplete?: boolean;
|
|
19
|
-
minLength?: number;
|
|
20
|
-
maxLength?: number;
|
|
21
|
-
required?: boolean;
|
|
22
|
-
ariaLabel?: string;
|
|
23
|
-
ariaLabeledby?: string;
|
|
24
|
-
ariaDescribedby?: string;
|
|
25
|
-
onClick?: (e: MouseEvent) => void;
|
|
26
|
-
onChange?: (e: MouseEvent) => void;
|
|
27
|
-
onFocus?: (e: FocusEvent) => void;
|
|
28
|
-
onBlur?: (e: FocusEvent) => void;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type { NameValueInterface };
|
|
32
|
-
|
|
33
|
-
export default DropdownFieldProps;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import DropdownFieldSelectorProps from "./DropdownFieldSelectorProps";
|
|
3
|
-
import styles from './dropdown.module.scss';
|
|
4
|
-
|
|
5
|
-
const DropdownFieldSelector = (props: DropdownFieldSelectorProps) => {
|
|
6
|
-
|
|
7
|
-
const classes = [styles.dropdownSelector];
|
|
8
|
-
|
|
9
|
-
return <div className={cx(classes)}>
|
|
10
|
-
{props.children}
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default DropdownFieldSelector;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
.dropdown {
|
|
2
|
-
position: relative;
|
|
3
|
-
|
|
4
|
-
.control {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 48px;
|
|
10
|
-
padding: var(--space-unit) calc(var(--space-unit) * 3);
|
|
11
|
-
border: 1px solid var(--color-gray-300);
|
|
12
|
-
border-radius: 6px;
|
|
13
|
-
font-family: var(--font);
|
|
14
|
-
font-size: var(--font-size-input);
|
|
15
|
-
line-height: var(--line-height-input);
|
|
16
|
-
font-weight: var(--line-height-input);
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.disabled {
|
|
21
|
-
cursor: not-allowed;
|
|
22
|
-
opacity: 0.3;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.label {
|
|
27
|
-
flex-grow: 1;
|
|
28
|
-
white-space: nowrap;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
padding-right: calc(var(--space-unit) * 3);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.placeholder {
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
text-overflow: ellipsis;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
flex-grow: 1;
|
|
39
|
-
color: var(--color-gray-500);
|
|
40
|
-
font-size: var(--font-size-input);
|
|
41
|
-
line-height: var(--line-height-input);
|
|
42
|
-
font-weight: var(--font-weight-input);
|
|
43
|
-
padding-right: calc(var(--space-unit) * 3);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.chevron {
|
|
47
|
-
width: 16px;
|
|
48
|
-
height: 16px;
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
justify-content: center;
|
|
52
|
-
|
|
53
|
-
svg {
|
|
54
|
-
width: 100%;
|
|
55
|
-
height: auto;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.dropdownSelector {
|
|
61
|
-
width: 100%;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
position: absolute;
|
|
65
|
-
padding: calc(var(--space-unit) * 2) 0;
|
|
66
|
-
border-radius: 4px;
|
|
67
|
-
background-color: var(--color-white);
|
|
68
|
-
box-shadow: var(--drop-shadow-default);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.dropdownItem {
|
|
72
|
-
padding: calc(var(--space-unit) * 2);
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
|
|
75
|
-
&.active,
|
|
76
|
-
&:hover {
|
|
77
|
-
background-color: var(--color-gray-50);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import EmailField from './EmailField.tsx';
|
|
4
|
-
|
|
5
|
-
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Form / EmailField',
|
|
8
|
-
component: EmailField,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
} satisfies Meta<typeof EmailField>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof EmailField>;
|
|
17
|
-
|
|
18
|
-
export const Example: Story = {
|
|
19
|
-
args: {
|
|
20
|
-
placeholder:"Placeholder",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import styles from '../inputs.module.scss' ;
|
|
3
|
-
import InputProps from "../InputProps";
|
|
4
|
-
|
|
5
|
-
const EmailField = (props: InputProps) => {
|
|
6
|
-
const {
|
|
7
|
-
name,
|
|
8
|
-
id,
|
|
9
|
-
value,
|
|
10
|
-
placeholder,
|
|
11
|
-
extraClass,
|
|
12
|
-
disabled,
|
|
13
|
-
error,
|
|
14
|
-
ariaLabel,
|
|
15
|
-
required,
|
|
16
|
-
readonly,
|
|
17
|
-
autoComplete,
|
|
18
|
-
...args
|
|
19
|
-
} = props;
|
|
20
|
-
|
|
21
|
-
const classes = [styles.input];
|
|
22
|
-
if (error) {
|
|
23
|
-
classes.push(styles.error);
|
|
24
|
-
}
|
|
25
|
-
if (extraClass) {
|
|
26
|
-
classes.push(extraClass);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return <input
|
|
30
|
-
className={cx(classes)}
|
|
31
|
-
id={id}
|
|
32
|
-
name={name}
|
|
33
|
-
type='email'
|
|
34
|
-
value={value}
|
|
35
|
-
placeholder={placeholder}
|
|
36
|
-
disabled={disabled}
|
|
37
|
-
readOnly={readonly}
|
|
38
|
-
required={required}
|
|
39
|
-
autoComplete={autoComplete ? "on" : "off"}
|
|
40
|
-
aria-label={ariaLabel ? ariaLabel : name}
|
|
41
|
-
aria-required={required ? "true" : "false"}
|
|
42
|
-
aria-invalid={error ? "true" : "false"}
|
|
43
|
-
aria-disabled={disabled ? "true" : "false"}
|
|
44
|
-
aria-readonly={readonly ? "true" : "false"}
|
|
45
|
-
aria-autocomplete={autoComplete ? "list" : "none"}
|
|
46
|
-
{...args}
|
|
47
|
-
/>
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export default EmailField;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import FormFieldHolder from "./FormFieldHolder";
|
|
3
|
-
import TextField from "../TextField/TextField";
|
|
4
|
-
|
|
5
|
-
const meta: Meta = {
|
|
6
|
-
title: "Form / FormFieldHolder",
|
|
7
|
-
component: FormFieldHolder,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "centered",
|
|
10
|
-
},
|
|
11
|
-
tags: ["autodocs"],
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
const FormFieldHolderTemplate: Story = {
|
|
19
|
-
render: () => {
|
|
20
|
-
return (
|
|
21
|
-
<FormFieldHolder label="Name" description={"helper text"}>
|
|
22
|
-
<TextField placeholder="Placeholder" />
|
|
23
|
-
</FormFieldHolder>
|
|
24
|
-
);
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const FormFieldHolderComponent = {
|
|
29
|
-
...FormFieldHolderTemplate,
|
|
30
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import WarningCircle from "../../Icons/SecurityAndWarnings/WarningCircle/WarningCircle";
|
|
2
|
-
import FormFieldHolderProps from "./FormFieldHolderProps";
|
|
3
|
-
import styles from "./formHolder.module.scss";
|
|
4
|
-
|
|
5
|
-
const FormFieldHolder = (props: FormFieldHolderProps) => {
|
|
6
|
-
const { label, description, extraClass = "", children, error } = props;
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<div
|
|
10
|
-
className={`field-holder ${extraClass} ${styles.holder} ${
|
|
11
|
-
error ? styles.holderError : ""
|
|
12
|
-
}`}
|
|
13
|
-
>
|
|
14
|
-
{!!label && (
|
|
15
|
-
<div className={styles.label}>
|
|
16
|
-
<label>{label}</label>
|
|
17
|
-
</div>
|
|
18
|
-
)}
|
|
19
|
-
<div className={styles.field}>{children}</div>
|
|
20
|
-
|
|
21
|
-
{!!description && (
|
|
22
|
-
<div className={styles.description}>
|
|
23
|
-
<>
|
|
24
|
-
{error && (
|
|
25
|
-
<div className={styles.helperIcon}>
|
|
26
|
-
<WarningCircle />
|
|
27
|
-
</div>
|
|
28
|
-
)}
|
|
29
|
-
</>
|
|
30
|
-
<>
|
|
31
|
-
{typeof description === "string" && <p>{description}</p>}
|
|
32
|
-
{typeof description !== "string" && { description }}
|
|
33
|
-
</>
|
|
34
|
-
</div>
|
|
35
|
-
)}
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default FormFieldHolder;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
interface FormFieldHolderProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
description?: string | ReactNode;
|
|
6
|
-
extraClass?: string;
|
|
7
|
-
error?: boolean;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default FormFieldHolderProps;
|