@helsenorge/designsystem-react 3.2.1-beta.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -7
- package/Input.js +1 -1
- package/Input.js.map +1 -1
- package/Label.js +1 -1
- package/Label.js.map +1 -1
- package/RadioButton.js +1 -1
- package/RadioButton.js.map +1 -1
- package/Select.js +1 -1
- package/Select.js.map +1 -1
- package/Table.js +2 -0
- package/Table.js.map +1 -0
- package/TableBody.js +1 -1
- package/TableBody.js.map +1 -1
- package/TableCell.js +1 -1
- package/TableCell.js.map +1 -1
- package/TableExpandedRow.js +1 -1
- package/TableExpandedRow.js.map +1 -1
- package/TableExpanderCell.js +1 -1
- package/TableExpanderCell.js.map +1 -1
- package/TableHead.js +1 -1
- package/TableHead.js.map +1 -1
- package/TableHeadCell.js +1 -1
- package/TableHeadCell.js.map +1 -1
- package/TableRow.js +1 -1
- package/TableRow.js.map +1 -1
- package/Textarea.js +1 -1
- package/Textarea.js.map +1 -1
- package/components/AnchorLink/styles.module.scss +1 -1
- package/components/Checkbox/styles.module.scss +2 -3
- package/components/Icons/ActiveMonitoring.js.map +1 -1
- package/components/Icons/AdditionalIconInformation.js +11 -0
- package/components/Icons/AlarmClock.js.map +1 -1
- package/components/Icons/AlertSignFill.js.map +1 -1
- package/components/Icons/AlertSignStroke.js.map +1 -1
- package/components/Icons/Amputation.js.map +1 -1
- package/components/Icons/Anxiety.js.map +1 -1
- package/components/Icons/Apple.js.map +1 -1
- package/components/Icons/ArmFlexing.js.map +1 -1
- package/components/Icons/ArrowDown.js.map +1 -1
- package/components/Icons/ArrowLeft.js.map +1 -1
- package/components/Icons/ArrowUp.js.map +1 -1
- package/components/Icons/ArrowUpRight.js.map +1 -1
- package/components/Icons/Attachment.js.map +1 -1
- package/components/Icons/Atv.js.map +1 -1
- package/components/Icons/Avatar.js.map +1 -1
- package/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/components/Icons/Baby.js.map +1 -1
- package/components/Icons/BandAid.js.map +1 -1
- package/components/Icons/BeerAndPills.js.map +1 -1
- package/components/Icons/Bike.js.map +1 -1
- package/components/Icons/BirthControl.js.map +1 -1
- package/components/Icons/Boat.js.map +1 -1
- package/components/Icons/Body.js.map +1 -1
- package/components/Icons/Brain.js.map +1 -1
- package/components/Icons/BreastReconstruction.js.map +1 -1
- package/components/Icons/BrokenHeart.js.map +1 -1
- package/components/Icons/Bus.js.map +1 -1
- package/components/Icons/Calendar.js.map +1 -1
- package/components/Icons/CalendarChange.js.map +1 -1
- package/components/Icons/CalendarCheck.js.map +1 -1
- package/components/Icons/CalendarEvent.js.map +1 -1
- package/components/Icons/Cancer.js.map +1 -1
- package/components/Icons/Candle.d.ts +5 -0
- package/components/Icons/Candle.d.ts.map +1 -0
- package/components/Icons/Candle.js +2 -0
- package/components/Icons/Candle.js.map +1 -0
- package/components/Icons/Car.js.map +1 -1
- package/components/Icons/Change.js.map +1 -1
- package/components/Icons/Check.js.map +1 -1
- package/components/Icons/CheckOutline.js.map +1 -1
- package/components/Icons/Chest.js.map +1 -1
- package/components/Icons/ChevronDown.js.map +1 -1
- package/components/Icons/ChevronLeft.js.map +1 -1
- package/components/Icons/ChevronRight.js.map +1 -1
- package/components/Icons/ChevronUp.js.map +1 -1
- package/components/Icons/ChevronsDown.js.map +1 -1
- package/components/Icons/ChevronsUp.js.map +1 -1
- package/components/Icons/ChildPlaying.js.map +1 -1
- package/components/Icons/Cigarette.js.map +1 -1
- package/components/Icons/Coins.js.map +1 -1
- package/components/Icons/Contacts.js.map +1 -1
- package/components/Icons/Copy.js.map +1 -1
- package/components/Icons/CoronaCertificate.js.map +1 -1
- package/components/Icons/Coronavirus.js.map +1 -1
- package/components/Icons/Cough.js.map +1 -1
- package/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/components/Icons/Cross.js.map +1 -1
- package/components/Icons/DataExchange.js.map +1 -1
- package/components/Icons/DataReceived.js.map +1 -1
- package/components/Icons/Depression.js.map +1 -1
- package/components/Icons/DigestiveSystem.js.map +1 -1
- package/components/Icons/Dizzy.js.map +1 -1
- package/components/Icons/Documents.js.map +1 -1
- package/components/Icons/Dog.js.map +1 -1
- package/components/Icons/DonorCard.js.map +1 -1
- package/components/Icons/Draft.js.map +1 -1
- package/components/Icons/EChat.js.map +1 -1
- package/components/Icons/ElderlyPerson.js.map +1 -1
- package/components/Icons/Embolization.js.map +1 -1
- package/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/components/Icons/EmoticonDelighted.js.map +1 -1
- package/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/components/Icons/EmoticonHappy.js.map +1 -1
- package/components/Icons/EmoticonMeh.js.map +1 -1
- package/components/Icons/EnterFullScreen.js.map +1 -1
- package/components/Icons/Epilepsy.js.map +1 -1
- package/components/Icons/Eraser.js.map +1 -1
- package/components/Icons/ErrorSignFill.js.map +1 -1
- package/components/Icons/ErrorSignStroke.js.map +1 -1
- package/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/components/Icons/ExitFullScreen.js.map +1 -1
- package/components/Icons/Eye.js.map +1 -1
- package/components/Icons/Facebook.js.map +1 -1
- package/components/Icons/FallingLeaf.d.ts +5 -0
- package/components/Icons/FallingLeaf.d.ts.map +1 -0
- package/components/Icons/FallingLeaf.js +2 -0
- package/components/Icons/FallingLeaf.js.map +1 -0
- package/components/Icons/Female.js.map +1 -1
- package/components/Icons/FemaleDoctor.js.map +1 -1
- package/components/Icons/Ferry.js.map +1 -1
- package/components/Icons/File.js.map +1 -1
- package/components/Icons/Filter.js.map +1 -1
- package/components/Icons/FingerBleed.js.map +1 -1
- package/components/Icons/FirstAidKit.js.map +1 -1
- package/components/Icons/FloppyDisk.js.map +1 -1
- package/components/Icons/Football.js.map +1 -1
- package/components/Icons/Form.js.map +1 -1
- package/components/Icons/Forward.js.map +1 -1
- package/components/Icons/Garden.js.map +1 -1
- package/components/Icons/GasCan.js.map +1 -1
- package/components/Icons/GenderIdentity.js.map +1 -1
- package/components/Icons/Globe.js.map +1 -1
- package/components/Icons/Graph.d.ts +5 -0
- package/components/Icons/Graph.d.ts.map +1 -0
- package/components/Icons/Graph.js +2 -0
- package/components/Icons/Graph.js.map +1 -0
- package/components/Icons/GroupTwins.d.ts +5 -0
- package/components/Icons/GroupTwins.d.ts.map +1 -0
- package/components/Icons/GroupTwins.js +2 -0
- package/components/Icons/GroupTwins.js.map +1 -0
- package/components/Icons/HandWithDisease.js.map +1 -1
- package/components/Icons/HandsAndHeart.d.ts +5 -0
- package/components/Icons/HandsAndHeart.d.ts.map +1 -0
- package/components/Icons/HandsAndHeart.js +2 -0
- package/components/Icons/HandsAndHeart.js.map +1 -0
- package/components/Icons/HealthClinic.js.map +1 -1
- package/components/Icons/HealthWarning.js.map +1 -1
- package/components/Icons/HealthcarePerson.d.ts +5 -0
- package/components/Icons/HealthcarePerson.d.ts.map +1 -0
- package/components/Icons/HealthcarePerson.js +2 -0
- package/components/Icons/HealthcarePerson.js.map +1 -0
- package/components/Icons/HealthcarePersonell.d.ts +5 -0
- package/components/Icons/HealthcarePersonell.d.ts.map +1 -0
- package/components/Icons/HealthcarePersonell.js +2 -0
- package/components/Icons/HealthcarePersonell.js.map +1 -0
- package/components/Icons/Heart.js.map +1 -1
- package/components/Icons/HeartHands.js.map +1 -1
- package/components/Icons/HelpSign.js.map +1 -1
- package/components/Icons/HelpingHand.js.map +1 -1
- package/components/Icons/Hemodialysis.js.map +1 -1
- package/components/Icons/Hiker.js.map +1 -1
- package/components/Icons/History.js.map +1 -1
- package/components/Icons/HivAndAids.js.map +1 -1
- package/components/Icons/Home.js.map +1 -1
- package/components/Icons/Hospital.js.map +1 -1
- package/components/Icons/Hourglass.js.map +1 -1
- package/components/Icons/Icon.d.ts +7 -7
- package/components/Icons/Icon.d.ts.map +1 -1
- package/components/Icons/Icon.js.map +1 -1
- package/components/Icons/IconWall.d.ts +8 -0
- package/components/Icons/IconWall.d.ts.map +1 -0
- package/components/Icons/IconWall.js +2 -0
- package/components/Icons/IconWall.js.map +1 -0
- package/components/Icons/ImgFile.js.map +1 -1
- package/components/Icons/Inbox.js.map +1 -1
- package/components/Icons/InfoSignStroke.js.map +1 -1
- package/components/Icons/Instagram.js.map +1 -1
- package/components/Icons/JointPain.js.map +1 -1
- package/components/Icons/Journal.js.map +1 -1
- package/components/Icons/JpgFile.js.map +1 -1
- package/components/Icons/Kidney.js.map +1 -1
- package/components/Icons/Kjernejournal.js.map +1 -1
- package/components/Icons/Laboratory.js.map +1 -1
- package/components/Icons/LaptopBlog.js.map +1 -1
- package/components/Icons/LawBook.js.map +1 -1
- package/components/Icons/LegalDocument.d.ts +5 -0
- package/components/Icons/LegalDocument.d.ts.map +1 -0
- package/components/Icons/LegalDocument.js +2 -0
- package/components/Icons/LegalDocument.js.map +1 -0
- package/components/Icons/LightBulb.js.map +1 -1
- package/components/Icons/List.js.map +1 -1
- package/components/Icons/Location.js.map +1 -1
- package/components/Icons/Login.js.map +1 -1
- package/components/Icons/Logout.js.map +1 -1
- package/components/Icons/Lungs.js.map +1 -1
- package/components/Icons/Makeup.js.map +1 -1
- package/components/Icons/MaleDoctor.js.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/components/Icons/MaleGenitalia.js.map +1 -1
- package/components/Icons/Medicine.js.map +1 -1
- package/components/Icons/MedicineWarning.js.map +1 -1
- package/components/Icons/MentalHealthAdult.js.map +1 -1
- package/components/Icons/MentalHealthChild.js.map +1 -1
- package/components/Icons/Menu.js.map +1 -1
- package/components/Icons/Microscope.js.map +1 -1
- package/components/Icons/Minus.js.map +1 -1
- package/components/Icons/Mirror.js.map +1 -1
- package/components/Icons/MobilePhone.js.map +1 -1
- package/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/components/Icons/MuscleBack.js.map +1 -1
- package/components/Icons/MuscleLeg.js.map +1 -1
- package/components/Icons/Mushroom.js.map +1 -1
- package/components/Icons/Music.js.map +1 -1
- package/components/Icons/MusselsAndSalt.js.map +1 -1
- package/components/Icons/NoAccess.js.map +1 -1
- package/components/Icons/NoEye.js.map +1 -1
- package/components/Icons/NoFilter.js.map +1 -1
- package/components/Icons/Notepad.js.map +1 -1
- package/components/Icons/Osteotomy.js.map +1 -1
- package/components/Icons/PaintRoller.js.map +1 -1
- package/components/Icons/PaperPlane.js.map +1 -1
- package/components/Icons/PatientAndPerson.js.map +1 -1
- package/components/Icons/Pause.js.map +1 -1
- package/components/Icons/PdfFile.js.map +1 -1
- package/components/Icons/Pencil.js.map +1 -1
- package/components/Icons/PeopleTalking.js.map +1 -1
- package/components/Icons/Peritonealdialysis.js.map +1 -1
- package/components/Icons/Person.js.map +1 -1
- package/components/Icons/PersonAndPatient.js.map +1 -1
- package/components/Icons/PersonCancel.js.map +1 -1
- package/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/components/Icons/PersonOverweight.js.map +1 -1
- package/components/Icons/PersonWithBrain.js.map +1 -1
- package/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/components/Icons/PersonWithCrutches.js.map +1 -1
- package/components/Icons/PersonWithJaw.js.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/components/Icons/PersonWithSenses.js.map +1 -1
- package/components/Icons/PersonalPlan.js.map +1 -1
- package/components/Icons/PizzaSlice.js.map +1 -1
- package/components/Icons/Plant.js.map +1 -1
- package/components/Icons/Play.js.map +1 -1
- package/components/Icons/PlusLarge.js.map +1 -1
- package/components/Icons/PlusSmall.js.map +1 -1
- package/components/Icons/PngFile.js.map +1 -1
- package/components/Icons/Podcast.js.map +1 -1
- package/components/Icons/PoisonInformation.js.map +1 -1
- package/components/Icons/Pregnant.js.map +1 -1
- package/components/Icons/Printer.js.map +1 -1
- package/components/Icons/Psychosis.js.map +1 -1
- package/components/Icons/Publication.js.map +1 -1
- package/components/Icons/Puzzle.js.map +1 -1
- package/components/Icons/Quarrel.js.map +1 -1
- package/components/Icons/RadioTherapy.js.map +1 -1
- package/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/components/Icons/Radioiodine.js.map +1 -1
- package/components/Icons/Receipt.js.map +1 -1
- package/components/Icons/Receptionist.js.map +1 -1
- package/components/Icons/Recovery.js.map +1 -1
- package/components/Icons/Referral.js.map +1 -1
- package/components/Icons/Refresh.js.map +1 -1
- package/components/Icons/Refund.js.map +1 -1
- package/components/Icons/Reply.js.map +1 -1
- package/components/Icons/Rocket.js.map +1 -1
- package/components/Icons/RtfFile.js.map +1 -1
- package/components/Icons/STDs.js.map +1 -1
- package/components/Icons/Save.js.map +1 -1
- package/components/Icons/Scale.js.map +1 -1
- package/components/Icons/Search.js.map +1 -1
- package/components/Icons/SectionSign.js.map +1 -1
- package/components/Icons/Sexualorientation.js.map +1 -1
- package/components/Icons/ShakingHand.js.map +1 -1
- package/components/Icons/Share.js.map +1 -1
- package/components/Icons/ShuntOperation.js.map +1 -1
- package/components/Icons/Skeleton.js.map +1 -1
- package/components/Icons/Skin.js.map +1 -1
- package/components/Icons/Snake.js.map +1 -1
- package/components/Icons/Snapchat.js.map +1 -1
- package/components/Icons/SortDown.js.map +1 -1
- package/components/Icons/SortUp.js.map +1 -1
- package/components/Icons/SpeechBubble.js.map +1 -1
- package/components/Icons/Spray.js.map +1 -1
- package/components/Icons/SupportingPerson.js.map +1 -1
- package/components/Icons/Surgery.js.map +1 -1
- package/components/Icons/Syringe.js.map +1 -1
- package/components/Icons/Taxi.js.map +1 -1
- package/components/Icons/TeddyBear.js.map +1 -1
- package/components/Icons/Teenagers.js.map +1 -1
- package/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/components/Icons/Ticket.js.map +1 -1
- package/components/Icons/Tombstone.d.ts +5 -0
- package/components/Icons/Tombstone.d.ts.map +1 -0
- package/components/Icons/Tombstone.js +2 -0
- package/components/Icons/Tombstone.js.map +1 -0
- package/components/Icons/Toolbox.js.map +1 -1
- package/components/Icons/Tooth.js.map +1 -1
- package/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/components/Icons/Train.js.map +1 -1
- package/components/Icons/Transplantation.js.map +1 -1
- package/components/Icons/TrashCan.js.map +1 -1
- package/components/Icons/TravelRoute.js.map +1 -1
- package/components/Icons/TriangleX.js.map +1 -1
- package/components/Icons/Twitter.js.map +1 -1
- package/components/Icons/Undo.js.map +1 -1
- package/components/Icons/UniProsthesis.js.map +1 -1
- package/components/Icons/Upload.js.map +1 -1
- package/components/Icons/UserOrganization.js.map +1 -1
- package/components/Icons/VerticalDots.js.map +1 -1
- package/components/Icons/VideoCamera.js.map +1 -1
- package/components/Icons/VideoChat.js.map +1 -1
- package/components/Icons/Wallet.js.map +1 -1
- package/components/Icons/Watch.js.map +1 -1
- package/components/Icons/Wheelchair.js.map +1 -1
- package/components/Icons/WheelchairActive.js.map +1 -1
- package/components/Icons/Window.js.map +1 -1
- package/components/Icons/WorkSuitcase.js.map +1 -1
- package/components/Icons/X.js.map +1 -1
- package/components/Icons/XOutline.js.map +1 -1
- package/components/Icons/YouTube.js.map +1 -1
- package/components/Icons/Zoom.js.map +1 -1
- package/components/Icons/componentdata.json +1 -1
- package/components/Label/componentdata.json +1 -1
- package/components/LinkList/styles.module.scss +2 -2
- package/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/components/Table/Table.d.ts +6 -0
- package/components/Table/Table.d.ts.map +1 -1
- package/components/Table/TableBody/TableBody.d.ts +4 -1
- package/components/Table/TableBody/TableBody.d.ts.map +1 -1
- package/components/Table/TableBody/componentdata.json +1 -1
- package/components/Table/TableBody/index.js +1 -1
- package/components/Table/TableCell/TableCell.d.ts +6 -1
- package/components/Table/TableCell/TableCell.d.ts.map +1 -1
- package/components/Table/TableCell/componentdata.json +1 -1
- package/components/Table/TableCell/index.js +1 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.d.ts +4 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.d.ts.map +1 -1
- package/components/Table/TableExpandedRow/componentdata.json +1 -1
- package/components/Table/TableExpandedRow/index.js +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.d.ts +4 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.d.ts.map +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts.map +1 -1
- package/components/Table/TableExpanderCell/componentdata.json +1 -1
- package/components/Table/TableExpanderCell/index.js +1 -1
- package/components/Table/TableHead/TableHead.d.ts +4 -1
- package/components/Table/TableHead/TableHead.d.ts.map +1 -1
- package/components/Table/TableHead/componentdata.json +1 -1
- package/components/Table/TableHead/index.js +1 -1
- package/components/Table/TableHeadCell/TableHeadCell.d.ts +4 -1
- package/components/Table/TableHeadCell/TableHeadCell.d.ts.map +1 -1
- package/components/Table/TableHeadCell/componentdata.json +1 -1
- package/components/Table/TableHeadCell/index.js +1 -1
- package/components/Table/TableRow/TableRow.d.ts +3 -0
- package/components/Table/TableRow/TableRow.d.ts.map +1 -1
- package/components/Table/TableRow/componentdata.json +1 -1
- package/components/Table/TableRow/index.js +1 -1
- package/components/Table/index.js +1 -1
- package/components/Table/index.js.map +1 -1
- package/components/Table/styles.module.scss +67 -45
- package/components/Table/styles.module.scss.d.ts +5 -0
- package/package.json +5 -1
- package/scss/_palette.scss +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"props":{"sortable":{"defaultValue":null,"description":"Sets if column for head cell should be sortable","name":"sortable","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"sortDir":{"defaultValue":null,"description":"Sort direction","name":"sortDir","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"enum","raw":"SortDirection","value":[{"value":"\"asc\"","description":"","fullComment":"","tags":{}},{"value":"\"desc\"","description":"","fullComment":"","tags":{}}]}},"onClick":{"defaultValue":null,"description":"Function that is called when clicked","name":"onClick","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"(() => void)"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the content of the td element.","name":"children","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"ReactNode"}}}}
|
|
1
|
+
{"props":{"sortable":{"defaultValue":null,"description":"Sets if column for head cell should be sortable","name":"sortable","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"sortDir":{"defaultValue":null,"description":"Sort direction","name":"sortDir","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"enum","raw":"SortDirection","value":[{"value":"\"asc\"","description":"","fullComment":"","tags":{}},{"value":"\"desc\"","description":"","fullComment":"","tags":{}}]}},"onClick":{"defaultValue":null,"description":"Function that is called when clicked","name":"onClick","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"(() => void)"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the content of the td element.","name":"children","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"ReactNode"}},"mode":{"defaultValue":{"value":"ModeType.normal"},"description":"For display with less space. Discouraged to use together with interactive elements.","name":"mode","parent":{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableHeadCell/TableHeadCell.tsx","name":"Props"}],"required":false,"type":{"name":"enum","raw":"ModeType","value":[{"value":"\"compact\"","description":"","fullComment":"","tags":{}},{"value":"\"normal\"","description":"","fullComment":"","tags":{}}]}}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"../../../TableHeadCell.js";import{S as
|
|
1
|
+
import{a as r}from"../../../TableHeadCell.js";import{S as k,T as q}from"../../../TableHeadCell.js";import"react";import"classnames";import"../../Icons/Icon.js";import"../../../constants.js";import"../../../hooks/useUuid.js";import"../../../uuid.js";import"../../../utils/environment.js";import"../../Icons/ArrowDown.js";import"../../Icons/ArrowUp.js";import"../styles.module.scss";import"../../../Table.js";import"../../../hooks/useBreakpoint.js";import"../../../theme/grid.js";import"../../../hooks/useLayoutEvent.js";import"../../../utils/debounce.js";import"../../../HorizontalScroll.js";import"../../../hooks/useIsVisible.js";import"../../../hooks/useIntersectionObserver.js";import"../../../hooks/useSize.js";import"../../HorizontalScroll/styles.module.scss";import"../../../utils/device.js";export{k as SortDirection,q as TableHeadCell,r as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ModeType } from '../Table';
|
|
2
3
|
export interface Props {
|
|
3
4
|
/** Sets if expanded row can be expanded */
|
|
4
5
|
expandable?: boolean;
|
|
@@ -16,6 +17,8 @@ export interface Props {
|
|
|
16
17
|
className?: string;
|
|
17
18
|
/** Sets the cells of the table row element. */
|
|
18
19
|
children?: React.ReactNode;
|
|
20
|
+
/** For display with less space. Discouraged to use together with interactive elements. */
|
|
21
|
+
mode?: ModeType;
|
|
19
22
|
}
|
|
20
23
|
export declare const TableRow: React.FC<Props>;
|
|
21
24
|
export default TableRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/TableRow/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/TableRow/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,MAAM,WAAW,KAAK;IACpB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0FAA0F;IAC1F,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkCpC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"props":{"expandable":{"defaultValue":null,"description":"Sets if expanded row can be expanded","name":"expandable","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Sets if expanded row is expanded","name":"expanded","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"onClick":{"defaultValue":null,"description":"When hide/show button for expanded row is clicked.","name":"onClick","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"(() => void)"}},"hideDetailsText":{"defaultValue":null,"description":"Text for expanded row hide button.","name":"hideDetailsText","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"showDetailsText":{"defaultValue":null,"description":"Text for expanded row show button.","name":"showDetailsText","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"rowKey":{"defaultValue":null,"description":"Key attribute for row","name":"rowKey","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the cells of the table row element.","name":"children","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}}}}
|
|
1
|
+
{"props":{"expandable":{"defaultValue":null,"description":"Sets if expanded row can be expanded","name":"expandable","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Sets if expanded row is expanded","name":"expanded","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"onClick":{"defaultValue":null,"description":"When hide/show button for expanded row is clicked.","name":"onClick","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"(() => void)"}},"hideDetailsText":{"defaultValue":null,"description":"Text for expanded row hide button.","name":"hideDetailsText","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"showDetailsText":{"defaultValue":null,"description":"Text for expanded row show button.","name":"showDetailsText","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"rowKey":{"defaultValue":null,"description":"Key attribute for row","name":"rowKey","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Sets the cells of the table row element.","name":"children","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"mode":{"defaultValue":{"value":"ModeType.normal"},"description":"For display with less space. Discouraged to use together with interactive elements.","name":"mode","parent":{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"},"declarations":[{"fileName":"src/components/Table/TableRow/TableRow.tsx","name":"Props"}],"required":false,"type":{"name":"enum","raw":"ModeType","value":[{"value":"\"compact\"","description":"","fullComment":"","tags":{}},{"value":"\"normal\"","description":"","fullComment":"","tags":{}}]}}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"../../../TableRow.js";import{T as
|
|
1
|
+
import{a as r}from"../../../TableRow.js";import{T as G}from"../../../TableRow.js";import"react";import"classnames";import"../styles.module.scss";import"../../../Table.js";import"../../../constants.js";import"../../../hooks/useBreakpoint.js";import"../../../theme/grid.js";import"../../../hooks/useLayoutEvent.js";import"../../../utils/debounce.js";import"../../../HorizontalScroll.js";import"../../../hooks/useIsVisible.js";import"../../../hooks/useIntersectionObserver.js";import"../../../hooks/useSize.js";import"../../HorizontalScroll/styles.module.scss";import"../../../utils/device.js";import"../../../Button.js";import"../../Icons/Icon.js";import"../../../hooks/useUuid.js";import"../../../uuid.js";import"../../../utils/environment.js";import"../../../hooks/useHover.js";import"../../../hooks/useIcons.js";import"../../../theme/currys/color.js";import"../../../theme/index.js";import"../../../theme/palette.js";import"../../../theme/spacers.js";import"../../Icons/ArrowRight.js";import"../../Button/styles.module.scss";import"../../Icons/ChevronDown.js";import"../../Icons/ChevronUp.js";export{G as TableRow,r as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{T as r}from"../../Table.js";import{M as q,R as z,d as F,s as G}from"../../Table.js";import{T as J}from"../../TableBody.js";import{T as L,a as N}from"../../TableCell.js";import{T as P}from"../../TableExpandedRow.js";import{T as U}from"../../TableExpanderCell.js";import{H as X,T as Y}from"../../TableHead.js";import{S as _,T as $}from"../../TableHeadCell.js";import{T as ro}from"../../TableRow.js";import"react";import"classnames";import"../../constants.js";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../HorizontalScroll.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useSize.js";import"../HorizontalScroll/styles.module.scss";import"./styles.module.scss";import"../../utils/device.js";import"../../Button.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";import"../Icons/ChevronUp.js";import"../Icons/ChevronDown.js";import"../Icons/ArrowDown.js";import"../Icons/ArrowUp.js";export{X as HeaderCategory,q as ModeType,z as ResponsiveTableVariant,_ as SortDirection,r as Table,J as TableBody,L as TableCell,P as TableExpandedRow,U as TableExpanderCell,Y as TableHead,$ as TableHeadCell,ro as TableRow,N as TextAlign,r as default,F as defaultConfig,G as simpleConfig};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Table/utils.ts","../../../src/components/Table/Table.tsx"],"sourcesContent":["import React from 'react';\n\nimport { BreakpointConfig, ResponsiveTableVariant } from './Table';\nimport { Breakpoint } from '../../hooks/useBreakpoint';\nimport { isTouchDevice } from '../../utils/device';\n\nimport styles from './styles.module.scss';\n\n/**\n * Sjekk om det skal brukes CSS for å bestemme responsivt utseende på dette breakpoint\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns true om breakpoint bruker CSS\n */\nconst configUsesCss = (config: BreakpointConfig): boolean =>\n config.variant === ResponsiveTableVariant.centeredoverflow || config.variant === ResponsiveTableVariant.block;\n\n/**\n * Lag klassenavn for CSS-config\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns CSS-klassenavn\n */\nconst mapConfigToClass = (config: BreakpointConfig): string => styles[`table--${config.variant}-${config.breakpoint}`];\n\n/**\n * Sorter konfigurasjon etter breakpoints, fra største til minste\n * @param a Konfigurasjon for responsiv oppførsel\n * @param b Konfigurasjon for responsiv oppførsel\n * @returns Sortert liste\n */\nconst sortByBreakpointsDescending = (a: BreakpointConfig, b: BreakpointConfig): number =>\n Breakpoint[a.breakpoint] - Breakpoint[b.breakpoint];\n\n/**\n * Sjekk om en konfigurasjon skal brukes for nåværende breakpoint\n * @param a Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @returns true dersom config skal brukes for breakpointet\n */\nconst isValidForCurrentBreakpoint = (config: BreakpointConfig, breakpoint: Breakpoint): boolean =>\n Breakpoint[config.breakpoint] >= breakpoint;\n\n/**\n * Finn konfigurasjon for nåværende breakpoint\n * @param config Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @returns Konfigurasjon for responsiv oppførsel\n */\nconst getConfigForBreakpoint = (config: BreakpointConfig | BreakpointConfig[], breakpoint: Breakpoint): BreakpointConfig | undefined => {\n if (Array.isArray(config)) {\n config.sort(sortByBreakpointsDescending);\n\n return config.find(x => isValidForCurrentBreakpoint(x, breakpoint));\n } else if (config && isValidForCurrentBreakpoint(config, breakpoint)) {\n return config;\n }\n};\n\n/**\n * Finn konfigurasjon for nåværende breakpoint og tabellbredde\n * @param config Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @param tableWidth Bredde på tabell i px\n * @returns Konfigurasjon for responsiv oppførsel uten fallbackVariant\n */\nexport const getCurrentConfig = (\n config: BreakpointConfig | BreakpointConfig[],\n breakpoint: Breakpoint,\n tableWidth: number,\n windowWidth: number\n): Omit<BreakpointConfig, 'fallbackVariant'> | undefined => {\n const breakpointConfig = getConfigForBreakpoint(config, breakpoint);\n const canUseHorizontalScroll = isTouchDevice();\n const canUseCenteredOverflow = tableWidth <= windowWidth;\n\n if (!breakpointConfig) {\n return;\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.centeredoverflow &&\n !canUseCenteredOverflow &&\n breakpointConfig.fallbackVariant === ResponsiveTableVariant.horizontalscroll\n ) {\n return {\n variant: canUseHorizontalScroll ? ResponsiveTableVariant.horizontalscroll : ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.centeredoverflow &&\n !canUseCenteredOverflow &&\n breakpointConfig.fallbackVariant !== ResponsiveTableVariant.centeredoverflow\n ) {\n return {\n variant: breakpointConfig.fallbackVariant ?? ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.horizontalscroll &&\n !canUseHorizontalScroll &&\n breakpointConfig.fallbackVariant === ResponsiveTableVariant.centeredoverflow\n ) {\n return {\n variant: canUseCenteredOverflow ? ResponsiveTableVariant.centeredoverflow : ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.horizontalscroll &&\n !canUseHorizontalScroll &&\n breakpointConfig.fallbackVariant !== ResponsiveTableVariant.horizontalscroll\n ) {\n return {\n variant: breakpointConfig.fallbackVariant ?? ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n return breakpointConfig;\n};\n\n/**\n * Finn klassenavn for responsiv oppførsel\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns Klassenavn\n */\nexport const getBreakpointClass = (config?: BreakpointConfig): string | undefined =>\n config && configUsesCss(config) ? mapConfigToClass(config) : undefined;\n\n/**\n * Finn riktig posisjon for horisontal sentrering av tabell som skal vises \"centeredoverflow\"\n * @param parentWidth Bredde på element som tabellen ligger i\n * @param tableWidth Bredde på tabellen\n * @returns Styling som posisjonerer tabellen riktig\n */\nexport const getCenteredOverflowTableStyle = (parentWidth: number, tableWidth: number): React.CSSProperties => {\n const COLUMN_GUTTER_WIDTH_PX = 8;\n\n return { left: `${(parentWidth - tableWidth) / 2 - COLUMN_GUTTER_WIDTH_PX}px` };\n};\n","import React, { useEffect, useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { getCurrentConfig, getBreakpointClass, getCenteredOverflowTableStyle } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useLayoutEvent } from '../../hooks/useLayoutEvent';\nimport HorizontalScroll from '../HorizontalScroll';\n\nimport styles from './styles.module.scss';\n\nexport enum ResponsiveTableVariant {\n /** No handling responsive behaviour. Default. */\n none = 'none',\n /** Overflow parent container to the left and right while remaining centered horizontally. */\n centeredoverflow = 'centeredoverflow',\n /** Show horizontal scrollbar when table is too big for the screen. */\n horizontalscroll = 'horizontalscroll',\n /** Collapse to two columns. */\n block = 'block',\n}\n\nexport interface BreakpointConfig {\n /** Breakpoint at which responsive behaviour will be applied. The table component uses a \"desktop first\" approach. */\n breakpoint: keyof typeof Breakpoint;\n /** Desired behaviour on this breakpoint and all smaller screens. */\n variant: keyof typeof ResponsiveTableVariant;\n /** If variant is horizontallscroll, use a fallback instead of device is not a touch device. */\n fallbackVariant?: keyof typeof ResponsiveTableVariant;\n}\n\nexport interface Props {\n /** Unique ID */\n id?: string;\n /** Id used for testing */\n testId?: string;\n /** Customize how the table behaves on various screen widths */\n breakpointConfig?: BreakpointConfig | BreakpointConfig[];\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the table. Use TableHead and TableBody */\n children: React.ReactNode;\n}\n\nexport const defaultConfig: BreakpointConfig[] = [\n {\n breakpoint: 'xl',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.horizontalscroll,\n },\n];\n\nexport const simpleConfig: BreakpointConfig[] = [\n {\n breakpoint: 'xl',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.horizontalscroll,\n },\n {\n breakpoint: 'sm',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.block,\n },\n];\n\nexport const Table: React.FC<Props> = ({ id, testId, className, children, breakpointConfig = defaultConfig }) => {\n const [currentConfig, setCurrentConfig] = useState<BreakpointConfig>();\n const [tableWidth, setTableWidth] = useState<number>(0);\n const [parentWidth, setParentWidth] = useState<number>(0);\n const [windowWidth, setWindowWidth] = useState(window.innerWidth);\n const tableRef = useRef<HTMLTableElement>(null);\n const breakpoint = useBreakpoint();\n\n useEffect(() => {\n setCurrentConfig(getCurrentConfig(breakpointConfig, breakpoint, tableWidth, windowWidth));\n }, [breakpointConfig, breakpoint, tableWidth, windowWidth]);\n\n useEffect(() => {\n if (\n currentConfig?.variant === ResponsiveTableVariant.centeredoverflow ||\n currentConfig?.variant === ResponsiveTableVariant.horizontalscroll\n ) {\n setTableWidth(tableRef.current?.getBoundingClientRect().width ?? 0);\n }\n if (currentConfig?.variant === ResponsiveTableVariant.centeredoverflow) {\n setParentWidth(tableRef.current?.parentElement?.getBoundingClientRect().width ?? 0);\n }\n }, [currentConfig]);\n\n useLayoutEvent(() => setWindowWidth(window.innerWidth), ['resize'], 100);\n\n const tableStyle =\n currentConfig?.variant === ResponsiveTableVariant.centeredoverflow ? getCenteredOverflowTableStyle(parentWidth, tableWidth) : undefined;\n\n const breakpointClass = getBreakpointClass(currentConfig);\n const tableClass = classNames(styles.table, breakpointClass, className);\n\n const table = (\n <table className={tableClass} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Table} ref={tableRef} style={tableStyle}>\n {children}\n </table>\n );\n\n if (currentConfig?.variant === ResponsiveTableVariant.horizontalscroll) {\n return (\n <HorizontalScroll childWidth={tableWidth} testId=\"horizontal-scroll\">\n {table}\n </HorizontalScroll>\n );\n }\n\n return table;\n};\n\nexport default Table;\n"],"names":["configUsesCss","config","ResponsiveTableVariant","mapConfigToClass","styles","sortByBreakpointsDescending","a","b","Breakpoint","isValidForCurrentBreakpoint","breakpoint","getConfigForBreakpoint","x","getCurrentConfig","tableWidth","windowWidth","breakpointConfig","canUseHorizontalScroll","isTouchDevice","canUseCenteredOverflow","getBreakpointClass","getCenteredOverflowTableStyle","parentWidth","defaultConfig","simpleConfig","Table","id","testId","className","children","currentConfig","setCurrentConfig","useState","setTableWidth","setParentWidth","setWindowWidth","tableRef","useRef","useBreakpoint","useEffect","_a","_c","_b","useLayoutEvent","tableStyle","breakpointClass","tableClass","classNames","table","React","AnalyticsId","HorizontalScroll"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Kan fjernes når konvensjonen for BEM er tillatt.
|
|
2
|
+
/* stylelint-disable selector-class-pattern */
|
|
1
3
|
@use 'sass:map';
|
|
2
4
|
@import '../../scss/spacers';
|
|
3
5
|
@import '../../scss/breakpoints';
|
|
@@ -6,7 +8,7 @@
|
|
|
6
8
|
@import '../../scss/grid';
|
|
7
9
|
|
|
8
10
|
/* fix outline for Safari */
|
|
9
|
-
table
|
|
11
|
+
table .table-body .table-row {
|
|
10
12
|
outline: 3px solid transparent;
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -26,14 +28,14 @@ table tbody tr {
|
|
|
26
28
|
display: block;
|
|
27
29
|
clear: both;
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
.table-body,
|
|
32
|
+
.table-row,
|
|
33
|
+
.table__head-cell,
|
|
34
|
+
.table__cell {
|
|
33
35
|
display: block;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
.table-row {
|
|
37
39
|
clear: both;
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -41,24 +43,35 @@ table tbody tr {
|
|
|
41
43
|
max-width: 100%;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
.table__head-cell:focus {
|
|
45
47
|
outline: none;
|
|
46
48
|
background-color: $blueberry800;
|
|
47
49
|
text-decoration: underline;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
.table__cell {
|
|
51
53
|
position: relative;
|
|
52
54
|
padding: 0.75rem 0 0.75rem 40%;
|
|
53
55
|
float: left;
|
|
54
56
|
clear: both;
|
|
55
57
|
width: 100%;
|
|
58
|
+
border-top: 0;
|
|
59
|
+
border-bottom: 0;
|
|
60
|
+
outline: 0;
|
|
61
|
+
|
|
62
|
+
&--center {
|
|
63
|
+
text-align: left;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&--right {
|
|
67
|
+
text-align: left;
|
|
68
|
+
}
|
|
56
69
|
|
|
57
70
|
&:not(.expandable-container) {
|
|
58
71
|
font-weight: 400;
|
|
59
72
|
}
|
|
60
73
|
|
|
61
|
-
/* Get data from the td-tag attribute "data-label"
|
|
74
|
+
/* Get data from the td-tag attribute "data-label" and use this to populate :before content */
|
|
62
75
|
&::before {
|
|
63
76
|
content: attr(data-label);
|
|
64
77
|
position: relative;
|
|
@@ -78,33 +91,16 @@ table tbody tr {
|
|
|
78
91
|
|
|
79
92
|
.table__expander-cell-mobile {
|
|
80
93
|
padding-left: 0.75rem;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.table__expanded-row td {
|
|
84
|
-
text-align: left;
|
|
85
|
-
padding: 0.75rem;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.table__expanded-row {
|
|
89
|
-
display: none;
|
|
94
|
+
border-bottom: 1px solid $neutral500;
|
|
90
95
|
|
|
91
96
|
&--expanded {
|
|
92
|
-
|
|
97
|
+
border-bottom: 0;
|
|
93
98
|
}
|
|
94
99
|
}
|
|
95
100
|
|
|
96
|
-
.table__cell {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
outline: 0;
|
|
100
|
-
|
|
101
|
-
&--center {
|
|
102
|
-
text-align: left;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&--right {
|
|
106
|
-
text-align: left;
|
|
107
|
-
}
|
|
101
|
+
.table__expanded-row .table__cell {
|
|
102
|
+
text-align: left;
|
|
103
|
+
padding: 0.75rem;
|
|
108
104
|
}
|
|
109
105
|
|
|
110
106
|
.table__cell:first-child {
|
|
@@ -113,6 +109,12 @@ table tbody tr {
|
|
|
113
109
|
}
|
|
114
110
|
|
|
115
111
|
.table__expanded-row {
|
|
112
|
+
display: none;
|
|
113
|
+
|
|
114
|
+
&--expanded {
|
|
115
|
+
display: block;
|
|
116
|
+
}
|
|
117
|
+
|
|
116
118
|
.table__cell:first-child {
|
|
117
119
|
border-top: 0;
|
|
118
120
|
}
|
|
@@ -123,25 +125,15 @@ table tbody tr {
|
|
|
123
125
|
border-collapse: collapse;
|
|
124
126
|
border-top: 1px solid $neutral500;
|
|
125
127
|
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
tr:last-child .table__cell:last-child {
|
|
129
|
-
border-bottom: 1px solid $neutral500;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.table__expander-cell-mobile {
|
|
133
|
-
border-bottom: 1px solid $neutral500;
|
|
134
|
-
|
|
135
|
-
&--expanded {
|
|
136
|
-
border-bottom: 0;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
128
|
|
|
140
|
-
.table__row--expandable {
|
|
141
129
|
&:focus-within {
|
|
142
130
|
outline: none;
|
|
143
131
|
}
|
|
144
132
|
}
|
|
133
|
+
|
|
134
|
+
.table-row:last-child .table__cell:last-child {
|
|
135
|
+
border-bottom: 1px solid $neutral500;
|
|
136
|
+
}
|
|
145
137
|
}
|
|
146
138
|
|
|
147
139
|
.table {
|
|
@@ -184,6 +176,14 @@ table tbody tr {
|
|
|
184
176
|
@media (min-width: map.get($grid-breakpoints, lg)) {
|
|
185
177
|
height: 6.125rem;
|
|
186
178
|
}
|
|
179
|
+
|
|
180
|
+
&--compact {
|
|
181
|
+
height: unset;
|
|
182
|
+
|
|
183
|
+
@media (min-width: map.get($grid-breakpoints, lg)) {
|
|
184
|
+
height: unset;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.table__head-cell {
|
|
@@ -225,6 +225,20 @@ table tbody tr {
|
|
|
225
225
|
line-height: $lineheight-size-sm;
|
|
226
226
|
font-weight: 700;
|
|
227
227
|
}
|
|
228
|
+
|
|
229
|
+
&--compact {
|
|
230
|
+
padding: getSpacer(2xs) getSpacer(3xs) getSpacer(4xs) getSpacer(3xs);
|
|
231
|
+
line-height: 18px;
|
|
232
|
+
font-size: 14px;
|
|
233
|
+
height: unset;
|
|
234
|
+
|
|
235
|
+
@media (min-width: map.get($grid-breakpoints, sm)) {
|
|
236
|
+
padding: getSpacer(s) getSpacer(3xs) getSpacer(3xs) getSpacer(3xs);
|
|
237
|
+
line-height: 20px;
|
|
238
|
+
font-size: 16px;
|
|
239
|
+
height: unset;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
228
242
|
}
|
|
229
243
|
|
|
230
244
|
.table__head-cell-sort-icon-wrapper {
|
|
@@ -257,6 +271,14 @@ table tbody tr {
|
|
|
257
271
|
font-size: $font-size-sm;
|
|
258
272
|
line-height: 1.75rem;
|
|
259
273
|
}
|
|
274
|
+
|
|
275
|
+
&--compact {
|
|
276
|
+
padding: getSpacer(4xs) getSpacer(3xs);
|
|
277
|
+
|
|
278
|
+
@media (min-width: map.get($grid-breakpoints, sm)) {
|
|
279
|
+
padding: getSpacer(3xs);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
260
282
|
}
|
|
261
283
|
|
|
262
284
|
.table__cell-expander {
|
|
@@ -3,6 +3,7 @@ export type Styles = {
|
|
|
3
3
|
table: string;
|
|
4
4
|
table__cell: string;
|
|
5
5
|
'table__cell--center': string;
|
|
6
|
+
'table__cell--compact': string;
|
|
6
7
|
'table__cell--nowrap': string;
|
|
7
8
|
'table__cell--right': string;
|
|
8
9
|
'table__cell-expander': string;
|
|
@@ -13,10 +14,12 @@ export type Styles = {
|
|
|
13
14
|
'table__expander-cell-mobile': string;
|
|
14
15
|
'table__expander-cell-mobile--expanded': string;
|
|
15
16
|
table__head: string;
|
|
17
|
+
'table__head--compact': string;
|
|
16
18
|
'table__head--normal': string;
|
|
17
19
|
'table__head--sortable': string;
|
|
18
20
|
'table__head--transparent': string;
|
|
19
21
|
'table__head-cell': string;
|
|
22
|
+
'table__head-cell--compact': string;
|
|
20
23
|
'table__head-cell--sortable': string;
|
|
21
24
|
'table__head-cell--sorted': string;
|
|
22
25
|
'table__head-cell-sort-icon-wrapper': string;
|
|
@@ -35,6 +38,8 @@ export type Styles = {
|
|
|
35
38
|
'table--centeredoverflow-xl': string;
|
|
36
39
|
'table--centeredoverflow-xs': string;
|
|
37
40
|
'table--centeredoverflow-xxs': string;
|
|
41
|
+
'table-body': string;
|
|
42
|
+
'table-row': string;
|
|
38
43
|
};
|
|
39
44
|
|
|
40
45
|
export type ClassNames = keyof Styles;
|
package/package.json
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
"name": "@helsenorge/designsystem-react",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "The official design system for Helsenorge built with React.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/helsenorge/designsystem"
|
|
8
|
+
},
|
|
5
9
|
"homepage": "https://helsenorge.design",
|
|
6
|
-
"version": "
|
|
10
|
+
"version": "4.1.0",
|
|
7
11
|
"author": "Helsenorge",
|
|
8
12
|
"license": "MIT",
|
|
9
13
|
"peerDependencies": {
|