@helsenorge/designsystem-react 1.0.0 → 1.2.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 (77) hide show
  1. package/Button-0917df8e.js +2 -0
  2. package/Button-0917df8e.js.map +1 -0
  3. package/HorizontalScroll-a4634c75.js +2 -0
  4. package/HorizontalScroll-a4634c75.js.map +1 -0
  5. package/Modal-055c753d.js +2 -0
  6. package/Modal-055c753d.js.map +1 -0
  7. package/{Panel-1ce6fe37.js → Panel-f52d1b19.js} +2 -2
  8. package/Panel-f52d1b19.js.map +1 -0
  9. package/{TableExpandedRow-44b09912.js → TableExpandedRow-9c134fef.js} +2 -2
  10. package/TableExpandedRow-9c134fef.js.map +1 -0
  11. package/{TableExpanderCell-015d3db2.js → TableExpanderCell-c1819f4b.js} +2 -2
  12. package/TableExpanderCell-c1819f4b.js.map +1 -0
  13. package/{TableRow-692099ee.js → TableRow-f413aebe.js} +2 -2
  14. package/TableRow-f413aebe.js.map +1 -0
  15. package/components/Button/Button.d.ts.map +1 -1
  16. package/components/Button/index.js +1 -1
  17. package/components/Button/styles.module.scss +7 -7
  18. package/components/ButtonWithModal/index.js +1 -1
  19. package/components/Dropdown/index.js +1 -1
  20. package/components/Expander/index.js +1 -1
  21. package/components/FormExample/index.js +1 -1
  22. package/components/HighlightBox/HighlightBox.d.ts +2 -0
  23. package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
  24. package/components/HighlightBox/componentdata.json +19 -0
  25. package/components/HighlightBox/index.js +1 -1
  26. package/components/HighlightBox/styles.module.scss +0 -2
  27. package/components/HorizontalScroll/HorizontalScroll.d.ts +4 -0
  28. package/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -0
  29. package/components/HorizontalScroll/componentdata.json +3 -0
  30. package/components/HorizontalScroll/index.d.ts +4 -0
  31. package/components/HorizontalScroll/index.d.ts.map +1 -0
  32. package/components/HorizontalScroll/index.js +2 -0
  33. package/components/HorizontalScroll/index.js.map +1 -0
  34. package/components/HorizontalScroll/styles.module.scss +33 -0
  35. package/components/HorizontalScroll/styles.module.scss.d.ts +14 -0
  36. package/components/Modal/index.js +1 -1
  37. package/components/NotificationPanel/NotificationPanel.d.ts +0 -18
  38. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  39. package/components/NotificationPanel/componentdata.json +12 -216
  40. package/components/NotificationPanel/index.js +1 -1
  41. package/components/NotificationPanel/utils.d.ts +16 -0
  42. package/components/NotificationPanel/utils.d.ts.map +1 -0
  43. package/components/Panel/Panel.d.ts.map +1 -1
  44. package/components/Panel/index.js +1 -1
  45. package/components/Panel/styles.module.scss +38 -39
  46. package/components/Panel/styles.module.scss.d.ts +2 -2321
  47. package/components/PanelList/index.js +1 -1
  48. package/components/PanelList/styles.module.scss +0 -1
  49. package/components/PanelList/styles.module.scss.d.ts +0 -2320
  50. package/components/Table/Table.d.ts +7 -1
  51. package/components/Table/Table.d.ts.map +1 -1
  52. package/components/Table/TableExpandedRow.js +1 -1
  53. package/components/Table/TableExpanderCell.js +1 -1
  54. package/components/Table/TableRow.js +1 -1
  55. package/components/Table/index.js +1 -1
  56. package/components/Table/styles.module.scss +0 -1
  57. package/components/Table/styles.module.scss.d.ts +35 -0
  58. package/hooks/useIsVisible.d.ts +3 -1
  59. package/hooks/useIsVisible.d.ts.map +1 -1
  60. package/index.js +1 -1
  61. package/package.json +1 -1
  62. package/scss/_breakpoints.scss +2 -0
  63. package/scss/_grid.scss +5 -1
  64. package/scss/helsenorge.scss +1 -1
  65. package/{useIsVisible-bef05e5e.js → useFocusTrap-4a5fb65d.js} +2 -2
  66. package/useFocusTrap-4a5fb65d.js.map +1 -0
  67. package/useIsVisible-2ffbdea2.js +2 -0
  68. package/useIsVisible-2ffbdea2.js.map +1 -0
  69. package/Button-78f848e6.js +0 -2
  70. package/Button-78f848e6.js.map +0 -1
  71. package/Modal-3ed00fd4.js +0 -2
  72. package/Modal-3ed00fd4.js.map +0 -1
  73. package/Panel-1ce6fe37.js.map +0 -1
  74. package/TableExpandedRow-44b09912.js.map +0 -1
  75. package/TableExpanderCell-015d3db2.js.map +0 -1
  76. package/TableRow-692099ee.js.map +0 -1
  77. package/useIsVisible-bef05e5e.js.map +0 -1
@@ -25,24 +25,6 @@ interface NotificationPanelProps {
25
25
  /** Sets the data-testid attribute. */
26
26
  testId?: string;
27
27
  }
28
- export declare const variantToColorMap: {
29
- info: {
30
- color: string;
31
- depth: number;
32
- };
33
- warn: {
34
- color: string;
35
- depth: number;
36
- };
37
- alert: {
38
- color: string;
39
- depth: number;
40
- };
41
- crisis: {
42
- color: string;
43
- depth: number;
44
- };
45
- };
46
28
  declare const NotificationPanel: React.ForwardRefExoticComponent<NotificationPanelProps & React.RefAttributes<HTMLDivElement>>;
47
29
  export default NotificationPanel;
48
30
  //# sourceMappingURL=NotificationPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,oBAAY,yBAAyB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7E,oBAAY,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,UAAU,sBAAsB;IAC9B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,K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AC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAiBD,QAAA,MAAM,iBAAiB,+FAqDrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
@@ -1,221 +1,17 @@
1
1
  {
2
2
  "props": {
3
- "className": {
4
- "defaultValue": null,
5
- "description": "Adds custom classes to the element.",
6
- "name": "className",
7
- "parent": {
8
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
9
- "name": "NotificationPanelProps"
10
- },
11
- "declarations": [
12
- {
13
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
14
- "name": "NotificationPanelProps"
15
- }
16
- ],
17
- "required": false,
18
- "type": {
19
- "name": "string"
20
- }
21
- },
22
- "children": {
23
- "defaultValue": null,
24
- "description": "Adds inner child elements.",
25
- "name": "children",
26
- "parent": {
27
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
28
- "name": "NotificationPanelProps"
29
- },
30
- "declarations": [
31
- {
32
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
33
- "name": "NotificationPanelProps"
34
- }
35
- ],
36
- "required": false,
37
- "type": {
38
- "name": "ReactNode"
39
- }
40
- },
41
- "variant": {
42
- "defaultValue": null,
43
- "description": "Changes the visual representation of the notification panel.",
44
- "name": "variant",
45
- "parent": {
46
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
47
- "name": "NotificationPanelProps"
48
- },
49
- "declarations": [
50
- {
51
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
52
- "name": "NotificationPanelProps"
53
- }
54
- ],
55
- "required": false,
56
- "type": {
57
- "name": "enum",
58
- "raw": "NotificationPanelVariants | undefined",
59
- "value": [
60
- {
61
- "value": "undefined"
62
- },
63
- {
64
- "value": "\"info\""
65
- },
66
- {
67
- "value": "\"warn\""
68
- },
69
- {
70
- "value": "\"alert\""
71
- },
72
- {
73
- "value": "\"crisis\""
74
- }
75
- ]
76
- }
77
- },
78
- "shadow": {
79
- "defaultValue": null,
80
- "description": "Adds a shadow effect around the notification panel.",
81
- "name": "shadow",
82
- "parent": {
83
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
84
- "name": "NotificationPanelProps"
85
- },
86
- "declarations": [
87
- {
88
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
89
- "name": "NotificationPanelProps"
90
- }
91
- ],
92
- "required": false,
93
- "type": {
94
- "name": "boolean"
95
- }
96
- },
97
- "size": {
98
- "defaultValue": null,
99
- "description": "Sets a fixed size for the content container.",
100
- "name": "size",
101
- "parent": {
102
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
103
- "name": "NotificationPanelProps"
104
- },
105
- "declarations": [
106
- {
107
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
108
- "name": "NotificationPanelProps"
109
- }
110
- ],
111
- "required": false,
112
- "type": {
113
- "name": "enum",
114
- "raw": "NotificationPanelSizes | undefined",
115
- "value": [
116
- {
117
- "value": "undefined"
118
- },
119
- {
120
- "value": "\"small\""
121
- },
122
- {
123
- "value": "\"medium\""
124
- },
125
- {
126
- "value": "\"large\""
127
- }
128
- ]
129
- }
130
- },
131
- "onClick": {
132
- "defaultValue": null,
133
- "description": "Used in combination with dismissiable property to close the notification panel.",
134
- "name": "onClick",
135
- "parent": {
136
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
137
- "name": "NotificationPanelProps"
138
- },
139
- "declarations": [
140
- {
141
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
142
- "name": "NotificationPanelProps"
143
- }
144
- ],
145
- "required": false,
146
- "type": {
147
- "name": "((e?: MouseEvent<HTMLElement, MouseEvent>) => void) | undefined"
148
- }
149
- },
150
- "dismissable": {
151
- "defaultValue": null,
152
- "description": "Toggles the close button in the top right corner. Will only show if there are children.",
153
- "name": "dismissable",
154
- "parent": {
155
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
156
- "name": "NotificationPanelProps"
157
- },
158
- "declarations": [
159
- {
160
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
161
- "name": "NotificationPanelProps"
162
- }
163
- ],
164
- "required": false,
165
- "type": {
166
- "name": "boolean"
167
- }
168
- },
169
- "fluid": {
170
- "defaultValue": null,
171
- "description": "Enables a fluid outer container that spans the entire width of parent.",
172
- "name": "fluid",
173
- "parent": {
174
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
175
- "name": "NotificationPanelProps"
176
- },
177
- "declarations": [
178
- {
179
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
180
- "name": "NotificationPanelProps"
181
- }
182
- ],
183
- "required": false,
184
- "type": {
185
- "name": "boolean"
186
- }
187
- },
188
3
  "label": {
189
4
  "defaultValue": null,
190
- "description": "Sets a label for the notification panel.",
5
+ "description": "",
191
6
  "name": "label",
192
7
  "parent": {
193
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
194
- "name": "NotificationPanelProps"
195
- },
196
- "declarations": [
197
- {
198
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
199
- "name": "NotificationPanelProps"
200
- }
201
- ],
202
- "required": false,
203
- "type": {
204
- "name": "string"
205
- }
206
- },
207
- "ariaLabelCloseBtn": {
208
- "defaultValue": null,
209
- "description": "Close button aria-label",
210
- "name": "ariaLabelCloseBtn",
211
- "parent": {
212
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
213
- "name": "NotificationPanelProps"
8
+ "fileName": "src/components/NotificationPanel/utils.tsx",
9
+ "name": "AriaLabelAttributesConfig"
214
10
  },
215
11
  "declarations": [
216
12
  {
217
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
218
- "name": "NotificationPanelProps"
13
+ "fileName": "src/components/NotificationPanel/utils.tsx",
14
+ "name": "AriaLabelAttributesConfig"
219
15
  }
220
16
  ],
221
17
  "required": false,
@@ -223,18 +19,18 @@
223
19
  "name": "string"
224
20
  }
225
21
  },
226
- "testId": {
22
+ "id": {
227
23
  "defaultValue": null,
228
- "description": "Sets the data-testid attribute.",
229
- "name": "testId",
24
+ "description": "",
25
+ "name": "id",
230
26
  "parent": {
231
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
232
- "name": "NotificationPanelProps"
27
+ "fileName": "src/components/NotificationPanel/utils.tsx",
28
+ "name": "AriaLabelAttributesConfig"
233
29
  },
234
30
  "declarations": [
235
31
  {
236
- "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
237
- "name": "NotificationPanelProps"
32
+ "fileName": "src/components/NotificationPanel/utils.tsx",
33
+ "name": "AriaLabelAttributesConfig"
238
34
  }
239
35
  ],
240
36
  "required": false,
@@ -1,2 +1,2 @@
1
- import{d as e}from"../../_rollupPluginBabelHelpers-0f007973.js";import a from"react";import{c as o}from"../../index-d1c0552c.js";import{p as i}from"../../palette-f206f488.js";import{I as r}from"../../Icon-d69d65b3.js";import{A as t}from"../../constants-dbdea596.js";import{I as n}from"../../InfoSignStroke-f10d62aa.js";import{A as l}from"../../AlertSignStroke-32f09751.js";import{A as s}from"../../AlertSignFill-5df5b7c7.js";import c from"./styles.module.scss";import{C as m}from"../../Close-08d48540.js";import"../../_tslib-b219470a.js";import"../../useUuid-3b1e73f2.js";import"../../uuid-11037462.js";import"../../X-867957f2.js";import"../Close/styles.module.scss";import"../../useBreakpoint-a74f5af5.js";import"../../grid-c105cad1.js";var f={info:{color:"kiwi",depth:50},warn:{color:"banana",depth:50},alert:{color:"cherry",depth:100},crisis:{color:"black",depth:0}},p={info:a.createElement(r,{svgIcon:n,color:i.kiwi900,hoverColor:i.kiwi900}),warn:a.createElement(r,{svgIcon:l,color:"black",hoverColor:"black"}),alert:a.createElement(r,{svgIcon:s,color:i.cherry500,hoverColor:i.cherry500}),alertLabel:a.createElement(r,{svgIcon:l,color:i.cherry500,hoverColor:i.cherry500}),crisis:a.createElement(r,{svgIcon:s,color:i.banana200,hoverColor:i.banana200})},d=a.forwardRef((function(i,r){var n,l,s=i.children,f=i.variant,d=void 0===f?"info":f,b=i.shadow,h=void 0!==b&&b,u=i.dismissable,v=void 0!==u&&u,_=i.onClick,j=i.label,g=i.fluid,w=void 0!==g&&g,C=i.size,E=i.className,k=i.testId;var y,I=!!j&&!s;return y=a.createElement("div",{ref:r,"data-testid":k,"data-analyticsid":t.NotificationPanel,className:o(c["notification-panel"],C&&c["notification-panel--"+C],c["notification-panel--"+d],(n={},e(n,c["notification-panel--shadow"],!w&&h),e(n,c["notification-panel--has-children"],!I),e(n,c["notification-panel--label-only"],I),e(n,c["notification-panel--dismissable"],!I&&v),n),E)},a.createElement("span",{className:c["notification-panel__icon"]},p["alert"===d&&j&&!s?"alertLabel":d]),!I&&v&&a.createElement("span",{className:c["notification-panel__close"]},a.createElement(m,{ariaLabel:i.ariaLabelCloseBtn,onClick:_})),a.createElement("section",{"aria-label":function(){if(s){var e="";return a.Children.map(s,(function(a){"string"==typeof a&&(e+=a)})),e}return""}(),className:o(c["notification-panel__content"],(l={},e(l,c["notification-panel__content--crisis"],"crisis"===d),e(l,c["notification-panel__content--alert"],"alert"===d),l))},j&&a.createElement("h1",{className:c["notification-panel__label"],dangerouslySetInnerHTML:{__html:j}}),s)),w?a.createElement("div",{className:o(c["fluid-wrapper"],c["fluid-wrapper--"+d],e({},c["fluid-wrapper--shadow"],h))},y):y}));export{d as default,f as variantToColorMap};
1
+ import r from"react";import{p as o}from"../../palette-f206f488.js";import{I as e}from"../../Icon-d69d65b3.js";import"../../constants-dbdea596.js";import{I as a}from"../../InfoSignStroke-f10d62aa.js";import{A as l}from"../../AlertSignStroke-32f09751.js";import{A as t}from"../../AlertSignFill-5df5b7c7.js";import"../../_tslib-b219470a.js";import"../../index-d1c0552c.js";import"../../useUuid-3b1e73f2.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../uuid-11037462.js";var i={info:r.createElement(e,{svgIcon:a,color:o.kiwi900,hoverColor:o.kiwi900}),warn:r.createElement(e,{svgIcon:l,color:"black",hoverColor:"black"}),alert:r.createElement(e,{svgIcon:t,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:r.createElement(e,{svgIcon:l,color:o.cherry500,hoverColor:o.cherry500}),crisis:r.createElement(e,{svgIcon:t,color:o.banana200,hoverColor:o.banana200})},c=function(r){var o=r.label,e=r.id;return e?{"aria-labelledby":e}:o?{"aria-label":o}:void 0};export{c as getAriaLabelAttributes,i as variantToIconMap};
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
1
+ import { AriaAttributes } from 'react';
2
+ export declare const variantToIconMap: {
3
+ info: JSX.Element;
4
+ warn: JSX.Element;
5
+ alert: JSX.Element;
6
+ alertLabel: JSX.Element;
7
+ crisis: JSX.Element;
8
+ };
9
+ interface AriaLabelAttributesConfig {
10
+ label?: string;
11
+ id?: string;
12
+ }
13
+ declare type AriaLabelAttributes = Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'>;
14
+ export declare const getAriaLabelAttributes: (config: AriaLabelAttributesConfig) => AriaLabelAttributes | undefined;
15
+ export {};
16
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/utils.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ9C,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAC;AAEF,UAAU,yBAAyB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,aAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,iBAAiB,CAAC,CAAC;AAElF,eAAO,MAAM,sBAAsB,WAAY,yBAAyB,KAAG,mBAAmB,GAAG,SAahG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx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AC7C,aAAa,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACvC,iEAAiE;IACjE,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IAClC,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AA2ED,QAAA,MAAM,KAAK,uFAyMT,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- export{c as PanelLayout,a as PanelStatus,b as PanelVariant,P as default}from"../../Panel-1ce6fe37.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../_tslib-b219470a.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Title-01820508.js";import"../Title/styles.module.scss";import"../../constants-dbdea596.js";import"../../Button-78f848e6.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../../Icon-d69d65b3.js";import"../../useUuid-3b1e73f2.js";import"../../uuid-11037462.js";import"../../Loader-06293a27.js";import"../Loader/styles.module.scss";import"../../useHover-18479690.js";import"../../useBreakpoint-a74f5af5.js";import"../Button/styles.module.scss";import"../../ChevronDown-2b3daace.js";import"../../ChevronUp-dfafe27b.js";import"../../ArrowRight-43c97f7a.js";import"../../AlertSignFill-5df5b7c7.js";import"../../Pencil-dd3fe667.js";import"../../Calendar-a9aa98de.js";import"../../Watch-3d5fc351.js";import"../../usePrevious-ae293b10.js";import"../../Badge-eebcb720.js";import"../Badge/styles.module.scss";
1
+ export{c as PanelLayout,a as PanelStatus,b as PanelVariant,P as default}from"../../Panel-f52d1b19.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../_tslib-b219470a.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Title-01820508.js";import"../Title/styles.module.scss";import"../../constants-dbdea596.js";import"../../Button-0917df8e.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../../Icon-d69d65b3.js";import"../../useUuid-3b1e73f2.js";import"../../uuid-11037462.js";import"../../Loader-06293a27.js";import"../Loader/styles.module.scss";import"../../useHover-18479690.js";import"../../useBreakpoint-a74f5af5.js";import"../Button/styles.module.scss";import"../../ChevronDown-2b3daace.js";import"../../ChevronUp-dfafe27b.js";import"../../ArrowRight-43c97f7a.js";import"../../AlertSignFill-5df5b7c7.js";import"../../Pencil-dd3fe667.js";import"../../Calendar-a9aa98de.js";import"../../Watch-3d5fc351.js";import"../../usePrevious-ae293b10.js";import"../../Badge-eebcb720.js";import"../Badge/styles.module.scss";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,6 @@
1
1
  @import '../../scss/_spacers.scss';
2
2
  @import '../../scss/_breakpoints.scss';
3
3
  @import '../../scss/_palette.scss';
4
- @import '../../scss/_grid.scss';
5
4
  @import '../../scss/_font-settings.scss';
6
5
 
7
6
  .panel-wrapper {
@@ -26,11 +25,22 @@
26
25
  }
27
26
  }
28
27
 
28
+ @mixin hover-and-focus-effects($background-color, $box-shadow-color) {
29
+ &:hover {
30
+ background-color: $background-color;
31
+ }
32
+
33
+ &:focus {
34
+ box-shadow: inset 0px 0px 0px 3px $box-shadow-color;
35
+ }
36
+ }
37
+
29
38
  .panel {
30
39
  @include panel-padding;
31
40
  outline: none;
32
41
  position: relative;
33
42
  width: 100%;
43
+ box-sizing: border-box;
34
44
 
35
45
  &__container {
36
46
  @media (min-width: map-get($grid-breakpoints, sm)) {
@@ -113,7 +123,6 @@
113
123
  flex-direction: column;
114
124
  @media (min-width: map-get($grid-breakpoints, lg)) {
115
125
  align-self: end;
116
- max-width: 300px;
117
126
  }
118
127
 
119
128
  &--layout3 {
@@ -130,7 +139,8 @@
130
139
  }
131
140
 
132
141
  &__details-btn {
133
- &--pull-right {
142
+
143
+ @media (min-width: map-get($grid-breakpoints, lg)) {
134
144
  align-self: end;
135
145
  }
136
146
  }
@@ -139,19 +149,13 @@
139
149
 
140
150
  &--fill {
141
151
  background-color: $neutral50;
142
-
143
- &:hover {
144
- background-color: $neutral100;
145
- }
146
-
147
- &:focus {
148
- box-shadow: inset 0px 0px 0px 3px $neutral600;
149
- }
150
152
  }
151
153
 
152
- &--selected#{&}--fill {
154
+ &--fill#{&}--selected {
153
155
  background-color: $neutral100;
154
- border-bottom: 0;
156
+ }
157
+
158
+ &--fill#{&}--selected#{&}--clickable {
155
159
  &:hover {
156
160
  background-color: $neutral200;
157
161
  }
@@ -159,32 +163,25 @@
159
163
 
160
164
  &--white {
161
165
  background-color: $white;
162
- &:hover {
163
- background-color: $neutral100;
164
- }
165
- &:focus {
166
- box-shadow: inset 0px 0px 0px 3px $neutral600;
167
- }
168
166
  }
169
167
 
170
- &--selected#{&}--white {
168
+ &--fill#{&}--clickable,
169
+ &--white#{&}--clickable {
170
+ @include hover-and-focus-effects($neutral100, $neutral600);
171
+ }
172
+
173
+ &--white#{&}--selected {
171
174
  box-shadow: inset 0px 0px 0px 6px $neutral100;
172
- &:hover {
173
- background-color: $neutral100;
174
- }
175
- &:focus {
176
- box-shadow: inset 0px 0px 0px 3px $neutral600;
177
- }
178
175
  }
179
176
 
180
177
  &--stroke {
181
178
  border: 6px solid $neutral100;
182
- &:hover {
183
- background-color: $neutral50;
184
- }
179
+ }
180
+
181
+ &--stroke#{&}--clickable {
182
+ @include hover-and-focus-effects($neutral50, $neutral100);
185
183
  &:focus {
186
184
  border-color: $neutral600;
187
- box-shadow: inset 0px 0px 0px 3px $neutral100;
188
185
  }
189
186
  }
190
187
 
@@ -193,22 +190,23 @@
193
190
  border-color: $neutral500;
194
191
  border-top: 1px solid;
195
192
  border-bottom: 1px solid;
196
- &:hover {
197
- background-color: $neutral50;
198
- }
199
- &:focus {
200
- border-color: transparent;
201
- box-shadow: inset 0px 0px 0px 3px $neutral600;
202
- }
203
193
  }
204
194
 
205
- &--selected#{&}--line {
195
+ &--line#{&}--clickable {
196
+ @include hover-and-focus-effects($neutral50, $neutral600);
197
+ }
198
+
199
+ &--line#{&}--selected {
206
200
  background-color: $neutral50;
207
201
  border-bottom: 0;
202
+ }
203
+
204
+ &--line#{&}--selected#{&}--clickable {
208
205
  &:hover {
209
206
  background-color: $neutral100;
210
207
  }
211
208
  }
209
+
212
210
  &--no-top-border#{&}--line {
213
211
  border-top: none;
214
212
  }
@@ -255,7 +253,8 @@
255
253
  @include panel-padding;
256
254
 
257
255
  &--open {
258
- display: block;
256
+ display: flex;
257
+ flex-direction: column;
259
258
  }
260
259
  &--line {
261
260
  background: $white;