@helsenorge/designsystem-react 7.0.0 → 7.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.
- package/CHANGELOG.md +2 -0
- package/_virtual/_cloneBuffer.js +5 -0
- package/_virtual/_cloneBuffer.js.map +1 -0
- package/_virtual/_commonjs-dynamic-modules.js +7 -0
- package/_virtual/_commonjs-dynamic-modules.js.map +1 -0
- package/_virtual/_commonjsHelpers.js +9 -0
- package/_virtual/_commonjsHelpers.js.map +1 -0
- package/_virtual/_nodeUtil.js +5 -0
- package/_virtual/_nodeUtil.js.map +1 -0
- package/_virtual/assert.js +5 -0
- package/_virtual/assert.js.map +1 -0
- package/_virtual/ast.js +5 -0
- package/_virtual/ast.js.map +1 -0
- package/_virtual/code.js +5 -0
- package/_virtual/code.js.map +1 -0
- package/_virtual/doctrine.js +5 -0
- package/_virtual/doctrine.js.map +1 -0
- package/_virtual/errors.js +5 -0
- package/_virtual/errors.js.map +1 -0
- package/_virtual/index.js +5 -0
- package/_virtual/index.js.map +1 -0
- package/_virtual/index2.js +5 -0
- package/_virtual/index2.js.map +1 -0
- package/_virtual/index3.js +5 -0
- package/_virtual/index3.js.map +1 -0
- package/_virtual/inherits_browser.js +5 -0
- package/_virtual/inherits_browser.js.map +1 -0
- package/_virtual/isBuffer.js +5 -0
- package/_virtual/isBuffer.js.map +1 -0
- package/_virtual/keyword.js +5 -0
- package/_virtual/keyword.js.map +1 -0
- package/_virtual/memoizerific.js +5 -0
- package/_virtual/memoizerific.js.map +1 -0
- package/_virtual/typed.js +5 -0
- package/_virtual/typed.js.map +1 -0
- package/_virtual/types.js +5 -0
- package/_virtual/types.js.map +1 -0
- package/_virtual/util.js +5 -0
- package/_virtual/util.js.map +1 -0
- package/_virtual/utility.js +5 -0
- package/_virtual/utility.js.map +1 -0
- package/_virtual/utils.js +5 -0
- package/_virtual/utils.js.map +1 -0
- package/components/AnchorLink/AnchorLink.js +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Badge/Badge.d.ts +1 -1
- package/components/Badge/Badge.js +14 -18
- package/components/Badge/Badge.js.map +1 -1
- package/components/Badge/Badge.stories.d.ts +2 -1
- package/components/Badge/styles.module.scss +6 -18
- package/components/Badge/styles.module.scss.d.ts +0 -4
- package/components/Button/Button.js +1 -1
- package/components/Button/Button.stories.d.ts +1 -0
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Close/Close.js +1 -1
- package/components/DictionaryTrigger/DictionaryTrigger.js +1 -1
- package/components/Dropdown/Dropdown.d.ts +7 -7
- package/components/Dropdown/Dropdown.js +46 -47
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.stories.d.ts +4 -0
- package/components/Duolist/Duolist.js +1 -1
- package/components/EmptyState/EmptyState.js +1 -1
- package/components/EmptyState/NobodyHome.js +1 -1
- package/components/ErrorWrapper/ErrorWrapper.js +1 -1
- package/components/Expander/Expander.js +1 -1
- package/components/ExpanderHierarchy/Expander.js +1 -1
- package/components/ExpanderHierarchy/ExpanderButton.js +1 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.js +1 -1
- package/components/ExpanderList/ExpanderList.js +1 -1
- package/components/FormGroup/FormGroup.js +1 -1
- package/components/FormLayout/FormLayout.js +1 -1
- package/components/GridExample/GridExample.d.ts +5 -1
- package/components/GridExample/GridExample.js +7 -3
- package/components/GridExample/GridExample.js.map +1 -1
- package/components/HelpBubble/HelpBubble.js +1 -1
- package/components/HelpBubble/HelpBubble.stories.d.ts +4 -0
- package/components/HelpPanel/HelpPanel.js +1 -1
- package/components/HelpQuestion/HelpQuestion.js +1 -1
- package/components/HighlightBox/HighlightBox.js +1 -1
- package/components/HorizontalScroll/HorizontalScroll.js +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Label/Label.js +1 -1
- package/components/Label/SubLabel.js +1 -1
- package/components/LinkList/LinkList.js +1 -1
- package/components/List/List.js +1 -1
- package/components/ListHeader/ListHeader.js +1 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.js +1 -1
- package/components/Loader/Loader.js +1 -1
- package/components/MaxCharacters/MaxCharacters.js +1 -1
- package/components/Modal/Modal.js +1 -1
- package/components/Modal/Modal.stories.d.ts +4 -0
- package/components/NotificationPanel/DetailButton/DetailButton.js +1 -1
- package/components/NotificationPanel/NotificationPanel.js +1 -1
- package/components/Panel/Panel.js +1 -1
- package/components/PanelList/PanelList.js +1 -1
- package/components/PopMenu/PopMenu.js +1 -1
- package/components/PopMenu/PopMenu.stories.d.ts +4 -0
- package/components/PopOver/PopOver.js +1 -1
- package/components/PopOver/PopOver.stories.d.ts +5 -0
- package/components/PromoPanel/PromoPanel.js +1 -1
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/Select/Select.js +1 -1
- package/components/ServiceMessage/ServiceMessage.js +1 -1
- package/components/SharingStatus/SharingStatus.js +1 -1
- package/components/Slider/Slider.js +1 -1
- package/components/Spacer/Spacer.js +1 -1
- package/components/StatusDot/StatusDot.js +1 -1
- package/components/Step/Step.js +1 -1
- package/components/StepButtons/StepButtons.js +1 -1
- package/components/Stepper/Dot.js +1 -1
- package/components/Stepper/Stepper.js +1 -1
- package/components/Table/Table.js +1 -1
- package/components/Table/TableBody/TableBody.js +1 -1
- package/components/Table/TableCell/TableCell.js +1 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.js +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.js +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +1 -1
- package/components/Table/TableHead/TableHead.js +1 -1
- package/components/Table/TableHeadCell/TableHeadCell.js +1 -1
- package/components/Table/TableRow/TableRow.js +1 -1
- package/components/Table/utils.js +1 -1
- package/components/Tag/Tag.js +1 -1
- package/components/TagList/TagList.js +1 -1
- package/components/Textarea/Textarea.js +1 -1
- package/components/Tile/Tile.js +1 -1
- package/components/Title/Title.js +1 -1
- package/components/Tooltip/Tooltip.stories.d.ts +4 -0
- package/components/Tooltip/TooltipWord/TooltipWord.js +1 -1
- package/components/Trigger/Trigger.js +1 -1
- package/components/Validation/Validation.js +1 -1
- package/components/Validation/ValidationSummary.js +1 -1
- package/docs/index.d.ts +7 -0
- package/docs/index.js +9 -0
- package/docs/index.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_cloneBuffer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function r(o) {
|
|
2
|
+
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
3
|
+
}
|
|
4
|
+
export {
|
|
5
|
+
r as commonjsRequire
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=_commonjs-dynamic-modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjs-dynamic-modules.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=_commonjsHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_nodeUtil.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/_virtual/ast.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/_virtual/code.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctrine.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inherits_browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBuffer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoizerific.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/_virtual/util.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -5,7 +5,7 @@ import { useHover as E } from "../../hooks/useHover.js";
|
|
|
5
5
|
import { getColor as m } from "../../theme/currys/color.js";
|
|
6
6
|
import { Icon as N } from "../Icon/Icon.js";
|
|
7
7
|
import _ from "../Icons/ArrowUpRight.js";
|
|
8
|
-
import r from "
|
|
8
|
+
import r from "../AnchorLink/styles.module.scss";
|
|
9
9
|
const C = e.forwardRef((i, f) => {
|
|
10
10
|
const { id: p, href: d, children: h, className: u, target: o = "_self", htmlMarkup: t = "a", onClick: k, testId: b } = i, n = o === "_blank", { hoverRef: a, isHovered: g } = E(
|
|
11
11
|
f
|
|
@@ -4,7 +4,7 @@ import { AnalyticsId as v, IconSize as u } from "../../constants.js";
|
|
|
4
4
|
import { palette as o } from "../../theme/palette.js";
|
|
5
5
|
import { Icon as b } from "../Icon/Icon.js";
|
|
6
6
|
import x from "../Icons/Check.js";
|
|
7
|
-
import a from "
|
|
7
|
+
import a from "../Avatar/styles.module.scss";
|
|
8
8
|
var A = /* @__PURE__ */ ((t) => (t.xsmall = "xsmall", t.small = "small", t))(A || {});
|
|
9
9
|
const I = r.forwardRef(function(c, n) {
|
|
10
10
|
const { children: e, className: i = "", selected: l = !1, variant: s = "normal", size: m = "small", testId: d } = c, f = e.charAt(0).toLocaleUpperCase() + e.substring(1, 2);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PaletteNames } from '../../theme/palette';
|
|
3
|
-
export type BadgeColors = PaletteNames
|
|
3
|
+
export type BadgeColors = Extract<PaletteNames, 'blueberry' | 'cherry' | 'neutral'>;
|
|
4
4
|
export type BadgeChildren = string | number;
|
|
5
5
|
export interface BadgeProps {
|
|
6
6
|
/** Sets the content of the badge. */
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { AnalyticsId as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const { children: s, className:
|
|
7
|
-
|
|
1
|
+
import r from "react";
|
|
2
|
+
import n from "classnames";
|
|
3
|
+
import { AnalyticsId as b } from "../../constants.js";
|
|
4
|
+
import e from "../Badge/styles.module.scss";
|
|
5
|
+
const m = r.forwardRef(function(t, d) {
|
|
6
|
+
const { children: s, className: o = "", color: a = "blueberry", testId: l } = t, c = n(
|
|
7
|
+
e.badge,
|
|
8
8
|
{
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[a["badge--cherry"]]: e === "cherry",
|
|
13
|
-
[a["badge--kiwi"]]: e === "kiwi",
|
|
14
|
-
[a["badge--neutral"]]: e === "neutral",
|
|
15
|
-
[a["badge--plum"]]: e === "plum"
|
|
9
|
+
[e["badge--blueberry"]]: a === "blueberry",
|
|
10
|
+
[e["badge--cherry"]]: a === "cherry",
|
|
11
|
+
[e["badge--neutral"]]: a === "neutral"
|
|
16
12
|
},
|
|
17
|
-
|
|
13
|
+
o
|
|
18
14
|
);
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
}),
|
|
15
|
+
return /* @__PURE__ */ r.createElement("span", { className: c, ref: d, "data-testid": l, "data-analyticsid": b.Badge }, s);
|
|
16
|
+
}), p = m;
|
|
21
17
|
export {
|
|
22
|
-
|
|
18
|
+
p as default
|
|
23
19
|
};
|
|
24
20
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\n\nimport badgeStyles from './styles.module.scss';\n\nexport type BadgeColors = PaletteNames
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\n\nimport badgeStyles from './styles.module.scss';\n\nexport type BadgeColors = Extract<PaletteNames, 'blueberry' | 'cherry' | 'neutral'>;\nexport type BadgeChildren = string | number;\n\nexport interface BadgeProps {\n /** Sets the content of the badge. */\n children: BadgeChildren;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the badge background color. */\n color?: BadgeColors;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\nexport type BadgeType = React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLElement>>;\nconst Badge: BadgeType = React.forwardRef(function BadgeForwardedRef(props: BadgeProps, ref: React.ForwardedRef<HTMLElement>) {\n const { children, className = '', color = 'blueberry', testId } = props;\n const badgeClasses = classNames(\n badgeStyles.badge,\n {\n [badgeStyles['badge--blueberry']]: color === 'blueberry',\n [badgeStyles['badge--cherry']]: color === 'cherry',\n [badgeStyles['badge--neutral']]: color === 'neutral',\n },\n className\n );\n\n return (\n <span className={badgeClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Badge}>\n {children}\n </span>\n );\n});\n\nexport default Badge;\n"],"names":["Badge","React","props","ref","children","className","color","testId","badgeClasses","classNames","badgeStyles","AnalyticsId","Badge$1"],"mappings":";;;;AAuBA,MAAMA,IAAmBC,EAAM,WAAW,SAA2BC,GAAmBC,GAAsC;AAC5H,QAAM,EAAE,UAAAC,GAAU,WAAAC,IAAY,IAAI,OAAAC,IAAQ,aAAa,QAAAC,EAAW,IAAAL,GAC5DM,IAAeC;AAAA,IACnBC,EAAY;AAAA,IACZ;AAAA,MACE,CAACA,EAAY,kBAAkB,CAAC,GAAGJ,MAAU;AAAA,MAC7C,CAACI,EAAY,eAAe,CAAC,GAAGJ,MAAU;AAAA,MAC1C,CAACI,EAAY,gBAAgB,CAAC,GAAGJ,MAAU;AAAA,IAC7C;AAAA,IACAD;AAAA,EAAA;AAIA,SAAAJ,gBAAAA,EAAA,cAAC,QAAK,EAAA,WAAWO,GAAc,KAAAL,GAAU,eAAaI,GAAQ,oBAAkBI,EAAY,MAAA,GACzFP,CACH;AAEJ,CAAC,GAEDQ,IAAeZ;"}
|
|
@@ -19,10 +19,11 @@ declare const meta: {
|
|
|
19
19
|
};
|
|
20
20
|
color: {
|
|
21
21
|
control: string;
|
|
22
|
-
options:
|
|
22
|
+
options: string[];
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export default meta;
|
|
27
27
|
type Story = StoryObj<typeof meta>;
|
|
28
28
|
export declare const Default: Story;
|
|
29
|
+
export declare const Variants: Story;
|
|
@@ -12,33 +12,21 @@
|
|
|
12
12
|
padding: 0 0.375rem;
|
|
13
13
|
color: $white;
|
|
14
14
|
background-color: $black;
|
|
15
|
-
|
|
16
|
-
&--white {
|
|
17
|
-
color: $black;
|
|
18
|
-
background-color: $white;
|
|
19
|
-
}
|
|
15
|
+
border: 1px solid;
|
|
20
16
|
|
|
21
17
|
&--blueberry {
|
|
22
18
|
background-color: $blueberry500;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
&--banana {
|
|
26
|
-
background-color: $banana500;
|
|
19
|
+
border-color: $blueberry600;
|
|
27
20
|
}
|
|
28
21
|
|
|
29
22
|
&--cherry {
|
|
30
23
|
background-color: $cherry500;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
&--kiwi {
|
|
34
|
-
background-color: $kiwi500;
|
|
24
|
+
border-color: $cherry600;
|
|
35
25
|
}
|
|
36
26
|
|
|
37
27
|
&--neutral {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&--plum {
|
|
42
|
-
background-color: $plum500;
|
|
28
|
+
color: $black;
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
border-color: $neutral600;
|
|
43
31
|
}
|
|
44
32
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
badge: string;
|
|
3
|
-
'badge--banana': string;
|
|
4
3
|
'badge--blueberry': string;
|
|
5
4
|
'badge--cherry': string;
|
|
6
|
-
'badge--kiwi': string;
|
|
7
5
|
'badge--neutral': string;
|
|
8
|
-
'badge--plum': string;
|
|
9
|
-
'badge--white': string;
|
|
10
6
|
};
|
|
11
7
|
|
|
12
8
|
export type ClassNames = keyof Styles;
|
|
@@ -9,7 +9,7 @@ import { getColor as i } from "../../theme/currys/color.js";
|
|
|
9
9
|
import { breakpoints as bt } from "../../theme/grid.js";
|
|
10
10
|
import { isTest as pt, isProd as dt } from "../../utils/environment.js";
|
|
11
11
|
import ft from "../Icons/ArrowRight.js";
|
|
12
|
-
import t from "
|
|
12
|
+
import t from "../Button/styles.module.scss";
|
|
13
13
|
const ht = (e, r, n, d, s, g) => g && n ? !s || e ? i("neutral", r ? 500 : 700) : i("white") : n ? !s || e ? i("neutral", 500) : `${i("white")}b3` : e && !s || !e && s ? "white" : d === "normal" ? i("blueberry", 600) : i("cherry", 500), N = (e, r) => r && e ? v.Small : e ? v.Medium : v.XSmall, gt = (e, r, n) => {
|
|
14
14
|
if (n && e && (r === void 0 || r === ""))
|
|
15
15
|
throw new Error("Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav");
|
|
@@ -9,7 +9,7 @@ import { uuid as ce } from "../../utils/uuid.js";
|
|
|
9
9
|
import { Icon as re } from "../Icon/Icon.js";
|
|
10
10
|
import oe from "../Icons/Check.js";
|
|
11
11
|
import { getLabelText as ae, renderLabelAsParent as le } from "../Label/Label.js";
|
|
12
|
-
import e from "
|
|
12
|
+
import e from "../Checkbox/styles.module.scss";
|
|
13
13
|
const I = l.forwardRef((x, d) => {
|
|
14
14
|
const {
|
|
15
15
|
className: N,
|
|
@@ -7,7 +7,7 @@ import { palette as v } from "../../theme/palette.js";
|
|
|
7
7
|
import { mergeRefs as I } from "../../utils/refs.js";
|
|
8
8
|
import { Icon as B } from "../Icon/Icon.js";
|
|
9
9
|
import N from "../Icons/X.js";
|
|
10
|
-
import t from "
|
|
10
|
+
import t from "../Close/styles.module.scss";
|
|
11
11
|
const g = e.forwardRef(function(r, s) {
|
|
12
12
|
const { small: o, testId: a, ariaLabel: l = "Lukk", onClick: m, className: i, color: c = v.blueberry600 } = r, n = y(), { hoverRef: f, isHovered: p } = R(), d = n === C.xs || o ? 38 : 48, u = b(t.close, { [t["close--small"]]: o }, i);
|
|
13
13
|
return /* @__PURE__ */ e.createElement(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import d from "classnames";
|
|
3
3
|
import { AnalyticsId as g } from "../../constants.js";
|
|
4
|
-
import m from "
|
|
4
|
+
import m from "../DictionaryTrigger/styles.module.scss";
|
|
5
5
|
const r = t.forwardRef(
|
|
6
6
|
({ children: a, selected: e = !1, className: i, testId: o, ...s }, n) => {
|
|
7
7
|
const c = d(m.dictionarytrigger, i);
|
|
@@ -6,9 +6,9 @@ export declare enum DropdownMode {
|
|
|
6
6
|
oncherry = "oncherry"
|
|
7
7
|
}
|
|
8
8
|
export interface DropdownProps {
|
|
9
|
-
/** Label for dropdown.
|
|
9
|
+
/** Label for dropdown. Visible for screen readers */
|
|
10
10
|
label: string;
|
|
11
|
-
/**
|
|
11
|
+
/** Text on the trigger button that opens the dropdown */
|
|
12
12
|
placeholder: string;
|
|
13
13
|
/** Sets the dropdown content */
|
|
14
14
|
children: React.ReactNode;
|
|
@@ -16,19 +16,19 @@ export interface DropdownProps {
|
|
|
16
16
|
closeText?: string;
|
|
17
17
|
/** No close button */
|
|
18
18
|
noCloseButton?: boolean;
|
|
19
|
-
/** Called when dropdown is open/closed
|
|
19
|
+
/** Called when dropdown is open/closed */
|
|
20
20
|
onToggle?: (isOpen: boolean) => void;
|
|
21
|
-
/**
|
|
21
|
+
/** Whether the dropdown is open or not */
|
|
22
22
|
open?: boolean;
|
|
23
23
|
/** Changes the visuals of the dropdown */
|
|
24
24
|
mode?: keyof typeof DropdownMode;
|
|
25
|
-
/** Makes the background transparent */
|
|
25
|
+
/** Makes the background of the trigger transparent */
|
|
26
26
|
transparent?: boolean;
|
|
27
|
-
/** Makes the
|
|
27
|
+
/** Makes the width of the full component adjust to its parent */
|
|
28
28
|
fluid?: boolean;
|
|
29
29
|
/** Makes the dropdown disabled */
|
|
30
30
|
disabled?: boolean;
|
|
31
|
-
/** Sets the data-testid attribute on the dropdown button
|
|
31
|
+
/** Sets the data-testid attribute on the dropdown button */
|
|
32
32
|
testId?: string;
|
|
33
33
|
/** Overrides the default z-index of the DropDownContent */
|
|
34
34
|
zIndex?: number;
|