@entur/button 3.3.13-beta.9 → 3.3.14

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/Button.d.ts CHANGED
@@ -1,6 +1,5 @@
1
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
1
2
  import * as React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- import './Button.scss';
4
3
  /** @deprecated use variant="secondary" size="small" instead */
5
4
  declare const tertiary = "tertiary";
6
5
  type ButtonBaseProps = {
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import './ButtonGroup.scss';
1
+ import { default as React } from 'react';
3
2
  export type ButtonGroupProps = {
4
3
  /** To eller flere Button-komponenter */
5
4
  children: React.ReactNode;
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import './FloatingButton.scss';
1
+ import { default as React } from 'react';
3
2
  export type FloatingButtonProps = {
4
3
  /** Beskrivende tekst for skjermlesere */
5
4
  'aria-label': string;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- import './IconButton.scss';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
4
3
  export type IconButtonBaseProps = {
5
4
  /** Ikonet som du vil ha inne i knappen */
6
5
  children: React.ReactNode;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  export type NegativeButtonBaseProps = {
4
4
  /** Størrelsen på knappen
5
5
  * @default 'medium'
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  export type PrimaryButtonBaseProps = {
4
4
  /** Størrelsen på knappen
5
5
  * @default 'medium'
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  export type SecondaryButtonBaseProps = {
4
4
  /** Størrelsen på knappen
5
5
  * @default 'medium'
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  type SecondarySquareButtonBaseProps = {
4
4
  /** Tekst og ikon, ikon og tekst, eller bare ikon */
5
5
  children: React.ReactNode;
@@ -1,6 +1,5 @@
1
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
1
2
  import * as React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
3
- import './SquareButton.scss';
4
3
  export type SquareButtonBaseProps = {
5
4
  /** Tekst og ikon */
6
5
  children: React.ReactNode;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  export type SuccessButtonBaseProps = {
4
4
  /** Størrelsen på knappen
5
5
  * @default 'medium'
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  type SuccessSquareButtonBaseProps = {
4
4
  /** Tekst og ikon, ikon og tekst, eller bare ikon */
5
5
  children: React.ReactNode;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  export type TertiaryButtonBaseProps = {
4
4
  /** Størrelsen på knappen
5
5
  * @default 'medium'
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { PolymorphicComponentPropsWithRef } from '@entur/utils';
1
+ import { default as React } from 'react';
2
+ import { PolymorphicComponentPropsWithRef } from '../../utils';
3
3
  type TertiarySquareButtonBaseProps = {
4
4
  /** Tekst og ikon, ikon og tekst, eller bare ikon */
5
5
  children: React.ReactNode;
@@ -0,0 +1,268 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils = require("@entur/utils");
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const React = require("react");
6
+ const classNames = require("classnames");
7
+ const loader = require("@entur/loader");
8
+ function _interopNamespaceDefault(e) {
9
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
+ if (e) {
11
+ for (const k in e) {
12
+ if (k !== "default") {
13
+ const d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: () => e[k]
17
+ });
18
+ }
19
+ }
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
25
+ const defaultElement$9 = "button";
26
+ const Button = React__namespace.forwardRef(
27
+ ({
28
+ as,
29
+ children,
30
+ variant = "primary",
31
+ size = "medium",
32
+ loading,
33
+ className,
34
+ disabled = false,
35
+ width = "auto",
36
+ "aria-label": ariaLabel,
37
+ ...rest
38
+ }, ref) => {
39
+ const Element = as || defaultElement$9;
40
+ const childrenArray = React__namespace.Children.toArray(children);
41
+ const hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== "string";
42
+ const hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== "string";
43
+ const ariaLabelWhenLoading = childrenArray.filter((child) => typeof child === "string").join(" ");
44
+ const ariaLabelValue = () => {
45
+ if (ariaLabel) return ariaLabel;
46
+ if (loading) return ariaLabelWhenLoading;
47
+ return void 0;
48
+ };
49
+ return /* @__PURE__ */ jsxRuntime.jsx(
50
+ Element,
51
+ {
52
+ className: classNames(
53
+ "eds-button",
54
+ {
55
+ [`eds-button--variant-${variant}`]: variant,
56
+ [`eds-button--size-${size}`]: size,
57
+ "eds-button--width-fluid": width === "fluid",
58
+ "eds-button--loading": loading,
59
+ "eds-button--leading-icon": hasLeadingIcon,
60
+ "eds-button--trailing-icon": hasTrailingIcon
61
+ },
62
+ className
63
+ ),
64
+ ref,
65
+ "aria-busy": loading,
66
+ disabled,
67
+ "aria-disabled": disabled,
68
+ "aria-label": ariaLabelValue(),
69
+ ...rest,
70
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(loader.LoadingDots, { className: "eds-button__loading-dots" }) : children
71
+ }
72
+ );
73
+ }
74
+ );
75
+ const defaultElement$8 = "button";
76
+ const PrimaryButton = React.forwardRef(
77
+ (props, ref) => {
78
+ const Element = props.as || defaultElement$8;
79
+ return /* @__PURE__ */ jsxRuntime.jsx(Button, { as: Element, ...props, ref, variant: "primary" });
80
+ }
81
+ );
82
+ const defaultElement$7 = "button";
83
+ const SecondaryButton = React.forwardRef(
84
+ (props, ref) => {
85
+ const Element = props.as || defaultElement$7;
86
+ return /* @__PURE__ */ jsxRuntime.jsx(Button, { as: Element, ...props, ref, variant: "secondary" });
87
+ }
88
+ );
89
+ const defaultElement$6 = "button";
90
+ const SuccessButton = React.forwardRef(
91
+ (props, ref) => {
92
+ const Element = props.as || defaultElement$6;
93
+ return /* @__PURE__ */ jsxRuntime.jsx(Button, { as: Element, ...props, ref, variant: "success" });
94
+ }
95
+ );
96
+ const defaultElement$5 = "button";
97
+ const NegativeButton = React.forwardRef(
98
+ (props, ref) => {
99
+ const Element = props.as || defaultElement$5;
100
+ return /* @__PURE__ */ jsxRuntime.jsx(Button, { as: Element, ...props, ref, variant: "negative" });
101
+ }
102
+ );
103
+ const defaultElement$4 = "button";
104
+ const TertiaryButton = React.forwardRef(
105
+ (props, ref) => {
106
+ const Element = props.as || defaultElement$4;
107
+ return /* @__PURE__ */ jsxRuntime.jsx(
108
+ Button,
109
+ {
110
+ as: Element,
111
+ ...props,
112
+ ref,
113
+ variant: "tertiary",
114
+ size: "small"
115
+ }
116
+ );
117
+ }
118
+ );
119
+ const ButtonGroup = ({
120
+ as: Element = "div",
121
+ className,
122
+ ...rest
123
+ }) => {
124
+ return /* @__PURE__ */ jsxRuntime.jsx(Element, { className: classNames("eds-button-group", className), ...rest });
125
+ };
126
+ const FloatingButton = ({
127
+ className,
128
+ children,
129
+ size = "medium",
130
+ ...rest
131
+ }) => {
132
+ return /* @__PURE__ */ jsxRuntime.jsx(
133
+ "button",
134
+ {
135
+ className: classNames(
136
+ "eds-floating-button",
137
+ { "eds-floating-button--extended": React.Children.count(children) > 1 },
138
+ { "eds-floating-button--small": size === "small" },
139
+ className
140
+ ),
141
+ type: "button",
142
+ ...rest,
143
+ children: wrapStringsInSpans(children)
144
+ }
145
+ );
146
+ };
147
+ const wrapStringsInSpans = (children) => React.Children.map(
148
+ children,
149
+ (child) => typeof child === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: child }) : child
150
+ );
151
+ const defaultElement$3 = "button";
152
+ const SquareButton = React__namespace.forwardRef(
153
+ ({
154
+ as,
155
+ children,
156
+ className,
157
+ disabled = false,
158
+ loading = false,
159
+ variant = "secondary",
160
+ ...rest
161
+ }, ref) => {
162
+ const Element = as || defaultElement$3;
163
+ return /* @__PURE__ */ jsxRuntime.jsx(
164
+ Element,
165
+ {
166
+ className: classNames(
167
+ "eds-square-button",
168
+ `eds-square-button--${variant}`,
169
+ {
170
+ "eds-square-button--loading": loading
171
+ },
172
+ className
173
+ ),
174
+ "aria-busy": loading,
175
+ disabled,
176
+ "aria-disabled": disabled,
177
+ ref,
178
+ ...rest,
179
+ children: React__namespace.Children.map(children, (child) => {
180
+ if (typeof child === "string") {
181
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "eds-square-button__label", children: child });
182
+ }
183
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "eds-square-button__button", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(loader.LoadingDots, { className: "eds-square-button__loading-dots" }) : child });
184
+ })
185
+ }
186
+ );
187
+ }
188
+ );
189
+ const defaultElement$2 = "button";
190
+ const SecondarySquareButton = React.forwardRef(
191
+ (props, ref) => {
192
+ const Element = props.as || defaultElement$2;
193
+ return (
194
+ // @ts-expect-error type error due to props not being BaseButtonProps
195
+ /* @__PURE__ */ jsxRuntime.jsx(SquareButton, { as: Element, ref, ...props, variant: "secondary" })
196
+ );
197
+ }
198
+ );
199
+ const defaultElement$1 = "button";
200
+ const SuccessSquareButton = React.forwardRef(
201
+ (props, ref) => {
202
+ const Element = props.as || defaultElement$1;
203
+ return (
204
+ // @ts-expect-error type error due to props not being BaseButtonProps
205
+ /* @__PURE__ */ jsxRuntime.jsx(SquareButton, { as: Element, ref, ...props, variant: "success" })
206
+ );
207
+ }
208
+ );
209
+ const TertiarySquareButton = React.forwardRef(
210
+ (props, ref) => /* @__PURE__ */ jsxRuntime.jsx(SquareButton, { ref, ...props, variant: "tertiary" })
211
+ );
212
+ const defaultElement = "button";
213
+ const IconButton = React.forwardRef(
214
+ ({
215
+ children,
216
+ className,
217
+ disabled = false,
218
+ size = "medium",
219
+ as,
220
+ loading,
221
+ ...rest
222
+ }, ref) => {
223
+ const Element = as || defaultElement;
224
+ const IconWithAriaHidden = React.Children.map(children, (child) => {
225
+ if (React.isValidElement(child)) {
226
+ return React.cloneElement(child, { "aria-hidden": true });
227
+ }
228
+ return child;
229
+ });
230
+ const iconButtonElement = /* @__PURE__ */ jsxRuntime.jsx(
231
+ Element,
232
+ {
233
+ className: classNames(
234
+ "eds-icon-button",
235
+ className,
236
+ {
237
+ "eds-icon-button--disabled": disabled
238
+ },
239
+ `eds-icon-button--size-${size}`
240
+ ),
241
+ disabled,
242
+ "aria-disabled": disabled,
243
+ "aria-busy": loading,
244
+ ref,
245
+ ...rest,
246
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(loader.LoadingDots, {}) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: IconWithAriaHidden })
247
+ }
248
+ );
249
+ if (disabled) {
250
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "eds-icon-button--disabled__wrapper", children: iconButtonElement });
251
+ }
252
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: iconButtonElement });
253
+ }
254
+ );
255
+ utils.warnAboutMissingStyles("button");
256
+ exports.Button = Button;
257
+ exports.ButtonGroup = ButtonGroup;
258
+ exports.FloatingButton = FloatingButton;
259
+ exports.IconButton = IconButton;
260
+ exports.NegativeButton = NegativeButton;
261
+ exports.PrimaryButton = PrimaryButton;
262
+ exports.SecondaryButton = SecondaryButton;
263
+ exports.SecondarySquareButton = SecondarySquareButton;
264
+ exports.SuccessButton = SuccessButton;
265
+ exports.SuccessSquareButton = SuccessSquareButton;
266
+ exports.TertiaryButton = TertiaryButton;
267
+ exports.TertiarySquareButton = TertiarySquareButton;
268
+ //# sourceMappingURL=button.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.cjs.js","sources":["../src/Button.tsx","../src/PrimaryButton.tsx","../src/SecondaryButton.tsx","../src/SuccessButton.tsx","../src/NegativeButton.tsx","../src/TertiaryButton.tsx","../src/ButtonGroup.tsx","../src/FloatingButton.tsx","../src/SquareButton.tsx","../src/SecondarySquareButton.tsx","../src/SuccessSquareButton.tsx","../src/TertiarySquareButton.tsx","../src/IconButton.tsx","../src/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport cx from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { LoadingDots } from '@entur/loader';\nimport './Button.scss';\n\n/** @deprecated use variant=\"secondary\" size=\"small\" instead */\nconst tertiary = 'tertiary';\n\ntype ButtonBaseProps = {\n /** Farge og uttrykk på knappen */\n variant: 'primary' | 'secondary' | 'success' | 'negative' | typeof tertiary;\n /** Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Bredden på knappen.\n * @default 'auto'\n */\n width?: 'fluid' | 'auto';\n /** Innholdet i knappen */\n children: React.ReactNode;\n /** Et HTML-element eller en React-komponent som komponenten tar utgangspunkt i for å lage denne knappevarianten\n * @default \"button\"\n */\n as?: string | React.ElementType;\n /**\n * Tekst som leses opp på skjermleser (nødvendig når knappetekst mangler)\n */\n 'aria-label'?: string;\n};\n\nconst defaultElement = 'button';\n\nexport type ButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ButtonBaseProps>;\n\nexport type ButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ButtonProps<T>,\n) => React.ReactElement | null;\n\nexport const Button: ButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n as,\n children,\n variant = 'primary',\n size = 'medium',\n loading,\n className,\n disabled = false,\n width = 'auto',\n 'aria-label': ariaLabel,\n ...rest\n }: ButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n const childrenArray = React.Children.toArray(children);\n const hasLeadingIcon =\n childrenArray.length > 1 && typeof childrenArray[0] !== 'string';\n const hasTrailingIcon =\n childrenArray.length > 1 &&\n typeof childrenArray[childrenArray.length - 1] !== 'string';\n\n const ariaLabelWhenLoading = childrenArray\n .filter(child => typeof child === 'string')\n .join(' ');\n\n const ariaLabelValue = () => {\n if (ariaLabel) return ariaLabel;\n if (loading) return ariaLabelWhenLoading;\n return undefined;\n };\n\n return (\n <Element\n className={cx(\n 'eds-button',\n {\n [`eds-button--variant-${variant}`]: variant,\n [`eds-button--size-${size}`]: size,\n 'eds-button--width-fluid': width === 'fluid',\n 'eds-button--loading': loading,\n 'eds-button--leading-icon': hasLeadingIcon,\n 'eds-button--trailing-icon': hasTrailingIcon,\n },\n className,\n )}\n ref={ref}\n aria-busy={loading}\n disabled={disabled}\n aria-disabled={disabled}\n aria-label={ariaLabelValue()}\n {...rest}\n >\n {loading ? (\n <LoadingDots className=\"eds-button__loading-dots\" />\n ) : (\n children\n )}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { Button } from './Button';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type PrimaryButtonBaseProps = {\n /** Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Bredden på knappen.\n * @default 'auto'\n */\n width?: 'fluid' | 'auto';\n /** Innholdet i knappen */\n children: React.ReactNode;\n};\n\nexport type PrimaryButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, PrimaryButtonBaseProps>;\n\nexport type PrimaryButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: PrimaryButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const PrimaryButton: PrimaryButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: PrimaryButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BaseButtonProps\n return <Button as={Element} {...props} ref={ref} variant=\"primary\" />;\n },\n);\n","import React from 'react';\nimport { Button } from './Button';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type SecondaryButtonBaseProps = {\n /** Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Bredden på knappen.\n * @default 'auto'\n */\n width?: 'fluid' | 'auto';\n /** Innholdet i knappen */\n children: React.ReactNode;\n};\n\nexport type SecondaryButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, SecondaryButtonBaseProps>;\n\nexport type SecondaryButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: SecondaryButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const SecondaryButton: SecondaryButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: SecondaryButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BaseButtonProps\n return <Button as={Element} {...props} ref={ref} variant=\"secondary\" />;\n },\n);\n","import React from 'react';\nimport { Button } from './Button';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type SuccessButtonBaseProps = {\n /** Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Bredden på knappen.\n * @default 'auto'\n */\n width?: 'fluid' | 'auto';\n /** Innholdet i knappen */\n children: React.ReactNode;\n};\n\nexport type SuccessButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, SuccessButtonBaseProps>;\n\nexport type SuccessButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: SuccessButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const SuccessButton: SuccessButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: SuccessButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BaseButtonProps\n return <Button as={Element} {...props} ref={ref} variant=\"success\" />;\n },\n);\n","import React from 'react';\nimport { Button } from './Button';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type NegativeButtonBaseProps = {\n /** Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Bredden på knappen.\n * @default 'auto'\n */\n width?: 'fluid' | 'auto';\n /** Innholdet i knappen */\n children: React.ReactNode;\n};\n\nexport type NegativeButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, NegativeButtonBaseProps>;\n\nexport type NegativeButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: NegativeButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const NegativeButton: NegativeButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: NegativeButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n // @ts-expect-error type error due to props not being BaseButtonProps\n return <Button as={Element} {...props} ref={ref} variant=\"negative\" />;\n },\n);\n","import React from 'react';\nimport { Button } from './Button';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type TertiaryButtonBaseProps = {\n /** Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Bredden på knappen.\n * @default 'auto'\n */\n width?: 'fluid' | 'auto';\n /** Innholdet i knappen */\n children: React.ReactNode;\n};\n\nexport type TertiaryButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, TertiaryButtonBaseProps>;\n\nexport type TertiaryButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: TertiaryButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\n/** @deprecated use SecondaryButton size=\"small\" instead */\nexport const TertiaryButton: TertiaryButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: TertiaryButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n return (\n <Button\n as={Element}\n {...props}\n ref={ref}\n variant=\"tertiary\"\n size=\"small\"\n />\n );\n },\n);\n","import React from 'react';\nimport classNames from 'classnames';\nimport './ButtonGroup.scss';\n\nexport type ButtonGroupProps = {\n /** To eller flere Button-komponenter */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** HTML-elementet eller React-komponenten som lages\n * @default \"div\"\n */\n as?: string | React.ElementType;\n [key: string]: any;\n};\n\nexport const ButtonGroup: React.FC<ButtonGroupProps> = ({\n as: Element = 'div',\n className,\n ...rest\n}) => {\n return (\n <Element className={classNames('eds-button-group', className)} {...rest} />\n );\n};\n","import React from 'react';\nimport classNames from 'classnames';\nimport './FloatingButton.scss';\n\nexport type FloatingButtonProps = {\n /** Beskrivende tekst for skjermlesere */\n 'aria-label': string;\n /** Ikon eller ikon-og-tekst */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Callback når knappen klikkes */\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;\n /** Størrelse på knappen\n * @default \"medium\"\n */\n size?: 'medium' | 'small';\n [key: string]: any;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const FloatingButton: React.FC<FloatingButtonProps> = ({\n className,\n children,\n size = 'medium',\n ...rest\n}) => {\n return (\n <button\n className={classNames(\n 'eds-floating-button',\n { 'eds-floating-button--extended': React.Children.count(children) > 1 },\n { 'eds-floating-button--small': size === 'small' },\n className,\n )}\n type=\"button\"\n {...rest}\n >\n {wrapStringsInSpans(children)}\n </button>\n );\n};\n\nconst wrapStringsInSpans = (children: React.ReactNode) =>\n React.Children.map(children, child =>\n typeof child === 'string' ? <span>{child}</span> : child,\n );\n","import * as React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { LoadingDots } from '@entur/loader';\nimport './SquareButton.scss';\n\nexport type SquareButtonBaseProps = {\n /** Tekst og ikon */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** En type knapp */\n variant?: 'success' | 'secondary' | 'tertiary';\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** DOM-elementet knappen rendres som */\n as?: string | React.ElementType;\n};\n\nexport type SquareButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, SquareButtonBaseProps>;\n\nexport type SquareButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: SquareButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const SquareButton: SquareButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n as,\n children,\n className,\n disabled = false,\n loading = false,\n variant = 'secondary',\n ...rest\n }: SquareButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <Element\n className={classNames(\n 'eds-square-button',\n `eds-square-button--${variant}`,\n {\n 'eds-square-button--loading': loading,\n },\n className,\n )}\n aria-busy={loading}\n disabled={disabled}\n aria-disabled={disabled}\n ref={ref}\n {...rest}\n >\n {React.Children.map(children, child => {\n if (typeof child === 'string') {\n return <span className=\"eds-square-button__label\">{child}</span>;\n }\n return (\n <span className=\"eds-square-button__button\">\n {loading ? (\n <LoadingDots className=\"eds-square-button__loading-dots\" />\n ) : (\n child\n )}\n </span>\n );\n })}\n </Element>\n );\n },\n);\n","import React from 'react';\nimport { SquareButton } from './SquareButton';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype SecondarySquareButtonBaseProps = {\n /** Tekst og ikon, ikon og tekst, eller bare ikon */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n};\n\nexport type SecondarySquareButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, SecondarySquareButtonBaseProps>;\n\nexport type SecondarySquareButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: SecondarySquareButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const SecondarySquareButton: SecondarySquareButtonComponent =\n React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: SecondarySquareButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n return (\n // @ts-expect-error type error due to props not being BaseButtonProps\n <SquareButton as={Element} ref={ref} {...props} variant=\"secondary\" />\n );\n },\n );\n","import React from 'react';\nimport { SquareButton } from './SquareButton';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\ntype SuccessSquareButtonBaseProps = {\n /** Tekst og ikon, ikon og tekst, eller bare ikon */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n};\n\nexport type SuccessSquareButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, SuccessSquareButtonBaseProps>;\n\nexport type SuccessSquareButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: SuccessSquareButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const SuccessSquareButton: SuccessSquareButtonComponent =\n React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: SuccessSquareButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = props.as || defaultElement;\n return (\n // @ts-expect-error type error due to props not being BaseButtonProps\n <SquareButton as={Element} ref={ref} {...props} variant=\"success\" />\n );\n },\n );\n","import React from 'react';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { SquareButton } from './SquareButton';\n\ntype TertiarySquareButtonBaseProps = {\n /** Tekst og ikon, ikon og tekst, eller bare ikon */\n children: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n /** DOM-elementet knappen rendres som */\n as?: string | React.ElementType;\n};\n\nexport type TertiarySquareButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, TertiarySquareButtonBaseProps>;\n\nexport type TertiarySquareButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: TertiarySquareButtonProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'button';\n\nexport const TertiarySquareButton: TertiarySquareButtonComponent =\n React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n props: TertiarySquareButtonProps<T>,\n ref: PolymorphicRef<T>,\n // @ts-expect-error TS error seems to stem from how the props are built up\n ) => <SquareButton ref={ref} {...props} variant=\"tertiary\" />,\n );\n","import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\nimport { LoadingDots } from '@entur/loader';\nimport './IconButton.scss';\n\nexport type IconButtonBaseProps = {\n /** Ikonet som du vil ha inne i knappen */\n children: React.ReactNode;\n /** Tekst som forklarer knappens handling. MÅ være satt hvis du ikke har en forklarende tooltip på knappen */\n 'aria-label'?: string;\n /** Ekstra klassenavn */\n className?: string;\n /** Deaktivering av knappen\n * @default false\n */\n disabled?: boolean;\n /** HTML-elementet eller React-komponenten som lager knappen\n * @default 'button'\n */\n as?: React.ElementType;\n /**Størrelsen på knappen\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n /** Om knappen er opptatt, f.eks. med å lagre eller å kjøpe\n * @default false\n */\n loading?: boolean;\n};\n\nconst defaultElement = 'button';\n\nexport type IconButtonProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, IconButtonBaseProps>;\n\nexport type IconButtonComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: IconButtonProps<T>,\n) => React.ReactElement | null;\n\nexport const IconButton: IconButtonComponent = React.forwardRef(\n <T extends React.ElementType = typeof defaultElement>(\n {\n children,\n className,\n disabled = false,\n size = 'medium',\n as,\n loading,\n ...rest\n }: IconButtonProps<T>,\n ref: PolymorphicRef<T>,\n ) => {\n const Element: React.ElementType = as || defaultElement;\n\n const IconWithAriaHidden = React.Children.map(children, child => {\n if (React.isValidElement(child)) {\n // @ts-expect-error aria-hidden does, in fact, exist\n return React.cloneElement(child, { 'aria-hidden': true });\n }\n return child;\n });\n\n const iconButtonElement = (\n <Element\n className={classNames(\n 'eds-icon-button',\n className,\n {\n 'eds-icon-button--disabled': disabled,\n },\n `eds-icon-button--size-${size}`,\n )}\n disabled={disabled}\n aria-disabled={disabled}\n aria-busy={loading}\n ref={ref}\n {...rest}\n >\n {loading ? <LoadingDots /> : <>{IconWithAriaHidden}</>}\n </Element>\n );\n\n if (disabled) {\n return (\n <div className=\"eds-icon-button--disabled__wrapper\">\n {iconButtonElement}\n </div>\n );\n }\n return <>{iconButtonElement}</>;\n },\n);\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('button');\n\nexport * from './Button';\nexport * from './PrimaryButton';\nexport * from './SecondaryButton';\nexport * from './SuccessButton';\nexport * from './NegativeButton';\nexport * from './TertiaryButton';\nexport * from './ButtonGroup';\nexport * from './FloatingButton';\nexport * from './SecondarySquareButton';\nexport * from './SuccessSquareButton';\nexport * from './TertiarySquareButton';\nexport * from './IconButton';\n"],"names":["defaultElement","React","jsx","cx","LoadingDots","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAMA,mBAAiB;AAWhB,MAAM,SAA0BC,iBAAM;AAAA,EAC3C,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,UAA6B,MAAMD;AACzC,UAAM,gBAAgBC,iBAAM,SAAS,QAAQ,QAAQ;AACrD,UAAM,iBACJ,cAAc,SAAS,KAAK,OAAO,cAAc,CAAC,MAAM;AAC1D,UAAM,kBACJ,cAAc,SAAS,KACvB,OAAO,cAAc,cAAc,SAAS,CAAC,MAAM;AAErD,UAAM,uBAAuB,cAC1B,OAAO,CAAA,UAAS,OAAO,UAAU,QAAQ,EACzC,KAAK,GAAG;AAEX,UAAM,iBAAiB,MAAM;AAC3B,UAAI,UAAW,QAAO;AACtB,UAAI,QAAS,QAAO;AACpB,aAAO;AAAA,IACT;AAEA,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC;AAAAA,UACT;AAAA,UACA;AAAA,YACE,CAAC,uBAAuB,OAAO,EAAE,GAAG;AAAA,YACpC,CAAC,oBAAoB,IAAI,EAAE,GAAG;AAAA,YAC9B,2BAA2B,UAAU;AAAA,YACrC,uBAAuB;AAAA,YACvB,4BAA4B;AAAA,YAC5B,6BAA6B;AAAA,UAAA;AAAA,UAE/B;AAAA,QAAA;AAAA,QAEF;AAAA,QACA,aAAW;AAAA,QACX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