@bbl-digital/snorre 4.0.7 → 4.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/bundle.js +109 -15
  2. package/esm/core/Alert/Alert.stories.js +17 -17
  3. package/esm/core/Alert/index.js +32 -2
  4. package/esm/core/AppLoader/AppLoader.stories.js +2 -3
  5. package/esm/core/AppLoader/index.js +9 -1
  6. package/esm/core/Banner/Banner.stories.js +26 -18
  7. package/esm/core/Banner/index.js +4 -1
  8. package/esm/core/Modal/Modal.stories.js +56 -39
  9. package/esm/core/Modal/index.js +29 -1
  10. package/esm/core/Tag/Tag.stories.js +72 -71
  11. package/esm/core/Tag/index.js +4 -0
  12. package/esm/index.js +2 -1
  13. package/esm/shared/components/VisuallyHidden/index.js +22 -0
  14. package/lib/core/Alert/Alert.stories.d.ts +10 -23
  15. package/lib/core/Alert/Alert.stories.d.ts.map +1 -1
  16. package/lib/core/Alert/Alert.stories.js +17 -17
  17. package/lib/core/Alert/index.d.ts +2 -1
  18. package/lib/core/Alert/index.d.ts.map +1 -1
  19. package/lib/core/Alert/index.js +32 -2
  20. package/lib/core/AppLoader/AppLoader.stories.d.ts +6 -7
  21. package/lib/core/AppLoader/AppLoader.stories.d.ts.map +1 -1
  22. package/lib/core/AppLoader/AppLoader.stories.js +2 -3
  23. package/lib/core/AppLoader/index.d.ts +2 -1
  24. package/lib/core/AppLoader/index.d.ts.map +1 -1
  25. package/lib/core/AppLoader/index.js +9 -1
  26. package/lib/core/Autocomplete/styles.d.ts +26 -1
  27. package/lib/core/Autocomplete/styles.d.ts.map +1 -1
  28. package/lib/core/Banner/Banner.stories.d.ts +10 -23
  29. package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
  30. package/lib/core/Banner/Banner.stories.js +26 -18
  31. package/lib/core/Banner/index.d.ts +2 -1
  32. package/lib/core/Banner/index.d.ts.map +1 -1
  33. package/lib/core/Banner/index.js +4 -1
  34. package/lib/core/Box/styles.d.ts +25 -1
  35. package/lib/core/Box/styles.d.ts.map +1 -1
  36. package/lib/core/CollapseList/styles.d.ts +26 -1
  37. package/lib/core/CollapseList/styles.d.ts.map +1 -1
  38. package/lib/core/FileInput/styles.d.ts +25 -1
  39. package/lib/core/FileInput/styles.d.ts.map +1 -1
  40. package/lib/core/InfoButton/styles.d.ts +25 -1
  41. package/lib/core/InfoButton/styles.d.ts.map +1 -1
  42. package/lib/core/Modal/Modal.stories.d.ts +11 -23
  43. package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
  44. package/lib/core/Modal/Modal.stories.js +56 -39
  45. package/lib/core/Modal/index.d.ts +3 -2
  46. package/lib/core/Modal/index.d.ts.map +1 -1
  47. package/lib/core/Modal/index.js +29 -1
  48. package/lib/core/Tag/Tag.stories.d.ts +19 -59
  49. package/lib/core/Tag/Tag.stories.d.ts.map +1 -1
  50. package/lib/core/Tag/Tag.stories.js +72 -71
  51. package/lib/core/Tag/index.d.ts +2 -0
  52. package/lib/core/Tag/index.d.ts.map +1 -1
  53. package/lib/core/Tag/index.js +4 -0
  54. package/lib/core/private/ButtonOrLink.d.ts +2 -1
  55. package/lib/core/private/ButtonOrLink.d.ts.map +1 -1
  56. package/lib/index.d.ts +2 -1
  57. package/lib/index.d.ts.map +1 -1
  58. package/lib/index.js +2 -1
  59. package/lib/layout/Footer/FooterButton/styles.d.ts +26 -1
  60. package/lib/layout/Footer/FooterButton/styles.d.ts.map +1 -1
  61. package/lib/layout/Footer/FooterLink/styles.d.ts +26 -1
  62. package/lib/layout/Footer/FooterLink/styles.d.ts.map +1 -1
  63. package/lib/layout/Menu/MenuTop/styles.d.ts +25 -1
  64. package/lib/layout/Menu/MenuTop/styles.d.ts.map +1 -1
  65. package/lib/shared/components/VisuallyHidden/index.d.ts +11 -0
  66. package/lib/shared/components/VisuallyHidden/index.d.ts.map +1 -0
  67. package/lib/shared/components/VisuallyHidden/index.js +22 -0
  68. package/lib/shared/types/Accessibility.d.ts +2 -2
  69. package/lib/shared/types/Accessibility.d.ts.map +1 -1
  70. package/package.json +1 -1
@@ -11,6 +11,7 @@ const Tag = ({
11
11
  icon,
12
12
  trackingEvent,
13
13
  trackingName,
14
+ disabled,
14
15
  ...props
15
16
  }) => {
16
17
  const Tag = (props.withclose || props.onClick) && !props.strictClose ? 'button' : 'div';
@@ -18,6 +19,8 @@ const Tag = ({
18
19
  title: props.title,
19
20
  className: props.className,
20
21
  onClick: !props.strictClose ? props.onClick : undefined,
22
+ disabled: disabled,
23
+ role: !props.strictClose && props.onClick ? 'button' : undefined,
21
24
  css: theme => [styles.default(theme), props.neutral && styles.neutral(theme), props.success && styles.success(theme), props.info && styles.info(theme), props.danger && styles.danger(theme), props.dark && styles.dark(theme), props.light && styles.light(theme), props.outline && styles.outline(theme), props.withclose && styles.withclose, props.strictClose && styles.strictClose, icon && styles.withicon, props.loading && styles.loading],
22
25
  children: [icon && icon, props.children, props.loading ? _jsx(Spinner, {
23
26
  margin: "0 0 0 8px",
@@ -32,6 +35,7 @@ const Tag = ({
32
35
  onClick: props.onClick,
33
36
  trackingEvent: trackingEvent,
34
37
  trackingName: trackingEvent,
38
+ disabled: disabled,
35
39
  children: _jsx(IconClose, {
36
40
  color: props.closeColor || 'white',
37
41
  size: '14px'
package/esm/index.js CHANGED
@@ -197,6 +197,7 @@ import IllustrationMySiteDashboard from './illustrations/MySite/IllustrationMySi
197
197
  import IllustrationMySiteCooperative from './illustrations/MySite/IllustrationMySiteCooperative';
198
198
  import IllustrationMySiteAssociation from './illustrations/MySite/IllustrationMySiteAssociation';
199
199
  import IllustrationMySiteMailbox from './illustrations/MySite/IllustrationMySiteMailbox';
200
+ import VisuallyHidden from './shared/components/VisuallyHidden';
200
201
  import Html from './core/Html';
201
202
  import CustomText from './core/CustomText';
202
203
  import Select from './core/Select';
@@ -313,4 +314,4 @@ export { getFormatedPhone } from './utils/phone';
313
314
  export { getCurrentPage, getFirstButtonIndex, getHasMorePages, getHasPreviousPages, getSkippedItems } from './utils/pagination';
314
315
  export { handleDateToStringConvertion, handleStringToDateConvertion, getTimeFromHours, getTimeStringFromHours } from './utils/time';
315
316
  export { getFormattedPrice, getFormattedPriceWithEnding, getFormattedDate, getTitleString, getFormattedCardNumber, getFormattedTime, getFormattedOrganizationNumber, getFormattedDateTimePretty, getFormattedTimePeriod } from './utils/format';
316
- export { Topbar, Layout, LayoutShell, AppShell, AppLoader, Alert, Button, Card, Divider, Dropdown, Header, Input, Image, Checkbox, Link, List, ListItem, Tag, Text, Footer, FooterCol, FooterGroup, FooterLabel, FooterLink, FooterButton, Radio, Skeleton, Html, CustomText, Select, SearchSelect, Option, UserMenu, UserMenuOption, Modal, MediaCarousel, NotificationsMenu, NotificationRow, Table, Cell, Row, FileInput, Datepicker, DatepickerRange, Menu, AppPicker, MainMenu, MenuItem, MenuTop, SecondaryMenu, SecondaryMenuItem, MenuSpacer, Submenu, SubmenuItem, PreemptionCard, PreemptionCardLoading, PieChart, SimpleBarChart, SimpleLineChart, BarAndLineComposedChart, BarChartWithCustomizedEvent, IconApartment, IconArchives, IconArea, IconChoice, IconReply, IconReplyAll, IconForward, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAttachment, IconBack, IconBath, IconBoard, IconBookmarkOutline, IconBookmarkFilled, IconBus, IconBlock, IconCar, IconCaretDown, IconCaretLeft, IconCaretUp, IconCases, IconCaretRight, IconCheck, IconCheckedOutline, IconCheckedFilled, IconChevronLeft, IconChevronRight, IconChevronDown, IconClose, IconCloseAlt, IconComment, IconCompanyBuilding, IconDelete, IconDoor, IconDotFilled, IconDotOutline, IconDownload, IconDraft, IconElevator, IconErrorOutline, IconErrorFilled, IconExternalLink, IconEye, IconEyeDeny, IconFamily, IconFerry, IconFile, IconFileEdit, IconFileAdd, IconFileExcel, IconFilePDF, IconFileWord, IconFillOut, IconFloor, IconGarage, IconGrid, IconGym, IconHearth, IconHearthOutline, IconHelp, IconHistory, IconHouse, IconHomeFilled, IconHomeOutline, IconHouseBlockFilled, IconHouseBlockOutline, IconHumans, IconImportantComment, IconInbox, IconLabel, IconJointcost, IconJointcost2, IconKey, IconKitchen, IconLeafFilled, IconLeafOutline, IconLeisureTime, IconLock, IconLockLocked, IconLockOpen, IconMap, IconMail, IconMenu, IconMinus, IconMoney, IconPinned, IconParking, IconPaymentCard, IconPlus, IconPortalUser, IconReciept, IconRedo, IconRefresh, IconRoom, IconSave, IconSearch, IconSend, IconSettings, IconShopping, IconSign, IconStarFilled, IconStarHalf, IconStarOutline, IconStore, IconSubway, IconSwitch, IconSliders, IconTrain, IconTram, IconPrint, IconTransport, IconTypeOfBuilding, IconTypeOfBuildingOutline, IconUpload, IconUser, IconUserThin, IconVote, IconWalk, IconWarning, IconWarningBell, IconZip, IconSort, IconFilterList, IconBellOutline, IconPlusAlt, IconPhone, IconHouseOutline, IconMembership, IconMembershipFilled, IconCalendar, IconInfoOutline, IconInfoFilled, IconCamera, IllustrationHouse, IllustrationHighHouseComposition, IllustrationHighHouse, IllustrationHouseComposition, IllustrationLowHouse, IllustrationLowHouseComposition, IllustrationSemiDetachedHouse, IllustrationSemiDetachedHouseComposition, IllustrationSmallHouse, IllustrationSmallHouseComposition, IllustrationTerraceBlock, IllustrationTerraceBlockComposition, IllustrationTownHouse, IllustrationTownHouseComposition, IllustrationHousesBackground, IllustrationHousesBackgroundWithComposition, IllustrationHouseMissing, IllustrationError, IllustrationErrorGeneric, IllustrationPaperCompleted, IllustrationPaperMissing, IllustrationMySiteBuilding, IllustrationMySiteCoffeeBook, IllustrationMySiteComputer, IllustrationMySiteGift, IllustrationMySitePapers, IllustrationMySitePiggyBank, IllustrationMySiteDashboard, IllustrationMySiteAssociation, IllustrationMySiteCooperative, IllustrationMySiteMailbox, IllustrationMySiteTransfer, IconCommunication, IconCommunicationFilled, IconCompanyBuildingOutline, IconCompanyBuildingFilled, IconDashboard, IconDashboardFilled, IconEconomy, IconEconomyFilled, IconWork, IconWorkFilled, IconProfile, IconProfileFilled, IconLookup, IconLookupFilled, IconDocument, IconDocumentFilled, IconEarth, IconEdit, IconMinusAlt, IconMinusAltFilled, IconUndo, IconVisa, IconMasterCard, IconBankAxept, IconAmericanExpress, IconFileCopy, IconBblFlame, IconBblWater, IconBblShield, IconFullscreenOpen, IconFullscreenClose, IconGmail, IconOffice365, IconAuditorFilled, IconAuditorOutline, IconJanitorFilled, IconJanitorOutline, useScreenOrientation, Box, Textarea, InfoButton, CommentsTimeline, CommentLine, HeaderCell, RowCell, TableHeader, TableRow, BoxedTable, DraggableRow, CollapseList, CollapseListItem, Banner, Calendar, YearWheel, DropdownMenu, DropdownMenuOption, Timeline, Timepicker, TimelineStep, HighlightText, TabBar, TabItem, Editor, TabNav, Video, TabNavItem, NoticeCard, ListPager, Spinner, Autocomplete, GoogleButton, NotificationCounter, SearchFilter, ImagePicker, Tooltip, ImageViewer };
317
+ export { Topbar, Layout, LayoutShell, AppShell, AppLoader, Alert, Button, Card, Divider, Dropdown, Header, Input, Image, Checkbox, Link, List, ListItem, Tag, Text, Footer, FooterCol, FooterGroup, FooterLabel, FooterLink, FooterButton, Radio, Skeleton, Html, CustomText, Select, SearchSelect, Option, UserMenu, UserMenuOption, Modal, MediaCarousel, NotificationsMenu, NotificationRow, Table, Cell, Row, FileInput, Datepicker, DatepickerRange, Menu, AppPicker, MainMenu, MenuItem, MenuTop, SecondaryMenu, SecondaryMenuItem, MenuSpacer, Submenu, SubmenuItem, PreemptionCard, PreemptionCardLoading, PieChart, SimpleBarChart, SimpleLineChart, BarAndLineComposedChart, BarChartWithCustomizedEvent, IconApartment, IconArchives, IconArea, IconChoice, IconReply, IconReplyAll, IconForward, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAttachment, IconBack, IconBath, IconBoard, IconBookmarkOutline, IconBookmarkFilled, IconBus, IconBlock, IconCar, IconCaretDown, IconCaretLeft, IconCaretUp, IconCases, IconCaretRight, IconCheck, IconCheckedOutline, IconCheckedFilled, IconChevronLeft, IconChevronRight, IconChevronDown, IconClose, IconCloseAlt, IconComment, IconCompanyBuilding, IconDelete, IconDoor, IconDotFilled, IconDotOutline, IconDownload, IconDraft, IconElevator, IconErrorOutline, IconErrorFilled, IconExternalLink, IconEye, IconEyeDeny, IconFamily, IconFerry, IconFile, IconFileEdit, IconFileAdd, IconFileExcel, IconFilePDF, IconFileWord, IconFillOut, IconFloor, IconGarage, IconGrid, IconGym, IconHearth, IconHearthOutline, IconHelp, IconHistory, IconHouse, IconHomeFilled, IconHomeOutline, IconHouseBlockFilled, IconHouseBlockOutline, IconHumans, IconImportantComment, IconInbox, IconLabel, IconJointcost, IconJointcost2, IconKey, IconKitchen, IconLeafFilled, IconLeafOutline, IconLeisureTime, IconLock, IconLockLocked, IconLockOpen, IconMap, IconMail, IconMenu, IconMinus, IconMoney, IconPinned, IconParking, IconPaymentCard, IconPlus, IconPortalUser, IconReciept, IconRedo, IconRefresh, IconRoom, IconSave, IconSearch, IconSend, IconSettings, IconShopping, IconSign, IconStarFilled, IconStarHalf, IconStarOutline, IconStore, IconSubway, IconSwitch, IconSliders, IconTrain, IconTram, IconPrint, IconTransport, IconTypeOfBuilding, IconTypeOfBuildingOutline, IconUpload, IconUser, IconUserThin, IconVote, IconWalk, IconWarning, IconWarningBell, IconZip, IconSort, IconFilterList, IconBellOutline, IconPlusAlt, IconPhone, IconHouseOutline, IconMembership, IconMembershipFilled, IconCalendar, IconInfoOutline, IconInfoFilled, IconCamera, IllustrationHouse, IllustrationHighHouseComposition, IllustrationHighHouse, IllustrationHouseComposition, IllustrationLowHouse, IllustrationLowHouseComposition, IllustrationSemiDetachedHouse, IllustrationSemiDetachedHouseComposition, IllustrationSmallHouse, IllustrationSmallHouseComposition, IllustrationTerraceBlock, IllustrationTerraceBlockComposition, IllustrationTownHouse, IllustrationTownHouseComposition, IllustrationHousesBackground, IllustrationHousesBackgroundWithComposition, IllustrationHouseMissing, IllustrationError, IllustrationErrorGeneric, IllustrationPaperCompleted, IllustrationPaperMissing, IllustrationMySiteBuilding, IllustrationMySiteCoffeeBook, IllustrationMySiteComputer, IllustrationMySiteGift, IllustrationMySitePapers, IllustrationMySitePiggyBank, IllustrationMySiteDashboard, IllustrationMySiteAssociation, IllustrationMySiteCooperative, IllustrationMySiteMailbox, IllustrationMySiteTransfer, IconCommunication, IconCommunicationFilled, IconCompanyBuildingOutline, IconCompanyBuildingFilled, IconDashboard, IconDashboardFilled, IconEconomy, IconEconomyFilled, IconWork, IconWorkFilled, IconProfile, IconProfileFilled, IconLookup, IconLookupFilled, IconDocument, IconDocumentFilled, IconEarth, IconEdit, IconMinusAlt, IconMinusAltFilled, IconUndo, IconVisa, IconMasterCard, IconBankAxept, IconAmericanExpress, IconFileCopy, IconBblFlame, IconBblWater, IconBblShield, IconFullscreenOpen, IconFullscreenClose, IconGmail, IconOffice365, IconAuditorFilled, IconAuditorOutline, IconJanitorFilled, IconJanitorOutline, VisuallyHidden, useScreenOrientation, Box, Textarea, InfoButton, CommentsTimeline, CommentLine, HeaderCell, RowCell, TableHeader, TableRow, BoxedTable, DraggableRow, CollapseList, CollapseListItem, Banner, Calendar, YearWheel, DropdownMenu, DropdownMenuOption, Timeline, Timepicker, TimelineStep, HighlightText, TabBar, TabItem, Editor, TabNav, Video, TabNavItem, NoticeCard, ListPager, Spinner, Autocomplete, GoogleButton, NotificationCounter, SearchFilter, ImagePicker, Tooltip, ImageViewer };
@@ -0,0 +1,22 @@
1
+ import _styled from "@emotion/styled/base";
2
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
+ /**
4
+ * Used with aria-describedby to hide text visually, but not from screen readers
5
+ * @link https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
6
+ **/
7
+
8
+ const VisuallyHidden = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
9
+ target: "esqcxxz0"
10
+ } : {
11
+ target: "esqcxxz0",
12
+ label: "VisuallyHidden"
13
+ })(process.env.NODE_ENV === "production" ? {
14
+ name: "1dja9su",
15
+ styles: "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0"
16
+ } : {
17
+ name: "1dja9su",
18
+ styles: "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0",
19
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wYWNrYWdlcy9zaGFyZWQvY29tcG9uZW50cy9WaXN1YWxseUhpZGRlbi9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT2lDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9wYWNrYWdlcy9zaGFyZWQvY29tcG9uZW50cy9WaXN1YWxseUhpZGRlbi9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcblxuLyoqXG4gKiBVc2VkIHdpdGggYXJpYS1kZXNjcmliZWRieSB0byBoaWRlIHRleHQgdmlzdWFsbHksIGJ1dCBub3QgZnJvbSBzY3JlZW4gcmVhZGVyc1xuICogQGxpbmsgaHR0cHM6Ly9zbm9vay5jYS9hcmNoaXZlcy9odG1sX2FuZF9jc3MvaGlkaW5nLWNvbnRlbnQtZm9yLWFjY2Vzc2liaWxpdHlcbiAqKi9cblxuY29uc3QgVmlzdWFsbHlIaWRkZW4gPSBzdHlsZWQuZGl2YFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHdpZHRoOiAxcHg7XG4gIGhlaWdodDogMXB4O1xuICBwYWRkaW5nOiAwO1xuICBtYXJnaW46IC0xcHg7XG4gIG92ZXJmbG93OiBoaWRkZW47XG4gIGNsaXA6IHJlY3QoMCwgMCwgMCwgMCk7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gIGJvcmRlcjogMDtcbmBcbmV4cG9ydCBkZWZhdWx0IFZpc3VhbGx5SGlkZGVuXG4iXX0= */",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ });
22
+ export default VisuallyHidden;
@@ -1,24 +1,11 @@
1
- /// <reference types="react" />
2
- declare const _default;
3
- export default _default;
4
- export declare const Default: {
5
- render: () => import("react").JSX.Element;
6
- name: string;
7
- };
8
- export declare const Success: {
9
- render: () => import("react").JSX.Element;
10
- name: string;
11
- };
12
- export declare const Info: {
13
- render: () => import("react").JSX.Element;
14
- name: string;
15
- };
16
- export declare const Danger: {
17
- render: () => import("react").JSX.Element;
18
- name: string;
19
- };
20
- export declare const WithoutClose: {
21
- render: () => import("react").JSX.Element;
22
- name: string;
23
- };
1
+ import Alert from '.';
2
+ import { Meta, StoryObj } from '@storybook/react';
3
+ declare const meta: Meta<typeof Alert>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof Alert>;
6
+ export declare const Default: Story;
7
+ export declare const Success: Story;
8
+ export declare const Info: Story;
9
+ export declare const Danger: Story;
10
+ export declare const WithoutClose: Story;
24
11
  //# sourceMappingURL=Alert.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Alert/Alert.stories.tsx"],"names":[],"mappings":";;AAGA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAOnB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAOnB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAOhB,CAAA;AAED,eAAO,MAAM,MAAM;;;CAOlB,CAAA;AAED,eAAO,MAAM,YAAY;;;CAGxB,CAAA"}
1
+ {"version":3,"file":"Alert.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Alert/Alert.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,GAAG,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAGpB,CAAA;AAET,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAA;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAA"}
@@ -1,43 +1,43 @@
1
1
  import Alert from '.';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- export default {
2
+ const meta = {
4
3
  title: 'Core/Alert',
5
4
  component: Alert
6
5
  };
6
+ export default meta;
7
7
  export const Default = {
8
- render: () => /*#__PURE__*/_jsx(Alert, {
8
+ args: {
9
9
  onClose: () => console.log('close'),
10
- children: "Here is some general information."
11
- }),
10
+ children: 'Here is some general information.'
11
+ },
12
12
  name: 'Default'
13
13
  };
14
14
  export const Success = {
15
- render: () => /*#__PURE__*/_jsx(Alert, {
15
+ args: {
16
16
  success: true,
17
17
  onClose: () => console.log('close'),
18
- children: "Thank you for feedback!"
19
- }),
18
+ children: 'Thank you for feedback!'
19
+ },
20
20
  name: 'Success'
21
21
  };
22
22
  export const Info = {
23
- render: () => /*#__PURE__*/_jsx(Alert, {
23
+ args: {
24
24
  info: true,
25
25
  onClose: () => console.log('close'),
26
- children: "The service is down between 23:00 - 05:00."
27
- }),
26
+ children: 'The service is down between 23:00 - 05:00.'
27
+ },
28
28
  name: 'Info'
29
29
  };
30
30
  export const Danger = {
31
- render: () => /*#__PURE__*/_jsx(Alert, {
31
+ args: {
32
32
  danger: true,
33
33
  onClose: () => console.log('close'),
34
- children: "There has been a mistake. Could not reach service."
35
- }),
34
+ children: 'There has been a mistake. Could not reach service.'
35
+ },
36
36
  name: 'Danger'
37
37
  };
38
38
  export const WithoutClose = {
39
- render: () => /*#__PURE__*/_jsx(Alert, {
40
- children: "Cannot close this message."
41
- }),
39
+ args: {
40
+ children: 'Here is some general information.'
41
+ },
42
42
  name: 'Without close'
43
43
  };
@@ -1,7 +1,8 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import React from 'react';
3
3
  import type { SerializedStyles } from '@emotion/react';
4
- interface IProps {
4
+ import { AccessibilityProps } from '../../shared/types/Accessibility';
5
+ interface IProps extends AccessibilityProps {
5
6
  /** Primary theme style */
6
7
  primary?: boolean;
7
8
  /** Success alert */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Alert/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAKtD,UAAU,MAAM;IACd,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,eAAe;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC/C;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAiC3B,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Alert/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAiB,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAItD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAGrE,UAAU,MAAO,SAAQ,kBAAkB;IACzC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,gBAAgB,CAAA;IACtB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,eAAe;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC/C;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAiE3B,CAAA;AAED,eAAe,KAAK,CAAA"}
@@ -1,8 +1,9 @@
1
1
  /** @jsxImportSource @emotion/react */
2
- import React from 'react';
2
+ import React, { useRef } from 'react';
3
3
  import { styles } from './styles';
4
4
  import Button from '../Button';
5
5
  import IconClose from '../../icons/General/IconClose';
6
+ import VisuallyHidden from '../../shared/components/VisuallyHidden';
6
7
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
8
9
  const Alert = ({
@@ -14,17 +15,46 @@ const Alert = ({
14
15
  css,
15
16
  children,
16
17
  className,
17
- onClose
18
+ onClose,
19
+ ...restProps
18
20
  }) => {
21
+ const ariaLivePolicy = success ? 'polite' : 'assertive';
22
+ // Random id for aria-describedby
23
+ const id = Math.random().toString(36).substring(7);
24
+ const descriptionId = useRef(`aria-describedby-${id}`);
25
+ const childTextContent = React.Children.toArray(children).filter(child => typeof child === 'string');
26
+ const getDefaultAriaLabel = () => {
27
+ if (success) {
28
+ return 'Suksess';
29
+ }
30
+ if (danger) {
31
+ return 'Fare';
32
+ }
33
+ return 'Informasjon';
34
+ };
35
+ const accessibilityProps = {
36
+ role: restProps['role'] || 'alert',
37
+ 'aria-live': ariaLivePolicy,
38
+ 'aria-atomic': restProps['aria-atomic'] || true,
39
+ 'aria-label': restProps['aria-label'] || getDefaultAriaLabel(),
40
+ 'aria-relevant': restProps['aria-relevant'] || 'all',
41
+ 'aria-describedby': descriptionId.current
42
+ };
19
43
  return _jsxs("div", {
20
44
  css: theme => [styles.default(theme), success && styles.success(theme), info && styles.info(theme), danger && styles.danger(theme), rounded && styles.rounded, primary && styles.primary(theme), css && css],
21
45
  className: className,
46
+ ...restProps,
47
+ ...accessibilityProps,
22
48
  children: [children, onClose && _jsx(Button, {
23
49
  onClick: onClose,
24
50
  nostyle: true,
51
+ "aria-label": "Lukk",
25
52
  children: _jsx(IconClose, {
26
53
  size: 14
27
54
  })
55
+ }), _jsx(VisuallyHidden, {
56
+ id: descriptionId.current,
57
+ children: childTextContent
28
58
  })]
29
59
  });
30
60
  };
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
- declare const _default;
3
- export default _default;
4
- export declare const Default: {
5
- render: () => import("react").JSX.Element;
6
- name: string;
7
- };
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import AppLoader from '.';
3
+ declare const meta: Meta<typeof AppLoader>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof AppLoader>;
6
+ export declare const Default: Story;
8
7
  //# sourceMappingURL=AppLoader.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppLoader.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/AppLoader.stories.tsx"],"names":[],"mappings":";;AAGA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAGnB,CAAA"}
1
+ {"version":3,"file":"AppLoader.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/AppLoader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,SAAS,MAAM,GAAG,CAAA;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAGN,CAAA;AAE3B,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAA;AAEvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAA"}
@@ -1,10 +1,9 @@
1
1
  import AppLoader from '.';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- export default {
2
+ const meta = {
4
3
  title: 'Core/AppLoader',
5
4
  component: AppLoader
6
5
  };
6
+ export default meta;
7
7
  export const Default = {
8
- render: () => /*#__PURE__*/_jsx(AppLoader, {}),
9
8
  name: 'Default'
10
9
  };
@@ -1,6 +1,7 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import React from 'react';
3
- interface IProps {
3
+ import { AccessibilityProps } from '../../shared/types/Accessibility';
4
+ interface IProps extends AccessibilityProps {
4
5
  /** Color of loading dots */
5
6
  color?: string;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,MAAM;IACd,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAS/B,CAAA;AAED,eAAe,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/AppLoader/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,UAAU,MAAO,SAAQ,kBAAkB;IACzC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAkB/B,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -4,10 +4,18 @@ import { styles } from './styles';
4
4
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
5
5
  import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
6
6
  const AppLoader = ({
7
- color
7
+ color,
8
+ ...restProps
8
9
  }) => {
10
+ const accessibilityProps = {
11
+ role: restProps['role'] || 'status',
12
+ 'aria-live': restProps['aria-live'] || 'polite',
13
+ 'aria-label': restProps['aria-label'] || 'Laster innhold'
14
+ };
9
15
  return _jsxs("div", {
10
16
  css: theme => [styles.default(theme, color)],
17
+ ...restProps,
18
+ ...accessibilityProps,
11
19
  children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})]
12
20
  });
13
21
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IAppTheme } from '../../app-shell/theme';
2
3
  declare const styles: {
3
4
  default: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
@@ -18,7 +19,31 @@ declare const styles: {
18
19
  disabled: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
19
20
  };
20
21
  export declare const ErrorMessage: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
21
- export declare const Clear: import("@emotion/styled").StyledComponent<import("../private/ButtonOrLink").Props & import("../../shared/types/Accessibility").AccessibilityProps & {
22
+ export declare const Clear: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
23
+ [prop: string]: unknown;
24
+ afterIcon?: import("react").ReactNode;
25
+ beforeIcon?: import("react").ReactNode;
26
+ children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
27
+ disabled?: boolean | undefined;
28
+ href?: string | undefined;
29
+ loading?: boolean | undefined;
30
+ onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
31
+ onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
32
+ onKeyPress?: {
33
+ key: string;
34
+ action: (event: KeyboardEvent) => void;
35
+ } | undefined;
36
+ onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
37
+ onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
38
+ openInNewWindow?: boolean | undefined;
39
+ rel?: string | undefined;
40
+ trackingEvent?: string | undefined;
41
+ trackingName?: string | undefined;
42
+ type?: "button" | "reset" | "submit" | undefined;
43
+ target?: string | undefined;
44
+ download?: any;
45
+ tabIndex?: number | undefined;
46
+ } & {
22
47
  success?: boolean | undefined;
23
48
  danger?: boolean | undefined;
24
49
  highlight?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Autocomplete/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,QAAA,MAAM,MAAM;qBACO,SAAS;;;0BA2DJ,SAAS;;;;kBAuCjB,SAAS;6BA2BE,SAAS;yBAGb,MAAM;iCAOE,MAAM;kCAGL,MAAM;qBAGnB,SAAS;4BAYF,SAAS;qBA4BhB,MAAM;sBAKL,SAAS;CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,8CAM5C,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;UAcjB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Autocomplete/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAIjD,QAAA,MAAM,MAAM;qBACO,SAAS;;;0BA2DJ,SAAS;;;;kBAuCjB,SAAS;6BA2BE,SAAS;yBAGb,MAAM;iCAOE,MAAM;kCAGL,MAAM;qBAGnB,SAAS;4BAYF,SAAS;qBA4BhB,MAAM;sBAKL,SAAS;CAM5B,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,SAAS,8CAM5C,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAcjB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -1,24 +1,11 @@
1
- /// <reference types="react" />
2
- declare const _default;
3
- export default _default;
4
- export declare const Default: {
5
- render: () => import("react").JSX.Element;
6
- name: string;
7
- };
8
- export declare const Success: {
9
- render: () => import("react").JSX.Element;
10
- name: string;
11
- };
12
- export declare const Info: {
13
- render: () => import("react").JSX.Element;
14
- name: string;
15
- };
16
- export declare const Danger: {
17
- render: () => import("react").JSX.Element;
18
- name: string;
19
- };
20
- export declare const WithoutChildren: {
21
- render: () => import("react").JSX.Element;
22
- name: string;
23
- };
1
+ import Banner from '.';
2
+ import { Meta, StoryObj } from '@storybook/react';
3
+ declare const meta: Meta<typeof Banner>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof Banner>;
6
+ export declare const Default: Story;
7
+ export declare const Success: Story;
8
+ export declare const Info: Story;
9
+ export declare const Danger: Story;
10
+ export declare const WithoutChildren: Story;
24
11
  //# sourceMappingURL=Banner.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/Banner.stories.tsx"],"names":[],"mappings":";;AAKA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAgBnB,CAAA;AAED,eAAO,MAAM,OAAO;;;CAUnB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAOhB,CAAA;AAED,eAAO,MAAM,MAAM;;;CAOlB,CAAA;AAED,eAAO,MAAM,eAAe;;;CAW3B,CAAA"}
1
+ {"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/Banner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,GAAG,CAAA;AAGtB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAGrB,CAAA;AAET,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA;AAEpC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,KAclB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAepB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAA"}
@@ -2,12 +2,13 @@ import Banner from '.';
2
2
  import Header from '../Header';
3
3
  import Button from '../Button';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- export default {
5
+ const meta = {
6
6
  title: 'Core/Banner',
7
7
  component: Banner
8
8
  };
9
+ export default meta;
9
10
  export const Default = {
10
- render: () => /*#__PURE__*/_jsx(Banner, {
11
+ args: {
11
12
  header: /*#__PURE__*/_jsx(Header, {
12
13
  level: 4,
13
14
  children: "Title"
@@ -16,53 +17,60 @@ export const Default = {
16
17
  onClick: () => console.log('Hello'),
17
18
  children: "Hello I am button"
18
19
  }),
19
- children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
20
- }),
20
+ children: /*#__PURE__*/_jsx("p", {
21
+ children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
22
+ })
23
+ },
21
24
  name: 'Default'
22
25
  };
23
26
  export const Success = {
24
- render: () => /*#__PURE__*/_jsx(Banner, {
27
+ args: {
25
28
  success: true,
26
29
  header: /*#__PURE__*/_jsx(Header, {
27
30
  level: 4,
28
31
  children: "Title"
29
32
  }),
30
- children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
31
- }),
33
+ children: /*#__PURE__*/_jsx("p", {
34
+ children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
35
+ })
36
+ },
32
37
  name: 'Success'
33
38
  };
34
39
  export const Info = {
35
- render: () => /*#__PURE__*/_jsx(Banner, {
40
+ args: {
36
41
  info: true,
37
42
  header: /*#__PURE__*/_jsx(Header, {
38
43
  level: 4,
39
44
  children: "Title"
40
45
  }),
41
- children: "Content"
42
- }),
43
- name: 'Info'
46
+ children: /*#__PURE__*/_jsx("p", {
47
+ children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
48
+ })
49
+ }
44
50
  };
45
51
  export const Danger = {
46
- render: () => /*#__PURE__*/_jsx(Banner, {
52
+ args: {
47
53
  danger: true,
48
54
  header: /*#__PURE__*/_jsx(Header, {
49
55
  level: 4,
50
56
  children: "Title"
51
57
  }),
52
- children: "Content"
53
- }),
58
+ children: /*#__PURE__*/_jsx("p", {
59
+ children: "Eu irure eiusmod amet tempor nisi veniam cupidatat duis nulla dolor. Eiusmod amet sit nostrud adipisicing qui pariatur do et duis fugiat magna laboris elit irure. Officia fugiat incididunt ipsum commodo quis aute qui reprehenderit reprehenderit fugiat. Voluptate quis tempor ea consequat."
60
+ })
61
+ },
54
62
  name: 'Danger'
55
63
  };
56
64
  export const WithoutChildren = {
57
- render: () => /*#__PURE__*/_jsx(Banner, {
65
+ args: {
58
66
  header: /*#__PURE__*/_jsx(Header, {
59
67
  level: 4,
60
- children: "Just a header"
68
+ children: "Title"
61
69
  }),
62
70
  actionButton: /*#__PURE__*/_jsx(Button, {
63
71
  onClick: () => console.log('Hello'),
64
- children: "And a button"
72
+ children: "Hello I am button"
65
73
  })
66
- }),
74
+ },
67
75
  name: 'Without children'
68
76
  };
@@ -1,6 +1,7 @@
1
1
  /** @jsxImportSource @emotion/react */
2
2
  import React from 'react';
3
- interface IProps {
3
+ import { AccessibilityProps } from '../../shared/types/Accessibility';
4
+ interface IProps extends AccessibilityProps {
4
5
  /** Banner header */
5
6
  header?: React.ReactNode;
6
7
  /** Success banner */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,MAAM;IACd,oBAAoB;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;IAC9C,6CAA6C;IAC7C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA0B5B,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Banner/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,UAAU,MAAO,SAAQ,kBAAkB;IACzC,oBAAoB;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;IAC9C,6CAA6C;IAC7C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA6B5B,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -10,15 +10,18 @@ const Banner = ({
10
10
  info,
11
11
  success,
12
12
  header,
13
- actionButton
13
+ actionButton,
14
+ ...restProps
14
15
  }) => {
15
16
  const isDefault = !success && !danger && !info;
16
17
  return _jsx(Alert, {
18
+ role: "banner",
17
19
  rounded: true,
18
20
  primary: isDefault,
19
21
  success: success,
20
22
  danger: danger,
21
23
  info: info,
24
+ ...restProps,
22
25
  children: _jsxs(Wrapper, {
23
26
  children: [_jsxs(LeftSide, {
24
27
  children: [header, children && _jsx(Content, {
@@ -16,7 +16,31 @@ declare const ContentWrapper: import("@emotion/styled").StyledComponent<{
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
17
  as?: import("react").ElementType<any> | undefined;
18
18
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
19
- declare const CollapseButton: import("@emotion/styled").StyledComponent<import("../private/ButtonOrLink").Props & import("../../shared/types/Accessibility").AccessibilityProps & {
19
+ declare const CollapseButton: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
20
+ [prop: string]: unknown;
21
+ afterIcon?: import("react").ReactNode;
22
+ beforeIcon?: import("react").ReactNode;
23
+ children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
24
+ disabled?: boolean | undefined;
25
+ href?: string | undefined;
26
+ loading?: boolean | undefined;
27
+ onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
28
+ onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
29
+ onKeyPress?: {
30
+ key: string;
31
+ action: (event: KeyboardEvent) => void;
32
+ } | undefined;
33
+ onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
34
+ onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
35
+ openInNewWindow?: boolean | undefined;
36
+ rel?: string | undefined;
37
+ trackingEvent?: string | undefined;
38
+ trackingName?: string | undefined;
39
+ type?: "button" | "reset" | "submit" | undefined;
40
+ target?: string | undefined;
41
+ download?: any;
42
+ tabIndex?: number | undefined;
43
+ } & {
20
44
  success?: boolean | undefined;
21
45
  danger?: boolean | undefined;
22
46
  highlight?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,MAAM;qBACO,SAAS;oBAWV,SAAS;;qBAQR,MAAM;CAGxB,CAAA;AAED,QAAA,MAAM,aAAa;;;;YACC,OAAO;yGAU1B,CAAA;AAED,QAAA,MAAM,cAAc;;;yGAGnB,CAAA;AAED,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;UAGnB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Box/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,MAAM;qBACO,SAAS;oBAWV,SAAS;;qBAQR,MAAM;CAGxB,CAAA;AAED,QAAA,MAAM,aAAa;;;;YACC,OAAO;yGAU1B,CAAA;AAED,QAAA,MAAM,cAAc;;;yGAGnB,CAAA;AAED,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGnB,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
@@ -1,5 +1,30 @@
1
+ /// <reference types="react" />
1
2
  import { IAppTheme } from '../../app-shell/theme';
2
- export declare const CollapseButton: import("@emotion/styled").StyledComponent<import("../private/ButtonOrLink").Props & import("../../shared/types/Accessibility").AccessibilityProps & {
3
+ export declare const CollapseButton: import("@emotion/styled").StyledComponent<import("../../shared/types/Accessibility").AccessibilityProps & {
4
+ [prop: string]: unknown;
5
+ afterIcon?: import("react").ReactNode;
6
+ beforeIcon?: import("react").ReactNode;
7
+ children: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal;
8
+ disabled?: boolean | undefined;
9
+ href?: string | undefined;
10
+ loading?: boolean | undefined;
11
+ onClick?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
12
+ onMouseUp?: ((event: import("react").MouseEvent<import("../private/ButtonOrLink").ButtonOrLinkTypes, MouseEvent>) => void) | undefined;
13
+ onKeyPress?: {
14
+ key: string;
15
+ action: (event: KeyboardEvent) => void;
16
+ } | undefined;
17
+ onEnterKeyPress?: ((event: KeyboardEvent) => void) | undefined;
18
+ onEscapeKeyPress?: ((event: KeyboardEvent) => void) | undefined;
19
+ openInNewWindow?: boolean | undefined;
20
+ rel?: string | undefined;
21
+ trackingEvent?: string | undefined;
22
+ trackingName?: string | undefined;
23
+ type?: "button" | "reset" | "submit" | undefined;
24
+ target?: string | undefined;
25
+ download?: any;
26
+ tabIndex?: number | undefined;
27
+ } & {
3
28
  success?: boolean | undefined;
4
29
  danger?: boolean | undefined;
5
30
  highlight?: boolean | undefined;