@helsenorge/designsystem-react 1.0.0-beta122 → 1.0.0-beta125
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/{Badge-2d8d73dd.js → Badge-f1986705.js} +2 -2
- package/Badge-f1986705.js.map +1 -0
- package/{Button-19ee3464.js → Button-a7ae5afb.js} +2 -2
- package/Button-a7ae5afb.js.map +1 -0
- package/Checkbox-b0271e50.js +2 -0
- package/Checkbox-b0271e50.js.map +1 -0
- package/{Close-476c50c6.js → Close-58f848f6.js} +2 -2
- package/Close-58f848f6.js.map +1 -0
- package/{FormGroup-a776b535.js → FormGroup-9d4dc1ed.js} +2 -2
- package/FormGroup-9d4dc1ed.js.map +1 -0
- package/FormLayout-6bb303ac.js +2 -0
- package/FormLayout-6bb303ac.js.map +1 -0
- package/{Input-cd941f2f.js → Input-b5f362b8.js} +2 -2
- package/Input-b5f362b8.js.map +1 -0
- package/{Loader-2f304e4f.js → Loader-a7566e5f.js} +2 -2
- package/Loader-a7566e5f.js.map +1 -0
- package/{Modal-d0213453.js → Modal-3702a0b8.js} +2 -2
- package/Modal-3702a0b8.js.map +1 -0
- package/{Panel-33611d84.js → Panel-8a6a740c.js} +2 -2
- package/Panel-8a6a740c.js.map +1 -0
- package/{RadioButton-6a868eb3.js → RadioButton-403681d9.js} +2 -2
- package/RadioButton-403681d9.js.map +1 -0
- package/{Textarea-1c857a8a.js → Textarea-47398150.js} +2 -2
- package/Textarea-47398150.js.map +1 -0
- package/Title-53c8b68d.js +2 -0
- package/Title-53c8b68d.js.map +1 -0
- package/{Validation-fa8b28c3.js → Validation-0c27dd5b.js} +2 -2
- package/Validation-0c27dd5b.js.map +1 -0
- package/__mocks__/ResizeObserver.d.ts +6 -0
- package/__mocks__/ResizeObserver.d.ts.map +1 -0
- package/__mocks__/ResizeObserver.js +2 -0
- package/__mocks__/ResizeObserver.js.map +1 -0
- package/__mocks__/useLayoutEvent.d.ts +1 -0
- package/__mocks__/useLayoutEvent.d.ts.map +1 -0
- package/__mocks__/useLayoutEvent.js +2 -0
- package/__mocks__/useLayoutEvent.js.map +1 -0
- package/__mocks__/uuid.d.ts +2 -0
- package/__mocks__/uuid.d.ts.map +1 -0
- package/__mocks__/uuid.js +2 -0
- package/__mocks__/uuid.js.map +1 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Badge/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/Button/styles.module.scss +29 -6
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Close/index.js +1 -1
- package/components/Dropdown/Dropdown.d.ts +36 -0
- package/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/components/Dropdown/componentdata.json +254 -0
- package/components/Dropdown/index.d.ts +4 -0
- package/components/Dropdown/index.d.ts.map +1 -0
- package/components/Dropdown/index.js +2 -0
- package/components/Dropdown/index.js.map +1 -0
- package/components/Dropdown/styles.module.scss +197 -0
- package/components/Expander/index.js +1 -1
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/FormExample/index.js +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/FormLayout/FormLayout.d.ts.map +1 -1
- package/components/FormLayout/index.js +1 -1
- package/components/FormLayout/styles.module.scss +16 -11
- package/components/FormLayout/styles.module.scss.d.ts +5 -4
- package/components/HighlightBox/index.js +1 -1
- package/components/Icons/AcupunctureBack.js +1 -1
- package/components/Icons/AlarmClock.js +1 -1
- package/components/Icons/AlertSignFill.js +1 -1
- package/components/Icons/AlertSignStroke.js +1 -1
- package/components/Icons/Archive.js +1 -1
- package/components/Icons/ArrowLeft.js +1 -1
- package/components/Icons/ArrowRight.js +1 -1
- package/components/Icons/ArrowUpRight.js +1 -1
- package/components/Icons/Attachment.js +1 -1
- package/components/Icons/Avatar.js +1 -1
- package/components/Icons/Bus.js +1 -1
- package/components/Icons/Calendar.js +1 -1
- package/components/Icons/CalendarChange.js +1 -1
- package/components/Icons/CalendarCheck.js +1 -1
- package/components/Icons/CalendarSave.js +1 -1
- package/components/Icons/Change.js +1 -1
- package/components/Icons/Check.js +1 -1
- package/components/Icons/CheckFill.js +1 -1
- package/components/Icons/ChevronDown.js +1 -1
- package/components/Icons/ChevronLeft.js +1 -1
- package/components/Icons/ChevronRight.js +1 -1
- package/components/Icons/ChevronUp.js +1 -1
- package/components/Icons/ChevronsDown.js +1 -1
- package/components/Icons/ChevronsUp.js +1 -1
- package/components/Icons/Contacts.js +1 -1
- package/components/Icons/Copy.js +1 -1
- package/components/Icons/Download.js +1 -1
- package/components/Icons/EChat.js +1 -1
- package/components/Icons/EnterFullScreen.js +1 -1
- package/components/Icons/Envelope.js +1 -1
- package/components/Icons/Eraser.js +1 -1
- package/components/Icons/ErrorSignFill.js +1 -1
- package/components/Icons/ErrorSignStroke.js +1 -1
- package/components/Icons/ExitFullScreen.js +1 -1
- package/components/Icons/Eye.js +1 -1
- package/components/Icons/Form.js +1 -1
- package/components/Icons/Forward.js +1 -1
- package/components/Icons/Gallery.js +1 -1
- package/components/Icons/Globe.js +1 -1
- package/components/Icons/Group.js +1 -1
- package/components/Icons/Heart.js +1 -1
- package/components/Icons/HelpSign.js +1 -1
- package/components/Icons/History.js +1 -1
- package/components/Icons/Home.js +1 -1
- package/components/Icons/Hospital.js +1 -1
- package/components/Icons/Hourglass.js +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/InfoSignFill.js +1 -1
- package/components/Icons/InfoSignStroke.js +1 -1
- package/components/Icons/Journal.js +1 -1
- package/components/Icons/List.js +1 -1
- package/components/Icons/Location.js +1 -1
- package/components/Icons/Lock.js +1 -1
- package/components/Icons/Medicine.js +1 -1
- package/components/Icons/Menu.js +1 -1
- package/components/Icons/Minus.js +1 -1
- package/components/Icons/MobilePhone.js +1 -1
- package/components/Icons/NoEye.js +1 -1
- package/components/Icons/NoFilter.js +1 -1
- package/components/Icons/PaperPlane.js +1 -1
- package/components/Icons/Pause.js +1 -1
- package/components/Icons/Pencil.js +1 -1
- package/components/Icons/Play.js +1 -1
- package/components/Icons/PlusLarge.js +1 -1
- package/components/Icons/PlusSmall.js +1 -1
- package/components/Icons/Printer.js +1 -1
- package/components/Icons/QrCode.js +1 -1
- package/components/Icons/Receptionist.js +1 -1
- package/components/Icons/Referral.js +1 -1
- package/components/Icons/Refresh.js +1 -1
- package/components/Icons/Reply.js +1 -1
- package/components/Icons/Save.js +1 -1
- package/components/Icons/Search.js +1 -1
- package/components/Icons/SectionSign.js +1 -1
- package/components/Icons/Settings.js +1 -1
- package/components/Icons/Share.js +1 -1
- package/components/Icons/SpeechBubble.js +1 -1
- package/components/Icons/Stopwatch.js +1 -1
- package/components/Icons/SupportingPerson.js +1 -1
- package/components/Icons/Syringe.js +1 -1
- package/components/Icons/TimePassing.js +1 -1
- package/components/Icons/Toolbox.js +1 -1
- package/components/Icons/TrashCan.js +1 -1
- package/components/Icons/Undo.js +1 -1
- package/components/Icons/Upload.js +1 -1
- package/components/Icons/Vaccine.js +1 -1
- package/components/Icons/VerticalDots.js +1 -1
- package/components/Icons/VideoCamera.js +1 -1
- package/components/Icons/VideoChat.js +1 -1
- package/components/Icons/Wallet.js +1 -1
- package/components/Icons/Watch.js +1 -1
- package/components/Icons/X.js +1 -1
- package/components/Icons/Zoom.js +1 -1
- package/components/Icons/index.js +1 -1
- package/components/Input/index.js +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/List/index.js +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Logo/index.js +1 -1
- package/components/Modal/index.js +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/Panel/index.js +1 -1
- package/components/PanelList/index.js +1 -1
- package/components/Portal/index.js +1 -1
- package/components/RadioButton/index.js +1 -1
- package/components/Slider/index.js +1 -1
- package/components/Spacer/index.js +1 -1
- package/components/StatusDot/index.js +1 -1
- package/components/Tag/Tag.d.ts +35 -0
- package/components/Tag/Tag.d.ts.map +1 -0
- package/components/Tag/componentdata.json +223 -0
- package/components/Tag/index.d.ts +4 -0
- package/components/Tag/index.d.ts.map +1 -0
- package/components/Tag/index.js +2 -0
- package/components/Tag/index.js.map +1 -0
- package/components/Tag/styles.module.scss +174 -0
- package/components/Tag/styles.module.scss.d.ts +24 -0
- package/components/TagList/TagList.d.ts +8 -0
- package/components/TagList/TagList.d.ts.map +1 -0
- package/components/TagList/componentdata.json +23 -0
- package/components/TagList/index.d.ts +4 -0
- package/components/TagList/index.d.ts.map +1 -0
- package/components/TagList/index.js +2 -0
- package/components/TagList/index.js.map +1 -0
- package/components/TagList/styles.module.scss +10 -0
- package/components/TagList/styles.module.scss.d.ts +9 -0
- package/components/Textarea/index.js +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Title/index.js +1 -1
- package/components/Validation/index.js +1 -1
- package/constants-088e1d4a.js +2 -0
- package/constants-088e1d4a.js.map +1 -0
- package/constants.d.ts +11 -0
- package/constants.d.ts.map +1 -1
- package/hooks/useKeyboardEvent.d.ts +3 -0
- package/hooks/useKeyboardEvent.d.ts.map +1 -0
- package/hooks/useOutsideEvent.d.ts +9 -0
- package/hooks/useOutsideEvent.d.ts.map +1 -0
- package/hooks/useResizeObserver.d.ts +9 -0
- package/hooks/useResizeObserver.d.ts.map +1 -0
- package/hooks/useToggle.d.ts +12 -0
- package/hooks/useToggle.d.ts.map +1 -0
- package/hooks/useUuid.d.ts +7 -0
- package/hooks/useUuid.d.ts.map +1 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/scss/typography.module.scss.d.ts +25 -25
- package/useOutsideEvent-342977b9.js +2 -0
- package/useOutsideEvent-342977b9.js.map +1 -0
- package/useUuid-24176312.js +2 -0
- package/useUuid-24176312.js.map +1 -0
- package/uuid-11037462.js +2 -0
- package/uuid-11037462.js.map +1 -0
- package/Badge-2d8d73dd.js.map +0 -1
- package/Button-19ee3464.js.map +0 -1
- package/Checkbox-ca6c635d.js +0 -2
- package/Checkbox-ca6c635d.js.map +0 -1
- package/Close-476c50c6.js.map +0 -1
- package/FormGroup-a776b535.js.map +0 -1
- package/FormLayout-8d6d4552.js +0 -2
- package/FormLayout-8d6d4552.js.map +0 -1
- package/Input-cd941f2f.js.map +0 -1
- package/Loader-2f304e4f.js.map +0 -1
- package/Modal-d0213453.js.map +0 -1
- package/Panel-33611d84.js.map +0 -1
- package/RadioButton-6a868eb3.js.map +0 -1
- package/Textarea-1c857a8a.js.map +0 -1
- package/Title-2522b5b9.js +0 -2
- package/Title-2522b5b9.js.map +0 -1
- package/Validation-fa8b28c3.js.map +0 -1
- package/constants-4fe8c7ff.js +0 -2
- package/constants-4fe8c7ff.js.map +0 -1
- package/uuid-fe7442b7.js +0 -2
- package/uuid-fe7442b7.js.map +0 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
{
|
|
2
|
+
"props": {
|
|
3
|
+
"children": {
|
|
4
|
+
"defaultValue": null,
|
|
5
|
+
"description": "Sets the text of the tag",
|
|
6
|
+
"name": "children",
|
|
7
|
+
"parent": {
|
|
8
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
9
|
+
"name": "TagProps"
|
|
10
|
+
},
|
|
11
|
+
"declarations": [
|
|
12
|
+
{
|
|
13
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
14
|
+
"name": "TagProps"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"fileName": "designsystem/node_modules/@types/react/index.d.ts",
|
|
18
|
+
"name": "TypeLiteral"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"required": false,
|
|
22
|
+
"type": {
|
|
23
|
+
"name": "string | (string & {}) | (string & ReactElement<any, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => Component<any, any, any>)>) | (string & ReactNodeArray) | (string & ReactPortal)"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"size": {
|
|
27
|
+
"defaultValue": null,
|
|
28
|
+
"description": "Sets the size of the tag. Default: small",
|
|
29
|
+
"name": "size",
|
|
30
|
+
"parent": {
|
|
31
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
32
|
+
"name": "TagProps"
|
|
33
|
+
},
|
|
34
|
+
"declarations": [
|
|
35
|
+
{
|
|
36
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
37
|
+
"name": "TagProps"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"required": false,
|
|
41
|
+
"type": {
|
|
42
|
+
"name": "enum",
|
|
43
|
+
"raw": "\"medium\" | \"large\" | undefined",
|
|
44
|
+
"value": [
|
|
45
|
+
{
|
|
46
|
+
"value": "undefined"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"value": "\"medium\""
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"value": "\"large\""
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"color": {
|
|
58
|
+
"defaultValue": null,
|
|
59
|
+
"description": "Sets the background of the tag. Not used if action is \"undo\". Default: blueberry",
|
|
60
|
+
"name": "color",
|
|
61
|
+
"parent": {
|
|
62
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
63
|
+
"name": "TagProps"
|
|
64
|
+
},
|
|
65
|
+
"declarations": [
|
|
66
|
+
{
|
|
67
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
68
|
+
"name": "TagProps"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"required": false,
|
|
72
|
+
"type": {
|
|
73
|
+
"name": "enum",
|
|
74
|
+
"raw": "\"banana\" | \"blueberry\" | \"cherry\" | \"kiwi\" | \"neutral\" | \"plum\" | undefined",
|
|
75
|
+
"value": [
|
|
76
|
+
{
|
|
77
|
+
"value": "undefined"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": "\"banana\""
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "\"blueberry\""
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"value": "\"cherry\""
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"value": "\"kiwi\""
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": "\"neutral\""
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"value": "\"plum\""
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"svgIcon": {
|
|
101
|
+
"defaultValue": null,
|
|
102
|
+
"description": "Adds an icon to the tag. Not shown if action is set.",
|
|
103
|
+
"name": "svgIcon",
|
|
104
|
+
"parent": {
|
|
105
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
106
|
+
"name": "TagProps"
|
|
107
|
+
},
|
|
108
|
+
"declarations": [
|
|
109
|
+
{
|
|
110
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
111
|
+
"name": "TagProps"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"required": false,
|
|
115
|
+
"type": {
|
|
116
|
+
"name": "FC<SvgPathProps>"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"variant": {
|
|
120
|
+
"defaultValue": null,
|
|
121
|
+
"description": "",
|
|
122
|
+
"name": "variant",
|
|
123
|
+
"parent": {
|
|
124
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
125
|
+
"name": "TagProps"
|
|
126
|
+
},
|
|
127
|
+
"declarations": [
|
|
128
|
+
{
|
|
129
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
130
|
+
"name": "TagProps"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"required": false,
|
|
134
|
+
"type": {
|
|
135
|
+
"name": "enum",
|
|
136
|
+
"raw": "\"normal\" | \"oncolor\" | \"emphasised\" | undefined",
|
|
137
|
+
"value": [
|
|
138
|
+
{
|
|
139
|
+
"value": "undefined"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"value": "\"normal\""
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"value": "\"oncolor\""
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"value": "\"emphasised\""
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"action": {
|
|
154
|
+
"defaultValue": null,
|
|
155
|
+
"description": "",
|
|
156
|
+
"name": "action",
|
|
157
|
+
"parent": {
|
|
158
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
159
|
+
"name": "TagProps"
|
|
160
|
+
},
|
|
161
|
+
"declarations": [
|
|
162
|
+
{
|
|
163
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
164
|
+
"name": "TagProps"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"required": false,
|
|
168
|
+
"type": {
|
|
169
|
+
"name": "enum",
|
|
170
|
+
"raw": "\"remove\" | \"undo\" | undefined",
|
|
171
|
+
"value": [
|
|
172
|
+
{
|
|
173
|
+
"value": "undefined"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"value": "\"remove\""
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"value": "\"undo\""
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"onClick": {
|
|
185
|
+
"defaultValue": null,
|
|
186
|
+
"description": "",
|
|
187
|
+
"name": "onClick",
|
|
188
|
+
"parent": {
|
|
189
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
190
|
+
"name": "TagProps"
|
|
191
|
+
},
|
|
192
|
+
"declarations": [
|
|
193
|
+
{
|
|
194
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
195
|
+
"name": "TagProps"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"required": false,
|
|
199
|
+
"type": {
|
|
200
|
+
"name": "(() => void)"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"testId": {
|
|
204
|
+
"defaultValue": null,
|
|
205
|
+
"description": "Sets the data-testid attribute on the expander button.",
|
|
206
|
+
"name": "testId",
|
|
207
|
+
"parent": {
|
|
208
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
209
|
+
"name": "TagProps"
|
|
210
|
+
},
|
|
211
|
+
"declarations": [
|
|
212
|
+
{
|
|
213
|
+
"fileName": "src/components/Tag/Tag.tsx",
|
|
214
|
+
"name": "TagProps"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"required": false,
|
|
218
|
+
"type": {
|
|
219
|
+
"name": "string"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as o}from"../../_rollupPluginBabelHelpers-4f206abf.js";import t from"react";import{c as a}from"../../index-9b84fabc.js";import{Icon as e}from"../Icons/Icon.js";import{A as r,I as n}from"../../constants-088e1d4a.js";import{p as c}from"../../palette-f206f488.js";import s from"./styles.module.scss";import{u as i}from"../../useHover-026f72c1.js";import m from"../Icons/Undo.js";import l from"../Icons/X.js";import"../../_tslib-51c8a283.js";var d,u,f;!function(o){o.medium="medium",o.large="large"}(d||(d={})),function(o){o.remove="remove",o.undo="undo"}(u||(u={})),function(o){o.normal="normal",o.oncolor="oncolor",o.emphasised="emphasised"}(f||(f={}));var p=function(o){var d=o.children,u=o.size,f=o.color,p=o.variant,v=o.action,g=o.onClick,b=o.testId,I=i(),j=I.hoverRef,h=I.isHovered,y=a(s.tag,s["tag--".concat(u)],s["tag--".concat(v)],s["tag--has-action"],"remove"===v&&[s["tag--".concat(f)],s["tag--".concat(p)]]);return t.createElement("button",{className:y,onClick:g,ref:j,type:"button","data-testid":b,"data-analyticsid":r.Tag},d,t.createElement(e,{svgIcon:function(){switch(v){case"remove":return l;case"undo":return m}}(),size:n.XXSmall,color:c["".concat("undo"===v?"blueberry":f,"800")],isHovered:h}))};export default function(i){var m=i.children,l=i.size,u=void 0===l?d.medium:l,f=i.color,v=void 0===f?"blueberry":f,g=i.svgIcon,b=i.variant,I=void 0===b?"normal":b,j=i.action,h=i.onClick,y=i.testId,z=a(s.tag,s["tag--".concat(u)],s["tag--".concat(v)],s["tag--".concat(I)],o({},s["tag--has-icon"],g));return j&&h?t.createElement(p,{size:u,color:v,variant:I,action:j,onClick:h,testId:y},m):t.createElement("span",{className:z,"data-testid":y,"data-analyticsid":r.Tag},g&&t.createElement(e,{svgIcon:g,size:n.XXSmall,color:c["".concat(v,"800")],className:s.tag__icon}),m)}export{u as TagAction,d as TagSize,f as TagVariant};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
@import '../../scss/_spacers.scss';
|
|
2
|
+
@import '../../scss/_breakpoints.scss';
|
|
3
|
+
@import '../../scss/_palette.scss';
|
|
4
|
+
@import '../../scss/_font-settings.scss';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Konverter en gjennomsiktig farge til en ugjennomsiktig farge ved å simulere fargen plassert
|
|
8
|
+
* på en bakgrunnsfarge (f.eks. 50% gjennomsiktig $blueberry200 på hvit bakgrunn).
|
|
9
|
+
*
|
|
10
|
+
* Fra https://makandracards.com/makandra/42500-sass-how-to-convert-an-rgba-color-to-its-rgb-look-alike
|
|
11
|
+
*
|
|
12
|
+
* @param $rgba Farge med alpha-verdi, f.eks. rgba(black, 0.67)
|
|
13
|
+
* @param $background Bakgrunnsfarge. Default: $white
|
|
14
|
+
*
|
|
15
|
+
* @returns Farge uten gjennomsiktighet
|
|
16
|
+
*/
|
|
17
|
+
@function rgba-to-rgb($rgba, $background: $white) {
|
|
18
|
+
@return mix(rgb(red($rgba), green($rgba), blue($rgba)), $background, alpha($rgba) * 100%);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.tag {
|
|
22
|
+
$tag: &;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
align-items: center;
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
border-width: 1px;
|
|
28
|
+
border-style: solid;
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
// komponenten bruker ekstra liten font-size og line-height
|
|
31
|
+
font-size: 0.875rem;
|
|
32
|
+
line-height: 1.125rem;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
|
|
35
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
36
|
+
font-size: $font-size-xs;
|
|
37
|
+
line-height: 1.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
$colors: 'blueberry', 'neutral', 'cherry', 'banana', 'kiwi', 'plum';
|
|
41
|
+
|
|
42
|
+
@each $color in $colors {
|
|
43
|
+
&--#{$color},
|
|
44
|
+
// Sørg for at fargene overstyrer dersom tag har type=button
|
|
45
|
+
&--#{$color}[type='button'] {
|
|
46
|
+
// banana og kiwi har unntak fra hovedregelen
|
|
47
|
+
@if $color == 'banana' {
|
|
48
|
+
color: map-get($palette-map, #{$color}900);
|
|
49
|
+
border-color: map-get($palette-map, #{$color}300);
|
|
50
|
+
} @else if $color == 'kiwi' {
|
|
51
|
+
color: map-get($palette-map, #{$color}900);
|
|
52
|
+
border-color: map-get($palette-map, #{$color}200);
|
|
53
|
+
} @else {
|
|
54
|
+
color: map-get($palette-map, #{$color}800);
|
|
55
|
+
border-color: map-get($palette-map, #{$color}200);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&#{$tag}--normal {
|
|
59
|
+
&#{$tag}--has-action {
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: rgba-to-rgb(rgba(map-get($palette-map, #{$color}200), 0.2));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&#{$tag}--oncolor {
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
&#{$tag}--has-action {
|
|
69
|
+
&:hover {
|
|
70
|
+
background-color: map-get($palette-map, #{$color}100);
|
|
71
|
+
border-color: map-get($palette-map, #{$color}100);
|
|
72
|
+
}
|
|
73
|
+
&:focus {
|
|
74
|
+
background-color: $white;
|
|
75
|
+
border-color: $white;
|
|
76
|
+
box-shadow: 0px 0px 0px 3px $black;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&#{$tag}--emphasised {
|
|
82
|
+
@if $color == 'banana' {
|
|
83
|
+
background-color: rgba-to-rgb(rgba(map-get($palette-map, #{$color}300), 0.4));
|
|
84
|
+
} @else {
|
|
85
|
+
background-color: rgba-to-rgb(rgba(map-get($palette-map, #{$color}200), 0.4));
|
|
86
|
+
}
|
|
87
|
+
&#{$tag}--has-action {
|
|
88
|
+
&:hover {
|
|
89
|
+
@if $color == 'banana' {
|
|
90
|
+
background-color: rgba-to-rgb(rgba(map-get($palette-map, #{$color}300), 0.5));
|
|
91
|
+
} @else {
|
|
92
|
+
background-color: rgba-to-rgb(rgba(map-get($palette-map, #{$color}200), 0.5));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--has-action[type='button'] {
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
&:focus {
|
|
103
|
+
outline: none;
|
|
104
|
+
border-color: $black;
|
|
105
|
+
box-shadow: inset 0px 0px 0px 2px $black;
|
|
106
|
+
}
|
|
107
|
+
&#{$tag}--undo {
|
|
108
|
+
color: $blueberry800;
|
|
109
|
+
background-color: $blueberry100;
|
|
110
|
+
border-color: $blueberry100;
|
|
111
|
+
text-decoration: line-through;
|
|
112
|
+
&:hover {
|
|
113
|
+
background-color: $white;
|
|
114
|
+
border-color: $blueberry200;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&--medium {
|
|
120
|
+
padding: 0 getSpacer(xs);
|
|
121
|
+
min-height: 26px;
|
|
122
|
+
|
|
123
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
124
|
+
min-height: 30px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&#{$tag}--has-icon {
|
|
128
|
+
padding: 0 getSpacer(xs) 0 6px;
|
|
129
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
130
|
+
padding: getSpacer(4xs) getSpacer(xs) getSpacer(4xs) 6px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&#{$tag}--has-action {
|
|
135
|
+
padding: 0 getSpacer(3xs) 0 getSpacer(xs);
|
|
136
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
137
|
+
padding: getSpacer(4xs) getSpacer(3xs) getSpacer(4xs) getSpacer(xs);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
#{$tag}__icon {
|
|
142
|
+
margin-right: getSpacer(4xs);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
&--large {
|
|
146
|
+
padding: 0 getSpacer(xs);
|
|
147
|
+
min-height: 30px;
|
|
148
|
+
|
|
149
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
150
|
+
min-height: 34px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&#{$tag}--has-icon {
|
|
154
|
+
padding: getSpacer(4xs) getSpacer(xs) getSpacer(4xs) 6px;
|
|
155
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
156
|
+
padding: getSpacer(3xs) getSpacer(xs) getSpacer(3xs) getSpacer(2xs);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&#{$tag}--has-action {
|
|
161
|
+
padding: getSpacer(4xs) getSpacer(3xs) getSpacer(4xs) getSpacer(xs);
|
|
162
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
163
|
+
padding: getSpacer(3xs) getSpacer(2xs) getSpacer(3xs) getSpacer(xs);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
#{$tag}__icon {
|
|
168
|
+
margin-right: getSpacer(4xs);
|
|
169
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
170
|
+
margin-right: getSpacer(3xs);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
tag: string;
|
|
3
|
+
tag__icon: string;
|
|
4
|
+
'tag--banana': string;
|
|
5
|
+
'tag--blueberry': string;
|
|
6
|
+
'tag--cherry': string;
|
|
7
|
+
'tag--emphasised': string;
|
|
8
|
+
'tag--has-action': string;
|
|
9
|
+
'tag--has-icon': string;
|
|
10
|
+
'tag--kiwi': string;
|
|
11
|
+
'tag--large': string;
|
|
12
|
+
'tag--medium': string;
|
|
13
|
+
'tag--neutral': string;
|
|
14
|
+
'tag--normal': string;
|
|
15
|
+
'tag--oncolor': string;
|
|
16
|
+
'tag--plum': string;
|
|
17
|
+
'tag--undo': string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ClassNames = keyof Styles;
|
|
21
|
+
|
|
22
|
+
declare const styles: Styles;
|
|
23
|
+
|
|
24
|
+
export default styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagList.d.ts","sourceRoot":"","sources":["../../../src/components/TagList/TagList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,iBAAiB;IACzB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAMxC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"props": {
|
|
3
|
+
"testId": {
|
|
4
|
+
"defaultValue": null,
|
|
5
|
+
"description": "Sets the data-testid attribute on the expander button.",
|
|
6
|
+
"name": "testId",
|
|
7
|
+
"parent": {
|
|
8
|
+
"fileName": "src/components/TagList/TagList.tsx",
|
|
9
|
+
"name": "TagListPropsProps"
|
|
10
|
+
},
|
|
11
|
+
"declarations": [
|
|
12
|
+
{
|
|
13
|
+
"fileName": "src/components/TagList/TagList.tsx",
|
|
14
|
+
"name": "TagListPropsProps"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"required": false,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagList/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"react";import a from"./styles.module.scss";import{A as s}from"../../constants-088e1d4a.js";export default function(e){var r=e.children,i=e.testId;return t.createElement("div",{className:a["tag-list"],"data-testid":i,"data-analyticsid":s.TagList},r)}
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as s}from"../../Textarea-
|
|
1
|
+
import{T as s}from"../../Textarea-47398150.js";export{T as default}from"../../Textarea-47398150.js";import"../../_rollupPluginBabelHelpers-4f206abf.js";import"../../_tslib-51c8a283.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-088e1d4a.js";import"../../uuid-11037462.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/components/Tile/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,d as t}from"../../_rollupPluginBabelHelpers-4f206abf.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as
|
|
1
|
+
import{_ as e,d as t}from"../../_rollupPluginBabelHelpers-4f206abf.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as a}from"react";import{c as l}from"../../index-9b84fabc.js";import{A as o,I as n}from"../../constants-088e1d4a.js";import s from"./styles.module.scss";var c=r.forwardRef((function(e,i){var a,o=e.children,n=e.className,c=e.htmlMarkup,d=void 0===c?"span":c,m=e.highlighted,f=e.compact,p=l(s.tile__title,(t(a={},s["tile__title--highlighted"],m),t(a,s["tile__title--compact"],f),a),n),u=d;return r.createElement(u,{className:p,ref:i},o)})),d=r.forwardRef((function(c,d){var m,f=c.icon,p=c.title,u=c.className,h=void 0===u?"":u,g=c.description,_=c.fixed,v=void 0!==_&&_,b=c.highlighted,E=void 0!==b&&b,N=c.testId,x=i(c,["icon","title","className","description","fixed","highlighted","testId"]),j=a(!1),w=e(j,2),M=w[0],k=w[1],I=!g,y=l(s.tile,(t(m={},s["tile--fixed"],v),t(m,s["tile--compact"],I),t(m,s["tile--highlighted"],E),m),h),B=l(s["title-wrapper"],t({},s["title-wrapper--compact"],I));return r.createElement("a",Object.assign({ref:d,className:y,onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)},onFocus:function(){return k(!0)},onBlur:function(){return k(!1)},"data-testid":N,"data-analyticsid":o.Tile,rel:"_blank"===c.target?"noopener noreferrer":c.rel},x),r.createElement("div",{className:B},r.cloneElement(f,{size:n.Medium,isHovered:M,color:E?"white":"black"}),r.cloneElement(p,{highlighted:E,compact:I})),g?r.createElement("p",{className:s.tile__description},g):null)}));d.Title=c;export default d;export{d as Tile};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as s}from"../../Title-
|
|
1
|
+
import{T as s}from"../../Title-53c8b68d.js";export{T as default,i as instanceOfTitleMargin}from"../../Title-53c8b68d.js";import"../../_rollupPluginBabelHelpers-4f206abf.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-088e1d4a.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as s}from"../../Validation-
|
|
1
|
+
import{V as s}from"../../Validation-0c27dd5b.js";export{V as Validation,V as default}from"../../Validation-0c27dd5b.js";import"react";import"../../index-9b84fabc.js";import"../../FormGroup-9d4dc1ed.js";import"../../_rollupPluginBabelHelpers-4f206abf.js";import"../FormGroup/styles.module.scss";import"../../Checkbox-b0271e50.js";import"../../uuid-11037462.js";import"../Icons/Check.js";import"../Icons/Icon.js";import"../../_tslib-51c8a283.js";import"../../constants-088e1d4a.js";import"../../color-e7d082c1.js";import"../../index-d1c9177a.js";import"../../palette-f206f488.js";import"../../grid-c105cad1.js";import"../Checkbox/styles.module.scss";import"../../RadioButton-403681d9.js";import"../RadioButton/styles.module.scss";import"../../Input-b5f362b8.js";import"../../useBreakpoint-6eb418f7.js";import"../Input/styles.module.scss";import"../../Title-53c8b68d.js";import"../Title/styles.module.scss";import"../../FormLayout-6bb303ac.js";import"../FormLayout/styles.module.scss";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a,o,n,e,r,t;!function(a){a[a.XXSmall=24]="XXSmall",a[a.XSmall=38]="XSmall",a[a.Small=48]="Small",a[a.Medium=64]="Medium",a[a.Large=80]="Large",a[a.XLarge=130]="XLarge"}(a||(a={})),function(a){a[a.Modal=13e5]="Modal",a[a.ExpanderTrigger=1e4]="ExpanderTrigger"}(o||(o={})),function(a){a.onwhite="onwhite",a.ongrey="ongrey",a.onblueberry="onblueberry",a.ondark="ondark",a.oninvalid="oninvalid"}(n||(n={})),function(a){a.normal="normal",a.bigform="bigform"}(e||(e={})),function(a){a.AnchorLink="anchor-link",a.Avatar="avatar",a.Badge="badge",a.Button="button",a.Checkbox="checkbox",a.Close="close",a.Dropdown="dropdown",a.Expander="expander",a.ExpanderList="expander-list",a.ExpanderListExpander="expander-list-expander",a.FormGroup="form-group",a.FormLayout="form-layout",a.HighlightBox="highlight-box",a.Icon="icon",a.Input="input",a.Link="link",a.LinkList="link-list",a.List="list",a.Loader="loader",a.Logo="logo",a.Modal="modal",a.NotificationPanel="notification-panel",a.Panel="panel",a.PanelList="panel-list",a.Portal="portal",a.RadioButton="radio-button",a.Slider="slider",a.Spacer="spacer",a.StatusDot="status-dot",a.Tag="tag",a.TagList="tag-list",a.Textarea="textarea",a.Tile="tile",a.Title="title",a.Validation="validation"}(r||(r={})),function(a){a.Enter="Enter",a.Escape="Escape",a.ArrowDown="ArrowDown",a.ArrowUp="ArrowUp",a.Home="Home",a.End="End"}(t||(t={}));export{r as A,n as F,a as I,t as K,o as Z,e as a};
|
|
2
|
+
//# sourceMappingURL=constants-088e1d4a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-088e1d4a.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/constants.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export declare enum AnalyticsId {
|
|
|
69
69
|
Button = "button",
|
|
70
70
|
Checkbox = "checkbox",
|
|
71
71
|
Close = "close",
|
|
72
|
+
Dropdown = "dropdown",
|
|
72
73
|
Expander = "expander",
|
|
73
74
|
ExpanderList = "expander-list",
|
|
74
75
|
ExpanderListExpander = "expander-list-expander",
|
|
@@ -91,9 +92,19 @@ export declare enum AnalyticsId {
|
|
|
91
92
|
Slider = "slider",
|
|
92
93
|
Spacer = "spacer",
|
|
93
94
|
StatusDot = "status-dot",
|
|
95
|
+
Tag = "tag",
|
|
96
|
+
TagList = "tag-list",
|
|
94
97
|
Textarea = "textarea",
|
|
95
98
|
Tile = "tile",
|
|
96
99
|
Title = "title",
|
|
97
100
|
Validation = "validation"
|
|
98
101
|
}
|
|
102
|
+
export declare enum KeyboardEventKey {
|
|
103
|
+
Enter = "Enter",
|
|
104
|
+
Escape = "Escape",
|
|
105
|
+
ArrowDown = "ArrowDown",
|
|
106
|
+
ArrowUp = "ArrowUp",
|
|
107
|
+
Home = "Home",
|
|
108
|
+
End = "End"
|
|
109
|
+
}
|
|
99
110
|
//# sourceMappingURL=constants.d.ts.map
|
package/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,EA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|
+
export declare const useKeyboardEvent: <E extends "keydown" | "keypress" | "keyup">(eventName: E, ref: import("react").RefObject<HTMLElement>, key: string | string[], callback: (event: HTMLElementEventMap[E]) => void) => void;
|
|
3
|
+
//# sourceMappingURL=useKeyboardEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,gBAAgB,4LAkB5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook for klikk eller fokus utenfor et gitt element
|
|
4
|
+
* @param ref Sjekker om det klikkes utenfor dette elementet
|
|
5
|
+
* @param handleClick Callback-funksjon ved klikk utenfor elementet
|
|
6
|
+
* @param events Type eventer å lytte på. Default: mousedown
|
|
7
|
+
*/
|
|
8
|
+
export declare const useOutsideEvent: (ref: import("react").RefObject<HTMLElement>, handleClick: () => void, events?: ("auxclick" | "blur" | "click" | "contextmenu" | "dblclick" | "drag" | "dragend" | "dragenter" | "dragleave" | "dragover" | "dragstart" | "drop" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "lostpointercapture" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "wheel")[]) => void;
|
|
9
|
+
//# sourceMappingURL=useOutsideEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":";AAMA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,0iBAkB3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Lytt på endringer i størrelse på et element. Bruker ResizeObserver-APIet.
|
|
4
|
+
*
|
|
5
|
+
* @param ref Element som skal observeres.
|
|
6
|
+
* @returns Object med høyde, bredde, x og y til elementet
|
|
7
|
+
*/
|
|
8
|
+
export declare const useResizeObserver: (ref?: import("react").RefObject<HTMLElement> | undefined) => DOMRect | undefined;
|
|
9
|
+
//# sourceMappingURL=useResizeObserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../src/hooks/useResizeObserver.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,mFAa7B,CAAC"}
|