@aarhus-university/au-lib-react-components 12.6.2 → 12.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.eslintrc.js +35 -35
  2. package/.storybook/main.js +34 -34
  3. package/.storybook/preview.js +17 -17
  4. package/README.md +19 -19
  5. package/__tests__/jest/AUButtonComponent.test.tsx +165 -165
  6. package/__tests__/jest/AUDynamicContentComponent.test.tsx +386 -386
  7. package/__tests__/jest/AUErrorComponent.test.tsx +142 -142
  8. package/__tests__/jest/AUModalComponent.test.tsx +186 -186
  9. package/__tests__/jest/AUNotificationComponent.test.tsx +115 -115
  10. package/__tests__/jest/AUSpinnerComponent.test.tsx +57 -57
  11. package/__tests__/jest/AUToolbarComponent.test.tsx +46 -46
  12. package/__tests__/jest/context.test.ts +25 -25
  13. package/__tests__/jest/helpers.test.ts +15 -15
  14. package/__tests__/jest/setupTests.ts +2 -2
  15. package/babel.config.js +8 -8
  16. package/build/umd/all.css +2 -2
  17. package/build/umd/all.js +1 -1
  18. package/build/umd/alphabox.js +1 -1
  19. package/build/umd/databox.js +1 -1
  20. package/build/umd/diagramme.js +1 -1
  21. package/build/umd/flowbox.js +1 -1
  22. package/build/umd/flowbox.js.map +1 -1
  23. package/build/umd/universe.js +1 -1
  24. package/build-storybook.log +386 -386
  25. package/esbuild.mjs +22 -22
  26. package/package.json +107 -107
  27. package/src/components/AUAlertComponent.tsx +128 -128
  28. package/src/components/AUAutoSuggestComponent.js +148 -148
  29. package/src/components/AUButtonComponent.tsx +99 -99
  30. package/src/components/AUCalendarComponent.tsx +497 -497
  31. package/src/components/AUCharacterCountComponent.tsx +56 -56
  32. package/src/components/AUComboBoxComponent.tsx +195 -195
  33. package/src/components/AUContentToggleComponent.tsx +50 -50
  34. package/src/components/AUDatepickerComponent.tsx +124 -124
  35. package/src/components/AUDialogModalComponent.tsx +124 -124
  36. package/src/components/AUDynamicContentComponent.tsx +137 -137
  37. package/src/components/AUEditorComponent.tsx +126 -126
  38. package/src/components/AUErrorComponent.tsx +73 -73
  39. package/src/components/AUMobilePrefixComponent.tsx +20 -20
  40. package/src/components/AUModalComponent.tsx +72 -72
  41. package/src/components/AUNotificationComponent.tsx +44 -44
  42. package/src/components/AUReceiptComponent.tsx +34 -34
  43. package/src/components/AUSpinnerComponent.tsx +40 -40
  44. package/src/components/AUStepComponent.tsx +75 -75
  45. package/src/components/AUSubNavComponent.tsx +57 -57
  46. package/src/components/AUSubmitButtonContainerComponent.tsx +38 -38
  47. package/src/components/AUTabbedContentComponent.tsx +154 -154
  48. package/src/components/AUTableComponent.tsx +29 -29
  49. package/src/components/AUToastComponent.tsx +104 -104
  50. package/src/components/AUToolbarComponent.tsx +108 -108
  51. package/src/components/AUTruncatorComponent.tsx +141 -141
  52. package/src/components/wrapping/AUEmbedComponent.js +47 -47
  53. package/src/layout-2016/components/alphabox/AlphaBoxComponent.js +142 -142
  54. package/src/layout-2016/components/alphabox/AlphaBoxContentComponent.js +136 -136
  55. package/src/layout-2016/components/common/AUCollapsibleComponent.js +152 -152
  56. package/src/layout-2016/components/common/AUSpinnerComponent.js +103 -103
  57. package/src/layout-2016/components/databox/DataBoxAlphabetComponent.js +144 -144
  58. package/src/layout-2016/components/databox/DataBoxAssociationComponent.js +122 -122
  59. package/src/layout-2016/components/databox/DataBoxButtonComponent.js +157 -157
  60. package/src/layout-2016/components/databox/DataBoxComponent.js +297 -297
  61. package/src/layout-2016/components/databox/DataBoxGroupingComponent.js +64 -64
  62. package/src/layout-2016/components/databox/DataBoxSearchResultComponent.js +36 -36
  63. package/src/layout-2016/components/databox/DataBoxStackedAssociationComponent.js +54 -54
  64. package/src/layout-2016/components/databox/DataBoxSuggestionComponent.js +39 -39
  65. package/src/layout-2016/components/diagramme/AUDiagrammeComponent.js +309 -309
  66. package/src/layout-2016/components/flowbox/FlowBoxComponent.js +126 -126
  67. package/src/layout-2016/components/flowbox/FlowBoxPhoneComponent.js +104 -104
  68. package/src/layout-2016/lib/all.js +3 -3
  69. package/src/layout-2016/lib/au-alphabox.js +99 -99
  70. package/src/layout-2016/lib/au-databox.js +399 -399
  71. package/src/layout-2016/lib/au-diagramme.js +85 -85
  72. package/src/layout-2016/lib/au-flowbox.js +116 -119
  73. package/src/lib/context.tsx +59 -59
  74. package/src/lib/dates.ts +52 -52
  75. package/src/lib/helpers.ts +208 -208
  76. package/src/lib/hooks.ts +157 -157
  77. package/src/lib/i18n.ts +600 -600
  78. package/src/lib/portals.tsx +150 -150
  79. package/src/lib/tinymce.ts +84 -84
  80. package/src/lib/wrapping.ts +21 -21
  81. package/src/styles/_settings.scss +10 -10
  82. package/src/styles/alphabox.scss +222 -222
  83. package/src/styles/app.scss +7 -7
  84. package/src/styles/autosuggest.scss +57 -57
  85. package/src/styles/databox.scss +563 -563
  86. package/src/styles/diagramme.scss +119 -119
  87. package/src/styles/flowbox.scss +72 -72
  88. package/src/styles/maps.scss +395 -395
  89. package/stories/AUAlertComponent.stories.tsx +133 -133
  90. package/stories/AUAutoSuggestComponent.stories.tsx +95 -95
  91. package/stories/AUButtonComponent.stories.tsx +139 -139
  92. package/stories/AUCharacterCountComponent.stories.tsx +121 -121
  93. package/stories/AUComboBoxComponent.stories.tsx +101 -101
  94. package/stories/AUContentToggleComponent.stories.tsx +87 -87
  95. package/stories/AUDialogModalComponent.stories.tsx +75 -75
  96. package/stories/AUDynamicContentComponent.stories.tsx +119 -119
  97. package/stories/AUEditorComponent.stories.tsx +66 -66
  98. package/stories/AUErrorComponent.stories.tsx +132 -132
  99. package/stories/AUModalComponent.stories.tsx +160 -160
  100. package/stories/AUNotificationComponent.stories.tsx +151 -151
  101. package/stories/AUSpinnerComponent.stories.tsx +44 -44
  102. package/stories/AUStepComponent.stories.tsx +91 -91
  103. package/stories/AUToolbarComponent.stories.tsx +389 -389
  104. package/stories/AUTruncatorComponent.stories.tsx +123 -123
  105. package/stories/lib/helpers.tsx +146 -146
  106. package/tsconfig.json +46 -46
  107. package/webpack.config.js +88 -88
  108. package/.claude/settings.local.json +0 -12
  109. package/.vscode/settings.json +0 -22
@@ -1,160 +1,160 @@
1
- import React from 'react';
2
- import { StoryObj, Meta } from '@storybook/react';
3
- import { useArgs } from '@storybook/preview-api';
4
- import AUModalComponent from '../src/components/AUModalComponent';
5
- import AUButtonComponent from '../src/components/AUButtonComponent';
6
- import { ThemeWrapper } from './lib/helpers';
7
-
8
- const modalContent = (
9
- <>
10
- <h2 className="modal-view__header">
11
- The quick brown fox jumps over the lazy dog
12
- </h2>
13
- <div className="modal-view__content">
14
- <p>"The quick brown fox jumps over the lazy dog" is an English-language pangram—a sentence that contains all of the letters of the alphabet. It is commonly used for touch-typing practice, testing typewriters and computer keyboards, displaying examples of fonts, and other applications involving text where the use of all letters in the alphabet is desired. Owing to its brevity and coherence, it has become widely known.</p><h3>History</h3><p>The earliest known appearance of the phrase is from The Boston Journal. In an article titled "Current Notes" in the February 10, 1885, morning edition, the phrase is mentioned as a good practice sentence for writing students: "A favorite copy set by writing teachers for their pupils is the following, because it contains every letter of the alphabet: 'A quick brown fox jumps over the lazy dog.'"[1] Dozens of other newspapers published the phrase over the next few months, all using the version of the sentence starting with "A" rather than "The".[2] The earliest known use of the phrase in its modern form (starting with "The") is from the 1888 book Illustrative Shorthand by Linda Bronson.[3] The modern form (starting with "The") became more common despite the fact that it is slightly longer than the original (starting with "A").</p>
15
- </div>
16
- </>
17
- );
18
-
19
- // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
20
- export default {
21
- title: 'Delphinus/Modal',
22
- component: AUModalComponent,
23
- argTypes: {
24
- sender: {
25
- table: {
26
- disable: true,
27
- },
28
- },
29
- },
30
- decorators: [
31
- (Story, context) => (
32
- <ThemeWrapper theme={context.globals.theme}>
33
- {Story()}
34
- </ThemeWrapper>
35
- )
36
- ],
37
- } as Meta<typeof AUModalComponent>;
38
-
39
- const fakeBtn = document.createElement('button');
40
-
41
- type Story = StoryObj<typeof AUModalComponent>;
42
-
43
- export const Default: Story = {
44
- args: {
45
- show: true,
46
- sender: fakeBtn,
47
- closeButtonDisabled: false,
48
- },
49
- render: (args) => {
50
- const [_, updateArgs] = useArgs();
51
-
52
- return (
53
- <div className="page__content__block">
54
- <AUButtonComponent
55
- label="Open modal"
56
- ariaHasPopup
57
- onClick={() => updateArgs({ ...args, show: true })}
58
- />
59
- <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
60
- {modalContent}
61
- </AUModalComponent>
62
- </div>
63
- );
64
- },
65
- };
66
-
67
- export const Hidden: Story = {
68
- args: {
69
- show: false,
70
- sender: fakeBtn,
71
- },
72
- render: (args) => {
73
- const [_, updateArgs] = useArgs();
74
-
75
- return (
76
- <div className="page__content__block">
77
- <AUButtonComponent
78
- label="Open modal"
79
- ariaHasPopup
80
- onClick={() => updateArgs({ ...args, show: true })}
81
- />
82
- <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
83
- {modalContent}
84
- </AUModalComponent>
85
- </div>
86
- );
87
- },
88
- };
89
-
90
- export const Wide: Story = {
91
- args: {
92
- className: 'modal-view modal-view--wide',
93
- show: true,
94
- sender: fakeBtn,
95
- },
96
- render: (args) => {
97
- const [_, updateArgs] = useArgs();
98
-
99
- return (
100
- <div className="page__content__block">
101
- <AUButtonComponent
102
- label="Open modal"
103
- ariaHasPopup
104
- onClick={() => updateArgs({ ...args, show: true })}
105
- />
106
- <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
107
- {modalContent}
108
- </AUModalComponent>
109
- </div>
110
- );
111
- },
112
- };
113
-
114
- export const High: Story = {
115
- args: {
116
- className: 'modal-view modal-view--high',
117
- show: true,
118
- sender: fakeBtn,
119
- },
120
- render: (args) => {
121
- const [_, updateArgs] = useArgs();
122
-
123
- return (
124
- <div className="page__content__block">
125
- <AUButtonComponent
126
- label="Open modal"
127
- ariaHasPopup
128
- onClick={() => updateArgs({ ...args, show: true })}
129
- />
130
- <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
131
- {modalContent}
132
- </AUModalComponent>
133
- </div>
134
- );
135
- },
136
- };
137
-
138
- export const Non_Closable: Story = {
139
- args: {
140
- show: true,
141
- sender: fakeBtn,
142
- closeButtonDisabled: true,
143
- },
144
- render: (args) => {
145
- const [_, updateArgs] = useArgs();
146
-
147
- return (
148
- <div className="page__content__block">
149
- <AUButtonComponent
150
- label="Open modal"
151
- ariaHasPopup
152
- onClick={() => updateArgs({ ...args, show: true })}
153
- />
154
- <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
155
- {modalContent}
156
- </AUModalComponent>
157
- </div>
158
- );
159
- },
160
- };
1
+ import React from 'react';
2
+ import { StoryObj, Meta } from '@storybook/react';
3
+ import { useArgs } from '@storybook/preview-api';
4
+ import AUModalComponent from '../src/components/AUModalComponent';
5
+ import AUButtonComponent from '../src/components/AUButtonComponent';
6
+ import { ThemeWrapper } from './lib/helpers';
7
+
8
+ const modalContent = (
9
+ <>
10
+ <h2 className="modal-view__header">
11
+ The quick brown fox jumps over the lazy dog
12
+ </h2>
13
+ <div className="modal-view__content">
14
+ <p>"The quick brown fox jumps over the lazy dog" is an English-language pangram—a sentence that contains all of the letters of the alphabet. It is commonly used for touch-typing practice, testing typewriters and computer keyboards, displaying examples of fonts, and other applications involving text where the use of all letters in the alphabet is desired. Owing to its brevity and coherence, it has become widely known.</p><h3>History</h3><p>The earliest known appearance of the phrase is from The Boston Journal. In an article titled "Current Notes" in the February 10, 1885, morning edition, the phrase is mentioned as a good practice sentence for writing students: "A favorite copy set by writing teachers for their pupils is the following, because it contains every letter of the alphabet: 'A quick brown fox jumps over the lazy dog.'"[1] Dozens of other newspapers published the phrase over the next few months, all using the version of the sentence starting with "A" rather than "The".[2] The earliest known use of the phrase in its modern form (starting with "The") is from the 1888 book Illustrative Shorthand by Linda Bronson.[3] The modern form (starting with "The") became more common despite the fact that it is slightly longer than the original (starting with "A").</p>
15
+ </div>
16
+ </>
17
+ );
18
+
19
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
20
+ export default {
21
+ title: 'Delphinus/Modal',
22
+ component: AUModalComponent,
23
+ argTypes: {
24
+ sender: {
25
+ table: {
26
+ disable: true,
27
+ },
28
+ },
29
+ },
30
+ decorators: [
31
+ (Story, context) => (
32
+ <ThemeWrapper theme={context.globals.theme}>
33
+ {Story()}
34
+ </ThemeWrapper>
35
+ )
36
+ ],
37
+ } as Meta<typeof AUModalComponent>;
38
+
39
+ const fakeBtn = document.createElement('button');
40
+
41
+ type Story = StoryObj<typeof AUModalComponent>;
42
+
43
+ export const Default: Story = {
44
+ args: {
45
+ show: true,
46
+ sender: fakeBtn,
47
+ closeButtonDisabled: false,
48
+ },
49
+ render: (args) => {
50
+ const [_, updateArgs] = useArgs();
51
+
52
+ return (
53
+ <div className="page__content__block">
54
+ <AUButtonComponent
55
+ label="Open modal"
56
+ ariaHasPopup
57
+ onClick={() => updateArgs({ ...args, show: true })}
58
+ />
59
+ <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
60
+ {modalContent}
61
+ </AUModalComponent>
62
+ </div>
63
+ );
64
+ },
65
+ };
66
+
67
+ export const Hidden: Story = {
68
+ args: {
69
+ show: false,
70
+ sender: fakeBtn,
71
+ },
72
+ render: (args) => {
73
+ const [_, updateArgs] = useArgs();
74
+
75
+ return (
76
+ <div className="page__content__block">
77
+ <AUButtonComponent
78
+ label="Open modal"
79
+ ariaHasPopup
80
+ onClick={() => updateArgs({ ...args, show: true })}
81
+ />
82
+ <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
83
+ {modalContent}
84
+ </AUModalComponent>
85
+ </div>
86
+ );
87
+ },
88
+ };
89
+
90
+ export const Wide: Story = {
91
+ args: {
92
+ className: 'modal-view modal-view--wide',
93
+ show: true,
94
+ sender: fakeBtn,
95
+ },
96
+ render: (args) => {
97
+ const [_, updateArgs] = useArgs();
98
+
99
+ return (
100
+ <div className="page__content__block">
101
+ <AUButtonComponent
102
+ label="Open modal"
103
+ ariaHasPopup
104
+ onClick={() => updateArgs({ ...args, show: true })}
105
+ />
106
+ <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
107
+ {modalContent}
108
+ </AUModalComponent>
109
+ </div>
110
+ );
111
+ },
112
+ };
113
+
114
+ export const High: Story = {
115
+ args: {
116
+ className: 'modal-view modal-view--high',
117
+ show: true,
118
+ sender: fakeBtn,
119
+ },
120
+ render: (args) => {
121
+ const [_, updateArgs] = useArgs();
122
+
123
+ return (
124
+ <div className="page__content__block">
125
+ <AUButtonComponent
126
+ label="Open modal"
127
+ ariaHasPopup
128
+ onClick={() => updateArgs({ ...args, show: true })}
129
+ />
130
+ <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
131
+ {modalContent}
132
+ </AUModalComponent>
133
+ </div>
134
+ );
135
+ },
136
+ };
137
+
138
+ export const Non_Closable: Story = {
139
+ args: {
140
+ show: true,
141
+ sender: fakeBtn,
142
+ closeButtonDisabled: true,
143
+ },
144
+ render: (args) => {
145
+ const [_, updateArgs] = useArgs();
146
+
147
+ return (
148
+ <div className="page__content__block">
149
+ <AUButtonComponent
150
+ label="Open modal"
151
+ ariaHasPopup
152
+ onClick={() => updateArgs({ ...args, show: true })}
153
+ />
154
+ <AUModalComponent {...args} onClose={() => updateArgs({ ...args, show: false })}>
155
+ {modalContent}
156
+ </AUModalComponent>
157
+ </div>
158
+ );
159
+ },
160
+ };
@@ -1,152 +1,152 @@
1
- import React from 'react';
2
- import { StoryObj, Meta } from '@storybook/react';
3
- import AUNotificationComponent from '../src/components/AUNotificationComponent';
4
- import AUButtonComponent from '../src/components/AUButtonComponent';
5
- import { ThemeWrapper } from './lib/helpers';
6
-
7
- export default {
8
- title: 'Delphinus/Notification',
9
- component: AUNotificationComponent,
10
- argTypes: {
11
- type: {
12
- control: {
13
- type: 'radio',
14
- },
15
- options: [
16
- 'default',
17
- 'warning',
18
- 'attention',
19
- 'confirm',
20
- ],
21
- },
22
- header: {
23
- table: {
24
- disable: true,
25
- }
26
- },
27
- content: {
28
- table: {
29
- disable: true,
30
- }
31
- },
32
- actions: {
33
- table: {
34
- disable: true,
35
- }
36
- },
37
- classNames: {
38
- table: {
39
- disable: true,
40
- }
41
- },
42
- },
43
- decorators: [
44
- (Story, context) => (
45
- <ThemeWrapper theme={context.globals.theme}>
46
- {Story()}
47
- </ThemeWrapper>
48
- )
49
- ],
50
- } as Meta<typeof AUNotificationComponent>;
51
-
52
- type Story = StoryObj<typeof AUNotificationComponent>;
53
-
54
- export const Default: Story = {
55
- args: {
56
- header: 'This is a notification',
57
- content: [
58
- <p>This might be of importance...</p>
59
- ],
60
- },
61
- render: (args) => <AUNotificationComponent {...args} />,
62
- };
63
-
64
- export const Warning: Story = {
65
- args: {
66
- header: 'Oops! An error has occurred',
67
- type: 'warning',
68
- content: [
69
- <p>Shit's fucked, yo!</p>
70
- ],
71
- },
72
- render: (args) => <AUNotificationComponent {...args} />,
73
- };
74
-
75
- export const Attention: Story = {
76
- args: {
77
- header: 'Please read this',
78
- type: 'attention',
79
- content: [
80
- <p>We really want you to read this.</p>
81
- ],
82
- },
83
- render: (args) => <AUNotificationComponent {...args} />,
84
- };
85
-
86
- export const Confirm: Story = {
87
- args: {
88
- header: 'Great success',
89
- type: 'confirm',
90
- content: [
91
- <p>You the man now, dawg!</p>
92
- ],
93
- },
94
- render: (args) => <AUNotificationComponent {...args} />,
95
- };
96
-
97
- export const Single_Action: Story = {
98
- args: {
99
- header: 'Do you want to do this?',
100
- type: 'attention',
101
- content: [
102
- <p>Please confirm.</p>
103
- ],
104
- actions: [
105
- <AUButtonComponent
106
- label="Ok"
107
- />
108
- ],
109
- },
110
- render: (args) => <AUNotificationComponent {...args} />,
111
- };
112
-
113
- export const Multiple_Actions: Story = {
114
- args: {
115
- header: 'Do you want to do this?',
116
- type: 'attention',
117
- content: [
118
- <p>Please confirm.</p>
119
- ],
120
- actions: [
121
- <div className="button-container">
122
- <AUButtonComponent
123
- label="Ok"
124
- />
125
- <AUButtonComponent
126
- label="Cancel"
127
- type="text"
128
- />
129
- </div>,
130
- ],
131
- },
132
- render: (args) => <AUNotificationComponent {...args} />,
133
- };
134
-
135
- export const No_Header: Story = {
136
- args: {
137
- content: [
138
- <p>This might be of importance...</p>
139
- ],
140
- },
141
- render: (args) => <AUNotificationComponent {...args} />,
142
- };
143
-
144
- export const Constrained_Width: Story = {
145
- args: {
146
- header: 'This is a notification',
147
- content: [
148
- <p>This might be of importance...</p>
149
- ],
150
- },
151
- render: (args) => <AUNotificationComponent {...args} />,
1
+ import React from 'react';
2
+ import { StoryObj, Meta } from '@storybook/react';
3
+ import AUNotificationComponent from '../src/components/AUNotificationComponent';
4
+ import AUButtonComponent from '../src/components/AUButtonComponent';
5
+ import { ThemeWrapper } from './lib/helpers';
6
+
7
+ export default {
8
+ title: 'Delphinus/Notification',
9
+ component: AUNotificationComponent,
10
+ argTypes: {
11
+ type: {
12
+ control: {
13
+ type: 'radio',
14
+ },
15
+ options: [
16
+ 'default',
17
+ 'warning',
18
+ 'attention',
19
+ 'confirm',
20
+ ],
21
+ },
22
+ header: {
23
+ table: {
24
+ disable: true,
25
+ }
26
+ },
27
+ content: {
28
+ table: {
29
+ disable: true,
30
+ }
31
+ },
32
+ actions: {
33
+ table: {
34
+ disable: true,
35
+ }
36
+ },
37
+ classNames: {
38
+ table: {
39
+ disable: true,
40
+ }
41
+ },
42
+ },
43
+ decorators: [
44
+ (Story, context) => (
45
+ <ThemeWrapper theme={context.globals.theme}>
46
+ {Story()}
47
+ </ThemeWrapper>
48
+ )
49
+ ],
50
+ } as Meta<typeof AUNotificationComponent>;
51
+
52
+ type Story = StoryObj<typeof AUNotificationComponent>;
53
+
54
+ export const Default: Story = {
55
+ args: {
56
+ header: 'This is a notification',
57
+ content: [
58
+ <p>This might be of importance...</p>
59
+ ],
60
+ },
61
+ render: (args) => <AUNotificationComponent {...args} />,
62
+ };
63
+
64
+ export const Warning: Story = {
65
+ args: {
66
+ header: 'Oops! An error has occurred',
67
+ type: 'warning',
68
+ content: [
69
+ <p>Shit's fucked, yo!</p>
70
+ ],
71
+ },
72
+ render: (args) => <AUNotificationComponent {...args} />,
73
+ };
74
+
75
+ export const Attention: Story = {
76
+ args: {
77
+ header: 'Please read this',
78
+ type: 'attention',
79
+ content: [
80
+ <p>We really want you to read this.</p>
81
+ ],
82
+ },
83
+ render: (args) => <AUNotificationComponent {...args} />,
84
+ };
85
+
86
+ export const Confirm: Story = {
87
+ args: {
88
+ header: 'Great success',
89
+ type: 'confirm',
90
+ content: [
91
+ <p>You the man now, dawg!</p>
92
+ ],
93
+ },
94
+ render: (args) => <AUNotificationComponent {...args} />,
95
+ };
96
+
97
+ export const Single_Action: Story = {
98
+ args: {
99
+ header: 'Do you want to do this?',
100
+ type: 'attention',
101
+ content: [
102
+ <p>Please confirm.</p>
103
+ ],
104
+ actions: [
105
+ <AUButtonComponent
106
+ label="Ok"
107
+ />
108
+ ],
109
+ },
110
+ render: (args) => <AUNotificationComponent {...args} />,
111
+ };
112
+
113
+ export const Multiple_Actions: Story = {
114
+ args: {
115
+ header: 'Do you want to do this?',
116
+ type: 'attention',
117
+ content: [
118
+ <p>Please confirm.</p>
119
+ ],
120
+ actions: [
121
+ <div className="button-container">
122
+ <AUButtonComponent
123
+ label="Ok"
124
+ />
125
+ <AUButtonComponent
126
+ label="Cancel"
127
+ type="text"
128
+ />
129
+ </div>,
130
+ ],
131
+ },
132
+ render: (args) => <AUNotificationComponent {...args} />,
133
+ };
134
+
135
+ export const No_Header: Story = {
136
+ args: {
137
+ content: [
138
+ <p>This might be of importance...</p>
139
+ ],
140
+ },
141
+ render: (args) => <AUNotificationComponent {...args} />,
142
+ };
143
+
144
+ export const Constrained_Width: Story = {
145
+ args: {
146
+ header: 'This is a notification',
147
+ content: [
148
+ <p>This might be of importance...</p>
149
+ ],
150
+ },
151
+ render: (args) => <AUNotificationComponent {...args} />,
152
152
  };