@rikstv/shared-components 2.0.11 → 2.0.12

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 (77) hide show
  1. package/dist/components/accordion/Accordion.d.ts +0 -1
  2. package/dist/components/accordion/Accordion.test.d.ts +1 -0
  3. package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -1
  4. package/dist/components/breadcrumb/Breadcrumb.test.d.ts +1 -0
  5. package/dist/components/button/ArrowButton.d.ts +0 -3
  6. package/dist/components/button/ArrowButton.test.d.ts +1 -0
  7. package/dist/components/button/BaseLinkButton.d.ts +0 -4
  8. package/dist/components/button/Button.d.ts +0 -2
  9. package/dist/components/button/Button.test.d.ts +1 -0
  10. package/dist/components/button/DecoratedButton.d.ts +0 -2
  11. package/dist/components/button/IconButton.d.ts +0 -2
  12. package/dist/components/button/IconButton.test.d.ts +1 -0
  13. package/dist/components/button/LinkButton.test.d.ts +1 -0
  14. package/dist/components/checkbox/Checkbox.d.ts +0 -1
  15. package/dist/components/checkbox/Checkbox.test.d.ts +1 -0
  16. package/dist/components/core/Core.test.d.ts +1 -0
  17. package/dist/components/core/RiksTV.d.ts +0 -1
  18. package/dist/components/core/Strim.d.ts +0 -1
  19. package/dist/components/core/docs/BrandVariables.d.ts +3 -0
  20. package/dist/components/core/docs/Colors.d.ts +2 -0
  21. package/dist/components/core/docs/Spacing.d.ts +2 -0
  22. package/dist/components/core/docs/Variables.d.ts +5 -0
  23. package/dist/components/core/docs/componets/BrandColors/BrandColors.d.ts +2 -0
  24. package/dist/components/core/docs/componets/ColorSwatch/ColorSwatch.d.ts +4 -0
  25. package/dist/components/core/docs/componets/ColorSwatch/ColorSwatchBtn.d.ts +7 -0
  26. package/dist/components/core/docs/componets/ColorSwatch/getColor.d.ts +1 -0
  27. package/dist/components/core/docs/componets/ColorSwatch/useColorSwatchCopy.d.ts +6 -0
  28. package/dist/components/core/docs/componets/ExampleGrid/ExampleGrid.d.ts +4 -0
  29. package/dist/components/core/docs/componets/SpacingBlock/SpacingBlock.d.ts +4 -0
  30. package/dist/components/core/docs/context/ExampleContext.d.ts +4 -0
  31. package/dist/components/core/docs/hooks/ClickOutside.d.ts +2 -0
  32. package/dist/components/core/docs/hooks/Intersection.d.ts +2 -0
  33. package/dist/components/core/docs/hooks/Mutation.d.ts +1 -0
  34. package/dist/components/core/docs/hooks/animated.d.ts +2 -0
  35. package/dist/components/core/docs/utils/PropertyList.d.ts +4 -0
  36. package/dist/components/core/docs/utils/parseColorsFromScss.d.ts +1 -0
  37. package/dist/components/core/docs/utils/parseScssImport.d.ts +3 -0
  38. package/dist/components/core/hooks/useClickOutsideListner.test.d.ts +1 -0
  39. package/dist/components/core/hooks/useIntersectionObserver.test.d.ts +1 -0
  40. package/dist/components/core/hooks/useMutationObserver.test.d.ts +1 -0
  41. package/dist/components/core/utils/Mouse.test.d.ts +0 -0
  42. package/dist/components/core/utils/Touch.test.d.ts +0 -0
  43. package/dist/components/icons/HeartToggle.d.ts +4 -0
  44. package/dist/components/icons/Icons.d.ts +8 -0
  45. package/dist/components/list/CheckmarkListItem.d.ts +0 -1
  46. package/dist/components/list/CrossmarkListItem.d.ts +0 -1
  47. package/dist/components/list/List.d.ts +0 -1
  48. package/dist/components/list/List.test.d.ts +1 -0
  49. package/dist/components/list/ListItem.d.ts +0 -1
  50. package/dist/components/list/OrderedListItem.d.ts +0 -1
  51. package/dist/components/list/internal/getMarkColor.d.ts +1 -1
  52. package/dist/components/loader/Loader.test.d.ts +1 -0
  53. package/dist/components/loader/RawLoader.d.ts +0 -1
  54. package/dist/components/notificationDot/NotificationDot.d.ts +0 -1
  55. package/dist/components/notificationDot/NotificationDot.test.d.ts +0 -0
  56. package/dist/components/panel/Info.d.ts +0 -1
  57. package/dist/components/panel/Panel.d.ts +0 -1
  58. package/dist/components/panel/Panel.test.d.ts +0 -0
  59. package/dist/components/progress/CircularProgress.d.ts +0 -1
  60. package/dist/components/progress/CircularProgress.test.d.ts +0 -0
  61. package/dist/components/progress/Progress.d.ts +0 -1
  62. package/dist/components/progress/Progress.test.d.ts +0 -0
  63. package/dist/components/textfield/TextField.d.ts +0 -1
  64. package/dist/components/textfield/textfield.test.d.ts +0 -0
  65. package/dist/components/toggle/RadioToggle.d.ts +0 -3
  66. package/dist/components/toggle/RadioToggle.test.d.ts +0 -0
  67. package/dist/components/toggle/docs/Example.d.ts +2 -0
  68. package/dist/components/toggleButton/ToggleButton.d.ts +0 -1
  69. package/dist/components/toggleButton/ToggleButton.test.d.ts +1 -0
  70. package/dist/components/toggleInlineButton/ToggleInlineButton.d.ts +0 -1
  71. package/dist/components/toggleInlineButton/ToggleInlineButton.test.d.ts +1 -0
  72. package/dist/components/toggleLinkButton/ToggleLinkButton.d.ts +0 -1
  73. package/dist/components/toggleLinkButton/ToggleLinkButton.test.d.ts +1 -0
  74. package/dist/components/typography/Typography.d.ts +0 -1
  75. package/dist/components/typography/Typography.test.d.ts +0 -0
  76. package/package.json +3 -3
  77. package/dist/utils/generateId.d.ts +0 -1
@@ -1,5 +1,4 @@
1
1
  import { DetailedHTMLProps, FC, HTMLAttributes, ReactNode } from "react";
2
- import "./accordion.scss";
3
2
  interface Props extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
4
3
  heading: ReactNode;
5
4
  initialOpen?: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { FC, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
2
- import "./breadcrumb.scss";
3
2
  interface Props extends HTMLAttributes<HTMLElement> {
4
3
  crumbs: Array<{
5
4
  name: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { DecoratedButtonProps } from "./BaseDecoratedButton";
3
- import "./button.scss";
4
- import "./arrow-button.scss";
5
- import "./button-shared.scss";
6
3
  interface ArrowButtonProps extends Omit<DecoratedButtonProps, "arrow"> {
7
4
  forwards?: boolean;
8
5
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonBackgroundStyles } from "./BaseButton";
3
- import "./button.scss";
4
- import "./button-shared.scss";
5
- import "./link-button.scss";
6
- import "./arrow-button.scss";
7
3
  export type LinkButtonVariants = "primary" | "secondary" | "tertiary" | "highlighted";
8
4
  interface BaseLinkButtonPropsWithElement<ElementProps> {
9
5
  element: (props: ElementProps) => JSX.Element;
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from "./BaseButton";
3
- import "./button.scss";
4
- import "./button-shared.scss";
5
3
  export declare const PrimaryButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
6
4
  export declare const SecondaryButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
7
5
  export declare const TertiaryButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseDecoratedButtonProps } from "./BaseDecoratedButton";
3
- import "./button.scss";
4
- import "./button-shared.scss";
5
3
  export declare const PrimaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonType"> & import("react").RefAttributes<HTMLButtonElement>>;
6
4
  export declare const SecondaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonType"> & import("react").RefAttributes<HTMLButtonElement>>;
7
5
  export declare const TertiaryDecoratedButton: import("react").ForwardRefExoticComponent<Omit<BaseDecoratedButtonProps, "buttonType"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { DecoratedButtonProps } from "./BaseDecoratedButton";
3
- import "./icon-button.scss";
4
- import "./button-shared.scss";
5
3
  interface IconButtonProps extends Omit<DecoratedButtonProps, "icon"> {
6
4
  icon: () => JSX.Element;
7
5
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes } from "react";
2
- import "./checkbox.scss";
3
2
  export interface Props extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> {
4
3
  className?: string;
5
4
  lightBackground?: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,2 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- import "./rtv.scss";
3
2
  export declare const RiksTVProvider: FC<PropsWithChildren>;
@@ -1,3 +1,2 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- import "./strm.scss";
3
2
  export declare const StrimProvider: FC<PropsWithChildren>;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ export declare const Roundness: FC;
3
+ export declare const Font: FC;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const Colors: FC;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const Spacing: FC;
@@ -0,0 +1,5 @@
1
+ import { FC } from "react";
2
+ export declare const Breakpoints: FC;
3
+ export declare const Gutters: FC;
4
+ export declare const Widths: FC;
5
+ export declare const Shadow: FC;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const BrandColors: FC;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ export declare const ColorSwatch: FC<{
3
+ color: string;
4
+ }>;
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from "react";
2
+ interface Props {
3
+ onClick: () => void;
4
+ children: ReactNode;
5
+ }
6
+ export declare const ColorSwatchBtn: FC<Props>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getColor: (divElement: HTMLDivElement) => string;
@@ -0,0 +1,6 @@
1
+ export declare const useColorSwatchCopy: () => {
2
+ ANIMATION_DURATION: number;
3
+ copied: boolean;
4
+ lastCopiedString: string;
5
+ handleCopy: (stringToCopy: string) => Promise<number | void>;
6
+ };
@@ -0,0 +1,4 @@
1
+ import { FC, PropsWithChildren } from "react";
2
+ export declare const ExampleGrid: FC<PropsWithChildren<{
3
+ title: string;
4
+ }>>;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ export declare const SpacingBlock: FC<{
3
+ size: number;
4
+ }>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ExampleContext: import("react").Context<{
3
+ isStrim: boolean;
4
+ }>;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const ClickOutside: FC;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const Intersection: FC;
@@ -0,0 +1 @@
1
+ export declare const Mutation: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const AnimationExample: FC;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ export declare const PropertyList: FC<{
3
+ properties: string[];
4
+ }>;
@@ -0,0 +1 @@
1
+ export declare const parseColorsFromScss: (scssFile: string, brand: "strm" | "rtv") => string[][];
@@ -0,0 +1,3 @@
1
+ export declare const parseScssImport: (scssFile: string, className?: string) => string[];
2
+ export declare const getCustomMediaQueries: (scssContents: string) => string[];
3
+ export declare const getMatchingProperties: (customProperties: string[], matcher: string) => string[];
File without changes
File without changes
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ export declare const HeartToggle: FC<{
3
+ checked: boolean;
4
+ }>;
@@ -0,0 +1,8 @@
1
+ import { ReactComponent as Play } from "./Play.svg";
2
+ import { ReactComponent as Pause } from "./Pause.svg";
3
+ import { ReactComponent as Heart } from "./HeartFilled.svg";
4
+ import { ReactComponent as HeartUnfilled } from "./HeartUnfilled.svg";
5
+ import { HeartToggle } from "./HeartToggle";
6
+ import { Chevron } from "./Chevron";
7
+ import { Arrow } from "./Arrow";
8
+ export { Arrow, Play, Pause, Chevron, HeartToggle, Heart, HeartUnfilled };
@@ -1,5 +1,4 @@
1
1
  import { FC, HTMLAttributes } from "react";
2
- import "./CheckmarkListItem.scss";
3
2
  interface Props extends HTMLAttributes<HTMLLIElement> {
4
3
  className?: string;
5
4
  color?: "error" | "success";
@@ -1,5 +1,4 @@
1
1
  import { FC, HTMLAttributes } from "react";
2
- import "./CrossmarkListItem.scss";
3
2
  interface Props extends Omit<HTMLAttributes<HTMLLIElement>, "color"> {
4
3
  className?: string;
5
4
  color?: "error" | "success";
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
- import "./List.scss";
3
2
  interface Props extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {
4
3
  className?: string;
5
4
  ordered?: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { FC, HTMLAttributes } from "react";
2
- import "./ListItem.scss";
3
2
  interface Props extends HTMLAttributes<HTMLLIElement> {
4
3
  className?: string;
5
4
  innerClassName?: string;
@@ -1,5 +1,4 @@
1
1
  import { FC, HTMLAttributes } from "react";
2
- import "./OrderedListItem.scss";
3
2
  interface Props extends HTMLAttributes<HTMLLIElement> {
4
3
  className?: string;
5
4
  innerClassName?: string;
@@ -1,3 +1,3 @@
1
1
  export declare const getMarkColor: (color?: "error" | "success") => {
2
2
  "--mark-color": string;
3
- };
3
+ } | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
- import "./Loader.scss";
3
2
  export interface Props extends HTMLAttributes<HTMLDivElement> {
4
3
  className?: string;
5
4
  size?: "small" | "large";
@@ -1,5 +1,4 @@
1
1
  import { FC, HTMLAttributes } from "react";
2
- import "./notificationDot.scss";
3
2
  interface Props extends HTMLAttributes<HTMLSpanElement> {
4
3
  numberOfNotifications?: number;
5
4
  large?: boolean;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const Info: () => JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
- import "./panel.scss";
3
2
  export interface Props extends HTMLAttributes<HTMLDivElement> {
4
3
  className?: string;
5
4
  variant?: "info" | "warning" | "warning2" | "error";
File without changes
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
- import "./circularProgress.scss";
3
2
  interface Props extends HTMLAttributes<HTMLDivElement> {
4
3
  progressRatio: number;
5
4
  label: string;
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
- import "./Progress.scss";
3
2
  interface Props extends HTMLAttributes<HTMLProgressElement> {
4
3
  label: string;
5
4
  ratio: number;
File without changes
@@ -1,5 +1,4 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes } from "react";
2
- import "./textfield.scss";
3
2
  interface Props extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> {
4
3
  className?: string;
5
4
  name: string;
File without changes
@@ -1,7 +1,4 @@
1
1
  import { InputHTMLAttributes } from "react";
2
- import "./radioToggle.scss";
3
- import "../button/button-shared.scss";
4
- import "../button/button.scss";
5
2
  interface RadioToggleInputProps extends InputHTMLAttributes<HTMLInputElement> {
6
3
  label: string;
7
4
  }
File without changes
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const Example: FC;
@@ -1,5 +1,4 @@
1
1
  import { FC, InputHTMLAttributes } from "react";
2
- import "./toggleButton.scss";
3
2
  interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
4
3
  children: string;
5
4
  alwaysShowLabel?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { InputHTMLAttributes } from "react";
2
- import "./toggleInlineButton.scss";
3
2
  interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
4
3
  lightBackground?: boolean;
5
4
  inputClassName?: string;
@@ -1,5 +1,4 @@
1
1
  import { InputHTMLAttributes } from "react";
2
- import "./toggleLinkButton.scss";
3
2
  interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
4
3
  children: string;
5
4
  toggledContentId: string;
@@ -1,5 +1,4 @@
1
1
  import { ForwardRefExoticComponent, HTMLAttributes } from "react";
2
- import "./typography.scss";
3
2
  type HeadingLevels = 1 | 2 | 3 | 4;
4
3
  type AcceptedHTMLElements = HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement;
5
4
  interface Props<T extends AcceptedHTMLElements> extends HTMLAttributes<T> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rikstv/shared-components",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,7 +17,7 @@
17
17
  "browser": "./dist/shared-components.mjs",
18
18
  "scripts": {
19
19
  "dev": "vite",
20
- "build": "tsc src/*.ts* && vite build && tsc src/components/index.ts --declaration --emitDeclarationOnly --jsx react-jsx --esModuleInterop --outDir dist",
20
+ "build": "npm run typecheck && vite build",
21
21
  "serve": "vite preview",
22
22
  "test": "cypress run --component",
23
23
  "test:open": "cypress open --component",
@@ -33,4 +33,4 @@
33
33
  "@types/react-dom": "^16.8.6 || ^17 || ^18",
34
34
  "react": "^16.8.0 || ^17 || ^18"
35
35
  }
36
- }
36
+ }
@@ -1 +0,0 @@
1
- export declare const generateId: (id?: string | undefined) => string;