@obosbbl/grunnmuren-react 2.0.0-canary.17 → 2.0.0-canary.18

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1, ListBoxItemProps, ComboBoxProps, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, SelectProps as SelectProps$1, TextFieldProps as TextFieldProps$1, NumberFieldProps as NumberFieldProps$1, ContextValue, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1 } from 'react-aria-components';
1
+ import { CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1, ListBoxItemProps, ComboBoxProps, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, SelectProps as SelectProps$1, TextFieldProps as TextFieldProps$1, NumberFieldProps as NumberFieldProps$1, ContextValue, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, LinkProps } from 'react-aria-components';
2
2
  export { ListBoxItemProps as ComboboxItemProps, Form, ListBoxItemProps as SelectItemProps } from 'react-aria-components';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
@@ -570,4 +570,33 @@ declare const _Breadcrumbs: react.ForwardRefExoticComponent<{
570
570
  style?: react.CSSProperties | undefined;
571
571
  } & Omit<BreadcrumbsProps$1<BreadcrumbProps>, "className" | "style"> & react.RefAttributes<HTMLOListElement>>;
572
572
 
573
- export { _Accordion as Accordion, _AccordionItem as AccordionItem, type AccordionItemProps, type AccordionProps, Alertbox, type Props as AlertboxProps, _Breadcrumb as Breadcrumb, type BreadcrumbProps, _Breadcrumbs as Breadcrumbs, type BreadcrumbsProps, _Button as Button, type ButtonProps, _Checkbox as Checkbox, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, _Combobox as Combobox, ListBoxItem as ComboboxItem, type ComboboxProps, Content, ContentContext, type ContentProps, Footer, type FooterProps, GrunnmurenProvider, type GrunnmurenProviderProps, Heading, HeadingContext, type HeadingProps, _NumberField as NumberField, type NumberFieldProps, _Radio as Radio, _RadioGroup as RadioGroup, type RadioGroupProps, type RadioProps, _Select as Select, ListBoxItem as SelectItem, type SelectProps, _TextArea as TextArea, type TextAreaProps, _TextField as TextField, type TextFieldProps };
573
+ type BacklinkProps = {
574
+ /** Additional CSS className for the element. */
575
+ className?: string;
576
+ /** Additional style properties for the element. */
577
+ style?: React.CSSProperties;
578
+ /** The URL to navigate to when clicking the backlink. */
579
+ href?: string;
580
+ /** The content of the link */
581
+ children?: React.ReactNode;
582
+ /** To add a permanent underline on the link (not only on hover)
583
+ * @default false
584
+ */
585
+ withUnderline?: boolean;
586
+ } & Omit<LinkProps, 'className' | 'style'>;
587
+ declare const _Backlink: react.ForwardRefExoticComponent<{
588
+ /** Additional CSS className for the element. */
589
+ className?: string | undefined;
590
+ /** Additional style properties for the element. */
591
+ style?: react.CSSProperties | undefined;
592
+ /** The URL to navigate to when clicking the backlink. */
593
+ href?: string | undefined;
594
+ /** The content of the link */
595
+ children?: React.ReactNode;
596
+ /** To add a permanent underline on the link (not only on hover)
597
+ * @default false
598
+ */
599
+ withUnderline?: boolean | undefined;
600
+ } & Omit<LinkProps, "className" | "style"> & react.RefAttributes<HTMLAnchorElement>>;
601
+
602
+ export { _Accordion as Accordion, _AccordionItem as AccordionItem, type AccordionItemProps, type AccordionProps, Alertbox, type Props as AlertboxProps, _Backlink as Backlink, type BacklinkProps, _Breadcrumb as Breadcrumb, type BreadcrumbProps, _Breadcrumbs as Breadcrumbs, type BreadcrumbsProps, _Button as Button, type ButtonProps, _Checkbox as Checkbox, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, _Combobox as Combobox, ListBoxItem as ComboboxItem, type ComboboxProps, Content, ContentContext, type ContentProps, Footer, type FooterProps, GrunnmurenProvider, type GrunnmurenProviderProps, Heading, HeadingContext, type HeadingProps, _NumberField as NumberField, type NumberFieldProps, _Radio as Radio, _RadioGroup as RadioGroup, type RadioGroupProps, type RadioProps, _Select as Select, ListBoxItem as SelectItem, type SelectProps, _TextArea as TextArea, type TextAreaProps, _TextField as TextField, type TextFieldProps };
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ export { Form } from 'react-aria-components';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { useLayoutEffect, createContext, forwardRef, Children, useId, useState, useRef } from 'react';
6
6
  import { cx, cva, compose } from 'cva';
7
- import { ChevronDown, LoadingSpinner, Check, Close, InfoCircle, CheckCircle, Warning, CloseCircle, ChevronRight } from '@obosbbl/grunnmuren-icons-react';
7
+ import { ChevronDown, LoadingSpinner, Check, Close, InfoCircle, CheckCircle, Warning, CloseCircle, ChevronRight, ChevronLeft } from '@obosbbl/grunnmuren-icons-react';
8
8
  import { mergeRefs } from '@react-aria/utils';
9
9
 
10
10
  function GrunnmurenProvider({ children, locale = 'nb', navigate }) {
@@ -926,4 +926,24 @@ function Breadcrumb(props, ref) {
926
926
  }
927
927
  const _Breadcrumb = /*#__PURE__*/ forwardRef(Breadcrumb);
928
928
 
929
- export { _Accordion as Accordion, _AccordionItem as AccordionItem, Alertbox, _Breadcrumb as Breadcrumb, _Breadcrumbs as Breadcrumbs, _Button as Button, _Checkbox as Checkbox, _CheckboxGroup as CheckboxGroup, _Combobox as Combobox, ListBoxItem as ComboboxItem, Content, ContentContext, Footer, GrunnmurenProvider, Heading, HeadingContext, _NumberField as NumberField, _Radio as Radio, _RadioGroup as RadioGroup, _Select as Select, ListBoxItem as SelectItem, _TextArea as TextArea, _TextField as TextField };
929
+ function Backlink(props, ref) {
930
+ const { className, children, href, withUnderline, ...restProps } = props;
931
+ return /*#__PURE__*/ jsxs(Link, {
932
+ className: cx(className, 'group flex max-w-fit items-center gap-3 rounded-md p-2.5 no-underline focus:outline-none focus-visible:ring focus-visible:ring-black'),
933
+ ...restProps,
934
+ ref: ref,
935
+ href: href,
936
+ children: [
937
+ /*#__PURE__*/ jsx(ChevronLeft, {
938
+ className: cx('-ml-[0.5em] flex-shrink-0 transition-transform duration-300 group-hover:-translate-x-1')
939
+ }),
940
+ /*#__PURE__*/ jsx("span", {
941
+ className: cx('border-b-2 border-t-2 border-transparent leading-none transition-colors duration-300', withUnderline ? 'border-b-black' : 'hover:border-b-black'),
942
+ children: children
943
+ })
944
+ ]
945
+ });
946
+ }
947
+ const _Backlink = /*#__PURE__*/ forwardRef(Backlink);
948
+
949
+ export { _Accordion as Accordion, _AccordionItem as AccordionItem, Alertbox, _Backlink as Backlink, _Breadcrumb as Breadcrumb, _Breadcrumbs as Breadcrumbs, _Button as Button, _Checkbox as Checkbox, _CheckboxGroup as CheckboxGroup, _Combobox as Combobox, ListBoxItem as ComboboxItem, Content, ContentContext, Footer, GrunnmurenProvider, Heading, HeadingContext, _NumberField as NumberField, _Radio as Radio, _RadioGroup as RadioGroup, _Select as Select, ListBoxItem as SelectItem, _TextArea as TextArea, _TextField as TextField };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-react",
3
- "version": "2.0.0-canary.17",
3
+ "version": "2.0.0-canary.18",
4
4
  "description": "Grunnmuren components in React",
5
5
  "repository": {
6
6
  "url": "https://github.com/code-obos/grunnmuren"