@obosbbl/grunnmuren-react 0.1.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.
Files changed (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/Alert/Alert.d.ts +9 -0
  4. package/dist/Alert/index.d.ts +1 -0
  5. package/dist/Banner/Banner.d.ts +11 -0
  6. package/dist/Banner/BannerImage.d.ts +6 -0
  7. package/dist/Banner/index.d.ts +2 -0
  8. package/dist/Button/Button.d.ts +14 -0
  9. package/dist/Button/ButtonColorContext.d.ts +3 -0
  10. package/dist/Button/index.d.ts +2 -0
  11. package/dist/Card/Card.d.ts +8 -0
  12. package/dist/Card/CardContent.d.ts +5 -0
  13. package/dist/Card/CardImage.d.ts +7 -0
  14. package/dist/Card/CardLinkOverlay.d.ts +4 -0
  15. package/dist/Card/CardList.d.ts +7 -0
  16. package/dist/Card/index.d.ts +5 -0
  17. package/dist/Checkbox/Checkbox.d.ts +9 -0
  18. package/dist/Checkbox/index.d.ts +1 -0
  19. package/dist/Footer/Footer.d.ts +7 -0
  20. package/dist/Footer/index.d.ts +1 -0
  21. package/dist/Form/Form.d.ts +9 -0
  22. package/dist/Form/FormError.d.ts +4 -0
  23. package/dist/Form/FormErrorMessage.d.ts +5 -0
  24. package/dist/Form/FormHelperText.d.ts +5 -0
  25. package/dist/Form/FormLabel.d.ts +6 -0
  26. package/dist/Form/FormSuccess.d.ts +6 -0
  27. package/dist/Form/index.d.ts +6 -0
  28. package/dist/Hero/Hero.d.ts +21 -0
  29. package/dist/Hero/HeroActions.d.ts +7 -0
  30. package/dist/Hero/HeroContent.d.ts +9 -0
  31. package/dist/Hero/HeroImage.d.ts +8 -0
  32. package/dist/Hero/index.d.ts +4 -0
  33. package/dist/Hero/utils.d.ts +2 -0
  34. package/dist/IconLegacy/IconLegacy.d.ts +20 -0
  35. package/dist/IconLegacy/index.d.ts +1 -0
  36. package/dist/Input/Input.d.ts +8 -0
  37. package/dist/Input/index.d.ts +1 -0
  38. package/dist/Link/Link.d.ts +8 -0
  39. package/dist/Link/index.d.ts +1 -0
  40. package/dist/Navbar/Navbar.d.ts +6 -0
  41. package/dist/Navbar/NavbarCollapsible.d.ts +6 -0
  42. package/dist/Navbar/NavbarContent.d.ts +7 -0
  43. package/dist/Navbar/NavbarContext.d.ts +6 -0
  44. package/dist/Navbar/NavbarExpandedMobileContent.d.ts +9 -0
  45. package/dist/Navbar/NavbarItem.d.ts +7 -0
  46. package/dist/Navbar/NavbarItems.d.ts +6 -0
  47. package/dist/Navbar/NavbarMenuButton.d.ts +5 -0
  48. package/dist/Navbar/index.d.ts +6 -0
  49. package/dist/Select/Select.d.ts +7 -0
  50. package/dist/Select/index.d.ts +1 -0
  51. package/dist/Snackbar/Snackbar.d.ts +8 -0
  52. package/dist/Snackbar/SnackbarButton.d.ts +6 -0
  53. package/dist/Snackbar/SnackbarContent.d.ts +5 -0
  54. package/dist/Snackbar/index.d.ts +3 -0
  55. package/dist/TextArea/TextArea.d.ts +11 -0
  56. package/dist/TextArea/index.d.ts +1 -0
  57. package/dist/TextField/TextField.d.ts +12 -0
  58. package/dist/TextField/index.d.ts +1 -0
  59. package/dist/grunnmuren.es.js +1078 -0
  60. package/dist/hooks/index.d.ts +7 -0
  61. package/dist/hooks/useBlockBackgroundColor.d.ts +2 -0
  62. package/dist/hooks/useComposedRefs.d.ts +25 -0
  63. package/dist/hooks/useFallbackId.d.ts +4 -0
  64. package/dist/hooks/useFormControlValidity.d.ts +14 -0
  65. package/dist/hooks/useMedia.d.ts +1 -0
  66. package/dist/hooks/usePrefersReducedMotion.d.ts +1 -0
  67. package/dist/hooks/useScreenMaxWidthMd.d.ts +1 -0
  68. package/dist/index.d.ts +16 -0
  69. package/package.json +51 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 OBOS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @obosbbl/grunnmuren-react
2
+
3
+ Grunnmuren React components
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @obosbbl/grunnmuren-react
9
+ ```
10
+
11
+ You need to setup and configure [`@obosbbl/grunnmuren-tailwind`](../tailwind/) as well.
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface AlertProps {
3
+ className?: string;
4
+ children?: React.ReactNode;
5
+ heading: string;
6
+ /** @default alert */
7
+ severity?: 'alert' | 'info';
8
+ }
9
+ export declare const Alert: (props: AlertProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Alert';
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { BlockBackgroundColor } from '../hooks';
3
+ interface BannerProps {
4
+ bgColor?: BlockBackgroundColor;
5
+ className?: string;
6
+ children: React.ReactNode;
7
+ heading: string;
8
+ image: React.ReactNode;
9
+ }
10
+ export declare const Banner: (props: BannerProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface BannerImageProps extends React.ComponentPropsWithoutRef<'img'> {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export declare const BannerImage: (props: BannerImageProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './Banner';
2
+ export * from './BannerImage';
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare type ButtonColor = 'standard' | 'white' | 'light-green';
3
+ export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ color?: 'standard' | 'white' | 'light-green';
7
+ disabled?: boolean;
8
+ href?: string;
9
+ /** @default button */
10
+ type?: 'button' | 'submit' | 'reset';
11
+ /** @default primary */
12
+ variant?: 'primary' | 'secondary';
13
+ }
14
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { ButtonColor } from '.';
3
+ export declare const ButtonColorContext: import("react").Context<ButtonColor>;
@@ -0,0 +1,2 @@
1
+ export * from './Button';
2
+ export * from './ButtonColorContext';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface CardProps<T extends React.ElementType> {
3
+ /** @default div */
4
+ as?: T;
5
+ /** @default white */
6
+ bgColor?: 'white' | 'gray';
7
+ }
8
+ export declare const Card: <T extends import("react").ElementType<any> = "div">(props: CardProps<T> & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<T>>, keyof CardProps<T>>) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ interface CardContentProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ }
4
+ export declare const CardContent: (props: CardContentProps) => JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface CardImageProps extends React.ComponentPropsWithoutRef<'img'> {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export declare const CardImage: (props: CardImageProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export interface CardLinkOverlayProps extends React.ComponentPropsWithoutRef<'a'> {
3
+ }
4
+ export declare const CardLinkOverlay: import("react").ForwardRefExoticComponent<CardLinkOverlayProps & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { BlockBackgroundColor } from '../hooks';
3
+ interface CardListProps extends React.ComponentPropsWithoutRef<'div'> {
4
+ bgColor?: BlockBackgroundColor;
5
+ }
6
+ export declare const CardList: (props: CardListProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './Card';
2
+ export * from './CardImage';
3
+ export * from './CardList';
4
+ export * from './CardContent';
5
+ export * from './CardLinkOverlay';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * CSS inspired by https://moderncss.dev/pure-css-custom-checkbox-style/
4
+ */
5
+ export interface CheckboxProps extends React.ComponentPropsWithRef<'input'> {
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ }
9
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<Pick<CheckboxProps, "className" | "children" | "form" | "slot" | "style" | "title" | "pattern" | "list" | "role" | "key" | "alt" | "crossOrigin" | "height" | "src" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "multiple" | "maxLength" | "minLength" | "enterKeyHint" | "max" | "min" | "readOnly" | "required" | "size"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export * from './Checkbox';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface FooterProps {
3
+ className?: string;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const Footer: (props: FooterProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Footer';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface FormProps extends React.ComponentPropsWithoutRef<'form'> {
3
+ children: React.ReactNode;
4
+ heading?: string;
5
+ }
6
+ export declare const Form: (props: FormProps) => JSX.Element;
7
+ export interface FormHeadingProps extends React.ComponentPropsWithoutRef<'div'> {
8
+ }
9
+ export declare const FormHeading: (props: FormHeadingProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export interface FormErrorProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ }
4
+ export declare const FormError: (props: FormErrorProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface FormErrorMessageProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const FormErrorMessage: (props: FormErrorMessageProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface FormHelperTextProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const FormHelperText: (props: FormHelperTextProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface LabelProps extends React.ComponentPropsWithoutRef<'label'> {
3
+ children: React.ReactNode;
4
+ isRequired?: boolean;
5
+ }
6
+ export declare const FormLabel: (props: LabelProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface FormSuccessProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ heading?: string;
4
+ text?: string;
5
+ }
6
+ export declare const FormSuccess: (props: FormSuccessProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ export * from './Form';
2
+ export * from './FormError';
3
+ export * from './FormErrorMessage';
4
+ export * from './FormHelperText';
5
+ export * from './FormLabel';
6
+ export * from './FormSuccess';
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ export declare const HeroContext: import("react").Context<{
3
+ bgColor: HeroColor;
4
+ contentPosition: HeroContentPosition;
5
+ hasImage: boolean;
6
+ }>;
7
+ export declare type HeroColor = 'green' | 'blue' | 'white';
8
+ export declare type HeroContentPosition = 'below-center' | 'below-left' | 'top-left' | 'bottom-left' | 'top-right' | 'bottom-right' | 'center' | 'vertical-split';
9
+ export interface HeroProps {
10
+ /** @default white */
11
+ bgColor?: HeroColor;
12
+ className?: string;
13
+ children: React.ReactNode;
14
+ /** Positioning of the content relative to the image. Only affects wider screens
15
+ * @default below-center
16
+ */
17
+ contentPosition?: HeroContentPosition;
18
+ /** Instance of HeroImage */
19
+ image?: React.ReactNode;
20
+ }
21
+ export declare const Hero: (props: HeroProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface HeroActionsProps {
3
+ className?: string;
4
+ children?: React.ReactNode;
5
+ }
6
+ export declare const HeroActions: (props: HeroActionsProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface HeroContentProps {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ heading: string;
6
+ description?: string;
7
+ }
8
+ export declare const HeroContent: (props: HeroContentProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface HeroImageProps {
3
+ src: string;
4
+ mdSrc: string;
5
+ alt?: string;
6
+ }
7
+ export declare const HeroImage: (props: HeroImageProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './Hero';
2
+ export * from './HeroImage';
3
+ export * from './HeroContent';
4
+ export * from './HeroActions';
@@ -0,0 +1,2 @@
1
+ import type { HeroContentPosition } from './Hero';
2
+ export declare function usesGridAreaPlacement(contentPosition: HeroContentPosition): boolean;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export declare type IconName = keyof typeof iconMap;
3
+ interface IconLegacyProps {
4
+ className?: string;
5
+ name: IconName;
6
+ children?: never;
7
+ }
8
+ /**
9
+ *
10
+ * NB! This component should only be used for compatibility reasons.
11
+ * It uses old icon names and it causes all the referenced icons to be inluded in the application bundle.
12
+ * Import icons from @obosbbl/grunnmuren-icons instead.
13
+ */
14
+ export declare const IconLegacy: (props: IconLegacyProps) => JSX.Element;
15
+ declare const iconMap: {
16
+ readonly mapmarker: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
17
+ readonly smartphone: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
18
+ readonly envelope: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
19
+ };
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './IconLegacy';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface InputProps extends React.ComponentPropsWithoutRef<'input'> {
3
+ as?: string;
4
+ prefix?: string;
5
+ /** Render input as invalid. Sets `aria-invalid` to true */
6
+ isInvalid?: boolean;
7
+ }
8
+ export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export * from './Input';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface LinkProps {
3
+ children: React.ReactNode;
4
+ icon?: React.ReactNode;
5
+ href: string;
6
+ className?: string;
7
+ }
8
+ export declare const Link: (props: LinkProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Link';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface NavbarProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const Navbar: (props: NavbarProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface NavbarCollapsibleProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const NavbarCollapsible: (props: NavbarCollapsibleProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface NavbarContentProps {
3
+ children?: React.ReactNode;
4
+ logo: React.ReactNode;
5
+ className?: string;
6
+ }
7
+ export declare const NavbarContent: (props: NavbarContentProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const NavbarContext: import("react").Context<{
3
+ isExpanded: boolean;
4
+ setIsExpanded: React.Dispatch<React.SetStateAction<boolean>>;
5
+ collapsibleId: string;
6
+ }>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface NavbarExpandedMobileContentProps {
3
+ children: React.ReactNode;
4
+ }
5
+ /**
6
+ * Helper component that only renders when the navbar is expanded and on a small screen
7
+ * Simplifies having a totally different navbar layout than on desktop
8
+ */
9
+ export declare const NavbarExpandedMobileContent: (props: NavbarExpandedMobileContentProps) => JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface NavbarItemProps extends React.ComponentPropsWithoutRef<'a'> {
3
+ active?: boolean;
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+ export declare const NavbarItem: import("react").ForwardRefExoticComponent<NavbarItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface NavbarItemsProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const NavbarItems: (props: NavbarItemsProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * TODO: Add support for setting custom button text (eg for obos.se)
4
+ */
5
+ export declare const NavbarMenuButton: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ export * from './Navbar';
2
+ export * from './NavbarItems';
3
+ export * from './NavbarItem';
4
+ export * from './NavbarContent';
5
+ export * from './NavbarCollapsible';
6
+ export * from './NavbarExpandedMobileContent';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface SelectProps extends React.ComponentPropsWithoutRef<'select'> {
3
+ children: React.ReactNode;
4
+ id?: string;
5
+ className?: string;
6
+ }
7
+ export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
@@ -0,0 +1 @@
1
+ export * from './Select';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface SnackbarProps {
3
+ children?: React.ReactNode;
4
+ id?: string;
5
+ heading: string;
6
+ closeSnackbar?: () => void;
7
+ }
8
+ export declare const Snackbar: (props: SnackbarProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface SnackbarButtonProps extends React.ComponentPropsWithoutRef<'button'> {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const SnackbarButton: (props: SnackbarButtonProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface SnackbarContentProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ children?: React.ReactNode;
4
+ }
5
+ export declare const SnackbarContent: (props: SnackbarContentProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './Snackbar';
2
+ export * from './SnackbarButton';
3
+ export * from './SnackbarContent';
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export interface TextAreaProps extends React.ComponentPropsWithoutRef<'textarea'> {
3
+ children?: never;
4
+ /** Help text for the form control */
5
+ description?: string;
6
+ /** Error message for the form control */
7
+ error?: string;
8
+ /** Label for the form control */
9
+ label: string;
10
+ }
11
+ export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1 @@
1
+ export * from './TextArea';
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export interface TextFieldProps extends React.ComponentPropsWithoutRef<'input'> {
3
+ children?: never;
4
+ /** Help text for the form control */
5
+ description?: string;
6
+ /** Error message for the form control */
7
+ error?: string;
8
+ /** Label for the form control */
9
+ label: string;
10
+ prefix?: string;
11
+ }
12
+ export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export * from './TextField';