@digigov/ui 0.27.0 → 0.28.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 +19 -1
- package/admin/Drawer/__stories__/Default.js +1 -1
- package/admin/Dropdown/__stories__/AlignRight.js +3 -3
- package/admin/Dropdown/__stories__/Default.js +3 -3
- package/admin/Dropdown/__stories__/PlacementTop.js +3 -3
- package/admin/Modal/Modal.stories.playwright.json +2 -2
- package/admin/Modal/__stories__/AlertDialog.js +2 -6
- package/admin/Modal/__stories__/AlertDialog.test.d.ts +1 -0
- package/admin/Modal/__stories__/AlertDialog.test.js +60 -0
- package/admin/Modal/__stories__/Default.js +1 -1
- package/app/Header/HeaderLogo.d.ts +2 -2
- package/app/Header/HeaderLogo.js +19 -19
- package/app/Header/HeaderSection.d.ts +2 -4
- package/app/Header/HeaderSection.js +20 -10
- package/app/Header/HeaderTitle.d.ts +2 -4
- package/app/Header/HeaderTitle.js +19 -19
- package/app/Header/index.d.ts +2 -4
- package/app/Header/index.js +21 -13
- package/app/PageTitle.js +1 -1
- package/core/Accordion/index.d.ts +1 -1
- package/core/Accordion/index.js +25 -8
- package/core/Blockquote/index.d.ts +2 -2
- package/core/Blockquote/index.js +19 -18
- package/core/Button/BackLink.d.ts +3 -0
- package/core/Button/BackLink.js +30 -0
- package/core/Button/ButtonLink.d.ts +3 -4
- package/core/Button/ButtonLink.js +20 -18
- package/core/Button/CallToAction.d.ts +2 -6
- package/core/Button/CallToAction.js +18 -29
- package/core/Button/ThemeToggleButton.d.ts +0 -2
- package/core/Button/ThemeToggleButton.js +16 -0
- package/core/Button/index.d.ts +3 -4
- package/core/Button/index.js +23 -27
- package/core/Divider/index.d.ts +3 -3
- package/core/Divider/index.js +4 -4
- package/core/Masthead/__stories__/Default.js +3 -1
- package/core/NotificationBanner/index.js +3 -11
- package/core/SectionBreak/index.d.ts +3 -0
- package/core/SectionBreak/index.js +30 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +14 -0
- package/es/admin/Drawer/__stories__/Default.js +1 -1
- package/es/admin/Dropdown/__stories__/AlignRight.js +1 -1
- package/es/admin/Dropdown/__stories__/Default.js +1 -1
- package/es/admin/Dropdown/__stories__/PlacementTop.js +1 -1
- package/es/admin/Modal/Modal.stories.playwright.json +2 -2
- package/es/admin/Modal/__stories__/AlertDialog.js +2 -6
- package/es/admin/Modal/__stories__/AlertDialog.test.js +53 -0
- package/es/admin/Modal/__stories__/Default.js +1 -1
- package/es/app/Header/HeaderLogo.js +2 -16
- package/es/app/Header/HeaderSection.js +2 -6
- package/es/app/Header/HeaderTitle.js +2 -16
- package/es/app/Header/index.js +2 -6
- package/es/app/PageTitle.js +1 -1
- package/es/core/Accordion/index.js +1 -5
- package/es/core/Blockquote/index.js +2 -15
- package/es/core/Button/BackLink.js +3 -0
- package/es/core/Button/ButtonLink.js +3 -16
- package/es/core/Button/CallToAction.js +2 -26
- package/es/core/Button/ThemeToggleButton.js +18 -2
- package/es/core/Button/index.js +4 -22
- package/es/core/Divider/index.js +2 -2
- package/es/core/Masthead/__stories__/Default.js +3 -1
- package/es/core/NotificationBanner/index.js +2 -10
- package/es/core/SectionBreak/index.js +3 -0
- package/es/core/index.js +1 -0
- package/es/layouts/Basic/Aside/index.js +3 -0
- package/es/layouts/Basic/Container/index.js +3 -0
- package/es/registry.js +12 -0
- package/es/typography/Caption/index.js +1 -1
- package/es/typography/Heading/Heading.stories.js +6 -0
- package/es/typography/Heading/__stories__/Default.js +24 -0
- package/es/typography/Heading/index.js +3 -0
- package/es/typography/Heading/index.mdx +12 -0
- package/es/typography/HeadingCaption/HeadingCaption.stories.js +7 -0
- package/es/typography/HeadingCaption/__stories__/Default.js +35 -0
- package/es/typography/HeadingCaption/__stories__/NestedToTitle.js +15 -0
- package/es/typography/HeadingCaption/index.js +3 -0
- package/es/typography/HeadingCaption/index.mdx +16 -0
- package/es/typography/NormalText/index.js +1 -1
- package/es/typography/Paragraph/index.js +1 -0
- package/es/typography/Title/index.js +1 -1
- package/esm/admin/Drawer/__stories__/Default.js +1 -1
- package/esm/admin/Dropdown/__stories__/AlignRight.js +1 -1
- package/esm/admin/Dropdown/__stories__/Default.js +1 -1
- package/esm/admin/Dropdown/__stories__/PlacementTop.js +1 -1
- package/esm/admin/Modal/Modal.stories.playwright.json +2 -2
- package/esm/admin/Modal/__stories__/AlertDialog.js +2 -6
- package/esm/admin/Modal/__stories__/AlertDialog.test.js +53 -0
- package/esm/admin/Modal/__stories__/Default.js +1 -1
- package/esm/app/Header/HeaderLogo.js +2 -16
- package/esm/app/Header/HeaderSection.js +2 -6
- package/esm/app/Header/HeaderTitle.js +2 -16
- package/esm/app/Header/index.js +2 -6
- package/esm/app/PageTitle.js +1 -1
- package/esm/core/Accordion/index.js +1 -5
- package/esm/core/Blockquote/index.js +2 -15
- package/esm/core/Button/BackLink.js +3 -0
- package/esm/core/Button/ButtonLink.js +3 -16
- package/esm/core/Button/CallToAction.js +2 -26
- package/esm/core/Button/ThemeToggleButton.js +18 -2
- package/esm/core/Button/index.js +4 -22
- package/esm/core/Divider/index.js +2 -2
- package/esm/core/Masthead/__stories__/Default.js +3 -1
- package/esm/core/NotificationBanner/index.js +2 -10
- package/esm/core/SectionBreak/index.js +3 -0
- package/esm/core/index.js +1 -0
- package/esm/index.js +1 -1
- package/esm/layouts/Basic/Aside/index.js +3 -0
- package/esm/layouts/Basic/Container/index.js +3 -0
- package/esm/registry.js +12 -0
- package/esm/typography/Caption/index.js +1 -1
- package/esm/typography/Heading/Heading.stories.js +6 -0
- package/esm/typography/Heading/__stories__/Default.js +24 -0
- package/esm/typography/Heading/index.js +3 -0
- package/esm/typography/Heading/index.mdx +12 -0
- package/esm/typography/HeadingCaption/HeadingCaption.stories.js +7 -0
- package/esm/typography/HeadingCaption/__stories__/Default.js +35 -0
- package/esm/typography/HeadingCaption/__stories__/NestedToTitle.js +15 -0
- package/esm/typography/HeadingCaption/index.js +3 -0
- package/esm/typography/HeadingCaption/index.mdx +16 -0
- package/esm/typography/NormalText/index.js +1 -1
- package/esm/typography/Paragraph/index.js +1 -0
- package/esm/typography/Title/index.js +1 -1
- package/layouts/Basic/Aside/index.d.ts +3 -0
- package/layouts/Basic/Aside/index.js +30 -0
- package/layouts/Basic/Container/index.d.ts +3 -0
- package/layouts/Basic/Container/index.js +30 -0
- package/package.json +2 -2
- package/registry.d.ts +6 -0
- package/registry.js +18 -0
- package/typography/Caption/index.d.ts +1 -1
- package/typography/Caption/index.js +1 -1
- package/typography/Heading/Heading.stories.d.ts +7 -0
- package/typography/{Title/Title.stories.js → Heading/Heading.stories.js} +4 -4
- package/typography/{Caption → Heading}/__stories__/Default.d.ts +0 -0
- package/typography/Heading/__stories__/Default.js +37 -0
- package/typography/Heading/index.d.ts +3 -0
- package/typography/Heading/index.js +30 -0
- package/typography/Heading/index.mdx +12 -0
- package/typography/HeadingCaption/HeadingCaption.stories.d.ts +8 -0
- package/typography/{Caption/Caption.stories.js → HeadingCaption/HeadingCaption.stories.js} +5 -5
- package/typography/{Title → HeadingCaption}/__stories__/Default.d.ts +0 -0
- package/typography/HeadingCaption/__stories__/Default.js +49 -0
- package/typography/{Caption → HeadingCaption}/__stories__/NestedToTitle.d.ts +0 -0
- package/typography/{Caption → HeadingCaption}/__stories__/NestedToTitle.js +5 -5
- package/typography/HeadingCaption/index.d.ts +3 -0
- package/typography/HeadingCaption/index.js +30 -0
- package/typography/HeadingCaption/index.mdx +16 -0
- package/typography/NormalText/index.d.ts +2 -4
- package/typography/NormalText/index.js +19 -8
- package/typography/Paragraph/index.d.ts +2 -5
- package/typography/Paragraph/index.js +19 -2
- package/typography/Title/index.d.ts +1 -1
- package/typography/Title/index.js +1 -1
- package/es/typography/Caption/Caption.stories.js +0 -7
- package/es/typography/Caption/__stories__/Default.js +0 -35
- package/es/typography/Caption/__stories__/NestedToTitle.js +0 -15
- package/es/typography/Caption/index.mdx +0 -16
- package/es/typography/Title/Title.stories.js +0 -6
- package/es/typography/Title/__stories__/Default.js +0 -24
- package/es/typography/Title/index.mdx +0 -12
- package/esm/typography/Caption/Caption.stories.js +0 -7
- package/esm/typography/Caption/__stories__/Default.js +0 -35
- package/esm/typography/Caption/__stories__/NestedToTitle.js +0 -15
- package/esm/typography/Caption/index.mdx +0 -16
- package/esm/typography/Title/Title.stories.js +0 -6
- package/esm/typography/Title/__stories__/Default.js +0 -24
- package/esm/typography/Title/index.mdx +0 -12
- package/typography/Caption/Caption.stories.d.ts +0 -8
- package/typography/Caption/__stories__/Default.js +0 -49
- package/typography/Caption/index.mdx +0 -16
- package/typography/Title/Title.stories.d.ts +0 -7
- package/typography/Title/__stories__/Default.js +0 -37
- package/typography/Title/index.mdx +0 -12
package/es/registry.js
CHANGED
|
@@ -58,6 +58,7 @@ import * as _digigov_ui_core_Base from '@digigov/ui/core/Base';
|
|
|
58
58
|
import * as _digigov_ui_core_Blockquote from '@digigov/ui/core/Blockquote';
|
|
59
59
|
import * as _digigov_ui_core_Breadcrumbs from '@digigov/ui/core/Breadcrumbs';
|
|
60
60
|
import * as _digigov_ui_core_Button_BackButton from '@digigov/ui/core/Button/BackButton';
|
|
61
|
+
import * as _digigov_ui_core_Button_BackLink from '@digigov/ui/core/Button/BackLink';
|
|
61
62
|
import * as _digigov_ui_core_Button_ButtonLink from '@digigov/ui/core/Button/ButtonLink';
|
|
62
63
|
import * as _digigov_ui_core_Button_CallToAction from '@digigov/ui/core/Button/CallToAction';
|
|
63
64
|
import * as _digigov_ui_core_Button_Icon from '@digigov/ui/core/Button/Icon';
|
|
@@ -102,6 +103,7 @@ import * as _digigov_ui_core_NavList_types from '@digigov/ui/core/NavList/types'
|
|
|
102
103
|
import * as _digigov_ui_core_NotificationBanner from '@digigov/ui/core/NotificationBanner';
|
|
103
104
|
import * as _digigov_ui_core_PhaseBanner from '@digigov/ui/core/PhaseBanner';
|
|
104
105
|
import * as _digigov_ui_core_Radios from '@digigov/ui/core/Radios';
|
|
106
|
+
import * as _digigov_ui_core_SectionBreak from '@digigov/ui/core/SectionBreak';
|
|
105
107
|
import * as _digigov_ui_core_Select from '@digigov/ui/core/Select';
|
|
106
108
|
import * as _digigov_ui_core_ServiceBadge from '@digigov/ui/core/ServiceBadge';
|
|
107
109
|
import * as _digigov_ui_core_SkipLink from '@digigov/ui/core/SkipLink';
|
|
@@ -137,7 +139,9 @@ import * as _digigov_ui_hooks_useOutdatedBrowserCheck from '@digigov/ui/hooks/us
|
|
|
137
139
|
import * as _digigov_ui_hooks_useSearch from '@digigov/ui/hooks/useSearch';
|
|
138
140
|
import * as _digigov_ui_hooks_useTogglableSections from '@digigov/ui/hooks/useTogglableSections';
|
|
139
141
|
import * as _digigov_ui from '@digigov/ui';
|
|
142
|
+
import * as _digigov_ui_layouts_Basic_Aside from '@digigov/ui/layouts/Basic/Aside';
|
|
140
143
|
import * as _digigov_ui_layouts_Basic_Bottom from '@digigov/ui/layouts/Basic/Bottom';
|
|
144
|
+
import * as _digigov_ui_layouts_Basic_Container from '@digigov/ui/layouts/Basic/Container';
|
|
141
145
|
import * as _digigov_ui_layouts_Basic_Content from '@digigov/ui/layouts/Basic/Content';
|
|
142
146
|
import * as _digigov_ui_layouts_Basic from '@digigov/ui/layouts/Basic';
|
|
143
147
|
import * as _digigov_ui_layouts_Basic_Main from '@digigov/ui/layouts/Basic/Main';
|
|
@@ -150,6 +154,8 @@ import * as _digigov_ui_locales_el from '@digigov/ui/locales/el';
|
|
|
150
154
|
import * as _digigov_ui_locales_en from '@digigov/ui/locales/en';
|
|
151
155
|
import * as _digigov_ui_router from '@digigov/ui/router';
|
|
152
156
|
import * as _digigov_ui_typography_Caption from '@digigov/ui/typography/Caption';
|
|
157
|
+
import * as _digigov_ui_typography_Heading from '@digigov/ui/typography/Heading';
|
|
158
|
+
import * as _digigov_ui_typography_HeadingCaption from '@digigov/ui/typography/HeadingCaption';
|
|
153
159
|
import * as _digigov_ui_typography_Hint from '@digigov/ui/typography/Hint';
|
|
154
160
|
import * as _digigov_ui_typography from '@digigov/ui/typography';
|
|
155
161
|
import * as _digigov_ui_typography_NormalText from '@digigov/ui/typography/NormalText';
|
|
@@ -233,6 +239,7 @@ export default {
|
|
|
233
239
|
'@digigov/ui/core/Blockquote': lazyImport(_digigov_ui_core_Blockquote),
|
|
234
240
|
'@digigov/ui/core/Breadcrumbs': lazyImport(_digigov_ui_core_Breadcrumbs),
|
|
235
241
|
'@digigov/ui/core/Button/BackButton': lazyImport(_digigov_ui_core_Button_BackButton),
|
|
242
|
+
'@digigov/ui/core/Button/BackLink': lazyImport(_digigov_ui_core_Button_BackLink),
|
|
236
243
|
'@digigov/ui/core/Button/ButtonLink': lazyImport(_digigov_ui_core_Button_ButtonLink),
|
|
237
244
|
'@digigov/ui/core/Button/CallToAction': lazyImport(_digigov_ui_core_Button_CallToAction),
|
|
238
245
|
'@digigov/ui/core/Button/Icon': lazyImport(_digigov_ui_core_Button_Icon),
|
|
@@ -277,6 +284,7 @@ export default {
|
|
|
277
284
|
'@digigov/ui/core/NotificationBanner': lazyImport(_digigov_ui_core_NotificationBanner),
|
|
278
285
|
'@digigov/ui/core/PhaseBanner': lazyImport(_digigov_ui_core_PhaseBanner),
|
|
279
286
|
'@digigov/ui/core/Radios': lazyImport(_digigov_ui_core_Radios),
|
|
287
|
+
'@digigov/ui/core/SectionBreak': lazyImport(_digigov_ui_core_SectionBreak),
|
|
280
288
|
'@digigov/ui/core/Select': lazyImport(_digigov_ui_core_Select),
|
|
281
289
|
'@digigov/ui/core/ServiceBadge': lazyImport(_digigov_ui_core_ServiceBadge),
|
|
282
290
|
'@digigov/ui/core/SkipLink': lazyImport(_digigov_ui_core_SkipLink),
|
|
@@ -312,7 +320,9 @@ export default {
|
|
|
312
320
|
'@digigov/ui/hooks/useSearch': lazyImport(_digigov_ui_hooks_useSearch),
|
|
313
321
|
'@digigov/ui/hooks/useTogglableSections': lazyImport(_digigov_ui_hooks_useTogglableSections),
|
|
314
322
|
'@digigov/ui': lazyImport(_digigov_ui),
|
|
323
|
+
'@digigov/ui/layouts/Basic/Aside': lazyImport(_digigov_ui_layouts_Basic_Aside),
|
|
315
324
|
'@digigov/ui/layouts/Basic/Bottom': lazyImport(_digigov_ui_layouts_Basic_Bottom),
|
|
325
|
+
'@digigov/ui/layouts/Basic/Container': lazyImport(_digigov_ui_layouts_Basic_Container),
|
|
316
326
|
'@digigov/ui/layouts/Basic/Content': lazyImport(_digigov_ui_layouts_Basic_Content),
|
|
317
327
|
'@digigov/ui/layouts/Basic': lazyImport(_digigov_ui_layouts_Basic),
|
|
318
328
|
'@digigov/ui/layouts/Basic/Main': lazyImport(_digigov_ui_layouts_Basic_Main),
|
|
@@ -325,6 +335,8 @@ export default {
|
|
|
325
335
|
'@digigov/ui/locales/en': lazyImport(_digigov_ui_locales_en),
|
|
326
336
|
'@digigov/ui/router': lazyImport(_digigov_ui_router),
|
|
327
337
|
'@digigov/ui/typography/Caption': lazyImport(_digigov_ui_typography_Caption),
|
|
338
|
+
'@digigov/ui/typography/Heading': lazyImport(_digigov_ui_typography_Heading),
|
|
339
|
+
'@digigov/ui/typography/HeadingCaption': lazyImport(_digigov_ui_typography_HeadingCaption),
|
|
328
340
|
'@digigov/ui/typography/Hint': lazyImport(_digigov_ui_typography_Hint),
|
|
329
341
|
'@digigov/ui/typography': lazyImport(_digigov_ui_typography),
|
|
330
342
|
'@digigov/ui/typography/NormalText': lazyImport(_digigov_ui_typography_NormalText),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import HeadingCaption from '@digigov/
|
|
1
|
+
import HeadingCaption from '@digigov/ui/typography/HeadingCaption';
|
|
2
2
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
3
|
export var Caption = withDeprecation(HeadingCaption, {
|
|
4
4
|
name: 'Caption',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Heading from '@digigov/ui/typography/Heading';
|
|
3
|
+
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(Heading, null, " govgr-heading-xl ");
|
|
5
|
+
|
|
6
|
+
var _ref2 = /*#__PURE__*/React.createElement(Heading, {
|
|
7
|
+
size: "l",
|
|
8
|
+
element: "h2"
|
|
9
|
+
}, ' ', "govgr-heading-lg", ' ');
|
|
10
|
+
|
|
11
|
+
var _ref3 = /*#__PURE__*/React.createElement(Heading, {
|
|
12
|
+
size: "m",
|
|
13
|
+
element: "h3"
|
|
14
|
+
}, ' ', "govgr-heading-md", ' ');
|
|
15
|
+
|
|
16
|
+
var _ref4 = /*#__PURE__*/React.createElement(Heading, {
|
|
17
|
+
size: "s",
|
|
18
|
+
element: "h4"
|
|
19
|
+
}, ' ', "govgr-heading-sm", ' ');
|
|
20
|
+
|
|
21
|
+
export var Default = function Default() {
|
|
22
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _ref, _ref2, _ref3, _ref4);
|
|
23
|
+
};
|
|
24
|
+
export default Default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import HeadingCaption from '@digigov/ui/typography/HeadingCaption';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Digigov UI/typography/HeadingCaption',
|
|
4
|
+
component: HeadingCaption
|
|
5
|
+
};
|
|
6
|
+
export * from '@digigov/ui/typography/HeadingCaption/__stories__/Default';
|
|
7
|
+
export * from '@digigov/ui/typography/HeadingCaption/__stories__/NestedToTitle';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import HeadingCaption from '@digigov/ui/typography/HeadingCaption';
|
|
3
|
+
import Heading from '@digigov/ui/typography/Heading';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(HeadingCaption, {
|
|
6
|
+
size: "xl"
|
|
7
|
+
}, "caption for govgr-heading-xl ");
|
|
8
|
+
|
|
9
|
+
var _ref2 = /*#__PURE__*/React.createElement(Heading, {
|
|
10
|
+
size: "l",
|
|
11
|
+
element: "h2"
|
|
12
|
+
}, ' ', "govgr-heading-xl", ' ');
|
|
13
|
+
|
|
14
|
+
var _ref3 = /*#__PURE__*/React.createElement(HeadingCaption, {
|
|
15
|
+
size: "l"
|
|
16
|
+
}, "caption for govgr-heading-lg ");
|
|
17
|
+
|
|
18
|
+
var _ref4 = /*#__PURE__*/React.createElement(Heading, {
|
|
19
|
+
size: "l",
|
|
20
|
+
element: "h2"
|
|
21
|
+
}, ' ', "govgr-heading-lg", ' ');
|
|
22
|
+
|
|
23
|
+
var _ref5 = /*#__PURE__*/React.createElement(HeadingCaption, {
|
|
24
|
+
size: "m"
|
|
25
|
+
}, "caption for govgr-heading-md ");
|
|
26
|
+
|
|
27
|
+
var _ref6 = /*#__PURE__*/React.createElement(Heading, {
|
|
28
|
+
size: "m",
|
|
29
|
+
element: "h3"
|
|
30
|
+
}, ' ', "govgr-heading-md", ' ');
|
|
31
|
+
|
|
32
|
+
export var Default = function Default() {
|
|
33
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _ref, _ref2, _ref3, _ref4, _ref5, _ref6);
|
|
34
|
+
};
|
|
35
|
+
export default Default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Heading from '@digigov/ui/typography/Heading';
|
|
3
|
+
import HeadingCaption from '@digigov/ui/typography/HeadingCaption';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(Heading, {
|
|
6
|
+
size: "l",
|
|
7
|
+
element: "h2"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(HeadingCaption, {
|
|
9
|
+
size: "xl"
|
|
10
|
+
}, "caption for govgr-heading-xl "), "govgr-heading-xl");
|
|
11
|
+
|
|
12
|
+
export var NestedToTitle = function NestedToTitle() {
|
|
13
|
+
return _ref;
|
|
14
|
+
};
|
|
15
|
+
export default NestedToTitle;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: heading-caption
|
|
3
|
+
title: HeadingCaption
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
import HeadingCaption from '@digigov/ui/typography/HeadingCaption';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
|
|
12
|
+
<Story packageName="@digigov/ui" component="typography/HeadingCaption" story="Default.tsx" />
|
|
13
|
+
|
|
14
|
+
### Nested caption to title
|
|
15
|
+
|
|
16
|
+
<Story packageName="@digigov/ui" component="typography/HeadingCaption" story="NestedToTitle.tsx" />
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["size", "component", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import Heading from '@digigov/
|
|
5
|
+
import Heading from '@digigov/ui/typography/Heading';
|
|
6
6
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
7
7
|
var sizeMappings = {
|
|
8
8
|
xl: 'xl',
|
|
@@ -71,7 +71,7 @@ export var Default = function Default() {
|
|
|
71
71
|
return toggleDrawer();
|
|
72
72
|
},
|
|
73
73
|
color: "secondary"
|
|
74
|
-
}, _ref2))), /*#__PURE__*/React.createElement(AdminContainer, null,
|
|
74
|
+
}, _ref2))), /*#__PURE__*/React.createElement(AdminContainer, null, /*#__PURE__*/React.createElement(AdminAside, null, _ref3, /*#__PURE__*/React.createElement(Drawer, {
|
|
75
75
|
direction: "left",
|
|
76
76
|
open: open
|
|
77
77
|
}, /*#__PURE__*/React.createElement(DrawerHeading, {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Dropdown, { DropdownButton, DropdownContent } from '@digigov/ui/admin/Dropdown';
|
|
3
3
|
import Field from '@digigov/ui/core/Field';
|
|
4
4
|
import Label from '@digigov/react-core/Label';
|
|
5
|
-
import
|
|
5
|
+
import SectionBreak from '@digigov/ui/core/Divider';
|
|
6
6
|
import NavVertical from '@digigov/react-core/NavVertical';
|
|
7
7
|
import { LabelTitle } from '@digigov/react-core/LabelTitle';
|
|
8
8
|
import TextInput from '@digigov/ui/core/TextInput';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Dropdown, { DropdownButton, DropdownContent } from '@digigov/ui/admin/Dropdown';
|
|
3
3
|
import Field from '@digigov/ui/core/Field';
|
|
4
4
|
import Label from '@digigov/react-core/Label';
|
|
5
|
-
import
|
|
5
|
+
import SectionBreak from '@digigov/ui/core/Divider';
|
|
6
6
|
import NavVertical from '@digigov/react-core/NavVertical';
|
|
7
7
|
import { LabelTitle } from '@digigov/react-core/LabelTitle';
|
|
8
8
|
import TextInput from '@digigov/ui/core/TextInput';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Dropdown, { DropdownButton, DropdownContent } from '@digigov/ui/admin/Dropdown';
|
|
3
3
|
import Field from '@digigov/ui/core/Field';
|
|
4
4
|
import Label from '@digigov/react-core/Label';
|
|
5
|
-
import
|
|
5
|
+
import SectionBreak from '@digigov/ui/core/Divider';
|
|
6
6
|
import NavVertical from '@digigov/react-core/NavVertical';
|
|
7
7
|
import { LabelTitle } from '@digigov/react-core/LabelTitle';
|
|
8
8
|
import TextInput from '@digigov/ui/core/TextInput';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "click",
|
|
10
10
|
"args": {
|
|
11
|
-
"selector": "
|
|
11
|
+
"selector": "text=Προσθήκη τηλεφώνου"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
{
|
|
25
25
|
"name": "click",
|
|
26
26
|
"args": {
|
|
27
|
-
"selector": "
|
|
27
|
+
"selector": "text=Διαγραφή"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
],
|
|
@@ -17,13 +17,9 @@ export var AlertDialog = function AlertDialog() {
|
|
|
17
17
|
modalProps = _useModal.modalProps,
|
|
18
18
|
toggleModal = _useModal.toggleModal;
|
|
19
19
|
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
21
|
-
color: "warning",
|
|
22
|
-
onClick: function onClick() {
|
|
23
|
-
return toggleModal();
|
|
24
|
-
}
|
|
25
|
-
}, "\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE"), /*#__PURE__*/React.createElement(Button, {
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
26
21
|
color: "warning",
|
|
22
|
+
id: "delete-button",
|
|
27
23
|
onClick: function onClick() {
|
|
28
24
|
return toggleModal();
|
|
29
25
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
|
|
4
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import AlertDialog from '@digigov/ui/admin/Modal/__stories__/AlertDialog';
|
|
8
|
+
import { test, expect } from '@playwright/experimental-ct-react';
|
|
9
|
+
|
|
10
|
+
var _ref3 = /*#__PURE__*/React.createElement(AlertDialog, null);
|
|
11
|
+
|
|
12
|
+
test('open modal', /*#__PURE__*/function () {
|
|
13
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
14
|
+
var mount, page, component;
|
|
15
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
16
|
+
while (1) {
|
|
17
|
+
switch (_context.prev = _context.next) {
|
|
18
|
+
case 0:
|
|
19
|
+
mount = _ref.mount, page = _ref.page;
|
|
20
|
+
_context.next = 3;
|
|
21
|
+
return mount(_ref3);
|
|
22
|
+
|
|
23
|
+
case 3:
|
|
24
|
+
component = _context.sent;
|
|
25
|
+
_context.next = 6;
|
|
26
|
+
return expect(component).toContainText('Διαγραφή');
|
|
27
|
+
|
|
28
|
+
case 6:
|
|
29
|
+
_context.next = 8;
|
|
30
|
+
return page.click('#delete-button');
|
|
31
|
+
|
|
32
|
+
case 8:
|
|
33
|
+
_context.t0 = expect;
|
|
34
|
+
_context.next = 11;
|
|
35
|
+
return page.screenshot();
|
|
36
|
+
|
|
37
|
+
case 11:
|
|
38
|
+
_context.t1 = _context.sent;
|
|
39
|
+
_context.next = 14;
|
|
40
|
+
return (0, _context.t0)(_context.t1).toMatchSnapshot();
|
|
41
|
+
|
|
42
|
+
case 14:
|
|
43
|
+
case "end":
|
|
44
|
+
return _context.stop();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, _callee);
|
|
48
|
+
}));
|
|
49
|
+
|
|
50
|
+
return function (_x) {
|
|
51
|
+
return _ref2.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
}());
|
|
@@ -21,7 +21,7 @@ export var Default = function Default() {
|
|
|
21
21
|
toggleModal = _useModal.toggleModal,
|
|
22
22
|
modalProps = _useModal.modalProps;
|
|
23
23
|
|
|
24
|
-
return /*#__PURE__*/React.createElement(
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
25
25
|
onClick: function onClick() {
|
|
26
26
|
return toggleModal();
|
|
27
27
|
}
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export var HeaderLogo = withDeprecation(CoreHeaderLogo, {
|
|
4
|
-
name: 'HeaderLogo',
|
|
5
|
-
props: {
|
|
6
|
-
height: {
|
|
7
|
-
warning: true
|
|
8
|
-
},
|
|
9
|
-
linkprops: {
|
|
10
|
-
warning: true
|
|
11
|
-
},
|
|
12
|
-
label: {
|
|
13
|
-
warning: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
});
|
|
1
|
+
import HeaderLogo from '@digigov/react-core/HeaderLogo';
|
|
2
|
+
export * from '@digigov/react-core/HeaderLogo';
|
|
17
3
|
export default HeaderLogo;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export var HeaderSection = withDeprecation(CoreHeaderSection, {
|
|
4
|
-
name: 'HeaderSection',
|
|
5
|
-
rename: 'HeaderSection'
|
|
6
|
-
});
|
|
1
|
+
import HeaderSection from '@digigov/react-core/HeaderSection';
|
|
2
|
+
export * from '@digigov/react-core/HeaderSection';
|
|
7
3
|
export default HeaderSection;
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export var HeaderTitle = withDeprecation(CoreHeaderTitle, {
|
|
4
|
-
name: 'Header',
|
|
5
|
-
props: {
|
|
6
|
-
xs: {
|
|
7
|
-
error: true
|
|
8
|
-
},
|
|
9
|
-
linkProps: {
|
|
10
|
-
error: 'The `linkProps` property is deprecated. You can use native anchor link props instead.'
|
|
11
|
-
},
|
|
12
|
-
linkComponent: {
|
|
13
|
-
error: 'The `linkComponent` property is deprecated.'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
});
|
|
1
|
+
import HeaderTitle from '@digigov/react-core/HeaderTitle';
|
|
2
|
+
export * from '@digigov/react-core/HeaderTitle';
|
|
17
3
|
export default HeaderTitle;
|
package/esm/app/Header/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export var Header = withDeprecation(CoreHeader, {
|
|
4
|
-
name: 'Header',
|
|
5
|
-
props: {}
|
|
6
|
-
});
|
|
1
|
+
import Header from '@digigov/react-core/Header';
|
|
2
|
+
export * from '@digigov/react-core/Header';
|
|
7
3
|
export * from '@digigov/ui/app/Header/HeaderTitle';
|
|
8
4
|
export * from '@digigov/ui/app/Header/HeaderLogo';
|
|
9
5
|
export * from '@digigov/ui/app/Header/HeaderSection';
|
package/esm/app/PageTitle.js
CHANGED
|
@@ -22,7 +22,7 @@ export var PageTitleSection = withDeprecation(function (_ref2) {
|
|
|
22
22
|
});
|
|
23
23
|
export var PageTitleCaption = withDeprecation(Caption, {
|
|
24
24
|
name: 'PageTitleCaption',
|
|
25
|
-
rename: '
|
|
25
|
+
rename: 'HeadingCaption'
|
|
26
26
|
});
|
|
27
27
|
export var PageTitleHeading = withDeprecation(function (_ref3) {
|
|
28
28
|
var component = _ref3.component,
|
|
@@ -8,16 +8,11 @@ import React from 'react';
|
|
|
8
8
|
import Accordion from '@digigov/react-core/Accordion';
|
|
9
9
|
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
10
10
|
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
11
|
-
import CoreAccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
12
11
|
import AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
13
12
|
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
14
13
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
15
14
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
16
15
|
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
17
|
-
export var AccordionSectionHeader = withDeprecation(CoreAccordionSectionHeader, {
|
|
18
|
-
name: 'AccordionSectionHeader',
|
|
19
|
-
error: true
|
|
20
|
-
});
|
|
21
16
|
export var AccordionItemDetails = withDeprecation(AccordionSectionContent, {
|
|
22
17
|
name: 'AccordionItemDetails',
|
|
23
18
|
rename: 'AccordionSectionContent'
|
|
@@ -58,5 +53,6 @@ var useAccordion = function useAccordion(props) {
|
|
|
58
53
|
}, rest);
|
|
59
54
|
};
|
|
60
55
|
|
|
56
|
+
export * from '@digigov/react-core/AccordionSectionHeader';
|
|
61
57
|
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent, AccordionSectionSummary, AccordionSectionSummaryHeading, useAccordion };
|
|
62
58
|
export default Accordion;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export var Blockquote = withDeprecation(CoreBlockquote, {
|
|
4
|
-
name: 'Blockquote',
|
|
5
|
-
props: {
|
|
6
|
-
variant: {
|
|
7
|
-
values: {
|
|
8
|
-
info: {
|
|
9
|
-
warning: true
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
error: true
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
});
|
|
1
|
+
import Blockquote from '@digigov/react-core/Blockquote';
|
|
2
|
+
export * from '@digigov/react-core/Blockquote';
|
|
16
3
|
export default Blockquote;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
name: 'ButtonLink',
|
|
5
|
-
props: {
|
|
6
|
-
variant: {
|
|
7
|
-
error: true
|
|
8
|
-
},
|
|
9
|
-
size: {
|
|
10
|
-
error: true
|
|
11
|
-
},
|
|
12
|
-
xsFullWidth: {
|
|
13
|
-
error: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
});
|
|
1
|
+
import ButtonLink from '@digigov/react-core/ButtonLink';
|
|
2
|
+
export * from '@digigov/react-core/ButtonLink';
|
|
3
|
+
export default ButtonLink;
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import CoreCallToAction from '@digigov/react-core/CallToAction';
|
|
5
|
-
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
6
|
-
export var CallToAction = withDeprecation(function (_ref) {
|
|
7
|
-
var _ref$label = _ref.label,
|
|
8
|
-
label = _ref$label === void 0 ? 'Start here' : _ref$label,
|
|
9
|
-
children = _ref.children,
|
|
10
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
|
|
12
|
-
return /*#__PURE__*/React.createElement(CoreCallToAction, props, children || label);
|
|
13
|
-
}, {
|
|
14
|
-
name: 'CallToAction',
|
|
15
|
-
props: {
|
|
16
|
-
variant: {
|
|
17
|
-
error: true
|
|
18
|
-
},
|
|
19
|
-
size: {
|
|
20
|
-
error: true
|
|
21
|
-
},
|
|
22
|
-
xsFullWidth: {
|
|
23
|
-
error: true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
1
|
+
import CallToAction from '@digigov/react-core/CallToAction';
|
|
2
|
+
export * from '@digigov/react-core/CallToAction';
|
|
27
3
|
export default CallToAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import Button from '@digigov/react-core/Button';
|
|
4
4
|
export var ThemeToggleButton = function ThemeToggleButton() {
|
|
5
5
|
var _useState = useState(function () {
|
|
6
6
|
var currentTheme = localStorage.getItem('theme');
|
|
@@ -23,7 +23,23 @@ export var ThemeToggleButton = function ThemeToggleButton() {
|
|
|
23
23
|
localStorage.setItem('theme', theme);
|
|
24
24
|
document.documentElement.className = theme;
|
|
25
25
|
}, [theme]);
|
|
26
|
-
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
var beforePrintListener = function beforePrintListener() {
|
|
28
|
+
document.documentElement.className = 'light';
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var afterPrintListener = function afterPrintListener() {
|
|
32
|
+
document.documentElement.className = localStorage.getItem('theme') || theme;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
window.addEventListener('beforeprint', beforePrintListener);
|
|
36
|
+
window.addEventListener('afterprint', afterPrintListener);
|
|
37
|
+
return function () {
|
|
38
|
+
window.removeEventListener('beforeprint', beforePrintListener);
|
|
39
|
+
window.removeEventListener('afterprint', afterPrintListener);
|
|
40
|
+
};
|
|
41
|
+
}, []);
|
|
42
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
27
43
|
onClick: toggleTheme,
|
|
28
44
|
variant: "link",
|
|
29
45
|
role: "button",
|