@helsenorge/designsystem-react 1.0.1 → 1.2.1

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 (57) 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-eebb821b.js → Modal-055c753d.js} +2 -2
  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/HorizontalScroll/index.js +1 -1
  27. package/components/HorizontalScroll/styles.module.scss +2 -0
  28. package/components/Modal/index.js +1 -1
  29. package/components/NotificationPanel/NotificationPanel.d.ts +7 -19
  30. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  31. package/components/NotificationPanel/componentdata.json +8 -212
  32. package/components/NotificationPanel/index.js +1 -1
  33. package/components/Panel/Panel.d.ts.map +1 -1
  34. package/components/Panel/index.js +1 -1
  35. package/components/Panel/styles.module.scss +38 -38
  36. package/components/Panel/styles.module.scss.d.ts +2 -1
  37. package/components/PanelList/index.js +1 -1
  38. package/components/Table/TableExpandedRow.js +1 -1
  39. package/components/Table/TableExpanderCell.js +1 -1
  40. package/components/Table/TableRow.js +1 -1
  41. package/components/Table/index.js +1 -1
  42. package/hooks/useIsVisible.d.ts +2 -1
  43. package/hooks/useIsVisible.d.ts.map +1 -1
  44. package/index.js +1 -1
  45. package/package.json +1 -1
  46. package/{useIsVisible-27ff4012.js → useIsVisible-2ffbdea2.js} +2 -2
  47. package/useIsVisible-2ffbdea2.js.map +1 -0
  48. package/Button-78f848e6.js +0 -2
  49. package/Button-78f848e6.js.map +0 -1
  50. package/HorizontalScroll-d65b118a.js +0 -2
  51. package/HorizontalScroll-d65b118a.js.map +0 -1
  52. package/Modal-eebb821b.js.map +0 -1
  53. package/Panel-1ce6fe37.js.map +0 -1
  54. package/TableExpandedRow-44b09912.js.map +0 -1
  55. package/TableExpanderCell-015d3db2.js.map +0 -1
  56. package/TableRow-692099ee.js.map +0 -1
  57. package/useIsVisible-27ff4012.js.map +0 -1
@@ -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
8
  "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"
9
+ "name": "AriaLabelAttributesConfig"
214
10
  },
215
11
  "declarations": [
216
12
  {
217
13
  "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
218
- "name": "NotificationPanelProps"
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
27
  "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
232
- "name": "NotificationPanelProps"
28
+ "name": "AriaLabelAttributesConfig"
233
29
  },
234
30
  "declarations": [
235
31
  {
236
32
  "fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
237
- "name": "NotificationPanelProps"
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{d as e}from"../../_rollupPluginBabelHelpers-0f007973.js";import a from"react";import{c as o}from"../../index-d1c0552c.js";import i from"./styles.module.scss";import{C as t}from"../../Close-08d48540.js";import{A as r}from"../../constants-dbdea596.js";import{u as n}from"../../useUuid-3b1e73f2.js";import{p as l}from"../../palette-f206f488.js";import{I as s}from"../../Icon-d69d65b3.js";import{I as c}from"../../InfoSignStroke-f10d62aa.js";import{A as m}from"../../AlertSignStroke-32f09751.js";import{A as d}from"../../AlertSignFill-5df5b7c7.js";import"../../X-867957f2.js";import"../Close/styles.module.scss";import"../../useBreakpoint-a74f5af5.js";import"../../grid-c105cad1.js";import"../../uuid-11037462.js";import"../../_tslib-b219470a.js";var f={info:a.createElement(s,{svgIcon:c,color:l.kiwi900,hoverColor:l.kiwi900}),warn:a.createElement(s,{svgIcon:m,color:"black",hoverColor:"black"}),alert:a.createElement(s,{svgIcon:d,color:l.cherry500,hoverColor:l.cherry500}),alertLabel:a.createElement(s,{svgIcon:m,color:l.cherry500,hoverColor:l.cherry500}),crisis:a.createElement(s,{svgIcon:d,color:l.banana200,hoverColor:l.banana200})},p=function(e){var a=e.label,o=e.id;return o?{"aria-labelledby":o}:a?{"aria-label":a}:void 0},b=function(t){var r=t.fluid,n=t.variant,l=t.shadow,s=t.children;if(r){var c=o(i["fluid-wrapper"],i["fluid-wrapper--".concat(n)],e({},i["fluid-wrapper--shadow"],l));return a.createElement("div",{className:c},s)}return s},u=a.forwardRef((function(l,s){var c,m,d=l.children,u=l.variant,v=void 0===u?"info":u,h=l.shadow,j=void 0!==h&&h,_=l.dismissable,E=void 0!==_&&_,g=l.onClick,w=l.label,C=l.fluid,I=void 0!==C&&C,y=l.size,k=l.className,N=l.testId,S=n(),A=!!w&&!d,L=o(i["notification-panel"],y&&i["notification-panel--".concat(y)],i["notification-panel--".concat(v)],(e(c={},i["notification-panel--shadow"],!I&&j),e(c,i["notification-panel--has-children"],!!d),e(c,i["notification-panel--label-only"],A),e(c,i["notification-panel--dismissable"],!A&&E),c),k),B=p({label:w,id:S});return a.createElement(b,null,a.createElement("section",Object.assign({ref:s,"data-testid":N,"data-analyticsid":r.NotificationPanel,className:L},B),a.createElement("span",{className:i["notification-panel__icon"]},f["alert"===v&&w&&!d?"alertLabel":v]),!A&&E&&a.createElement("span",{className:i["notification-panel__close"]},a.createElement(t,{ariaLabel:l.ariaLabelCloseBtn,onClick:g})),(m=o(i["notification-panel__content"],i["notification-panel__content--".concat(v)]),a.createElement("div",{className:m,id:w?void 0:S},w&&a.createElement("h1",{className:i["notification-panel__label"],dangerouslySetInnerHTML:{__html:w},id:S}),d))))}));export{u as default,p as getAriaLabelAttributes};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAe,EAAE,WAAW,EAAE,UAAU,EAAkB,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAgB5D,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,eAAe,CAAC,EAAE,SAAS,C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973.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
@@ -25,11 +25,22 @@
25
25
  }
26
26
  }
27
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
+
28
38
  .panel {
29
39
  @include panel-padding;
30
40
  outline: none;
31
41
  position: relative;
32
42
  width: 100%;
43
+ box-sizing: border-box;
33
44
 
34
45
  &__container {
35
46
  @media (min-width: map-get($grid-breakpoints, sm)) {
@@ -112,7 +123,6 @@
112
123
  flex-direction: column;
113
124
  @media (min-width: map-get($grid-breakpoints, lg)) {
114
125
  align-self: end;
115
- max-width: 300px;
116
126
  }
117
127
 
118
128
  &--layout3 {
@@ -129,7 +139,8 @@
129
139
  }
130
140
 
131
141
  &__details-btn {
132
- &--pull-right {
142
+
143
+ @media (min-width: map-get($grid-breakpoints, lg)) {
133
144
  align-self: end;
134
145
  }
135
146
  }
@@ -138,19 +149,13 @@
138
149
 
139
150
  &--fill {
140
151
  background-color: $neutral50;
141
-
142
- &:hover {
143
- background-color: $neutral100;
144
- }
145
-
146
- &:focus {
147
- box-shadow: inset 0px 0px 0px 3px $neutral600;
148
- }
149
152
  }
150
153
 
151
- &--selected#{&}--fill {
154
+ &--fill#{&}--selected {
152
155
  background-color: $neutral100;
153
- border-bottom: 0;
156
+ }
157
+
158
+ &--fill#{&}--selected#{&}--clickable {
154
159
  &:hover {
155
160
  background-color: $neutral200;
156
161
  }
@@ -158,32 +163,25 @@
158
163
 
159
164
  &--white {
160
165
  background-color: $white;
161
- &:hover {
162
- background-color: $neutral100;
163
- }
164
- &:focus {
165
- box-shadow: inset 0px 0px 0px 3px $neutral600;
166
- }
167
166
  }
168
167
 
169
- &--selected#{&}--white {
168
+ &--fill#{&}--clickable,
169
+ &--white#{&}--clickable {
170
+ @include hover-and-focus-effects($neutral100, $neutral600);
171
+ }
172
+
173
+ &--white#{&}--selected {
170
174
  box-shadow: inset 0px 0px 0px 6px $neutral100;
171
- &:hover {
172
- background-color: $neutral100;
173
- }
174
- &:focus {
175
- box-shadow: inset 0px 0px 0px 3px $neutral600;
176
- }
177
175
  }
178
176
 
179
177
  &--stroke {
180
178
  border: 6px solid $neutral100;
181
- &:hover {
182
- background-color: $neutral50;
183
- }
179
+ }
180
+
181
+ &--stroke#{&}--clickable {
182
+ @include hover-and-focus-effects($neutral50, $neutral100);
184
183
  &:focus {
185
184
  border-color: $neutral600;
186
- box-shadow: inset 0px 0px 0px 3px $neutral100;
187
185
  }
188
186
  }
189
187
 
@@ -192,22 +190,23 @@
192
190
  border-color: $neutral500;
193
191
  border-top: 1px solid;
194
192
  border-bottom: 1px solid;
195
- &:hover {
196
- background-color: $neutral50;
197
- }
198
- &:focus {
199
- border-color: transparent;
200
- box-shadow: inset 0px 0px 0px 3px $neutral600;
201
- }
202
193
  }
203
194
 
204
- &--selected#{&}--line {
195
+ &--line#{&}--clickable {
196
+ @include hover-and-focus-effects($neutral50, $neutral600);
197
+ }
198
+
199
+ &--line#{&}--selected {
205
200
  background-color: $neutral50;
206
201
  border-bottom: 0;
202
+ }
203
+
204
+ &--line#{&}--selected#{&}--clickable {
207
205
  &:hover {
208
206
  background-color: $neutral100;
209
207
  }
210
208
  }
209
+
211
210
  &--no-top-border#{&}--line {
212
211
  border-top: none;
213
212
  }
@@ -254,7 +253,8 @@
254
253
  @include panel-padding;
255
254
 
256
255
  &--open {
257
- display: block;
256
+ display: flex;
257
+ flex-direction: column;
258
258
  }
259
259
  &--line {
260
260
  background: $white;
@@ -15,10 +15,11 @@ export type Styles = {
15
15
  'panel__content-right--layout3a': string;
16
16
  'panel__content-right--layout3b': string;
17
17
  'panel__content-right--layout3c': string;
18
- 'panel__details-btn--pull-right': string;
18
+ 'panel__details-btn': string;
19
19
  panel__icon: string;
20
20
  'panel__icon--right': string;
21
21
  'panel--button': string;
22
+ 'panel--clickable': string;
22
23
  'panel--draft': string;
23
24
  'panel--error': string;
24
25
  'panel--fill': string;
@@ -1,2 +1,2 @@
1
- import s from"react";import e from"./styles.module.scss";import{A as t}from"../../constants-dbdea596.js";import{b as r,P as o}from"../../Panel-1ce6fe37.js";import{c as i}from"../../index-d1c0552c.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../_tslib-b219470a.js";import"../Panel/styles.module.scss";import"../../Title-01820508.js";import"../Title/styles.module.scss";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";var a=s.forwardRef((function(a,l){var m=a.testId,p=a.children,d=a.variant,n=void 0===d?r.fill:d;return s.createElement("div",{ref:l,"data-testid":m,className:e["panel-list"],"data-analyticsid":t.PanelList},s.Children.map(p,(function(t,a){return p=t,s.isValidElement(p)&&p.type===o?(l=t,m=0===a,s.cloneElement(l,{variant:n,noTopBorder:n===r.line&&!m,className:i(l.props.className,n!==r.line&&e["panel-list__panel"])})):t;var l,m,p})))}));export{a as default};
1
+ import s from"react";import e from"./styles.module.scss";import{A as t}from"../../constants-dbdea596.js";import{b as r,P as o}from"../../Panel-f52d1b19.js";import{c as i}from"../../index-d1c0552c.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../_tslib-b219470a.js";import"../Panel/styles.module.scss";import"../../Title-01820508.js";import"../Title/styles.module.scss";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";var a=s.forwardRef((function(a,l){var m=a.testId,p=a.children,d=a.variant,n=void 0===d?r.fill:d;return s.createElement("div",{ref:l,"data-testid":m,className:e["panel-list"],"data-analyticsid":t.PanelList},s.Children.map(p,(function(t,a){return p=t,s.isValidElement(p)&&p.type===o?(l=t,m=0===a,s.cloneElement(l,{variant:n,noTopBorder:n===r.line&&!m,className:i(l.props.className,n!==r.line&&e["panel-list__panel"])})):t;var l,m,p})))}));export{a as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{T as TableExpandedRow,T as default}from"../../TableExpandedRow-44b09912.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Button-78f848e6.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.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"../../ChevronUp-dfafe27b.js";
1
+ export{T as TableExpandedRow,T as default}from"../../TableExpandedRow-9c134fef.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Button-0917df8e.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.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"../../ChevronUp-dfafe27b.js";
2
2
  //# sourceMappingURL=TableExpandedRow.js.map
@@ -1,2 +1,2 @@
1
- export{T as TableExpanderCell,T as default}from"../../TableExpanderCell-015d3db2.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Icon-d69d65b3.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.js";import"../../useUuid-3b1e73f2.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../uuid-11037462.js";import"../../Button-78f848e6.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.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";
1
+ export{T as TableExpanderCell,T as default}from"../../TableExpanderCell-c1819f4b.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Icon-d69d65b3.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.js";import"../../useUuid-3b1e73f2.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"../../uuid-11037462.js";import"../../Button-0917df8e.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.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";
2
2
  //# sourceMappingURL=TableExpanderCell.js.map
@@ -1,2 +1,2 @@
1
- export{T as TableRow,T as default}from"../../TableRow-692099ee.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Button-78f848e6.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.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"../../ChevronUp-dfafe27b.js";import"../../ChevronDown-2b3daace.js";
1
+ export{T as TableRow,T as default}from"../../TableRow-f413aebe.js";import"../../_rollupPluginBabelHelpers-0f007973.js";import"react";import"../../index-d1c0552c.js";import"./styles.module.scss";import"../../Button-0917df8e.js";import"../../_tslib-b219470a.js";import"../../constants-dbdea596.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"../../ChevronUp-dfafe27b.js";import"../../ChevronDown-2b3daace.js";
2
2
  //# sourceMappingURL=TableRow.js.map
@@ -1,2 +1,2 @@
1
- import{d as e}from"../../_rollupPluginBabelHelpers-0f007973.js";import o from"react";import{c as r}from"../../index-d1c0552c.js";import s from"./styles.module.scss";import{A as l}from"../../constants-dbdea596.js";import{H as t}from"../../HorizontalScroll-d65b118a.js";export{T as TableBody}from"../../TableBody-eac2c23b.js";export{T as TableCell,a as TextAlign}from"../../TableCell-cc644eb5.js";export{T as TableExpandedRow}from"../../TableExpandedRow-44b09912.js";export{T as TableExpanderCell}from"../../TableExpanderCell-015d3db2.js";export{H as HeaderCategory,T as TableHead}from"../../TableHead-5ed58948.js";export{S as SortDirection,T as TableHeadCell}from"../../TableHeadCell-84651910.js";export{T as TableRow}from"../../TableRow-692099ee.js";import"../../useIsVisible-27ff4012.js";import"../HorizontalScroll/styles.module.scss";import"../../Button-78f848e6.js";import"../../_tslib-b219470a.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"../../ChevronUp-dfafe27b.js";import"../../ChevronDown-2b3daace.js";import"../../ArrowUp-e7787d9c.js";import"../../ArrowDown-88b2c27a.js";var i;!function(e){e.horizontalscroll="horizontalscroll",e.block="block"}(i||(i={}));var d=function(a){var d=a.id,m=a.testId,p=a.className,c=a.children,b=a.smallViewportVariant,n=void 0===b?i.horizontalscroll:b,j=r(s.table,e({},s["table--collapse2col"],n===i.block),p);return o.createElement(t,null,o.createElement("table",{className:j,id:d,"data-testid":m,"data-analyticsid":l.Table},c))};export{i as SmallViewportVariant,d as Table,d as default};
1
+ import{d as e}from"../../_rollupPluginBabelHelpers-0f007973.js";import o from"react";import{c as r}from"../../index-d1c0552c.js";import s from"./styles.module.scss";import{A as l}from"../../constants-dbdea596.js";import{H as t}from"../../HorizontalScroll-a4634c75.js";export{T as TableBody}from"../../TableBody-eac2c23b.js";export{T as TableCell,a as TextAlign}from"../../TableCell-cc644eb5.js";export{T as TableExpandedRow}from"../../TableExpandedRow-9c134fef.js";export{T as TableExpanderCell}from"../../TableExpanderCell-c1819f4b.js";export{H as HeaderCategory,T as TableHead}from"../../TableHead-5ed58948.js";export{S as SortDirection,T as TableHeadCell}from"../../TableHeadCell-84651910.js";export{T as TableRow}from"../../TableRow-f413aebe.js";import"../../useIsVisible-2ffbdea2.js";import"../HorizontalScroll/styles.module.scss";import"../../Button-0917df8e.js";import"../../_tslib-b219470a.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"../../ChevronUp-dfafe27b.js";import"../../ChevronDown-2b3daace.js";import"../../ArrowUp-e7787d9c.js";import"../../ArrowDown-88b2c27a.js";var i;!function(e){e.horizontalscroll="horizontalscroll",e.block="block"}(i||(i={}));var d=function(a){var d=a.id,m=a.testId,p=a.className,c=a.children,b=a.smallViewportVariant,n=void 0===b?i.horizontalscroll:b,f=r(s.table,e({},s["table--collapse2col"],n===i.block),p);return o.createElement(t,null,o.createElement("table",{className:f,id:d,"data-testid":m,"data-analyticsid":l.Table},c))};export{i as SmallViewportVariant,d as Table,d as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -4,7 +4,8 @@
4
4
  * @param ref Element som skal observeres
5
5
  * @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)
6
6
  * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres
7
+ * @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig
7
8
  * @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke
8
9
  */
9
- export declare const useIsVisible: (ref: React.RefObject<HTMLElement>, threshold?: number, options?: IntersectionObserverInit | undefined) => boolean;
10
+ export declare const useIsVisible: (ref: React.RefObject<HTMLElement>, threshold?: number, options?: IntersectionObserverInit | undefined, initial?: boolean) => boolean;
10
11
  //# sourceMappingURL=useIsVisible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,yEAAsD,OAUnH,CAAC"}
1
+ {"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,QAClB,MAAM,SAAS,CAAC,WAAW,CAAC,4FAIhC,OAUF,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{t as theme}from"./index-d1c9177a.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-a74f5af5.js";export{u as useFocusToggle,a as useFocusTrap}from"./useFocusTrap-4a5fb65d.js";export{u as useHover}from"./useHover-18479690.js";export{u as useIntersectionObserver,a as useIsVisible}from"./useIsVisible-27ff4012.js";import{d as e}from"./useSticky-432642c9.js";export{u as useLayoutEvent,a as useSticky}from"./useSticky-432642c9.js";export{u as usePrevious}from"./usePrevious-ae293b10.js";import{_ as s,a as r}from"./_rollupPluginBabelHelpers-0f007973.js";import{useState as o,useEffect as n}from"react";export{b as useKeyboardEvent,c as useOutsideEvent,u as useResizeObserver,a as useToggle}from"./useOutsideEvent-fb86686d.js";export{u as useUuid}from"./useUuid-3b1e73f2.js";export{u as uuid}from"./uuid-11037462.js";export{A as AnalyticsId,F as FormMode,a as FormVariant,I as IconSize,K as KeyboardEventKey,Z as ZIndex}from"./constants-dbdea596.js";import"./palette-f206f488.js";import"./grid-c105cad1.js";var i=function(t){var u=o(),a=s(u,2),i=a[0],f=a[1];return n((function(){if("undefined"!=typeof ResizeObserver){var o=new ResizeObserver((function(e){f(e[0].target.getBoundingClientRect())}));return(null==t?void 0:t.current)&&o.observe(null==t?void 0:t.current),o.disconnect}if("object"===("undefined"==typeof window?"undefined":r(window))){var u=["layoutchange","resize","orientationchange"],n=e((function(){(null==t?void 0:t.current)&&f(t.current.getBoundingClientRect())}),10),a=s(n,2),i=a[0],d=a[1];return u.forEach((function(e){return window.addEventListener(e,i)})),i(),function(){d(),u.forEach((function(e){return window.removeEventListener(e,i)}))}}}),[t]),i};export{i as useSize};
1
+ export{t as theme}from"./index-d1c9177a.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-a74f5af5.js";export{u as useFocusToggle,a as useFocusTrap}from"./useFocusTrap-4a5fb65d.js";export{u as useHover}from"./useHover-18479690.js";export{u as useIntersectionObserver,a as useIsVisible}from"./useIsVisible-2ffbdea2.js";import{d as e}from"./useSticky-432642c9.js";export{u as useLayoutEvent,a as useSticky}from"./useSticky-432642c9.js";export{u as usePrevious}from"./usePrevious-ae293b10.js";import{_ as s,a as r}from"./_rollupPluginBabelHelpers-0f007973.js";import{useState as o,useEffect as n}from"react";export{b as useKeyboardEvent,c as useOutsideEvent,u as useResizeObserver,a as useToggle}from"./useOutsideEvent-fb86686d.js";export{u as useUuid}from"./useUuid-3b1e73f2.js";export{u as uuid}from"./uuid-11037462.js";export{A as AnalyticsId,F as FormMode,a as FormVariant,I as IconSize,K as KeyboardEventKey,Z as ZIndex}from"./constants-dbdea596.js";import"./palette-f206f488.js";import"./grid-c105cad1.js";var i=function(t){var u=o(),a=s(u,2),i=a[0],f=a[1];return n((function(){if("undefined"!=typeof ResizeObserver){var o=new ResizeObserver((function(e){f(e[0].target.getBoundingClientRect())}));return(null==t?void 0:t.current)&&o.observe(null==t?void 0:t.current),o.disconnect}if("object"===("undefined"==typeof window?"undefined":r(window))){var u=["layoutchange","resize","orientationchange"],n=e((function(){(null==t?void 0:t.current)&&f(t.current.getBoundingClientRect())}),10),a=s(n,2),i=a[0],d=a[1];return u.forEach((function(e){return window.addEventListener(e,i)})),i(),function(){d(),u.forEach((function(e){return window.removeEventListener(e,i)}))}}}),[t]),i};export{i as useSize};
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@helsenorge/designsystem-react",
3
3
  "sideEffects": false,
4
- "version": "1.0.1",
4
+ "version": "1.2.1",
5
5
  "description": "The official design system for Helsenorge built with React.",
6
6
  "repository": {
7
7
  "type": "tfs",
@@ -1,2 +1,2 @@
1
- import{_ as r}from"./_rollupPluginBabelHelpers-0f007973.js";import{useEffect as n,useState as e}from"react";var t=function(r,e,t){n((function(){var n=new IntersectionObserver(e,t);return(null==r?void 0:r.current)&&n.observe(r.current),function(){(null==r?void 0:r.current)&&n.unobserve(r.current)}}),[r,t])},o=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2?arguments[2]:void 0,u=e(!1),c=r(u,2),s=c[0],l=c[1],a=function(r){l(r[0].intersectionRatio>=o)};return t(n,a,Object.assign({threshold:o},i)),s};export{o as a,t as u};
2
- //# sourceMappingURL=useIsVisible-27ff4012.js.map
1
+ import{_ as r}from"./_rollupPluginBabelHelpers-0f007973.js";import{useEffect as n,useState as e}from"react";var t=function(r,e,t){n((function(){var n=new IntersectionObserver(e,t);return(null==r?void 0:r.current)&&n.observe(r.current),function(){(null==r?void 0:r.current)&&n.unobserve(r.current)}}),[r,t])},o=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2?arguments[2]:void 0,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=e(u),l=r(c,2),s=l[0],a=l[1],v=function(r){a(r[0].intersectionRatio>=o)};return t(n,v,Object.assign({threshold:o},i)),s};export{o as a,t as u};
2
+ //# sourceMappingURL=useIsVisible-2ffbdea2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsVisible-2ffbdea2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{_ as t,d as e}from"./_rollupPluginBabelHelpers-0f007973.js";import{_ as n}from"./_tslib-b219470a.js";import o from"react";import{A as r,I as l}from"./constants-dbdea596.js";import{g as i}from"./color-e7d082c1.js";import"./Icon-d69d65b3.js";import{L as a}from"./Loader-06293a27.js";import{u as s}from"./useHover-18479690.js";import{u as d}from"./useBreakpoint-a74f5af5.js";import{b as u}from"./grid-c105cad1.js";import{c}from"./index-d1c0552c.js";import m from"./components/Button/styles.module.scss";var b={primary:"blueberry",warning:"banana",danger:"cherry"},f=function(t,e){return e<u.md&&t?l.Small:t?l.Medium:l.XSmall},p=o.forwardRef((function(u,p){var v,_,g,h=u.id,j=u.children,y=u.className,w=void 0===y?"":y,E=u.fluid,I=void 0!==E&&E,k=u.intent,N=void 0===k?"primary":k,x=u.inverted,B=void 0!==x&&x,C=u.htmlMarkup,H=void 0===C?"button":C,O=u.type,F=void 0===O?"button":O,M=u.onClick,S=u.large,z=void 0!==S&&S,A=u.loading,L=void 0!==A&&A,R=u.variant,X=void 0===R?"fill":R,P=u.disabled,q=void 0!==P&&P,D=u.ellipsis,G=void 0!==D&&D,J=u.tabIndex,K=u.testId,Q=u.href,T=u.target,U=n(u,["id","children","className","fluid","intent","inverted","htmlMarkup","type","onClick","large","loading","variant","disabled","ellipsis","tabIndex","testId","href","target"]),V=function(t){var e,n,o,r,l=null,i=null;void 0!==(null===(n=null===(e=t[0])||void 0===e?void 0:e.props)||void 0===n?void 0:n.svgIcon)&&(l=t.shift()),void 0!==(null===(r=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===r?void 0:r.svgIcon)&&(i=t.pop());var a=t.filter((function(t){return t}));return[l,i,a.length>0?a:null]}(o.Children.toArray(j)),W=t(V,3),Y=W[0],Z=W[1],$=W[2],tt=s(p),et=tt.hoverRef,nt=tt.isHovered,ot=function(t,e,n,o,r){return e?i("neutral",600):t&&!o||!t&&o?"white":i(b[n],r?700:600)}("fill"===X,q,N,B,nt),rt=d(),lt="fill"===X,it="outline"===X,at="borderless"===X,st="warning"===N,dt="danger"===N,ut=!(!Y&&!Z||L),ct=Object.assign({},U),mt=c(m.button,(e(v={},m["button--fluid"],I),e(v,m["button--large"],z),e(v,m["button--warning"],st),e(v,m["button--danger"],dt),e(v,m["button--inverted"],B),e(v,m["button--fill"],lt),e(v,m["button--outline"],it),e(v,m["button--borderless"],at),e(v,m["button--with-icon"],ut),e(v,m["button--ellipsis"],G),v),w),bt=c(m.button__content,(e(_={},m["button__content--warning"],st),e(_,m["button__content--danger"],dt),e(_,m["button__content--fill"],lt),e(_,m["button__content--borderless"],at),e(_,m["button__content--outline"],it),e(_,m["button__content--with-icon"],ut&&!at),e(_,m["button__content--large"],z),e(_,m["button__content--ellipsis"],G),e(_,m["button__content--inverted"],B),e(_,m["button__content--fluid"],I),_)),ft=c(m["button__left-fluid-content"],(e(g={},m["button__left-fluid-content--with-icon"],ut),e(g,m["button__left-fluid-content--large"],z),g));function pt(t,e,n,r){var l=t&&t.props&&t.props.color?t.props.color:n;return t&&Object.keys(t).length>0?o.cloneElement(t,{size:e,color:l,isHovered:r}):null}var vt=function(){return $?o.createElement("span",{className:bt},$):null},_t=function(){return o.createElement("span",{className:m["content-wrapper"]},L?o.createElement("div",{className:m["button__left-fluid-content"]},o.createElement(a,{testId:"test-id-loader",color:"fill"!==X||B?b[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,I?o.createElement("div",{className:ft},pt(Y,f(z,rt),ot,nt),vt()):o.createElement(o.Fragment,null,pt(Y,f(z,rt),ot,nt),vt()),pt(Z,l.XSmall,ot,nt)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({id:h,onClick:M,disabled:q,"data-testid":K,"data-analyticsid":r.Button,className:mt,ref:et,tabIndex:J,type:F},ct),_t()),"a"===H&&o.createElement("a",Object.assign({id:h,onClick:M,"data-testid":K,"data-analyticsid":r.Button,className:mt,href:Q,target:T,rel:"_blank"===T?"noopener noreferrer":u.rel,ref:et,tabIndex:J},U),_t()))}));export{p as B,b as i};
2
- //# sourceMappingURL=Button-78f848e6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-78f848e6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import r,{useRef as o}from"react";import{c as l}from"./index-d1c0552c.js";import{a as e}from"./useIsVisible-27ff4012.js";import i from"./components/HorizontalScroll/styles.module.scss";var t=function(t){var a=t.children,n=o(null),c=o(null),s=o(null),m=e(c,1,{root:null==n?void 0:n.current,rootMargin:"3px"}),d=e(s,1,{root:null==n?void 0:n.current,rootMargin:"3px"});return r.createElement("div",{className:i.horizontalscroll},r.createElement("div",{className:i.horizontalscroll__viewport,ref:n},r.createElement("div",{className:l(i.horizontalscroll__indicator,i["horizontalscroll__indicator--left"],!m&&i["horizontalscroll__indicator--visible"])}),r.createElement("div",{className:l(i.horizontalscroll__indicator,i["horizontalscroll__indicator--right"],!d&&i["horizontalscroll__indicator--visible"])}),r.createElement("div",{ref:c}),a,r.createElement("div",{ref:s})))};export{t as H};
2
- //# sourceMappingURL=HorizontalScroll-d65b118a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HorizontalScroll-d65b118a.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal-eebb821b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Panel-1ce6fe37.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableExpandedRow-44b09912.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableExpanderCell-015d3db2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableRow-692099ee.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIsVisible-27ff4012.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}