@coopdigital/react 0.53.0 → 0.55.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/README.md +3 -3
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +4 -3
- package/dist/components/Card/Card.js +2 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -1
- package/dist/components/DatePicker/DatePicker.js +6 -5
- package/dist/components/Expandable/Expandable.js +5 -5
- package/dist/components/Pill/Pill.js +1 -1
- package/dist/components/Searchbox/Searchbox.d.ts +21 -5
- package/dist/components/Searchbox/Searchbox.js +41 -27
- package/dist/components/Squircle/Squircle.js +1 -1
- package/dist/components/TextInput/TextInput.d.ts +5 -1
- package/dist/components/TextInput/TextInput.js +8 -2
- package/dist/components/icons/AccountCircleFilledIcon.d.ts +6 -0
- package/dist/components/icons/AccountCircleFilledIcon.js +20 -0
- package/dist/components/icons/AccountCircleIcon.d.ts +6 -0
- package/dist/components/icons/AccountCircleIcon.js +20 -0
- package/dist/components/icons/AccountFilledIcon.d.ts +6 -0
- package/dist/components/icons/AccountFilledIcon.js +20 -0
- package/dist/components/icons/AccountIcon.d.ts +6 -0
- package/dist/components/icons/AccountIcon.js +20 -0
- package/dist/components/icons/AddIcon.js +2 -2
- package/dist/components/icons/AppsFilledIcon.d.ts +6 -0
- package/dist/components/icons/AppsFilledIcon.js +20 -0
- package/dist/components/icons/{CoopIcon.d.ts → AppsIcon.d.ts} +1 -1
- package/dist/components/icons/AppsIcon.js +20 -0
- package/dist/components/icons/ArrowDownIcon.js +2 -2
- package/dist/components/icons/ArrowLeftIcon.js +2 -2
- package/dist/components/icons/ArrowRightIcon.js +2 -2
- package/dist/components/icons/ArrowUpIcon.js +2 -2
- package/dist/components/icons/BackspaceFilledIcon.d.ts +6 -0
- package/dist/components/icons/BackspaceFilledIcon.js +20 -0
- package/dist/components/icons/{AvatarAltIcon.d.ts → BackspaceIcon.d.ts} +1 -1
- package/dist/components/icons/BackspaceIcon.js +20 -0
- package/dist/components/icons/{CoopLocationIcon.d.ts → BasketFilledIcon.d.ts} +1 -1
- package/dist/components/icons/BasketFilledIcon.js +20 -0
- package/dist/components/icons/BasketIcon.js +2 -2
- package/dist/components/icons/BellFilledIcon.d.ts +6 -0
- package/dist/components/icons/BellFilledIcon.js +20 -0
- package/dist/components/icons/BellIcon.d.ts +6 -0
- package/dist/components/icons/BellIcon.js +20 -0
- package/dist/components/icons/{CloseIcon.d.ts → BroomIcon.d.ts} +1 -1
- package/dist/components/icons/BroomIcon.js +20 -0
- package/dist/components/icons/CalendarFilledIcon.d.ts +6 -0
- package/dist/components/icons/CalendarFilledIcon.js +20 -0
- package/dist/components/icons/CalendarIcon.js +2 -2
- package/dist/components/icons/CashFilledIcon.d.ts +6 -0
- package/dist/components/icons/CashFilledIcon.js +20 -0
- package/dist/components/icons/CashIcon.d.ts +6 -0
- package/dist/components/icons/CashIcon.js +20 -0
- package/dist/components/icons/ChevronDownIcon.js +2 -2
- package/dist/components/icons/ChevronLeftIcon.js +2 -2
- package/dist/components/icons/ChevronRightIcon.js +2 -2
- package/dist/components/icons/ChevronUpIcon.js +2 -2
- package/dist/components/icons/CircleBurgerFilledIcon.d.ts +6 -0
- package/dist/components/icons/CircleBurgerFilledIcon.js +20 -0
- package/dist/components/icons/CircleBurgerIcon.d.ts +6 -0
- package/dist/components/icons/CircleBurgerIcon.js +20 -0
- package/dist/components/icons/ClipboardFilledIcon.d.ts +6 -0
- package/dist/components/icons/ClipboardFilledIcon.js +20 -0
- package/dist/components/icons/ClipboardIcon.d.ts +6 -0
- package/dist/components/icons/ClipboardIcon.js +20 -0
- package/dist/components/icons/{InformationIcon.d.ts → ClockFilledIcon.d.ts} +1 -1
- package/dist/components/icons/ClockFilledIcon.js +20 -0
- package/dist/components/icons/ClockIcon.js +2 -2
- package/dist/components/icons/CloseAltFilledIcon.d.ts +6 -0
- package/dist/components/icons/CloseAltFilledIcon.js +20 -0
- package/dist/components/icons/CloseAltIcon.js +2 -2
- package/dist/components/icons/{VanIcon.d.ts → CogIcon.d.ts} +1 -1
- package/dist/components/icons/CogIcon.js +20 -0
- package/dist/components/icons/CommunityFilledIcon.d.ts +6 -0
- package/dist/components/icons/CommunityFilledIcon.js +20 -0
- package/dist/components/icons/CommunityIcon.d.ts +6 -0
- package/dist/components/icons/CommunityIcon.js +20 -0
- package/dist/components/icons/{QuestionIcon.d.ts → ComputerIcon.d.ts} +1 -1
- package/dist/components/icons/ComputerIcon.js +20 -0
- package/dist/components/icons/ContactFilledIcon.d.ts +6 -0
- package/dist/components/icons/ContactFilledIcon.js +20 -0
- package/dist/components/icons/ContactIcon.d.ts +6 -0
- package/dist/components/icons/ContactIcon.js +20 -0
- package/dist/components/icons/ContactlessFilledIcon.d.ts +6 -0
- package/dist/components/icons/ContactlessFilledIcon.js +20 -0
- package/dist/components/icons/ContactlessIcon.d.ts +6 -0
- package/dist/components/icons/ContactlessIcon.js +20 -0
- package/dist/components/icons/{SettingsIcon.d.ts → CoopLiveIcon.d.ts} +1 -1
- package/dist/components/icons/CoopLiveIcon.js +20 -0
- package/dist/components/icons/CoopLocationFilledIcon.d.ts +6 -0
- package/dist/components/icons/{CoopLocationIcon.js → CoopLocationFilledIcon.js} +5 -5
- package/dist/components/icons/{CoopCardIcon.d.ts → CoopLogoIcon.d.ts} +1 -1
- package/dist/components/icons/CoopLogoIcon.js +20 -0
- package/dist/components/icons/CoopMembershipCardFilledIcon.d.ts +6 -0
- package/dist/components/icons/CoopMembershipCardFilledIcon.js +20 -0
- package/dist/components/icons/CreditCardFilledIcon.d.ts +6 -0
- package/dist/components/icons/CreditCardFilledIcon.js +20 -0
- package/dist/components/icons/CreditCardIcon.d.ts +6 -0
- package/dist/components/icons/CreditCardIcon.js +20 -0
- package/dist/components/icons/CrossIcon.d.ts +6 -0
- package/dist/components/icons/CrossIcon.js +20 -0
- package/dist/components/icons/DocumentIcon.d.ts +6 -0
- package/dist/components/icons/DocumentIcon.js +20 -0
- package/dist/components/icons/DownloadIcon.js +2 -2
- package/dist/components/icons/EnterStoreIcon.d.ts +6 -0
- package/dist/components/icons/EnterStoreIcon.js +20 -0
- package/dist/components/icons/ExitStoreIcon.d.ts +6 -0
- package/dist/components/icons/ExitStoreIcon.js +20 -0
- package/dist/components/icons/EyeFilledIcon.d.ts +6 -0
- package/dist/components/icons/EyeFilledIcon.js +20 -0
- package/dist/components/icons/EyeIcon.d.ts +6 -0
- package/dist/components/icons/EyeIcon.js +20 -0
- package/dist/components/icons/EyeStrikeFilledIcon.d.ts +6 -0
- package/dist/components/icons/EyeStrikeFilledIcon.js +20 -0
- package/dist/components/icons/EyeStrikeIcon.d.ts +6 -0
- package/dist/components/icons/EyeStrikeIcon.js +20 -0
- package/dist/components/icons/FeedbackFilledIcon.d.ts +6 -0
- package/dist/components/icons/FeedbackFilledIcon.js +20 -0
- package/dist/components/icons/FeedbackIcon.d.ts +6 -0
- package/dist/components/icons/FeedbackIcon.js +20 -0
- package/dist/components/icons/{AvatarIcon.d.ts → FilterIcon.d.ts} +1 -1
- package/dist/components/icons/FilterIcon.js +20 -0
- package/dist/components/icons/GiftCardFilledIcon.d.ts +6 -0
- package/dist/components/icons/GiftCardFilledIcon.js +20 -0
- package/dist/components/icons/GiftCardIcon.d.ts +6 -0
- package/dist/components/icons/GiftCardIcon.js +20 -0
- package/dist/components/icons/GiftFilledIcon.d.ts +6 -0
- package/dist/components/icons/GiftFilledIcon.js +20 -0
- package/dist/components/icons/GiftIcon.d.ts +6 -0
- package/dist/components/icons/GiftIcon.js +20 -0
- package/dist/components/icons/HelpFilledIcon.d.ts +6 -0
- package/dist/components/icons/HelpFilledIcon.js +20 -0
- package/dist/components/icons/HelpIcon.d.ts +6 -0
- package/dist/components/icons/HelpIcon.js +20 -0
- package/dist/components/icons/HomeFilledIcon.d.ts +6 -0
- package/dist/components/icons/HomeFilledIcon.js +20 -0
- package/dist/components/icons/HomeIcon.js +2 -2
- package/dist/components/icons/HowDoIAssistantIcon.d.ts +6 -0
- package/dist/components/icons/HowDoIAssistantIcon.js +20 -0
- package/dist/components/icons/InfoIcon.d.ts +6 -0
- package/dist/components/icons/InfoIcon.js +20 -0
- package/dist/components/icons/KebabIcon.d.ts +6 -0
- package/dist/components/icons/KebabIcon.js +20 -0
- package/dist/components/icons/LoadingIcon.js +3 -3
- package/dist/components/icons/LocationFilledIcon.d.ts +6 -0
- package/dist/components/icons/LocationFilledIcon.js +20 -0
- package/dist/components/icons/LocationIcon.js +2 -2
- package/dist/components/icons/LogoutIcon.d.ts +6 -0
- package/dist/components/icons/LogoutIcon.js +20 -0
- package/dist/components/icons/MailIcon.js +2 -2
- package/dist/components/icons/MenuIcon.js +2 -2
- package/dist/components/icons/MessageIcon.js +2 -2
- package/dist/components/icons/MinusIcon.js +2 -2
- package/dist/components/icons/NotesFilledIcon.d.ts +6 -0
- package/dist/components/icons/NotesFilledIcon.js +20 -0
- package/dist/components/icons/NotesIcon.d.ts +6 -0
- package/dist/components/icons/NotesIcon.js +20 -0
- package/dist/components/icons/OpenNewIcon.js +2 -2
- package/dist/components/icons/OwnBagIcon.d.ts +6 -0
- package/dist/components/icons/OwnBagIcon.js +20 -0
- package/dist/components/icons/PadlockIcon.d.ts +6 -0
- package/dist/components/icons/PadlockIcon.js +20 -0
- package/dist/components/icons/PencilIcon.js +2 -2
- package/dist/components/icons/PhoneIcon.js +2 -2
- package/dist/components/icons/PowerIcon.d.ts +6 -0
- package/dist/components/icons/PowerIcon.js +20 -0
- package/dist/components/icons/SaveFilledIcon.d.ts +6 -0
- package/dist/components/icons/SaveFilledIcon.js +20 -0
- package/dist/components/icons/SaveIcon.d.ts +6 -0
- package/dist/components/icons/SaveIcon.js +20 -0
- package/dist/components/icons/ScooterIcon.js +3 -3
- package/dist/components/icons/SearchFilledIcon.d.ts +6 -0
- package/dist/components/icons/SearchFilledIcon.js +20 -0
- package/dist/components/icons/SearchIcon.js +2 -2
- package/dist/components/icons/SendIcon.d.ts +6 -0
- package/dist/components/icons/SendIcon.js +20 -0
- package/dist/components/icons/SpannerIcon.d.ts +6 -0
- package/dist/components/icons/SpannerIcon.js +20 -0
- package/dist/components/icons/StarFilledIcon.d.ts +6 -0
- package/dist/components/icons/StarFilledIcon.js +20 -0
- package/dist/components/icons/StarIcon.d.ts +6 -0
- package/dist/components/icons/StarIcon.js +20 -0
- package/dist/components/icons/TickAltFilledIcon.d.ts +6 -0
- package/dist/components/icons/TickAltFilledIcon.js +20 -0
- package/dist/components/icons/TickAltIcon.js +2 -2
- package/dist/components/icons/TickIcon.js +2 -2
- package/dist/components/icons/TruckIcon.d.ts +6 -0
- package/dist/components/icons/TruckIcon.js +20 -0
- package/dist/components/icons/UserWipeIcon.d.ts +6 -0
- package/dist/components/icons/UserWipeIcon.js +20 -0
- package/dist/components/icons/VoucherFilledIcon.d.ts +6 -0
- package/dist/components/icons/VoucherFilledIcon.js +20 -0
- package/dist/components/icons/VoucherIcon.d.ts +6 -0
- package/dist/components/icons/VoucherIcon.js +20 -0
- package/dist/components/icons/WarningFilledIcon.d.ts +6 -0
- package/dist/components/icons/WarningFilledIcon.js +20 -0
- package/dist/components/icons/WarningIcon.js +2 -2
- package/dist/components/icons/WifiIcon.d.ts +6 -0
- package/dist/components/icons/WifiIcon.js +20 -0
- package/dist/components/icons/WriteIcon.js +2 -2
- package/dist/components/icons/index.d.ts +77 -10
- package/dist/components/icons/index.js +77 -10
- package/dist/types/colors.d.ts +1 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +4 -1
- package/package.json +11 -11
- package/src/components/Button/Button.tsx +9 -13
- package/src/components/Card/Card.tsx +2 -1
- package/src/components/DatePicker/DatePicker.tsx +14 -13
- package/src/components/Expandable/Expandable.tsx +5 -10
- package/src/components/Pill/Pill.tsx +1 -1
- package/src/components/Searchbox/Searchbox.tsx +66 -56
- package/src/components/Squircle/Squircle.tsx +1 -1
- package/src/components/TextInput/TextInput.tsx +18 -2
- package/src/components/icons/AccountCircleFilledIcon.tsx +28 -0
- package/src/components/icons/AccountCircleIcon.tsx +28 -0
- package/src/components/icons/AccountFilledIcon.tsx +28 -0
- package/src/components/icons/AccountIcon.tsx +28 -0
- package/src/components/icons/AddIcon.tsx +2 -9
- package/src/components/icons/AppsFilledIcon.tsx +28 -0
- package/src/components/icons/AppsIcon.tsx +28 -0
- package/src/components/icons/ArrowDownIcon.tsx +2 -6
- package/src/components/icons/ArrowLeftIcon.tsx +2 -6
- package/src/components/icons/ArrowRightIcon.tsx +2 -6
- package/src/components/icons/ArrowUpIcon.tsx +2 -6
- package/src/components/icons/BackspaceFilledIcon.tsx +28 -0
- package/src/components/icons/BackspaceIcon.tsx +28 -0
- package/src/components/icons/BasketFilledIcon.tsx +28 -0
- package/src/components/icons/BasketIcon.tsx +2 -9
- package/src/components/icons/BellFilledIcon.tsx +29 -0
- package/src/components/icons/BellIcon.tsx +28 -0
- package/src/components/icons/BroomIcon.tsx +28 -0
- package/src/components/icons/CalendarFilledIcon.tsx +28 -0
- package/src/components/icons/CalendarIcon.tsx +2 -9
- package/src/components/icons/CashFilledIcon.tsx +28 -0
- package/src/components/icons/CashIcon.tsx +33 -0
- package/src/components/icons/ChevronDownIcon.tsx +2 -5
- package/src/components/icons/ChevronLeftIcon.tsx +2 -5
- package/src/components/icons/ChevronRightIcon.tsx +2 -5
- package/src/components/icons/ChevronUpIcon.tsx +2 -5
- package/src/components/icons/CircleBurgerFilledIcon.tsx +28 -0
- package/src/components/icons/CircleBurgerIcon.tsx +28 -0
- package/src/components/icons/ClipboardFilledIcon.tsx +28 -0
- package/src/components/icons/ClipboardIcon.tsx +28 -0
- package/src/components/icons/{InformationIcon.tsx → ClockFilledIcon.tsx} +6 -9
- package/src/components/icons/ClockIcon.tsx +2 -9
- package/src/components/icons/CloseAltFilledIcon.tsx +32 -0
- package/src/components/icons/CloseAltIcon.tsx +2 -13
- package/src/components/icons/CogIcon.tsx +28 -0
- package/src/components/icons/CommunityFilledIcon.tsx +28 -0
- package/src/components/icons/CommunityIcon.tsx +28 -0
- package/src/components/icons/ComputerIcon.tsx +28 -0
- package/src/components/icons/ContactFilledIcon.tsx +28 -0
- package/src/components/icons/ContactIcon.tsx +28 -0
- package/src/components/icons/ContactlessFilledIcon.tsx +28 -0
- package/src/components/icons/ContactlessIcon.tsx +28 -0
- package/src/components/icons/CoopLiveIcon.tsx +29 -0
- package/src/components/icons/CoopLocationFilledIcon.tsx +30 -0
- package/src/components/icons/CoopLogoIcon.tsx +28 -0
- package/src/components/icons/CoopMembershipCardFilledIcon.tsx +40 -0
- package/src/components/icons/CreditCardFilledIcon.tsx +42 -0
- package/src/components/icons/CreditCardIcon.tsx +28 -0
- package/src/components/icons/{CloseIcon.tsx → CrossIcon.tsx} +4 -11
- package/src/components/icons/DocumentIcon.tsx +28 -0
- package/src/components/icons/DownloadIcon.tsx +2 -13
- package/src/components/icons/EnterStoreIcon.tsx +28 -0
- package/src/components/icons/ExitStoreIcon.tsx +28 -0
- package/src/components/icons/EyeFilledIcon.tsx +28 -0
- package/src/components/icons/EyeIcon.tsx +28 -0
- package/src/components/icons/EyeStrikeFilledIcon.tsx +28 -0
- package/src/components/icons/EyeStrikeIcon.tsx +28 -0
- package/src/components/icons/FeedbackFilledIcon.tsx +35 -0
- package/src/components/icons/FeedbackIcon.tsx +28 -0
- package/src/components/icons/FilterIcon.tsx +28 -0
- package/src/components/icons/GiftCardFilledIcon.tsx +28 -0
- package/src/components/icons/GiftCardIcon.tsx +28 -0
- package/src/components/icons/GiftFilledIcon.tsx +28 -0
- package/src/components/icons/GiftIcon.tsx +28 -0
- package/src/components/icons/HelpFilledIcon.tsx +28 -0
- package/src/components/icons/HelpIcon.tsx +28 -0
- package/src/components/icons/HomeFilledIcon.tsx +28 -0
- package/src/components/icons/HomeIcon.tsx +2 -13
- package/src/components/icons/HowDoIAssistantIcon.tsx +28 -0
- package/src/components/icons/InfoIcon.tsx +28 -0
- package/src/components/icons/KebabIcon.tsx +28 -0
- package/src/components/icons/LoadingIcon.tsx +3 -6
- package/src/components/icons/LocationFilledIcon.tsx +28 -0
- package/src/components/icons/LocationIcon.tsx +2 -9
- package/src/components/icons/LogoutIcon.tsx +28 -0
- package/src/components/icons/MailIcon.tsx +2 -5
- package/src/components/icons/MenuIcon.tsx +2 -5
- package/src/components/icons/MessageIcon.tsx +2 -5
- package/src/components/icons/MinusIcon.tsx +2 -5
- package/src/components/icons/NotesFilledIcon.tsx +28 -0
- package/src/components/icons/NotesIcon.tsx +28 -0
- package/src/components/icons/OpenNewIcon.tsx +3 -9
- package/src/components/icons/OwnBagIcon.tsx +28 -0
- package/src/components/icons/PadlockIcon.tsx +28 -0
- package/src/components/icons/PencilIcon.tsx +2 -5
- package/src/components/icons/PhoneIcon.tsx +2 -5
- package/src/components/icons/PowerIcon.tsx +28 -0
- package/src/components/icons/SaveFilledIcon.tsx +28 -0
- package/src/components/icons/SaveIcon.tsx +28 -0
- package/src/components/icons/ScooterIcon.tsx +3 -22
- package/src/components/icons/SearchFilledIcon.tsx +28 -0
- package/src/components/icons/SearchIcon.tsx +9 -9
- package/src/components/icons/SendIcon.tsx +28 -0
- package/src/components/icons/SpannerIcon.tsx +28 -0
- package/src/components/icons/StarFilledIcon.tsx +31 -0
- package/src/components/icons/StarIcon.tsx +28 -0
- package/src/components/icons/TickAltFilledIcon.tsx +32 -0
- package/src/components/icons/TickAltIcon.tsx +2 -9
- package/src/components/icons/TickIcon.tsx +2 -5
- package/src/components/icons/TruckIcon.tsx +28 -0
- package/src/components/icons/UserWipeIcon.tsx +28 -0
- package/src/components/icons/VoucherFilledIcon.tsx +28 -0
- package/src/components/icons/VoucherIcon.tsx +28 -0
- package/src/components/icons/WarningFilledIcon.tsx +28 -0
- package/src/components/icons/WarningIcon.tsx +2 -9
- package/src/components/icons/WifiIcon.tsx +28 -0
- package/src/components/icons/WriteIcon.tsx +5 -17
- package/src/components/icons/index.ts +77 -10
- package/src/types/colors.ts +1 -3
- package/src/utils/index.ts +4 -0
- package/dist/components/icons/AvatarAltIcon.js +0 -20
- package/dist/components/icons/AvatarIcon.js +0 -20
- package/dist/components/icons/CloseIcon.js +0 -20
- package/dist/components/icons/CoopCardIcon.js +0 -20
- package/dist/components/icons/CoopIcon.js +0 -20
- package/dist/components/icons/InformationIcon.js +0 -20
- package/dist/components/icons/QuestionIcon.js +0 -20
- package/dist/components/icons/SettingsIcon.js +0 -20
- package/dist/components/icons/VanIcon.js +0 -20
- package/src/components/icons/AvatarAltIcon.tsx +0 -39
- package/src/components/icons/AvatarIcon.tsx +0 -35
- package/src/components/icons/CoopCardIcon.tsx +0 -32
- package/src/components/icons/CoopIcon.tsx +0 -32
- package/src/components/icons/CoopLocationIcon.tsx +0 -39
- package/src/components/icons/QuestionIcon.tsx +0 -35
- package/src/components/icons/SettingsIcon.tsx +0 -31
- package/src/components/icons/VanIcon.tsx +0 -31
package/README.md
CHANGED
|
@@ -25,18 +25,18 @@ npm install @coopdigital/react
|
|
|
25
25
|
|
|
26
26
|
## Usage
|
|
27
27
|
|
|
28
|
-
Import the components that you need, along with the
|
|
28
|
+
Import the components that you need, along with the foundations stylesheet and the corresponding component styles:
|
|
29
29
|
|
|
30
30
|
```
|
|
31
31
|
import { Pill } from "@coopdigital/react"
|
|
32
|
-
import "@coopdigital/styles/
|
|
32
|
+
import "@coopdigital/styles/foundations.css"
|
|
33
33
|
import "@coopdigital/styles/components/Pill.css"
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Alternatively if your project uses SASS you can import the source stylesheets:
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
@use "@coopdigital/styles/src/
|
|
39
|
+
@use "@coopdigital/styles/src/foundations.scss"
|
|
40
40
|
@use "@coopdigital/styles/src/components/Pill.scss"
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -24,7 +24,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
24
24
|
/** **(Optional)** Specify the Button size. */
|
|
25
25
|
size?: "sm" | "md" | "lg";
|
|
26
26
|
/** **(Optional)** Specify the Button variant. */
|
|
27
|
-
variant?: "
|
|
27
|
+
variant?: "solid" | "ghost" | "text";
|
|
28
28
|
}
|
|
29
29
|
export declare const Button: ({ as, children, className, href, isDisabled, isFullWidth, isLoading, loadingText, onClick, ref, size, variant, ...props }: ButtonProps) => JSX.Element;
|
|
30
30
|
export default Button;
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import React__default, { useState, useCallback } from 'react';
|
|
6
|
+
import { hasUserBg } from '../../utils/index.js';
|
|
6
7
|
import { LoadingIcon } from '../icons/LoadingIcon.js';
|
|
7
8
|
|
|
8
|
-
const Button = ({ as, children, className, href, isDisabled = false, isFullWidth = false, isLoading = false, loadingText = "Loading", onClick, ref, size = "md", variant = "
|
|
9
|
+
const Button = ({ as, children, className, href, isDisabled = false, isFullWidth = false, isLoading = false, loadingText = "Loading", onClick, ref, size = "md", variant = "solid", ...props }) => {
|
|
9
10
|
const element = as !== null && as !== void 0 ? as : (href ? "a" : "button");
|
|
10
11
|
const [isPending, setIsPending] = useState(false);
|
|
11
12
|
const handleClick = useCallback(async (event) => {
|
|
@@ -22,7 +23,7 @@ const Button = ({ as, children, className, href, isDisabled = false, isFullWidth
|
|
|
22
23
|
const componentProps = {
|
|
23
24
|
"aria-disabled": isDisabled ? true : undefined,
|
|
24
25
|
"aria-live": "assertive",
|
|
25
|
-
className: clsx(variant == "text" ? "coop-link" : "coop-button", className),
|
|
26
|
+
className: clsx(variant == "text" ? "coop-link" : "coop-button", !hasUserBg(className) && variant === "solid" && "bg-teal", className),
|
|
26
27
|
"data-loading": isLoading || isPending ? true : undefined,
|
|
27
28
|
"data-size": size.length && size !== "md" ? size : undefined,
|
|
28
29
|
"data-variant": variant !== "text" ? variant : undefined,
|
|
@@ -31,7 +32,7 @@ const Button = ({ as, children, className, href, isDisabled = false, isFullWidth
|
|
|
31
32
|
onClick: onClick ? handleClick : undefined,
|
|
32
33
|
...props,
|
|
33
34
|
};
|
|
34
|
-
const finalChildren = isPending || isLoading ? (jsxs(Fragment, { children: [loadingText, jsx(LoadingIcon, {})] })) : (children);
|
|
35
|
+
const finalChildren = isPending || isLoading ? (jsxs(Fragment, { children: [loadingText, jsx(LoadingIcon, { stroke: "currentColor", strokeWidth: "1px" })] })) : (children);
|
|
35
36
|
return React__default.createElement(element, { ...componentProps, ref }, finalChildren);
|
|
36
37
|
};
|
|
37
38
|
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
5
|
+
import { hasUserBg } from '../../utils/index.js';
|
|
5
6
|
import { ChevronRightIcon } from '../icons/ChevronRightIcon.js';
|
|
6
7
|
import { Image } from '../Image/Image.js';
|
|
7
8
|
|
|
@@ -28,7 +29,7 @@ const Card = ({ chevron = false, children, className, href, hrefAs, imagePositio
|
|
|
28
29
|
const innerProps = { className: "coop-card--inner" };
|
|
29
30
|
const hasLinkWrapper = href && !slots.CardHeading;
|
|
30
31
|
const componentProps = {
|
|
31
|
-
className: clsx("coop-card", className),
|
|
32
|
+
className: clsx("coop-card", !hasUserBg(className) && "bg-white", className),
|
|
32
33
|
"data-image-pos": imagePosition,
|
|
33
34
|
"data-orientation": orientation !== "vertical" ? orientation : undefined,
|
|
34
35
|
...props,
|
|
@@ -26,11 +26,12 @@ export interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
26
26
|
error?: boolean;
|
|
27
27
|
/** **(Optional)** Specify the Date Picker id. Will be auto-generated if not set. */
|
|
28
28
|
id?: string;
|
|
29
|
-
/** **(Optional)** Specify the initial month view for the picker.
|
|
29
|
+
/** **(Optional)** Specify the initial month view for the picker. Combine with `initialSelected` to pre-select a date.
|
|
30
30
|
*
|
|
31
31
|
* Default: today.
|
|
32
32
|
*/
|
|
33
33
|
initialDate?: Date | DateRange;
|
|
34
|
+
/** **(Optional)** Specify whether the initial date should be pre-selected. */
|
|
34
35
|
initialSelected?: boolean;
|
|
35
36
|
/** **(Optional)** Specify the picker mode. */
|
|
36
37
|
mode?: Mode;
|
|
@@ -5,7 +5,8 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { useMemo, useReducer, useCallback } from 'react';
|
|
6
6
|
import { useId } from '../../hooks/useId.js';
|
|
7
7
|
import { Button } from '../Button/Button.js';
|
|
8
|
-
import {
|
|
8
|
+
import { CalendarIcon } from '../icons/CalendarIcon.js';
|
|
9
|
+
import { CrossIcon } from '../icons/CrossIcon.js';
|
|
9
10
|
import { TickIcon } from '../icons/TickIcon.js';
|
|
10
11
|
import { Popover } from '../Popover/Popover.js';
|
|
11
12
|
import { TextInput } from '../TextInput/TextInput.js';
|
|
@@ -116,9 +117,9 @@ const DatePicker = ({ className, closeOnSelect = true, dateFormat = "dd/MM/yyyy"
|
|
|
116
117
|
return lowerCaseDateFormat;
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
return (jsxs("div", { ...componentProps, children: [jsxs(Popover, { onOpenChange: setOpen, open: state.open, children: [
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
return (jsxs("div", { ...componentProps, children: [jsxs(Popover, { onOpenChange: setOpen, open: state.open, children: [jsx(Popover.Anchor, { className: "coop-datepicker-inner", children: jsx(TextInput, { autoComplete: "off", className: "coop-datepicker-input", disabled: disabled, id: uid + componentConfig.fieldSuffix,
|
|
121
|
+
//maxLength={dateFormat.length}
|
|
122
|
+
name: name + componentConfig.fieldSuffix, onChange: updateFromInput, placeholder: getPlaceholder(), ref: ref, required: required, size: size, suffix: jsx(Popover.Trigger, { "aria-label": "Choose date", className: "coop-datepicker-trigger", children: jsx(CalendarIcon, { width: 24 }) }), suffixInline: true, value: (_f = (_e = state === null || state === void 0 ? void 0 : state[mode]) === null || _e === void 0 ? void 0 : _e.input) !== null && _f !== void 0 ? _f : "" }) }), jsxs(Popover.Content, { "aria-label": "Date picker", className: "coop-datepicker-calendar bg-white", collisionPadding: 16, sideOffset: 4, children: [jsx(Calendar
|
|
122
123
|
// jsx-ally throws here because we set autoFocus, but this
|
|
123
124
|
// is not a standard element. Daypicker uses this value to
|
|
124
125
|
// focus the day rather than the nav when it renders.
|
|
@@ -130,7 +131,7 @@ const DatePicker = ({ className, closeOnSelect = true, dateFormat = "dd/MM/yyyy"
|
|
|
130
131
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
131
132
|
autoFocus: true, captionLayout: "dropdown",
|
|
132
133
|
//defaultMonth={defaultMonth}
|
|
133
|
-
disabled: disabledDates, endMonth: endDate, month: state.view, onMonthChange: setView, onSelect: updateValues, startMonth: startDate, ...calendarProps[mode] }), jsxs("div", { className: "coop-datepicker-actions", children: [jsxs(Button, { "aria-label": "Cancel", onClick: resetState, size: "sm",
|
|
134
|
+
disabled: disabledDates, endMonth: endDate, month: state.view, onMonthChange: setView, onSelect: updateValues, startMonth: startDate, ...calendarProps[mode] }), jsxs("div", { className: "coop-datepicker-actions", children: [jsxs(Button, { "aria-label": "Cancel", className: "bg-tint-grey", onClick: resetState, size: "sm", children: ["Clear ", jsx(CrossIcon, { stroke: "black", strokeWidth: 1 })] }), jsx(Popover.Close, { asChild: true, children: jsxs(Button, { "aria-label": "Accept", size: "sm", children: ["OK ", jsx(TickIcon, { stroke: "white", strokeWidth: 1 })] }) })] })] })] }), jsx("div", { "aria-live": "assertive", className: "sr-only coop-datepicker-status", role: "status", children: (_g = state.message) !== null && _g !== void 0 ? _g : footerMessage[mode] }), mode === "single" && jsx("input", { ...valueProps, value: (_j = (_h = state.single) === null || _h === void 0 ? void 0 : _h.field) !== null && _j !== void 0 ? _j : "" }), mode === "multiple" && jsx("input", { ...valueProps, value: (_l = (_k = state.multiple) === null || _k === void 0 ? void 0 : _k.field) !== null && _l !== void 0 ? _l : "" }), mode === "range" && (jsxs(Fragment, { children: [jsx("input", { ...baseValueProps, id: `${uid}_start`, name: `${name}_start`, value: (_p = (_o = (_m = state.range) === null || _m === void 0 ? void 0 : _m.field) === null || _o === void 0 ? void 0 : _o.from) !== null && _p !== void 0 ? _p : "" }), jsx("input", { ...baseValueProps, id: `${uid}_end`, name: `${name}_end`, value: (_s = (_r = (_q = state.range) === null || _q === void 0 ? void 0 : _q.field) === null || _r === void 0 ? void 0 : _r.to) !== null && _s !== void 0 ? _s : "" })] }))] }));
|
|
134
135
|
};
|
|
135
136
|
DatePicker.config = componentConfig;
|
|
136
137
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { useSlots } from '../../hooks/useSlots.js';
|
|
4
|
-
import { hasUserBg
|
|
4
|
+
import { hasUserBg } from '../../utils/index.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import { ChevronDownIcon } from '../icons/ChevronDownIcon.js';
|
|
7
7
|
|
|
@@ -15,13 +15,13 @@ const Expandable = ({ children, className, ref, ...props }) => {
|
|
|
15
15
|
className: clsx("coop-expandable", !hasUserBg(className) && "bg-tint-grey", className),
|
|
16
16
|
...props,
|
|
17
17
|
};
|
|
18
|
-
componentProps.style = {
|
|
19
|
-
|
|
20
|
-
}
|
|
18
|
+
// componentProps.style = {
|
|
19
|
+
// "--bg": `var(--color-${bgClassToColor(componentProps.className)})`,
|
|
20
|
+
// }
|
|
21
21
|
return (jsxs("details", { ...componentProps, ref: ref, children: [slots.ExpandableSummary, slots.ExpandableContent] }));
|
|
22
22
|
};
|
|
23
23
|
const ExpandableSummary = ({ children, className, ...props }) => {
|
|
24
|
-
return (jsxs("summary", { ...props, className: className, children: [children, jsx(ChevronDownIcon, { className: "coop-expandable--icon",
|
|
24
|
+
return (jsxs("summary", { ...props, className: className, children: [children, jsx(ChevronDownIcon, { className: "coop-expandable--icon", width: "20" })] }));
|
|
25
25
|
};
|
|
26
26
|
const ExpandableContent = ({ children, className, ...props }) => {
|
|
27
27
|
return (jsx("div", { className: clsx("coop-expandable--content", className), ...props, children: children }));
|
|
@@ -22,7 +22,7 @@ const Pill = ({ as, children, className, href, ref, size = "md", ...props }) =>
|
|
|
22
22
|
return React__default.createElement(element, { ...componentProps, ref }, slots.PillBadge, slots.Children);
|
|
23
23
|
};
|
|
24
24
|
const PillBadge = ({ children, className }) => {
|
|
25
|
-
return (jsx("span", { className: clsx("coop-pill--badge", !hasUserBg(className) && "bg-
|
|
25
|
+
return (jsx("span", { className: clsx("coop-pill--badge", !hasUserBg(className) && "bg-red", className), children: children }));
|
|
26
26
|
};
|
|
27
27
|
PillBadge.config = { name: "PillBadge" };
|
|
28
28
|
Pill.Badge = PillBadge;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FormHTMLAttributes, JSX, Ref } from "react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { StandardSizes } from "../../types";
|
|
4
4
|
import { type ButtonProps } from "../Button";
|
|
5
|
-
|
|
5
|
+
import { TextInputProps } from "../TextInput";
|
|
6
|
+
export interface SearchboxProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
6
7
|
/** **(Optional)** Specify a server endpoint to submit the form. Will be ignored if onSubmit is also set. */
|
|
7
8
|
action?: string;
|
|
8
9
|
/** **(Optional)** Specify props to forward to the Button element. Use `label` to set Button text. */
|
|
@@ -20,7 +21,7 @@ export interface SearchboxProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
20
21
|
/** **(Optional)** Specify the TextInput name, also used as the URL search parameter. Defaults to `query`. */
|
|
21
22
|
name?: string;
|
|
22
23
|
/** **(Optional)** Callback to run when the form is submitted. If this is an async function, it will be awaited and the Searchbox will be in a pending state until the promise is resolved. */
|
|
23
|
-
onSubmit?: React.
|
|
24
|
+
onSubmit?: React.SubmitEventHandler<HTMLElement> | undefined;
|
|
24
25
|
/** **(Optional)** Specify the TextInput placeholder text Do not use in place of a form label. */
|
|
25
26
|
placeholder?: string;
|
|
26
27
|
/** **(Optional)** Specify a custom React ref for this component. */
|
|
@@ -28,7 +29,22 @@ export interface SearchboxProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
28
29
|
/** **(Optional)** Specify the Searchbox size. */
|
|
29
30
|
size?: StandardSizes;
|
|
30
31
|
/** **(Optional)** Specify the Searchbox variant. */
|
|
31
|
-
variant?: "
|
|
32
|
+
variant?: "solid" | "ghost";
|
|
32
33
|
}
|
|
33
|
-
export declare const Searchbox:
|
|
34
|
+
export declare const Searchbox: {
|
|
35
|
+
({ action, children, className, id, label, labelVisible, onSubmit, ref, size, variant, ...props }: SearchboxProps): JSX.Element;
|
|
36
|
+
Button: {
|
|
37
|
+
({ children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
config: {
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
Input: {
|
|
43
|
+
(props: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
config: {
|
|
45
|
+
isField: boolean;
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
34
50
|
export default Searchbox;
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import React__default, { useState, useCallback } from 'react';
|
|
6
6
|
import { useId } from '../../hooks/useId.js';
|
|
7
|
+
import { useSlots } from '../../hooks/useSlots.js';
|
|
8
|
+
import { hasUserBorder } from '../../utils/index.js';
|
|
7
9
|
import { Button } from '../Button/Button.js';
|
|
8
10
|
import { Field } from '../Field/Field.js';
|
|
9
|
-
import { Label } from '../FieldMarkers/Label.js';
|
|
10
11
|
import { SearchIcon } from '../icons/SearchIcon.js';
|
|
11
12
|
import { TextInput } from '../TextInput/TextInput.js';
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const componentSlots = {
|
|
15
|
+
SearchboxButton: null,
|
|
16
|
+
SearchboxInput: null,
|
|
16
17
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
18
|
+
const defaultButtonText = React__default.createElement(SearchIcon, {
|
|
19
|
+
alt: "Search",
|
|
20
|
+
stroke: "currentColor",
|
|
21
|
+
width: 24,
|
|
22
|
+
});
|
|
23
|
+
const Searchbox = ({ action, children, className, id, label, labelVisible = false, onSubmit, ref, size = "md", variant = "solid", ...props }) => {
|
|
24
|
+
const slots = useSlots(componentSlots, children);
|
|
19
25
|
const [isPending, setIsPending] = useState(false);
|
|
20
26
|
const uid = useId(id);
|
|
21
27
|
const handleSubmit = useCallback(async (event) => {
|
|
@@ -30,37 +36,45 @@ const Searchbox = ({ action, "aria-placeholder": ariaPlaceholder, autoCapitalize
|
|
|
30
36
|
setIsPending(false);
|
|
31
37
|
}
|
|
32
38
|
}, [onSubmit, isPending]);
|
|
39
|
+
let borderClass = "";
|
|
40
|
+
if (!hasUserBorder(className)) {
|
|
41
|
+
borderClass = variant === "ghost" ? "border-teal" : "border-grey";
|
|
42
|
+
}
|
|
33
43
|
const formProps = {
|
|
34
44
|
action: action !== null && action !== void 0 ? action : undefined,
|
|
35
|
-
className: clsx("coop-searchbox", className),
|
|
45
|
+
className: clsx("coop-searchbox", borderClass, className),
|
|
36
46
|
"data-size": size && size !== "md" ? size : undefined,
|
|
37
|
-
"data-variant": variant.length && variant !== "
|
|
38
|
-
id: uid,
|
|
47
|
+
"data-variant": variant.length && variant !== "solid" ? variant : undefined,
|
|
48
|
+
id: uid + "-form",
|
|
39
49
|
onSubmit: onSubmit ? handleSubmit : undefined,
|
|
50
|
+
...props,
|
|
40
51
|
};
|
|
41
|
-
|
|
42
|
-
className: button === null || button === void 0 ? void 0 : button.className,
|
|
52
|
+
slots.SearchboxButton = React__default.cloneElement(slots.SearchboxButton, {
|
|
43
53
|
isLoading: isPending,
|
|
44
|
-
loadingText: (_a = button === null || button === void 0 ? void 0 : button.loadingText) !== null && _a !== void 0 ? _a : "",
|
|
45
54
|
size,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
autoCapitalize,
|
|
51
|
-
autoComplete,
|
|
52
|
-
id: uid + "--input",
|
|
53
|
-
name,
|
|
54
|
-
placeholder,
|
|
55
|
+
});
|
|
56
|
+
slots.SearchboxInput = React__default.cloneElement(slots.SearchboxInput, {
|
|
57
|
+
autoCapitalize: "off",
|
|
58
|
+
id: uid,
|
|
55
59
|
size,
|
|
56
|
-
|
|
57
|
-
...props,
|
|
58
|
-
};
|
|
60
|
+
});
|
|
59
61
|
const labelProps = {
|
|
60
|
-
htmlFor: uid
|
|
62
|
+
htmlFor: uid,
|
|
61
63
|
isVisible: labelVisible,
|
|
62
64
|
};
|
|
63
|
-
return (jsxs("form", { ...formProps, ref: ref, children: [label && jsx(Label, { ...labelProps, children: label }), jsxs("div", { className: "coop-searchbox--inner", children: [jsx(Field, { children:
|
|
65
|
+
return (jsxs("form", { ...formProps, ref: ref, children: [label && jsx(Field.Label, { ...labelProps, children: label }), jsxs("div", { className: clsx("coop-searchbox--inner"), children: [jsx(Field, { children: slots.SearchboxInput }), slots.SearchboxButton] })] }));
|
|
66
|
+
};
|
|
67
|
+
const SearchboxButton = ({ children, ...props }) => {
|
|
68
|
+
const buttonProps = {
|
|
69
|
+
children: children !== null && children !== void 0 ? children : defaultButtonText,
|
|
70
|
+
...props,
|
|
71
|
+
};
|
|
72
|
+
return jsx(Button, { ...buttonProps });
|
|
64
73
|
};
|
|
74
|
+
const SearchboxInput = (props) => jsx(TextInput, { ...props });
|
|
75
|
+
Searchbox.Button = SearchboxButton;
|
|
76
|
+
Searchbox.Input = SearchboxInput;
|
|
77
|
+
SearchboxButton.config = { name: "SearchboxButton" };
|
|
78
|
+
SearchboxInput.config = { isField: true, name: "SearchboxInput" };
|
|
65
79
|
|
|
66
80
|
export { Searchbox, Searchbox as default };
|
|
@@ -4,7 +4,7 @@ import { hasUserBg } from '../../utils/index.js';
|
|
|
4
4
|
|
|
5
5
|
const Squircle = ({ children, className, ref, size = "lg", ...props }) => {
|
|
6
6
|
const componentProps = {
|
|
7
|
-
className: clsx("coop-squircle", !hasUserBg(className) && "bg-offer
|
|
7
|
+
className: clsx("coop-squircle", !hasUserBg(className) && "bg-offer", className),
|
|
8
8
|
"data-size": size.length && size !== "lg" ? size : undefined,
|
|
9
9
|
...props,
|
|
10
10
|
};
|
|
@@ -15,17 +15,21 @@ export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
/** **(Optional)** Specify the prefix. It can be any valid JSX or string. */
|
|
17
17
|
prefix?: React.ReactNode;
|
|
18
|
+
/** **(Optional)** Specify whether the prefix should be rendered inside the input. */
|
|
19
|
+
prefixInline?: boolean;
|
|
18
20
|
/** **(Optional)** Specify a custom React ref for this component. */
|
|
19
21
|
ref?: Ref<HTMLInputElement>;
|
|
20
22
|
/** **(Optional)** Specify the TextInput size. */
|
|
21
23
|
size?: StandardSizes;
|
|
22
24
|
/** **(Optional)** Specify the suffix. It can be any valid JSX or string. */
|
|
23
25
|
suffix?: React.ReactNode;
|
|
26
|
+
/** **(Optional)** Specify whether the suffix should be rendered inside the input. */
|
|
27
|
+
suffixInline?: boolean;
|
|
24
28
|
/** **(Optional)** Specify the TextInput type. */
|
|
25
29
|
type?: "text" | "email" | "number" | "password" | "search" | "tel" | "url" | "date" | "datetime-local" | "week" | "month" | "time";
|
|
26
30
|
}
|
|
27
31
|
export declare const TextInput: {
|
|
28
|
-
({ "aria-placeholder": ariaPlaceholder, className, disabled, error, id, name, placeholder, prefix, ref, size, suffix, type, ...props }: TextInputProps): JSX.Element;
|
|
32
|
+
({ "aria-placeholder": ariaPlaceholder, className, disabled, error, id, name, placeholder, prefix, prefixInline, ref, size, suffix, suffixInline, type, ...props }: TextInputProps): JSX.Element;
|
|
29
33
|
config: {
|
|
30
34
|
isField: true;
|
|
31
35
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useId } from '../../hooks/useId.js';
|
|
4
4
|
|
|
5
|
-
const TextInput = ({ "aria-placeholder": ariaPlaceholder, className, disabled, error = false, id, name, placeholder, prefix, ref, size = "md", suffix, type = "text", ...props }) => {
|
|
5
|
+
const TextInput = ({ "aria-placeholder": ariaPlaceholder, className, disabled, error = false, id, name, placeholder, prefix, prefixInline = false, ref, size = "md", suffix, suffixInline = false, type = "text", ...props }) => {
|
|
6
6
|
var _a;
|
|
7
7
|
const uid = useId(id);
|
|
8
8
|
const componentProps = {
|
|
@@ -17,8 +17,14 @@ const TextInput = ({ "aria-placeholder": ariaPlaceholder, className, disabled, e
|
|
|
17
17
|
type,
|
|
18
18
|
...props,
|
|
19
19
|
};
|
|
20
|
+
const prefixProps = prefix
|
|
21
|
+
? { className: "coop-text-input--prefix", "data-inline": prefixInline || undefined }
|
|
22
|
+
: {};
|
|
23
|
+
const suffixProps = suffix
|
|
24
|
+
? { className: "coop-text-input--suffix", "data-inline": suffixInline || undefined }
|
|
25
|
+
: {};
|
|
20
26
|
//const formItemProps = { "aria-disabled": disabled ? true : undefined }
|
|
21
|
-
return (jsxs("div", { className: "coop-text-input-wrapper", children: [prefix && jsx("span", {
|
|
27
|
+
return (jsxs("div", { className: "coop-text-input-wrapper", children: [prefix && jsx("span", { ...prefixProps, children: prefix }), jsx("input", { ...componentProps, ref: ref }), suffix && jsx("span", { ...suffixProps, children: suffix })] }));
|
|
22
28
|
};
|
|
23
29
|
TextInput.config = {
|
|
24
30
|
isField: true,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
+
alt?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AccountCircleFilledIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AccountCircleFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-circle-filled",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2c7.732 0 14 6.268 14 14 0 6.34-4.216 11.695-9.997 13.417l-.034.012-.029.008a14 14 0 0 1-3.453.553l-.037.002h-.022q-.211.007-.424.007L16 30 16 29.999V30q-.216 0-.432-.008h-.017l-.042-.003c-1.19-.04-2.34-.229-3.437-.549l-.035-.01-.075-.023a14 14 0 0 1-1.96-.755l-.06-.027-.011-.006C5.238 26.36 2 21.557 2 16 2 8.268 8.268 2 16 2m0 2C9.373 4 4 9.373 4 16a11.95 11.95 0 0 0 2.256 6.997 12.03 12.03 0 0 1 5.92-4.374 6 6 0 1 1 7.648 0 12.03 12.03 0 0 1 5.918 4.374A11.95 11.95 0 0 0 28 16c0-6.627-5.373-12-12-12" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AccountCircleFilledIcon };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
+
alt?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AccountCircleIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AccountCircleIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-circle",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2c7.732 0 14 6.268 14 14 0 6.378-4.265 11.758-10.099 13.447l-.03.01q-.447.127-.904.227l-.038.007q-.126.027-.251.051l-.099.02a14 14 0 0 1-.558.091l-.09.013a13 13 0 0 1-.559.067l-.203.017-.115.01q-.153.011-.306.02l-.033.001a14 14 0 0 1-1.43 0q-.018 0-.034-.002l-.306-.019-.115-.01q-.102-.007-.203-.017l-.225-.025-.087-.01-.245-.03-.093-.014-.236-.037-.1-.016a15 15 0 0 1-.57-.109l-.039-.008a14 14 0 0 1-.903-.227l-.032-.01C6.264 27.757 2 22.377 2 16 2 8.268 8.268 2 16 2m.001 18a9.99 9.99 0 0 0-8.397 4.57A11.95 11.95 0 0 0 16 28c3.27 0 6.23-1.31 8.393-3.43A9.99 9.99 0 0 0 16 20M16 4C9.373 4 4 9.373 4 16a11.95 11.95 0 0 0 2.256 6.997 12.03 12.03 0 0 1 5.92-4.374 6 6 0 1 1 7.648 0 12.03 12.03 0 0 1 5.918 4.374A11.95 11.95 0 0 0 28 16c0-6.627-5.373-12-12-12m0 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AccountCircleIcon };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
|
+
alt?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AccountFilledIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AccountFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account-filled",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2a7 7 0 0 1 4.055 12.703l.075.027a12.03 12.03 0 0 1 7.514 8.36q.063.252.115.51-.117.18-.24.357a14.05 14.05 0 0 1-7.11 5.334A13.9 13.9 0 0 1 16 30c-4.93 0-9.266-2.55-11.76-6.401a12.02 12.02 0 0 1 7.63-8.87l.074-.026A7 7 0 0 1 16 2" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AccountFilledIcon };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AccountIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "account",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2a7 7 0 0 1 4.055 12.703 12.03 12.03 0 0 1 7.565 8.304l.04.157q.054.216.099.435-.108.166-.22.329l-.075.105-.155.218-.097.13a14 14 0 0 1-.493.623l-.088.101A13.97 13.97 0 0 1 16 30a13.97 13.97 0 0 1-10.565-4.817l-.156-.18q-.085-.103-.169-.207l-.069-.085a13 13 0 0 1-.255-.331l-.097-.13-.155-.218-.074-.105a14 14 0 0 1-.22-.328q.045-.22.098-.436l.04-.157q.041-.165.089-.328.038-.128.078-.254l.066-.21a12 12 0 0 1 .128-.363 12.03 12.03 0 0 1 7.205-7.148A7 7 0 0 1 16 2m0 14c-4.55 0-8.387 3.04-9.598 7.2A11.98 11.98 0 0 0 16 28c3.926 0 7.407-1.887 9.596-4.802C24.385 19.04 20.55 16 16 16m0-12a5 5 0 1 0 0 10 5 5 0 0 0 0-10" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AccountIcon };
|
|
@@ -8,13 +8,13 @@ const AddIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
8
8
|
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "add",
|
|
11
|
-
fill: fill !== null && fill !== void 0 ? fill : "
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : undefined,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
15
|
...props,
|
|
16
16
|
};
|
|
17
|
-
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M15.957 4a1 1 0 0 1 1 1v10H27a1 1 0 1 1 0 2H16.957v10a1 1 0 0 1-2 0V17H5a1 1 0 1 1 0-2h9.957V5a1 1 0 0 1 1-1" })] }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { AddIcon };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AppsFilledIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "apps-filled",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M13 17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zm13.204.01A2 2 0 0 1 28 19v7l-.01.204a2 2 0 0 1-1.786 1.785L26 28h-7a2 2 0 0 1-1.99-1.796L17 26v-7a2 2 0 0 1 2-2h7zM19 26h7v-7h-7zM13 4a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm13 0a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AppsFilledIcon };
|
|
@@ -2,5 +2,5 @@ import { type SVGProps } from "react";
|
|
|
2
2
|
interface IconProps extends SVGProps<SVGSVGElement> {
|
|
3
3
|
alt?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const AppsIcon: ({ alt, className, fill, id, ref, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useId } from '../../hooks/useId.js';
|
|
4
|
+
|
|
5
|
+
const AppsIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
6
|
+
const uid = useId(id);
|
|
7
|
+
const componentProps = {
|
|
8
|
+
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
|
+
className: clsx("coop-icon", className),
|
|
10
|
+
"data-icon": "apps",
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
|
+
id: uid,
|
|
13
|
+
role: alt ? "img" : undefined,
|
|
14
|
+
viewBox: "0 0 32 32",
|
|
15
|
+
...props,
|
|
16
|
+
};
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M13.204 17.01A2 2 0 0 1 15 19v7l-.01.204a2 2 0 0 1-1.786 1.785L13 28H6a2 2 0 0 1-1.99-1.796L4 26v-7a2 2 0 0 1 2-2h7zM26 17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zM6 26h7v-7H6zm7.204-21.99A2 2 0 0 1 15 6v7l-.01.204a2 2 0 0 1-1.786 1.785L13 15H6a2 2 0 0 1-1.99-1.796L4 13V6a2 2 0 0 1 2-2h7zm13 0A2 2 0 0 1 28 6v7l-.01.204a2 2 0 0 1-1.786 1.785L26 15h-7a2 2 0 0 1-1.99-1.796L17 13V6a2 2 0 0 1 2-2h7zM6 13h7V6H6zm13 0h7V6h-7z" })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { AppsIcon };
|
|
@@ -8,13 +8,13 @@ const ArrowDownIcon = ({ alt, className, fill, id, ref, ...props }) => {
|
|
|
8
8
|
"aria-labelledby": alt ? uid + "-title" : undefined,
|
|
9
9
|
className: clsx("coop-icon", className),
|
|
10
10
|
"data-icon": "arrow-down",
|
|
11
|
-
fill: fill !== null && fill !== void 0 ? fill : "
|
|
11
|
+
fill: fill !== null && fill !== void 0 ? fill : "currentColor",
|
|
12
12
|
id: uid,
|
|
13
13
|
role: alt ? "img" : undefined,
|
|
14
14
|
viewBox: "0 0 32 32",
|
|
15
15
|
...props,
|
|
16
16
|
};
|
|
17
|
-
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "
|
|
17
|
+
return (jsxs("svg", { ...componentProps, ref: ref, children: [alt ? jsx("title", { id: uid + "-title", children: alt }) : null, jsx("path", { d: "M16 2a1 1 0 0 1 1 1v23.586l10.293-10.293a1 1 0 1 1 1.414 1.414L17.414 29a2 2 0 0 1-2.828 0L3.293 17.707a1 1 0 1 1 1.414-1.414L15 26.586V3a1 1 0 0 1 1-1" })] }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { ArrowDownIcon };
|