@scottish-government/designsystem-react 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/common/conditional-wrapper.jsx +8 -0
  2. package/dist/common/hint-text.jsx +9 -0
  3. package/dist/common/icon.jsx +14 -0
  4. package/dist/common/screen-reader-text.jsx +9 -0
  5. package/dist/common/wrapper-tag.jsx +11 -0
  6. package/dist/components/accordion/accordion.jsx +97 -0
  7. package/dist/components/aspect-box/aspect-box.jsx +78 -0
  8. package/dist/components/back-to-top/back-to-top.jsx +24 -0
  9. package/dist/components/breadcrumbs/breadcrumbs.jsx +28 -0
  10. package/dist/components/button/button.jsx +29 -0
  11. package/dist/components/checkbox/checkbox.jsx +58 -0
  12. package/dist/components/confirmation-message/confirmation-message.jsx +21 -0
  13. package/dist/components/contents-nav/contents-nav.jsx +30 -0
  14. package/dist/components/date-picker/date-picker.jsx +49 -0
  15. package/dist/components/details/details.jsx +16 -0
  16. package/dist/components/error-message/error-message.jsx +11 -0
  17. package/dist/components/inset-text/inset-text.jsx +11 -0
  18. package/dist/components/notification-banner/notification-banner.jsx +50 -0
  19. package/dist/components/notification-panel/notification-panel.jsx +18 -0
  20. package/dist/components/page-header/page-header.jsx +12 -0
  21. package/dist/components/page-metadata/page-metadata.jsx +23 -0
  22. package/dist/components/phase-banner/phase-banner.jsx +20 -0
  23. package/dist/components/question/question.jsx +21 -0
  24. package/dist/components/radio-button/radio-button.jsx +42 -0
  25. package/dist/components/select/select.jsx +51 -0
  26. package/dist/components/sequential-navigation/sequential-navigation.jsx +28 -0
  27. package/dist/components/side-navigation/side-navigation.jsx +49 -0
  28. package/dist/components/site-navigation/site-navigation.jsx +19 -0
  29. package/dist/components/site-search/site-search.jsx +54 -0
  30. package/dist/components/skip-links/skip-links.jsx +21 -0
  31. package/dist/components/tag/tag.jsx +13 -0
  32. package/dist/components/task-list/task-list.jsx +90 -0
  33. package/dist/components/text-input/text-input.jsx +58 -0
  34. package/dist/components/textarea/textarea.jsx +53 -0
  35. package/dist/components/warning-text/warning-text.jsx +13 -0
  36. package/dist/tsconfig.tsbuildinfo +1 -0
  37. package/package.json +1 -1
  38. package/.github/workflows/release-package.yml +0 -96
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const tag_1 = __importDefault(require("../tag/tag"));
7
+ const PhaseBanner = ({ children, phaseName, ...props }) => {
8
+ return (<div className="ds_phase-banner" {...props}>
9
+ <div className="ds_wrapper">
10
+ <p className="ds_phase-banner__content">
11
+ {phaseName && <tag_1.default title={phaseName} className="ds_phase-banner__tag"/>}
12
+ <span className="ds_phase-banner__text">
13
+ {children || "This is a new service"}
14
+ </span>
15
+ </p>
16
+ </div>
17
+ </div>);
18
+ };
19
+ PhaseBanner.displayName = 'PhaseBanner';
20
+ exports.default = PhaseBanner;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const error_message_1 = __importDefault(require("../error-message/error-message"));
7
+ const hint_text_1 = __importDefault(require("../../common/hint-text"));
8
+ const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
9
+ const Question = function ({ children, error, errorMessage, hintText, legend, tagName = 'div', ...props }) {
10
+ return (<wrapper_tag_1.default tagName={tagName} className={[
11
+ 'ds_question',
12
+ error && 'ds_question--error'
13
+ ].join(' ')} {...props}>
14
+ {legend && <legend>{legend}</legend>}
15
+ {hintText && <hint_text_1.default text={hintText}/>}
16
+ {error && errorMessage && <error_message_1.default text={errorMessage}/>}
17
+ {children}
18
+ </wrapper_tag_1.default>);
19
+ };
20
+ Question.displayName = 'Question';
21
+ exports.default = Question;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Radio = void 0;
7
+ const hint_text_1 = __importDefault(require("../../common/hint-text"));
8
+ const Radio = ({ checked, hintText, id, label, name, onBlur, onChange, small }) => {
9
+ const hintTextId = `hint-text-${id}`;
10
+ function handleBlur(event) {
11
+ if (typeof onBlur === 'function') {
12
+ onBlur(event);
13
+ }
14
+ }
15
+ function handleChange(event) {
16
+ if (typeof onChange === 'function') {
17
+ onChange(event);
18
+ }
19
+ }
20
+ return (<div className={[
21
+ 'ds_radio',
22
+ small && 'ds_radio--small'
23
+ ].join(' ')}>
24
+ <input aria-describedby={hintText ? hintTextId : undefined} className="ds_radio__input" defaultChecked={!!checked} id={id} name={name} onBlur={handleBlur} onChange={handleChange} type="radio"/>
25
+ <label className="ds_radio__label" htmlFor={id}>{label}</label>
26
+ {hintText && <hint_text_1.default id={hintTextId} text={hintText}/>}
27
+ </div>);
28
+ };
29
+ exports.Radio = Radio;
30
+ const RadioGroup = ({ inline, items, name, small, ...props }) => {
31
+ return (<div className={[
32
+ 'ds_radios',
33
+ 'ds_field-group',
34
+ inline && 'ds_field-group--inline'
35
+ ].join(' ')} {...props}>
36
+
37
+ {items && items.map((item, index) => (<exports.Radio checked={item.checked} hintText={item.hintText} id={item.id} key={'radio' + index} label={item.label} name={name} onBlur={item.onBlur} onChange={item.onChange} small={small || item.small}/>))}
38
+ </div>);
39
+ };
40
+ exports.Radio.displayName = 'Radio';
41
+ RadioGroup.displayName = 'RadioGroup';
42
+ exports.default = RadioGroup;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const error_message_1 = __importDefault(require("../error-message/error-message"));
7
+ const hint_text_1 = __importDefault(require("../../common/hint-text"));
8
+ const Option = function ({ text, value }) {
9
+ return (<option value={value}>{text}</option>);
10
+ };
11
+ const Select = function ({ defaultValue, error, errorMessage, hintText, id, label, name, onBlur, onChange, options, placeholder, width, ...props }) {
12
+ const errorMessageId = `error-message-${id}`;
13
+ const hintTextId = `hint-text-${id}`;
14
+ const describedbys = [];
15
+ if (hintText) {
16
+ describedbys.push(hintTextId);
17
+ }
18
+ ;
19
+ if (errorMessage) {
20
+ describedbys.push(errorMessageId);
21
+ }
22
+ ;
23
+ function handleBlur(event) {
24
+ if (typeof onBlur === 'function') {
25
+ onBlur(event);
26
+ }
27
+ }
28
+ function handleChange(event) {
29
+ if (typeof onChange === 'function') {
30
+ onChange(event);
31
+ }
32
+ }
33
+ return (<>
34
+ <label className="ds_label" htmlFor={id}>{label}</label>
35
+ {hintText && <hint_text_1.default id={hintTextId} text={hintText}/>}
36
+ {errorMessage && <error_message_1.default id={errorMessageId} text={errorMessage}/>}
37
+ <div className={[
38
+ "ds_select-wrapper",
39
+ error && 'ds_input--error',
40
+ width && `ds_input--${width}`,
41
+ ].join(' ')} {...props}>
42
+ <select aria-describedby={describedbys.join(' ')} className="ds_select" defaultValue={defaultValue} id={id} name={name || id} onBlur={handleBlur} onChange={handleChange}>
43
+ <option value="">{placeholder}</option>
44
+ {options && options.map((option, index) => (<Option value={option.value} text={option.text} key={`option-${index}`}/>))}
45
+ </select>
46
+ <span className="ds_select-arrow" aria-hidden="true"></span>
47
+ </div>
48
+ </>);
49
+ };
50
+ Select.displayName = 'Select';
51
+ exports.default = Select;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const NextLink = ({ href, title }) => {
4
+ return (<div className="ds_sequential-nav__item ds_sequential-nav__item--next">
5
+ <a href={href} className="ds_sequential-nav__button ds_sequential-nav__button--right">
6
+ <span className="ds_sequential-nav__text" data-label="Next">
7
+ {title}
8
+ </span>
9
+ </a>
10
+ </div>);
11
+ };
12
+ const PrevLink = ({ href, title, }) => {
13
+ return (<div className="ds_sequential-nav__item ds_sequential-nav__item--prev">
14
+ <a href={href} className="ds_sequential-nav__button ds_sequential-nav__button--left">
15
+ <span className="ds_sequential-nav__text" data-label="Previous">
16
+ {title}
17
+ </span>
18
+ </a>
19
+ </div>);
20
+ };
21
+ const SequentialNavigation = ({ ariaLabel = 'Article navigation', next, previous, ...props }) => {
22
+ return (<nav className="ds_sequential-nav" aria-label={ariaLabel} {...props}>
23
+ {previous && <PrevLink href={previous.href} title={previous.title}></PrevLink>}
24
+ {next && <NextLink href={next.href} title={next.title}></NextLink>}
25
+ </nav>);
26
+ };
27
+ SequentialNavigation.displayName = 'SequentialNavigation';
28
+ exports.default = SequentialNavigation;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Link = exports.List = void 0;
7
+ const react_1 = require("react");
8
+ // @ts-ignore
9
+ const side_navigation_1 = __importDefault(require("@scottish-government/design-system/src/components/side-navigation/side-navigation"));
10
+ const List = function ({ items, root }) {
11
+ return (<ul className="ds_side-navigation__list" id={root ? 'side-navigation-root' : undefined}>
12
+ {items && items.map((item, index) => (<exports.Link title={item.title} href={item.href} items={item.items} current={item.current} key={'sidenavitem' + index}/>))}
13
+ </ul>);
14
+ };
15
+ exports.List = List;
16
+ const Link = function ({ current = false, href, items, title }) {
17
+ return (<li className={[
18
+ 'ds_side-navigation__item',
19
+ items && 'ds_side-navigation__item--has-children'
20
+ ].join(' ')}>
21
+ {current ?
22
+ <span className="ds_side-navigation__link ds_current">{title}</span> :
23
+ <a href={href} className="ds_side-navigation__link">{title}</a>}
24
+
25
+ {items && <exports.List items={items}/>}
26
+ </li>);
27
+ };
28
+ exports.Link = Link;
29
+ const SideNavigation = function ({ children, items, ...props }) {
30
+ const ref = (0, react_1.useRef)(null);
31
+ (0, react_1.useEffect)(() => {
32
+ if (ref.current) {
33
+ new side_navigation_1.default(ref.current).init();
34
+ }
35
+ }, [ref]);
36
+ return (<nav aria-label="Sections" className="ds_side-navigation" data-module="ds-side-navigation" ref={ref} {...props}>
37
+ <input type="checkbox" className="fully-hidden js-toggle-side-navigation" id="show-side-navigation" aria-controls="side-navigation-root"/>
38
+ <label className="ds_side-navigation__expand ds_link" htmlFor="show-side-navigation">
39
+ <span className="visually-hidden">Show all</span> Pages in this section
40
+ <span className="ds_side-navigation__expand-indicator"></span>
41
+ </label>
42
+
43
+ {items && <exports.List root items={items}/>}
44
+ </nav>);
45
+ };
46
+ SideNavigation.displayName = 'SideNavigation';
47
+ exports.Link.displayName = 'SideNavLink';
48
+ exports.List.displayName = 'SideNavList';
49
+ exports.default = SideNavigation;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const SiteNavLink = ({ current = false, href, title }) => {
4
+ return (<li className="ds_site-navigation__item">
5
+ <a href={href} className={[
6
+ 'ds_site-navigation__link',
7
+ current ? 'ds_current' : undefined
8
+ ].join(' ')}>{title}</a>
9
+ </li>);
10
+ };
11
+ const SiteNavigation = ({ items, ...props }) => {
12
+ return (<nav className="ds_site-navigation" {...props}>
13
+ <ul className="ds_site-navigation__list">
14
+ {items && items.map((item, index) => (<SiteNavLink current={item.current} href={item.href} title={item.title} key={`link-${index}`}/>))}
15
+ </ul>
16
+ </nav>);
17
+ };
18
+ SiteNavigation.displayName = 'SiteNavigation';
19
+ exports.default = SiteNavigation;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = require("react");
7
+ // @ts-ignore
8
+ const autocomplete_1 = __importDefault(require("@scottish-government/design-system/src/components/autocomplete/autocomplete"));
9
+ const button_1 = __importDefault(require("../button/button"));
10
+ const SiteSearch = function ({ action = '/search', autocompleteEndpoint, autocompleteSuggestionMappingFunction, id = 'site-search', method = 'GET', minLength = 3, name = 'q', placeholder = 'Search', ...props }) {
11
+ const ref = (0, react_1.useRef)(null);
12
+ const hasAutocomplete = !!autocompleteEndpoint;
13
+ let autocompleteId = hasAutocomplete ? id + '-autocomplete' : '';
14
+ (0, react_1.useEffect)(() => {
15
+ if (hasAutocomplete && ref.current) {
16
+ const options = {};
17
+ if (minLength) {
18
+ options.minLength = minLength;
19
+ }
20
+ if (autocompleteSuggestionMappingFunction) {
21
+ options.suggestionMappingFunction = autocompleteSuggestionMappingFunction;
22
+ }
23
+ const autocomplete = new autocomplete_1.default(document.getElementById(autocompleteId), autocompleteEndpoint, options);
24
+ autocomplete.init();
25
+ }
26
+ }, [ref, autocompleteEndpoint, autocompleteId, hasAutocomplete, minLength, autocompleteSuggestionMappingFunction]);
27
+ return (<div className={[
28
+ 'ds_site-search',
29
+ hasAutocomplete ? 'ds_autocomplete' : undefined
30
+ ].join(' ')} id={autocompleteId ? autocompleteId : undefined} ref={ref} {...props}>
31
+
32
+ <form role="search" className="ds_site-search__form" method={method} action={action}>
33
+ <label className="ds_label visually-hidden" htmlFor={id} id={id + '-label'}>Search</label>
34
+
35
+ {hasAutocomplete && (<div role="status" aria-live="polite" id="autocomplete-status" className="visually-hidden"></div>)}
36
+
37
+ <div className="ds_input__wrapper ds_input__wrapper--has-icon">
38
+ <input aria-autocomplete={hasAutocomplete ? 'list' : undefined} aria-owns={hasAutocomplete ? 'autocomplete-suggestions' : undefined} autoComplete={hasAutocomplete ? 'off' : undefined} className={[
39
+ 'ds_input',
40
+ 'ds_site-search__input',
41
+ hasAutocomplete ? 'js-autocomplete-input' : undefined
42
+ ].join(' ')} id={id} name={name} placeholder={placeholder} required spellCheck="false" type="search"/>
43
+
44
+ <button_1.default type="submit" icon="search" iconOnly>Search</button_1.default>
45
+
46
+ {hasAutocomplete && (<div id="autocomplete-suggestions" className="ds_autocomplete__suggestions">
47
+ <ol className="ds_autocomplete__suggestions-list" role="listbox" aria-labelledby="site-search-label"></ol>
48
+ </div>)}
49
+ </div>
50
+ </form>
51
+ </div>);
52
+ };
53
+ SiteSearch.displayName = 'SiteSearch';
54
+ exports.default = SiteSearch;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SkipLink = void 0;
4
+ const SkipLink = ({ targetId, title }) => {
5
+ return (<li className="ds_skip-links__item">
6
+ <a href={`#${targetId}`} className="ds_skip-links__link">{title}</a>
7
+ </li>);
8
+ };
9
+ exports.SkipLink = SkipLink;
10
+ const SkipLinks = ({ items, mainContentId = 'main-content', mainLinkText = 'Skip to main content', ...props }) => {
11
+ return (<div className="ds_skip-links" {...props}>
12
+ <ul className="ds_skip-links__list">
13
+ <exports.SkipLink title={mainLinkText} targetId={mainContentId}/>
14
+
15
+ {items && items.map((item, index) => (<exports.SkipLink title={item.title} targetId={item.targetId} key={`skiplink-${index}`}/>))}
16
+ </ul>
17
+ </div>);
18
+ };
19
+ SkipLinks.displayName = 'SkipLinks';
20
+ exports.SkipLink.displayName = 'SkipLink';
21
+ exports.default = SkipLinks;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Tag = ({ className, colour, title, ...props }) => {
4
+ return (<span className={[
5
+ 'ds_tag',
6
+ className,
7
+ colour && `ds_tag--${colour}`,
8
+ ].join(' ')} {...props}>
9
+ {title}
10
+ </span>);
11
+ };
12
+ Tag.displayName = 'Tag';
13
+ exports.default = Tag;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TaskGroup = exports.Task = void 0;
7
+ const react_1 = require("react");
8
+ const conditional_wrapper_1 = __importDefault(require("../../common/conditional-wrapper"));
9
+ const hint_text_1 = __importDefault(require("../../common/hint-text"));
10
+ const screen_reader_text_1 = __importDefault(require("../../common/screen-reader-text"));
11
+ const tag_1 = __importDefault(require("../tag/tag"));
12
+ const Task = ({ children, href, id, isComplete = false, statusText, tagColour = 'grey', title, ...props }) => {
13
+ if (isComplete) {
14
+ tagColour = 'green';
15
+ }
16
+ return (<li className="ds_task-list__task" id={id} {...props}>
17
+ <div className="ds_task-list__task-details">
18
+ <h3 className="ds_task-list__task-heading">
19
+ <conditional_wrapper_1.default condition={typeof href !== 'undefined'} wrapper={(children) => <a className="ds_task-list__task-link" href={href}>{children}</a>}>
20
+ {title}
21
+ {statusText && <screen_reader_text_1.default>({statusText})</screen_reader_text_1.default>}
22
+ </conditional_wrapper_1.default>
23
+ </h3>
24
+ <hint_text_1.default className="ds_task-list__task-summary">{children}</hint_text_1.default>
25
+ </div>
26
+
27
+ {typeof statusText !== 'undefined' &&
28
+ <tag_1.default aria-hidden="true" colour={tagColour} title={statusText}/>}
29
+ </li>);
30
+ };
31
+ exports.Task = Task;
32
+ /**
33
+ * @param {Object} props
34
+ * @param {string} props.intro - Intro text
35
+ * @param {string} props.title - The title of the task group
36
+ * @returns {JSX.Element} - The element
37
+ */
38
+ const TaskGroup = ({ children, intro, title, ...props }) => {
39
+ return (<li className="ds_task-list-group__section" {...props}>
40
+ <h2 className="ds_task-list-heading">{title}</h2>
41
+ {intro && <p className="ds_task-list-intro">{intro}</p>}
42
+ <ul className="ds_task-list">
43
+ {children}
44
+ </ul>
45
+ </li>);
46
+ };
47
+ exports.TaskGroup = TaskGroup;
48
+ const TaskList = ({ children, headingId = 'task-list', title }) => {
49
+ let taskCount = 0;
50
+ let incompleteTaskIds = [];
51
+ let completedTasksCount = 0;
52
+ function processChild(item) {
53
+ if (item.type.displayName === 'Task') {
54
+ taskCount = taskCount + 1;
55
+ if (item.props.isComplete) {
56
+ completedTasksCount = completedTasksCount + 1;
57
+ }
58
+ else {
59
+ incompleteTaskIds.push(item.props.id);
60
+ }
61
+ }
62
+ else if (item.type.displayName === 'TaskGroup') {
63
+ react_1.Children.forEach(item.props.children, child => {
64
+ processChild(child);
65
+ });
66
+ }
67
+ }
68
+ function firstIncompleteTaskLink() {
69
+ if (incompleteTaskIds.length > 0) {
70
+ return (<p><a href={'#' + incompleteTaskIds[0]} className="js-task-list-skip-link">Skip to first incomplete section</a></p>);
71
+ }
72
+ }
73
+ react_1.Children.forEach(children, child => {
74
+ processChild(child);
75
+ });
76
+ return (<>
77
+ <h2 id={`${headingId}-status`} className="ds_task-list-status-heading">{title}</h2>
78
+ <nav aria-labelledby={`${headingId}-status`} className="ds_task-list-status">
79
+ <p>You have completed {completedTasksCount} of {taskCount} sections.</p>
80
+ {firstIncompleteTaskLink()}
81
+ </nav>
82
+ <ul className="ds_task-list">
83
+ {children}
84
+ </ul>
85
+ </>);
86
+ };
87
+ TaskList.displayName = 'TaskList';
88
+ exports.Task.displayName = 'Task';
89
+ exports.TaskGroup.displayName = 'TaskGroup';
90
+ exports.default = TaskList;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = require("react");
7
+ // @ts-ignore
8
+ const character_count_1 = __importDefault(require("@scottish-government/design-system/src/forms/character-count/character-count"));
9
+ const button_1 = __importDefault(require("../button/button"));
10
+ const conditional_wrapper_1 = __importDefault(require("../../common/conditional-wrapper"));
11
+ const error_message_1 = __importDefault(require("../error-message/error-message"));
12
+ const hint_text_1 = __importDefault(require("../../common/hint-text"));
13
+ const TextInput = ({ buttonIcon, buttonText, children, className, countThreshold, width, currency, currencySymbol, error, errorMessage, hasButton = false, hintText, id, label, maxlength, name, onBlur, onChange, placeholder, type = 'text', value, ...props }) => {
14
+ const errorMessageId = `error-message-${id}`;
15
+ const hintTextId = `hint-text-${id}`;
16
+ const ref = (0, react_1.useRef)(null);
17
+ const inputWrapperClasses = `${hasButton ? 'ds_input__wrapper ds_input__wrapper--has-icon' : ''} ${currency ? 'ds_currency-wrapper' : ''}`;
18
+ const describedbys = [];
19
+ if (hintText) {
20
+ describedbys.push(hintTextId);
21
+ }
22
+ ;
23
+ if (errorMessage) {
24
+ describedbys.push(errorMessageId);
25
+ }
26
+ ;
27
+ (0, react_1.useEffect)(() => {
28
+ if (ref.current) {
29
+ new character_count_1.default(ref.current).init();
30
+ }
31
+ }, [ref]);
32
+ function handleBlur(event) {
33
+ if (typeof onBlur === 'function') {
34
+ onBlur(event);
35
+ }
36
+ }
37
+ function handleChange(event) {
38
+ if (typeof onChange === 'function') {
39
+ onChange(event);
40
+ }
41
+ }
42
+ return (<conditional_wrapper_1.default condition={typeof maxlength !== 'undefined' && maxlength > 0} wrapper={(children) => <div ref={ref} data-threshold={countThreshold} data-module="ds-character-count">{children}</div>}>
43
+ <label className="ds_label" htmlFor={id}>{label}</label>
44
+ {hintText && <hint_text_1.default id={hintTextId} text={hintText}/>}
45
+ {errorMessage && <error_message_1.default id={errorMessageId} text={errorMessage}/>}
46
+ <conditional_wrapper_1.default condition={hasButton || typeof currency !== 'undefined' && currency} wrapper={(children) => <div className={inputWrapperClasses} data-symbol={currencySymbol}>{children}</div>}>
47
+ <input aria-describedby={describedbys.join(' ')} className={[
48
+ 'ds_input',
49
+ className,
50
+ error ? 'ds_input--error' : '',
51
+ width ? `ds_input--${width}` : '',
52
+ ].join(' ')} defaultValue={value} id={id} maxLength={maxlength} name={name || id} onBlur={handleBlur} onChange={handleChange} placeholder={placeholder} type={type} {...props}/>
53
+ {hasButton && (buttonText || buttonIcon) && <button_1.default iconOnly icon={buttonIcon}>{buttonText}</button_1.default>}
54
+ </conditional_wrapper_1.default>
55
+ </conditional_wrapper_1.default>);
56
+ };
57
+ TextInput.displayName = 'TextInput';
58
+ exports.default = TextInput;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = require("react");
7
+ // @ts-ignore
8
+ const character_count_1 = __importDefault(require("@scottish-government/design-system/src/forms/character-count/character-count"));
9
+ const conditional_wrapper_1 = __importDefault(require("../../common/conditional-wrapper"));
10
+ const error_message_1 = __importDefault(require("../error-message/error-message"));
11
+ const hint_text_1 = __importDefault(require("../../common/hint-text"));
12
+ const Textarea = ({ countThreshold, error, errorMessage, hintText, id, label, maxlength, name, onBlur, onChange, placeholder, rows = 4, value, ...props }) => {
13
+ const errorMessageId = `error-message-${id}`;
14
+ const hintTextId = `hint-text-${id}`;
15
+ const ref = (0, react_1.useRef)(null);
16
+ const describedbys = [];
17
+ if (hintText) {
18
+ describedbys.push(hintTextId);
19
+ }
20
+ ;
21
+ if (errorMessage) {
22
+ describedbys.push(errorMessageId);
23
+ }
24
+ ;
25
+ (0, react_1.useEffect)(() => {
26
+ if (ref.current) {
27
+ new character_count_1.default(ref.current).init();
28
+ }
29
+ }, [ref]);
30
+ function handleBlur(event) {
31
+ if (typeof onBlur === 'function') {
32
+ onBlur(event);
33
+ }
34
+ }
35
+ function handleChange(event) {
36
+ if (typeof onChange === 'function') {
37
+ onChange(event);
38
+ }
39
+ }
40
+ return (<conditional_wrapper_1.default condition={typeof maxlength !== 'undefined' && maxlength > 0} wrapper={(children) => <div ref={ref} data-threshold={countThreshold} data-module="ds-character-count">{children}</div>}>
41
+ <label className="ds_label" htmlFor={id}>{label}</label>
42
+ {hintText && <hint_text_1.default id={hintTextId} text={hintText}/>}
43
+ {errorMessage && <error_message_1.default id={errorMessageId} text={errorMessage}/>}
44
+
45
+ <textarea aria-describedby={describedbys.join(' ')} className={[
46
+ 'ds_input',
47
+ error && 'ds_input--error',
48
+ ].join(' ')} defaultValue={value} id={id} maxLength={maxlength} name={name || id} onBlur={handleBlur} onChange={handleChange} placeholder={placeholder} rows={rows} {...props}/>
49
+
50
+ </conditional_wrapper_1.default>);
51
+ };
52
+ Textarea.displayName = 'Textarea';
53
+ exports.default = Textarea;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const WarningText = ({ children, ...props }) => {
4
+ return (<div className="ds_warning-text" {...props}>
5
+ <strong className="ds_warning-text__icon" aria-hidden="true"></strong>
6
+ <strong className="visually-hidden">Warning</strong>
7
+ <div className="ds_warning-text__text">
8
+ {children}
9
+ </div>
10
+ </div>);
11
+ };
12
+ WarningText.displayName = 'WarningText';
13
+ exports.default = WarningText;
@@ -0,0 +1 @@
1
+ {"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.es2024.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.es2023.intl.d.ts","../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2024.collection.d.ts","../node_modules/typescript/lib/lib.es2024.object.d.ts","../node_modules/typescript/lib/lib.es2024.promise.d.ts","../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2024.string.d.ts","../node_modules/typescript/lib/lib.esnext.array.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.promise.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../node_modules/typescript/lib/lib.esnext.float16.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../@types/global.d.ts","../@types/sgds.d.ts","../@types/common/ConditionalWrapper.d.ts","../@types/common/HintText.d.ts","../@types/common/Icon.d.ts","../@types/common/ScreenReaderText.d.ts","../@types/common/WrapperTag.d.ts","../@types/components/Accordion.d.ts","../@types/components/AspectBox.d.ts","../@types/components/BackToTop.d.ts","../@types/components/Breadcrumbs.d.ts","../@types/components/Button.d.ts","../@types/components/Checkbox.d.ts","../@types/components/ConfirmationMessage.d.ts","../@types/components/ContentsNav.d.ts","../@types/components/DatePicker.d.ts","../@types/components/Details.d.ts","../@types/components/ErrorMessage.d.ts","../@types/components/Metadata.d.ts","../@types/components/NotificationBanner.d.ts","../@types/components/NotificationPanel.d.ts","../@types/components/PageHeader.d.ts","../@types/components/PhaseBanner.d.ts","../@types/components/Question.d.ts","../@types/components/RadioButton.d.ts","../@types/components/Select.d.ts","../@types/components/SequentialNavigation.d.ts","../@types/components/SideNavigation.d.ts","../@types/components/SiteNavigation.d.ts","../@types/components/SiteSearch.d.ts","../@types/components/SkipLinks.d.ts","../@types/components/Tag.d.ts","../@types/components/TaskList.d.ts","../@types/components/TextInput.d.ts","../@types/components/Textarea.d.ts","../src/common/conditional-wrapper.tsx","../src/common/hint-text.tsx","../src/common/icon.tsx","../src/common/screen-reader-text.tsx","../src/common/wrapper-tag.tsx","../src/components/accordion/accordion.tsx","../src/components/aspect-box/aspect-box.tsx","../src/components/back-to-top/back-to-top.tsx","../src/components/breadcrumbs/breadcrumbs.tsx","../src/components/button/button.tsx","../src/components/checkbox/checkbox.tsx","../src/components/confirmation-message/confirmation-message.tsx","../src/components/contents-nav/contents-nav.tsx","../src/components/error-message/error-message.tsx","../src/components/text-input/text-input.tsx","../src/components/date-picker/date-picker.tsx","../src/components/details/details.tsx","../src/components/inset-text/inset-text.tsx","../src/components/notification-banner/notification-banner.tsx","../src/components/notification-panel/notification-panel.tsx","../src/components/page-header/page-header.tsx","../src/components/page-metadata/page-metadata.tsx","../src/components/tag/tag.tsx","../src/components/phase-banner/phase-banner.tsx","../src/components/question/question.tsx","../src/components/radio-button/radio-button.tsx","../src/components/select/select.tsx","../src/components/sequential-navigation/sequential-navigation.tsx","../src/components/side-navigation/side-navigation.tsx","../src/components/site-navigation/site-navigation.tsx","../src/components/site-search/site-search.tsx","../src/components/skip-links/skip-links.tsx","../src/components/task-list/task-list.tsx","../src/components/textarea/textarea.tsx","../src/components/warning-text/warning-text.tsx"],"fileIdsList":[[83],[81,82],[83,123],[83,121],[121,122,123],[83,120],[121,123],[123],[83,133],[83,121,122,128],[141],[120,123,132],[120],[120,132],[83,128],[83,119,120,122,141],[83,119,120,128,132],[83,119,120,132]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"9e83685e23baf56b50eab5f89bcc46c66ccd709c4a44d32e635040196ad96603","impliedFormat":1},{"version":"19539467bf78201a93c2a00eeb99c728f52b4e623f14a7f20a691137e784c334","impliedFormat":1},{"version":"f9b9dc393258bafa22767d901343c7a0721d4cdf4273c1b4ee2ea59c4a9d8aee","affectsGlobalScope":true,"impliedFormat":1},{"version":"098d9d86ccf5d87f66dd1aba5edc7a79ac3c743252d0fcfc165f0842bbbbc03d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c64ea2259c2aca1681436a2c3515bbb8ae5961c9e3b7586599b9ea93d5126bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"527e5c92e78b41a24d5cab110a753a84bdcf5ee366d50438d02340143ad4046c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a2e5bd2aad7954b25979f0365662427432b417fee161a0143f4b57df59a77bee","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e4b84a1a0cf7e4beddc9fd133eeb16f57be77a743ed54a22a16f2573dd1049c","affectsGlobalScope":true,"impliedFormat":1},{"version":"501194205e656e49eda24bc4cb2991153086ce84f5de2cc6298958780baf5dc0","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d9f663a357c9604e121dbb84c3197397d4cf0a70c632a7bb8ab52ecffb47fe9","affectsGlobalScope":true,"impliedFormat":1},{"version":"795a3344a3c1b9b23670d059e1d787d9b19bf4f5ba95a2bf1bf6d45f68edf879","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a44882e64a6d02f9a1f7a5df840527c880f521f8391b34139bc3e0bc1a01071","affectsGlobalScope":true,"impliedFormat":1},{"version":"148729bac4e2f326c6d433a8cc8f6220354232b3b8d0c186d6d49c0baace62a5","affectsGlobalScope":true,"impliedFormat":1},{"version":"0cbae2256b8da5fa94a91e4588aacdeb0a76fdc4b95f130fd2a52ce14bae56ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b53d63911fa086cb2fe8dd1fd9fa37db0b0461fee2130174948fefab42b615","affectsGlobalScope":true,"impliedFormat":1},{"version":"0d1bbfc37f476714da448da21f0149cb29764dc28cc293860cd869b433bb4faa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ddd452d2f677bf5eb95e1672bc1376a0745531d256f7cceca0d0bdfedabfefa7","affectsGlobalScope":true,"impliedFormat":1},{"version":"2308590a9d9174ba57f30d6cfe8e07756948759df448de60f3f2efd31615c49b","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f933631f0519bd773d97948188b592717de588ecd462f11345d7a37c5df5176","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4a7a40fb52c0bebeeeed3e67e40d02c576daf6d0c568433b1004fbdc281826b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2bbe44e8ca142c128f00c20f9fe339ae169d7a1ea7cb04c15b9741788663d5a","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8db02e37668444307cf5df8a0acc6c6a7439b51666c97c345abfa4b82bc21bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"98ca85bc6fcc9b784ae5e74a4645a079ea54f01f8ccce536d08d69bf35bee782","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e1bd61a56720b4adb5bb5fca7a7f91ed91cb5afc70860cd652f10cb390a9321","affectsGlobalScope":true,"impliedFormat":1},{"version":"4d00e31abec9e0f86cf5930cb318852dfbdb7249e86a3135cb80d38a9872b142","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e9bd4fd9758ed505ae41d33753a0cdf46e1549c7809f50bcac83a698905b7e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fe4b9f17452cbf2eb5723458db431366666f7a49547e309b6215cf81abd30e1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e4e533ab1cd3bb55d1a4e87645737eb9b1697a0f203d8f87ea749d33e069d44","affectsGlobalScope":true,"impliedFormat":1},{"version":"d26f2ab557b364856451c4b6fe7a13f7bb259502decf8f3c4d05df5ee9e8a495","affectsGlobalScope":true,"impliedFormat":1},{"version":"5dbaaa54ab4b7a06488588a23fad4fb1e29c6698120846421e0748cae042caf5","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fba9b8227813f40a4b1da3b0621a6875ac3a60fb03f716bad5ba35ae31200e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"f79373f20bb8b8a2268e13516a67c003b5f87edd088d49478028031299567fce","affectsGlobalScope":true,"impliedFormat":1},{"version":"f320fba72ee15fdba35a7e57744f432f12d200d4cf4ff8ddfdfe7faee84a8cae","affectsGlobalScope":true,"impliedFormat":1},{"version":"b229c3f876810314bd63b09c469d69aeb2e02c22ca6342dfdccb5202c7874d0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"210791dd24c88a8eb27a91a11c1cd0299d62efa8e0eb030de154d5b30b52decd","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc670c5cfaeed3b2362c9addc3b2037c2633f284f6d5d2679d9bcf043a8f21e5","affectsGlobalScope":true,"impliedFormat":1},{"version":"68fe33fa82c2dd40de4f5e62d46ff7712a55e5ff11c5a00f45d46e3f4736dd32","impliedFormat":1},{"version":"81196068f2e4f59cc70e5a595b073a5798eef50054ed3807a43e457f78c84c55","impliedFormat":1},{"version":"7fafd4ed1ea648d24187ee52b5b6996c16560b7e76b88577325787236d22c126","impliedFormat":1},{"version":"71658a25bc2c1c615459d63c9e1ecc230822572c06112d570f63b2a6352333b1","impliedFormat":1},{"version":"1c1d08289fee4149d7a9b6a71f2d8f622312c642ba23ca6c67dbc182a34a90e6","impliedFormat":1},{"version":"25e3269f816cbe4fdd9870840bc616df0d84a37ba32c97e5fe45c086195af61a","impliedFormat":1},{"version":"2e8497facfce1e6632ffdbb2a172ddb8547fffbf3eec7e2a56b15a9a4a09489f","impliedFormat":1},{"version":"50cc9bc697b87ed781347a539ae04be7f556f238d881e4627169ea9947ec80ca","impliedFormat":1},{"version":"db439b85bb461984c749b7f4092b36bc302320df05e6ecabb5abcb722eb3647d","impliedFormat":1},{"version":"e516aa4fb79c2f4d00b733be3cb04db4dfb1a22b3e99b0747e4d17c692949fb4","impliedFormat":1},{"version":"61fa55270c0c6169607b1959475b3055788352fbff9a60afdbd75f50c84f154b","impliedFormat":1},{"version":"ae92e0c1230ecef4e98b72bf9e08fb4b8759ba55fb22318e71a9d1ddf712a880","impliedFormat":1},{"version":"a9b2d37b6e4a4d3b7e08cc4d474f5bcd7a311bf6843bbba74c61377e7cd8e919","impliedFormat":1},{"version":"4f98eb5b79ec02e6d2c0dbe4a8ecc624e072b2a59d1fc6a2ed478b84de30fc14","impliedFormat":1},{"version":"1aed7739f295a3d38ce16d0991c0ed16241bd050ec2770020e41b8cdd6405b56","impliedFormat":1},{"version":"8b057cba87b80affb2a9d0e74f5bb9f93fdf46febc82ac14bba14a83b11f3ef8","impliedFormat":1},{"version":"b502afe143028281afa86d889c91a7e146b7a872a840558e64d90c772a0994de","impliedFormat":1},{"version":"f05a1ec5ec8692c2b59a82e7376e0eb77226fbd2134527f59747402232c2bcd3","impliedFormat":1},{"version":"d85a8e5017d4c8350a80e9b54912757c0b63d64c75c28745d305fdaaf4de9316","impliedFormat":1},{"version":"da01554fbadee15220be6724204ac05f522f7d7df47350d87b80ffb289af19d9","impliedFormat":1},{"version":"37c51b8f09c343bb10bf53a24991d3118f9a723cdd02af65f05c9f04e9a31e60","impliedFormat":1},{"version":"3b8cd71266c821663d310daada911a65d54c5ac15d6fca2323e0e0dd244c84e7","impliedFormat":1},{"version":"19ac84ce5462c741d67e99fb788a5f7766bb392f938a9ea6f94534a71d4a7b7a","impliedFormat":1},{"version":"9dc390eec00e649a6a7c39111d1fb046ff8792955f90388291bd2d6cd75c111d","impliedFormat":1},{"version":"3b3a6e51c1e9afad4e4c7578b697b661d91b405576c39451eb1c642686528090","impliedFormat":1},{"version":"93ce43711398678c0fdcb29a1d110cbb9de307d89f62d60ceadf7be793ea35ef","impliedFormat":1},{"version":"49e046fde53632abef61062c3d29ef9d730e02d67c01d7c59332ba02506c8ef1","impliedFormat":1},{"version":"3ada45ba7abbebf3292b658f5abec3ace9412c9e458070cfc108608ed7c47c4b","impliedFormat":1},{"version":"5304588044d0583d8b1c51b5c3e377aaca7c95a884b3393846c0b298dd7b0849","impliedFormat":1},{"version":"5b4084c15781ff6b735e7d3d964ee9f919676a7ec6f08bf25917d22d09e64359","impliedFormat":1},{"version":"00c12c886b2f8e37583c26d1462e799722587f51ddd373aea0b9a7b2a622fe3a","impliedFormat":1},{"version":"d8a8326bd7f6c4ec38d06566169e7ad954a8e9cca2faadd1996e9fa6e89653ce","impliedFormat":1},{"version":"ddca391748fe80a80cc8b2ce26b7753461eec20ea8d447ad06b174101e530b8f","impliedFormat":1},{"version":"5760e67592762cc224a4b999db5228c5849866b5134be0513737427fd96a0c6c","impliedFormat":1},{"version":"d7e2e6591740c4c7a174a1f06b0ee9856c6adc1ff25776437f02785a0346aa50","impliedFormat":1}],"root":[[84,153]],"options":{"allowJs":false,"esModuleInterop":true,"jsx":1,"module":199,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","strict":true,"target":99},"referencedMap":[[84,1],[83,2],[124,3],[125,1],[126,4],[128,5],[129,6],[130,7],[131,8],[134,9],[137,10],[138,8],[142,11],[143,12],[144,13],[145,14],[147,1],[149,15],[151,16],[133,17],[152,18]],"version":"5.8.3"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scottish-government/designsystem-react",
3
3
  "description": "A React/JSX implementation of the Scottish Government Design System",
4
- "version": "0.0.2",
4
+ "version": "0.1.0",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Scottish Government Digital Design System team",