carbon-react 105.1.1 → 106.0.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/esm/__internal__/tooltip-provider/index.d.ts +19 -24
- package/esm/__internal__/tooltip-provider/index.js +1 -11
- package/esm/__internal__/utils/helpers/browser/index.d.ts +15 -1
- package/esm/__internal__/utils/helpers/browser/index.js +33 -1
- package/esm/__internal__/utils/helpers/browser-type-check/index.d.ts +7 -1
- package/esm/__internal__/utils/helpers/browser-type-check/index.js +8 -1
- package/esm/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
- package/esm/__internal__/utils/helpers/events/events.d.ts +132 -31
- package/esm/__internal__/utils/helpers/events/events.js +10 -125
- package/esm/__internal__/utils/helpers/guid/index.d.ts +5 -0
- package/esm/__internal__/utils/helpers/guid/{guid.js → index.js} +0 -2
- package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +4 -2
- package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -1
- package/esm/__internal__/utils/helpers/tags/tags.d.ts +10 -6
- package/esm/__internal__/utils/helpers/tags/tags.js +2 -6
- package/esm/__internal__/utils/helpers/useUniqueId/index.d.ts +2 -0
- package/esm/__internal__/utils/helpers/useUniqueId/index.js +7 -0
- package/esm/__internal__/utils/logger/index.d.ts +5 -1
- package/esm/__internal__/utils/logger/index.js +25 -1
- package/esm/__spec_helper__/mock-match-media.d.ts +3 -1
- package/esm/components/app-wrapper/app-wrapper.component.d.ts +4 -0
- package/esm/components/app-wrapper/app-wrapper.component.js +5 -3
- package/esm/components/badge/badge.style.d.ts +4 -2
- package/esm/components/button/button-types.style.d.ts +1 -2
- package/esm/components/button/button-types.style.js +3 -1
- package/esm/components/button/button.component.d.ts +67 -36
- package/esm/components/button/button.component.js +3314 -165
- package/esm/components/button/button.config.d.ts +4 -3
- package/esm/components/button/button.style.d.ts +6 -8
- package/esm/components/button/button.style.js +51 -95
- package/esm/components/button/index.d.ts +2 -2
- package/esm/components/confirm/confirm.component.js +1 -1
- package/esm/components/dialog/dialog.component.js +1 -1
- package/esm/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
- package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/esm/components/fieldset/fieldset.component.d.ts +6 -1
- package/esm/components/fieldset/fieldset.component.js +14 -15
- package/esm/components/heading/heading.component.d.ts +5 -0
- package/esm/components/icon/index.d.ts +1 -0
- package/esm/components/multi-action-button/multi-action-button.component.d.ts +3 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +7 -5
- package/esm/components/multi-action-button/multi-action-button.d.ts +4 -2
- package/esm/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
- package/esm/components/multi-step-wizard/step/step.d.ts +6 -0
- package/esm/components/multi-step-wizard/step/step.style.d.ts +4 -2
- package/esm/components/portrait/portrait-initials.component.js +1 -1
- package/esm/components/radio-button/radio-button-svg.component.js +29 -16
- package/esm/components/scrollable-list/scrollable-list.component.d.ts +8 -0
- package/esm/components/select/option/index.d.ts +1 -1
- package/esm/components/select/select-list/select-list.component.js +1 -1
- package/esm/components/select/select-textbox/select-textbox.component.js +1 -1
- package/esm/components/split-button/split-button-toggle.style.d.ts +2 -6
- package/esm/components/split-button/split-button.component.d.ts +3 -1
- package/esm/components/split-button/split-button.component.js +7 -4
- package/esm/components/split-button/split-button.d.ts +5 -2
- package/esm/components/textbox/textbox.component.d.ts +1 -2
- package/esm/components/textbox/textbox.component.js +7 -6
- package/esm/components/tooltip/index.d.ts +2 -1
- package/esm/components/tooltip/tooltip-pointer.style.d.ts +10 -1
- package/esm/components/tooltip/tooltip-pointer.style.js +5 -12
- package/esm/components/tooltip/tooltip.component.d.ts +33 -2
- package/esm/components/tooltip/tooltip.component.js +255 -110
- package/esm/components/tooltip/tooltip.config.d.ts +2 -1
- package/esm/components/tooltip/tooltip.style.d.ts +7 -2
- package/esm/components/tooltip/tooltip.style.js +7 -21
- package/esm/components/typography/typography.component.d.ts +1 -1
- package/esm/hooks/__internal__/useCharacterCount/index.d.ts +1 -2
- package/esm/hooks/__internal__/useCharacterCount/index.js +1 -18
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +3 -0
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.js +24 -0
- package/esm/hooks/__internal__/useInputAccessibility/index.d.ts +1 -24
- package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +11 -11
- package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -3
- package/esm/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
- package/esm/hooks/__internal__/useIsAboveBreakpoint/index.js +1 -6
- package/esm/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.d.ts +1 -0
- package/esm/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +6 -0
- package/esm/hooks/__internal__/useLocale/index.d.ts +1 -1
- package/esm/hooks/__internal__/useLocale/index.js +1 -5
- package/esm/hooks/__internal__/useLocale/useLocale.d.ts +1 -0
- package/esm/hooks/__internal__/useLocale/useLocale.js +5 -0
- package/esm/hooks/__internal__/useResizeObserver/index.d.ts +1 -10
- package/esm/hooks/__internal__/useResizeObserver/index.js +1 -23
- package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.d.ts +8 -0
- package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.js +29 -0
- package/esm/hooks/__internal__/useScrollBlock/index.d.ts +1 -4
- package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.d.ts +23 -9
- package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +24 -12
- package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.d.ts +2 -2
- package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.js +3 -5
- package/esm/hooks/useMediaQuery/index.d.ts +1 -1
- package/esm/hooks/useMediaQuery/index.js +1 -19
- package/esm/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
- package/esm/hooks/useMediaQuery/useMediaQuery.js +19 -0
- package/esm/locales/en-gb.d.ts +3 -5
- package/esm/locales/en-gb.js +5 -4
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/index.js +2 -0
- package/esm/locales/locale.d.ts +99 -105
- package/esm/locales/locale.js +1 -0
- package/esm/locales/pl-pl.d.ts +3 -5
- package/esm/locales/pl-pl.js +5 -4
- package/esm/style/{fonts → assets}/carbon-icons-webfont.woff +0 -0
- package/esm/style/fonts.css +30 -0
- package/esm/style/global-style.js +1 -1
- package/esm/style/themes/base/base-theme.config.d.ts +17 -8
- package/esm/style/themes/sage/index.d.ts +17 -8
- package/lib/__internal__/tooltip-provider/index.d.ts +19 -24
- package/lib/__internal__/tooltip-provider/index.js +2 -13
- package/lib/__internal__/utils/helpers/browser/index.d.ts +15 -1
- package/lib/__internal__/utils/helpers/browser/index.js +33 -8
- package/lib/__internal__/utils/helpers/browser-type-check/index.d.ts +7 -1
- package/lib/__internal__/utils/helpers/browser-type-check/index.js +10 -21
- package/lib/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
- package/lib/__internal__/utils/helpers/events/events.d.ts +132 -31
- package/lib/__internal__/utils/helpers/events/events.js +10 -125
- package/lib/__internal__/utils/helpers/guid/index.d.ts +5 -0
- package/lib/__internal__/utils/helpers/guid/{guid.js → index.js} +0 -2
- package/lib/__internal__/utils/helpers/guid/package.json +5 -2
- package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +4 -2
- package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -1
- package/lib/__internal__/utils/helpers/tags/tags.d.ts +10 -6
- package/lib/__internal__/utils/helpers/tags/tags.js +2 -6
- package/lib/__internal__/utils/helpers/useUniqueId/index.d.ts +2 -0
- package/lib/__internal__/utils/helpers/useUniqueId/index.js +20 -0
- package/lib/__internal__/utils/helpers/useUniqueId/package.json +6 -0
- package/lib/__internal__/utils/logger/index.d.ts +5 -1
- package/lib/__internal__/utils/logger/index.js +26 -8
- package/lib/__spec_helper__/mock-match-media.d.ts +3 -1
- package/lib/components/app-wrapper/app-wrapper.component.d.ts +4 -0
- package/lib/components/app-wrapper/app-wrapper.component.js +5 -4
- package/lib/components/badge/badge.style.d.ts +4 -2
- package/lib/components/button/button-types.style.d.ts +1 -2
- package/lib/components/button/button-types.style.js +0 -1
- package/lib/components/button/button.component.d.ts +67 -36
- package/lib/components/button/button.component.js +3381 -172
- package/lib/components/button/button.config.d.ts +4 -3
- package/lib/components/button/button.style.d.ts +6 -8
- package/lib/components/button/button.style.js +52 -101
- package/lib/components/button/index.d.ts +2 -2
- package/lib/components/confirm/confirm.component.js +1 -1
- package/lib/components/dialog/dialog.component.js +1 -1
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/lib/components/fieldset/fieldset.component.d.ts +6 -1
- package/lib/components/fieldset/fieldset.component.js +14 -16
- package/lib/components/heading/heading.component.d.ts +5 -0
- package/lib/components/icon/index.d.ts +1 -0
- package/lib/components/multi-action-button/multi-action-button.component.d.ts +3 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +6 -4
- package/lib/components/multi-action-button/multi-action-button.d.ts +4 -2
- package/lib/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
- package/lib/components/multi-step-wizard/step/step.d.ts +6 -0
- package/lib/components/multi-step-wizard/step/step.style.d.ts +4 -2
- package/lib/components/portrait/portrait-initials.component.js +1 -1
- package/lib/components/radio-button/radio-button-svg.component.js +38 -20
- package/lib/components/scrollable-list/scrollable-list.component.d.ts +8 -0
- package/lib/components/select/option/index.d.ts +1 -1
- package/lib/components/select/select-list/select-list.component.js +1 -1
- package/lib/components/select/select-textbox/select-textbox.component.js +1 -1
- package/lib/components/split-button/split-button-toggle.style.d.ts +2 -6
- package/lib/components/split-button/split-button.component.d.ts +3 -1
- package/lib/components/split-button/split-button.component.js +6 -3
- package/lib/components/split-button/split-button.d.ts +5 -2
- package/lib/components/textbox/textbox.component.d.ts +1 -2
- package/lib/components/textbox/textbox.component.js +7 -8
- package/lib/components/tooltip/index.d.ts +2 -1
- package/lib/components/tooltip/tooltip-pointer.style.d.ts +10 -1
- package/lib/components/tooltip/tooltip-pointer.style.js +7 -15
- package/lib/components/tooltip/tooltip.component.d.ts +33 -2
- package/lib/components/tooltip/tooltip.component.js +221 -130
- package/lib/components/tooltip/tooltip.config.d.ts +2 -1
- package/lib/components/tooltip/tooltip.style.d.ts +7 -2
- package/lib/components/tooltip/tooltip.style.js +7 -22
- package/lib/components/typography/typography.component.d.ts +1 -1
- package/lib/components/vertical-divider/vertical-divider.component.js +3 -0
- package/lib/hooks/__internal__/useCharacterCount/index.d.ts +1 -2
- package/lib/hooks/__internal__/useCharacterCount/index.js +8 -27
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +3 -0
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.js +40 -0
- package/lib/hooks/__internal__/useInputAccessibility/index.d.ts +1 -24
- package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +11 -11
- package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -3
- package/lib/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
- package/lib/hooks/__internal__/useIsAboveBreakpoint/index.js +8 -9
- package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.d.ts +1 -0
- package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +16 -0
- package/lib/hooks/__internal__/useLocale/index.d.ts +1 -1
- package/lib/hooks/__internal__/useLocale/index.js +8 -9
- package/lib/hooks/__internal__/useLocale/useLocale.d.ts +1 -0
- package/lib/hooks/__internal__/useLocale/useLocale.js +16 -0
- package/lib/hooks/__internal__/useResizeObserver/index.d.ts +1 -10
- package/lib/hooks/__internal__/useResizeObserver/index.js +8 -24
- package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.d.ts +8 -0
- package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.js +37 -0
- package/lib/hooks/__internal__/useScrollBlock/index.d.ts +1 -4
- package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.d.ts +23 -9
- package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +24 -12
- package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.d.ts +2 -2
- package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.js +3 -5
- package/lib/hooks/useMediaQuery/index.d.ts +1 -1
- package/lib/hooks/useMediaQuery/index.js +8 -25
- package/lib/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
- package/lib/hooks/useMediaQuery/useMediaQuery.js +32 -0
- package/lib/locales/en-gb.d.ts +3 -5
- package/lib/locales/en-gb.js +2 -1
- package/lib/locales/index.d.ts +1 -1
- package/lib/locales/index.js +23 -0
- package/lib/locales/locale.d.ts +99 -105
- package/lib/locales/locale.js +5 -0
- package/lib/{__internal__/utils/ether → locales}/package.json +1 -1
- package/lib/locales/pl-pl.d.ts +3 -5
- package/lib/locales/pl-pl.js +2 -1
- package/lib/style/{fonts → assets}/carbon-icons-webfont.woff +0 -0
- package/lib/style/fonts.css +30 -0
- package/lib/style/global-style.js +1 -1
- package/lib/style/themes/base/base-theme.config.d.ts +17 -8
- package/lib/style/themes/sage/index.d.ts +17 -8
- package/package.json +10 -5
- package/esm/__internal__/utils/ether/ether.d.ts +0 -19
- package/esm/__internal__/utils/ether/ether.js +0 -29
- package/esm/__internal__/utils/ether/index.d.ts +0 -1
- package/esm/__internal__/utils/ether/index.js +0 -1
- package/esm/__internal__/utils/helpers/browser/browser.d.ts +0 -17
- package/esm/__internal__/utils/helpers/browser/browser.js +0 -198
- package/esm/__internal__/utils/helpers/browser-type-check/browser-type-check.d.ts +0 -7
- package/esm/__internal__/utils/helpers/browser-type-check/browser-type-check.js +0 -14
- package/esm/__internal__/utils/helpers/guid/__spec__.d.ts +0 -1
- package/esm/__internal__/utils/helpers/guid/__spec__.js +0 -10
- package/esm/__internal__/utils/helpers/guid/guid.d.ts +0 -2
- package/esm/__internal__/utils/helpers/guid/package.json +0 -3
- package/esm/__internal__/utils/helpers/immutable/__spec__.d.ts +0 -1
- package/esm/__internal__/utils/helpers/immutable/__spec__.js +0 -117
- package/esm/__internal__/utils/helpers/immutable/immutable.d.ts +0 -4
- package/esm/__internal__/utils/helpers/immutable/immutable.js +0 -36
- package/esm/__internal__/utils/helpers/immutable/package.json +0 -4
- package/esm/__internal__/utils/helpers/with-unique-id-props/index.d.ts +0 -1
- package/esm/__internal__/utils/helpers/with-unique-id-props/index.js +0 -1
- package/esm/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.d.ts +0 -7
- package/esm/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +0 -82
- package/esm/__internal__/utils/logger/logger.d.ts +0 -9
- package/esm/__internal__/utils/logger/logger.js +0 -71
- package/esm/components/button/button.d.ts +0 -85
- package/esm/components/tooltip/tooltip.d.ts +0 -40
- package/lib/__internal__/utils/ether/ether.d.ts +0 -19
- package/lib/__internal__/utils/ether/ether.js +0 -33
- package/lib/__internal__/utils/ether/index.d.ts +0 -1
- package/lib/__internal__/utils/ether/index.js +0 -18
- package/lib/__internal__/utils/helpers/browser/browser.d.ts +0 -17
- package/lib/__internal__/utils/helpers/browser/browser.js +0 -213
- package/lib/__internal__/utils/helpers/browser-type-check/browser-type-check.d.ts +0 -7
- package/lib/__internal__/utils/helpers/browser-type-check/browser-type-check.js +0 -26
- package/lib/__internal__/utils/helpers/guid/__spec__.d.ts +0 -1
- package/lib/__internal__/utils/helpers/guid/__spec__.js +0 -15
- package/lib/__internal__/utils/helpers/guid/guid.d.ts +0 -2
- package/lib/__internal__/utils/helpers/immutable/__spec__.d.ts +0 -1
- package/lib/__internal__/utils/helpers/immutable/__spec__.js +0 -135
- package/lib/__internal__/utils/helpers/immutable/immutable.d.ts +0 -4
- package/lib/__internal__/utils/helpers/immutable/immutable.js +0 -46
- package/lib/__internal__/utils/helpers/immutable/package.json +0 -4
- package/lib/__internal__/utils/helpers/with-unique-id-props/index.d.ts +0 -1
- package/lib/__internal__/utils/helpers/with-unique-id-props/index.js +0 -15
- package/lib/__internal__/utils/helpers/with-unique-id-props/package.json +0 -6
- package/lib/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.d.ts +0 -7
- package/lib/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +0 -96
- package/lib/__internal__/utils/logger/logger.d.ts +0 -9
- package/lib/__internal__/utils/logger/logger.js +0 -78
- package/lib/components/button/button.d.ts +0 -85
- package/lib/components/tooltip/tooltip.d.ts +0 -40
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useMediaQuery;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function useMediaQuery(queryInput) {
|
|
13
|
+
const query = queryInput.replace(/^@media( ?)/m, "");
|
|
14
|
+
|
|
15
|
+
const [match, setMatch] = _react.default.useState(() => false);
|
|
16
|
+
|
|
17
|
+
_react.default.useEffect(() => {
|
|
18
|
+
const queryList = window.matchMedia(query);
|
|
19
|
+
|
|
20
|
+
const updateMatch = () => {
|
|
21
|
+
setMatch(queryList.matches);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
updateMatch();
|
|
25
|
+
queryList.addListener(updateMatch);
|
|
26
|
+
return () => {
|
|
27
|
+
queryList.removeListener(updateMatch);
|
|
28
|
+
};
|
|
29
|
+
}, [query]);
|
|
30
|
+
|
|
31
|
+
return match;
|
|
32
|
+
}
|
package/lib/locales/en-gb.d.ts
CHANGED
package/lib/locales/en-gb.js
CHANGED
|
@@ -9,7 +9,7 @@ var _dateFnsLocales = require("./date-fns-locales");
|
|
|
9
9
|
|
|
10
10
|
const isSingular = count => (typeof count === "string" ? parseInt(count) : count) === 1;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const enGB = {
|
|
13
13
|
locale: () => "en-GB",
|
|
14
14
|
actions: {
|
|
15
15
|
edit: () => "Edit",
|
|
@@ -136,4 +136,5 @@ var _default = {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
|
+
var _default = enGB;
|
|
139
140
|
exports.default = _default;
|
package/lib/locales/index.d.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "EnGb", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _enGb.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PlPl", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _plPl.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _enGb = _interopRequireDefault(require("./en-gb"));
|
|
20
|
+
|
|
21
|
+
var _plPl = _interopRequireDefault(require("./pl-pl"));
|
|
22
|
+
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/locales/locale.d.ts
CHANGED
|
@@ -1,111 +1,105 @@
|
|
|
1
1
|
import { Locale as DateFnsLocale } from "date-fns";
|
|
2
|
-
|
|
3
2
|
interface Locale {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
show: () => string;
|
|
53
|
-
records: (count: number | string, showNumber: boolean) => string;
|
|
54
|
-
first: () => string;
|
|
55
|
-
last: () => string;
|
|
56
|
-
next: () => string;
|
|
57
|
-
previous: () => string;
|
|
58
|
-
pageX: () => string;
|
|
59
|
-
ofY: (count: string | number) => string;
|
|
60
|
-
};
|
|
61
|
-
select: {
|
|
62
|
-
actionButtonText: () => string;
|
|
63
|
-
placeholder: () => string;
|
|
64
|
-
noResultsForTerm: (term: string) => string;
|
|
65
|
-
};
|
|
66
|
-
link: {
|
|
67
|
-
skipLinkLabel: () => string;
|
|
68
|
-
};
|
|
69
|
-
sidebar: {
|
|
70
|
-
ariaLabels: {
|
|
71
|
-
close: () => string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
switch: {
|
|
75
|
-
on: () => string;
|
|
76
|
-
off: () => string;
|
|
77
|
-
};
|
|
78
|
-
textEditor: {
|
|
79
|
-
tooltipMessages: {
|
|
80
|
-
bold: () => string;
|
|
81
|
-
italic: () => string;
|
|
82
|
-
bulletList: () => string;
|
|
83
|
-
numberList: () => string;
|
|
84
|
-
};
|
|
85
|
-
ariaLabels: {
|
|
86
|
-
bold: () => string;
|
|
87
|
-
italic: () => string;
|
|
88
|
-
bulletList: () => string;
|
|
89
|
-
numberList: () => string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
tileSelect: {
|
|
93
|
-
deselect: () => string;
|
|
94
|
-
};
|
|
95
|
-
toast: {
|
|
96
|
-
ariaLabels: {
|
|
97
|
-
close: () => string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
wizards: {
|
|
101
|
-
multiStep: {
|
|
102
|
-
buttons: {
|
|
103
|
-
submit: () => string;
|
|
3
|
+
locale: () => string;
|
|
4
|
+
actions: {
|
|
5
|
+
edit: () => string;
|
|
6
|
+
delete: () => string;
|
|
7
|
+
};
|
|
8
|
+
actionPopover: {
|
|
9
|
+
ariaLabel: () => string;
|
|
10
|
+
};
|
|
11
|
+
batchSelection: {
|
|
12
|
+
selected: (count: number | string) => string;
|
|
13
|
+
};
|
|
14
|
+
confirm: {
|
|
15
|
+
no: () => string;
|
|
16
|
+
yes: () => string;
|
|
17
|
+
};
|
|
18
|
+
date: {
|
|
19
|
+
dateFnsLocale: () => DateFnsLocale;
|
|
20
|
+
};
|
|
21
|
+
dialog: {
|
|
22
|
+
ariaLabels: {
|
|
23
|
+
close: () => string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
dialogFullScreen: {
|
|
27
|
+
ariaLabels: {
|
|
28
|
+
close: () => string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
errors: {
|
|
32
|
+
messages: {
|
|
33
|
+
formSummary: (errors: number, warnings: number, type: string) => [string, string] | null;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
message: {
|
|
37
|
+
closeButtonAriaLabel: () => string;
|
|
38
|
+
};
|
|
39
|
+
numeralDate: {
|
|
40
|
+
validation: {
|
|
41
|
+
day: () => string;
|
|
42
|
+
month: () => string;
|
|
43
|
+
year: () => string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
pager: {
|
|
47
|
+
show: () => string;
|
|
48
|
+
records: (count: number | string, showNumber: boolean) => string;
|
|
49
|
+
first: () => string;
|
|
50
|
+
last: () => string;
|
|
104
51
|
next: () => string;
|
|
105
|
-
|
|
106
|
-
|
|
52
|
+
previous: () => string;
|
|
53
|
+
pageX: () => string;
|
|
54
|
+
ofY: (count: string | number) => string;
|
|
55
|
+
};
|
|
56
|
+
select: {
|
|
57
|
+
actionButtonText: () => string;
|
|
58
|
+
placeholder: () => string;
|
|
59
|
+
noResultsForTerm: (term: string) => string;
|
|
60
|
+
};
|
|
61
|
+
link: {
|
|
62
|
+
skipLinkLabel: () => string;
|
|
63
|
+
};
|
|
64
|
+
sidebar: {
|
|
65
|
+
ariaLabels: {
|
|
66
|
+
close: () => string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
switch: {
|
|
70
|
+
on: () => string;
|
|
71
|
+
off: () => string;
|
|
72
|
+
};
|
|
73
|
+
textEditor: {
|
|
74
|
+
tooltipMessages: {
|
|
75
|
+
bold: () => string;
|
|
76
|
+
italic: () => string;
|
|
77
|
+
bulletList: () => string;
|
|
78
|
+
numberList: () => string;
|
|
79
|
+
};
|
|
80
|
+
ariaLabels: {
|
|
81
|
+
bold: () => string;
|
|
82
|
+
italic: () => string;
|
|
83
|
+
bulletList: () => string;
|
|
84
|
+
numberList: () => string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
tileSelect: {
|
|
88
|
+
deselect: () => string;
|
|
89
|
+
};
|
|
90
|
+
toast: {
|
|
91
|
+
ariaLabels: {
|
|
92
|
+
close: () => string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
wizards: {
|
|
96
|
+
multiStep: {
|
|
97
|
+
buttons: {
|
|
98
|
+
submit: () => string;
|
|
99
|
+
next: () => string;
|
|
100
|
+
back: () => string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
107
103
|
};
|
|
108
|
-
};
|
|
109
104
|
}
|
|
110
|
-
|
|
111
105
|
export default Locale;
|
package/lib/locales/pl-pl.d.ts
CHANGED
package/lib/locales/pl-pl.js
CHANGED
|
@@ -9,7 +9,7 @@ var _dateFnsLocales = require("./date-fns-locales");
|
|
|
9
9
|
|
|
10
10
|
const isSingular = count => (typeof count === "string" ? parseInt(count) : count) === 1;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const plPL = {
|
|
13
13
|
locale: () => "pl-PL",
|
|
14
14
|
actions: {
|
|
15
15
|
edit: () => "Edytuj",
|
|
@@ -134,4 +134,5 @@ var _default = {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
+
var _default = plPL;
|
|
137
138
|
exports.default = _default;
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@font-face{
|
|
2
|
+
font-family: "Sage UI";
|
|
3
|
+
src: url('https://fonts.sage.com/Sage_UI-Regular.woff2') format("woff2"), url('https://fonts.sage.com/Sage_UI-Regular.woff') format("woff");
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-display: swap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face{
|
|
10
|
+
font-family: "Sage UI";
|
|
11
|
+
src: url('https://fonts.sage.com/Sage_UI-Medium.woff2') format("woff2"), url('https://fonts.sage.com/Sage_UI-Medium.woff') format("woff");
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face{
|
|
18
|
+
font-family: "Sage UI";
|
|
19
|
+
src: url('https://fonts.sage.com/Sage_UI-Bold.woff2') format("woff2"), url('https://fonts.sage.com/Sage_UI-Bold.woff') format("woff");
|
|
20
|
+
font-weight: 900;
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-display: swap;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: "CarbonIcons";
|
|
27
|
+
src: url("./assets/carbon-icons-webfont.woff") format("woff");
|
|
28
|
+
font-weight: normal;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
}
|
|
@@ -10,7 +10,7 @@ var _styledComponents = require("styled-components");
|
|
|
10
10
|
const GlobalStyle = (0, _styledComponents.createGlobalStyle)`
|
|
11
11
|
body {
|
|
12
12
|
color: rgba(0, 0, 0, 0.9);
|
|
13
|
-
font-family:
|
|
13
|
+
font-family: "Sage UI", sans-serif;
|
|
14
14
|
font-size: 14px;
|
|
15
15
|
margin: 0px;
|
|
16
16
|
padding: 0px;
|
|
@@ -54,6 +54,7 @@ declare function _default(palette: any): {
|
|
|
54
54
|
colorsYin075: string;
|
|
55
55
|
colorsYin090: string;
|
|
56
56
|
colorsYang100: string;
|
|
57
|
+
colorsYang030: string;
|
|
57
58
|
colorsYang080: string;
|
|
58
59
|
colorsGray850: string;
|
|
59
60
|
colorsGray900: string;
|
|
@@ -138,6 +139,8 @@ declare function _default(palette: any): {
|
|
|
138
139
|
colorsUtilityReadOnly400: string;
|
|
139
140
|
colorsUtilityReadOnly500: string;
|
|
140
141
|
colorsUtilityReadOnly600: string;
|
|
142
|
+
colorsActionMajor350: string;
|
|
143
|
+
colorsActionMajor450: string;
|
|
141
144
|
colorsActionMajor700: string;
|
|
142
145
|
colorsActionMajor025: string;
|
|
143
146
|
colorsActionMajorTransparent: string;
|
|
@@ -146,6 +149,7 @@ declare function _default(palette: any): {
|
|
|
146
149
|
colorsActionMajorYin065: string;
|
|
147
150
|
colorsActionMajorYin090: string;
|
|
148
151
|
colorsActionMajorYang100: string;
|
|
152
|
+
colorsActionMajorYang030: string;
|
|
149
153
|
colorsActionMinor100: string;
|
|
150
154
|
colorsActionMinor150: string;
|
|
151
155
|
colorsActionMinor200: string;
|
|
@@ -305,16 +309,10 @@ declare function _default(palette: any): {
|
|
|
305
309
|
typographyDatePickerCalendarDateM: string;
|
|
306
310
|
typographyDatePickerCalendarDayM: string;
|
|
307
311
|
typographyDatePickerCalendarMonthM: string;
|
|
308
|
-
typographyDialogTitleXs: string;
|
|
309
|
-
typographyDialogTitleS: string;
|
|
310
|
-
typographyDialogTitleMs: string;
|
|
311
312
|
typographyDialogTitleM: string;
|
|
312
|
-
|
|
313
|
-
typographyDialogTitleL: string;
|
|
314
|
-
typographyDialogTitleXl: string;
|
|
315
|
-
typographyDialogParagraphXs: string;
|
|
316
|
-
typographyDialogParagraphS: string;
|
|
313
|
+
typographyDialogParagraphM: string;
|
|
317
314
|
typographyDrawerTitleM: string;
|
|
315
|
+
typographyDrawerParagraphM: string;
|
|
318
316
|
typographyFlashTextM: string;
|
|
319
317
|
typographyFlashTextL: string;
|
|
320
318
|
typographyFormFieldLabelXs: string;
|
|
@@ -349,6 +347,7 @@ declare function _default(palette: any): {
|
|
|
349
347
|
typographyFormFieldCharacterCountS: string;
|
|
350
348
|
typographyFormFieldCharacterCountM: string;
|
|
351
349
|
typographyFormFieldCharacterCountL: string;
|
|
350
|
+
typographyLinkTextS: string;
|
|
352
351
|
typographyLinkTextM: string;
|
|
353
352
|
typographyLinkTextL: string;
|
|
354
353
|
typographyMenuLabelM: string;
|
|
@@ -358,6 +357,7 @@ declare function _default(palette: any): {
|
|
|
358
357
|
typographyMessageTextM: string;
|
|
359
358
|
typographyMessageTextL: string;
|
|
360
359
|
typographyPaginationLabelM: string;
|
|
360
|
+
typographyTileParagraphM: string;
|
|
361
361
|
typographyPillLabelS: string;
|
|
362
362
|
typographyPillLabelM: string;
|
|
363
363
|
typographyPillLabelL: string;
|
|
@@ -390,13 +390,22 @@ declare function _default(palette: any): {
|
|
|
390
390
|
typographySidebarTitleS: string;
|
|
391
391
|
typographySidebarTitleM: string;
|
|
392
392
|
typographySidebarTitleL: string;
|
|
393
|
+
typographySidebarParagraphM: string;
|
|
393
394
|
typographyStepFlowCompleteLabelM: string;
|
|
394
395
|
typographyStepFlowCurrentLabelM: string;
|
|
395
396
|
typographyStepFlowIncompleteLabelM: string;
|
|
396
397
|
typographySwitchOptionLabelM: string;
|
|
397
398
|
typographySwitchOptionLabelL: string;
|
|
399
|
+
typographyTableHeaderTextXs: string;
|
|
400
|
+
typographyTableHeaderTextS: string;
|
|
398
401
|
typographyTableHeaderTextM: string;
|
|
402
|
+
typographyTableHeaderTextL: string;
|
|
403
|
+
typographyTableHeaderTextXl: string;
|
|
404
|
+
typographyTableCellTextXs: string;
|
|
405
|
+
typographyTableCellTextS: string;
|
|
399
406
|
typographyTableCellTextM: string;
|
|
407
|
+
typographyTableCellTextL: string;
|
|
408
|
+
typographyTableCellTextXl: string;
|
|
400
409
|
typographyTooltipTextM: string;
|
|
401
410
|
typographyTooltipTextL: string;
|
|
402
411
|
opacity300: string;
|
|
@@ -10,6 +10,7 @@ declare var _default: {
|
|
|
10
10
|
colorsYin075: string;
|
|
11
11
|
colorsYin090: string;
|
|
12
12
|
colorsYang100: string;
|
|
13
|
+
colorsYang030: string;
|
|
13
14
|
colorsYang080: string;
|
|
14
15
|
colorsGray850: string;
|
|
15
16
|
colorsGray900: string;
|
|
@@ -95,6 +96,8 @@ declare var _default: {
|
|
|
95
96
|
colorsUtilityReadOnly500: string;
|
|
96
97
|
colorsUtilityReadOnly600: string;
|
|
97
98
|
colorsActionMajor150: string;
|
|
99
|
+
colorsActionMajor350: string;
|
|
100
|
+
colorsActionMajor450: string;
|
|
98
101
|
colorsActionMajor500: string;
|
|
99
102
|
colorsActionMajor600: string;
|
|
100
103
|
colorsActionMajor700: string;
|
|
@@ -105,6 +108,7 @@ declare var _default: {
|
|
|
105
108
|
colorsActionMajorYin065: string;
|
|
106
109
|
colorsActionMajorYin090: string;
|
|
107
110
|
colorsActionMajorYang100: string;
|
|
111
|
+
colorsActionMajorYang030: string;
|
|
108
112
|
colorsActionMinor100: string;
|
|
109
113
|
colorsActionMinor150: string;
|
|
110
114
|
colorsActionMinor200: string;
|
|
@@ -270,16 +274,10 @@ declare var _default: {
|
|
|
270
274
|
typographyDatePickerCalendarDateM: string;
|
|
271
275
|
typographyDatePickerCalendarDayM: string;
|
|
272
276
|
typographyDatePickerCalendarMonthM: string;
|
|
273
|
-
typographyDialogTitleXs: string;
|
|
274
|
-
typographyDialogTitleS: string;
|
|
275
|
-
typographyDialogTitleMs: string;
|
|
276
277
|
typographyDialogTitleM: string;
|
|
277
|
-
|
|
278
|
-
typographyDialogTitleL: string;
|
|
279
|
-
typographyDialogTitleXl: string;
|
|
280
|
-
typographyDialogParagraphXs: string;
|
|
281
|
-
typographyDialogParagraphS: string;
|
|
278
|
+
typographyDialogParagraphM: string;
|
|
282
279
|
typographyDrawerTitleM: string;
|
|
280
|
+
typographyDrawerParagraphM: string;
|
|
283
281
|
typographyFlashTextM: string;
|
|
284
282
|
typographyFlashTextL: string;
|
|
285
283
|
typographyFormFieldLabelXs: string;
|
|
@@ -314,6 +312,7 @@ declare var _default: {
|
|
|
314
312
|
typographyFormFieldCharacterCountS: string;
|
|
315
313
|
typographyFormFieldCharacterCountM: string;
|
|
316
314
|
typographyFormFieldCharacterCountL: string;
|
|
315
|
+
typographyLinkTextS: string;
|
|
317
316
|
typographyLinkTextM: string;
|
|
318
317
|
typographyLinkTextL: string;
|
|
319
318
|
typographyMenuLabelM: string;
|
|
@@ -323,6 +322,7 @@ declare var _default: {
|
|
|
323
322
|
typographyMessageTextM: string;
|
|
324
323
|
typographyMessageTextL: string;
|
|
325
324
|
typographyPaginationLabelM: string;
|
|
325
|
+
typographyTileParagraphM: string;
|
|
326
326
|
typographyPillLabelS: string;
|
|
327
327
|
typographyPillLabelM: string;
|
|
328
328
|
typographyPillLabelL: string;
|
|
@@ -355,13 +355,22 @@ declare var _default: {
|
|
|
355
355
|
typographySidebarTitleS: string;
|
|
356
356
|
typographySidebarTitleM: string;
|
|
357
357
|
typographySidebarTitleL: string;
|
|
358
|
+
typographySidebarParagraphM: string;
|
|
358
359
|
typographyStepFlowCompleteLabelM: string;
|
|
359
360
|
typographyStepFlowCurrentLabelM: string;
|
|
360
361
|
typographyStepFlowIncompleteLabelM: string;
|
|
361
362
|
typographySwitchOptionLabelM: string;
|
|
362
363
|
typographySwitchOptionLabelL: string;
|
|
364
|
+
typographyTableHeaderTextXs: string;
|
|
365
|
+
typographyTableHeaderTextS: string;
|
|
363
366
|
typographyTableHeaderTextM: string;
|
|
367
|
+
typographyTableHeaderTextL: string;
|
|
368
|
+
typographyTableHeaderTextXl: string;
|
|
369
|
+
typographyTableCellTextXs: string;
|
|
370
|
+
typographyTableCellTextS: string;
|
|
364
371
|
typographyTableCellTextM: string;
|
|
372
|
+
typographyTableCellTextL: string;
|
|
373
|
+
typographyTableCellTextXl: string;
|
|
365
374
|
typographyTooltipTextM: string;
|
|
366
375
|
typographyTooltipTextL: string;
|
|
367
376
|
opacity300: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "106.0.0",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"engineStrict": true,
|
|
6
6
|
"engines": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://carbon.sage.com",
|
|
53
53
|
"peerDependencies": {
|
|
54
|
+
"@sage/design-tokens": "^2.3.0",
|
|
54
55
|
"draft-js": "^0.11.5",
|
|
55
56
|
"react": "^16.14.0",
|
|
56
57
|
"react-dom": "^16.14.0",
|
|
@@ -68,7 +69,8 @@
|
|
|
68
69
|
"@commitlint/cli": "^11.0.0",
|
|
69
70
|
"@commitlint/config-conventional": "^11.0.0",
|
|
70
71
|
"@cypress/react": "^5.12.0",
|
|
71
|
-
"@cypress/webpack-dev-server": "^1.8.
|
|
72
|
+
"@cypress/webpack-dev-server": "^1.8.4",
|
|
73
|
+
"@sage/design-tokens": "^2.3.0",
|
|
72
74
|
"@semantic-release/changelog": "^6.0.1",
|
|
73
75
|
"@semantic-release/exec": "^6.0.2",
|
|
74
76
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -88,10 +90,13 @@
|
|
|
88
90
|
"@testing-library/react": "^12.1.3",
|
|
89
91
|
"@types/enzyme": "^3.10.3",
|
|
90
92
|
"@types/enzyme-adapter-react-16": "^1.0.5",
|
|
93
|
+
"@types/invariant": "^2.2.35",
|
|
91
94
|
"@types/jest": "^26.0.19",
|
|
95
|
+
"@types/lodash": "^4.14.179",
|
|
92
96
|
"@types/node": "10.12.18",
|
|
93
97
|
"@types/react": "16.9.56",
|
|
94
98
|
"@types/react-dom": "16.9.8",
|
|
99
|
+
"@types/react-test-renderer": "^17.0.1",
|
|
95
100
|
"@types/styled-components": "^5.1.9",
|
|
96
101
|
"@types/uuid": "^8.3.3",
|
|
97
102
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
@@ -151,15 +156,15 @@
|
|
|
151
156
|
"sprintf-js": "^1.1.2",
|
|
152
157
|
"styled-components": "^4.4.1",
|
|
153
158
|
"ts-node": "^10.4.0",
|
|
154
|
-
"typescript": "^4.
|
|
159
|
+
"typescript": "^4.6.2",
|
|
155
160
|
"typescript-to-proptypes": "^2.2.1",
|
|
156
161
|
"uuid": "^8.3.2",
|
|
157
|
-
"
|
|
162
|
+
"webfontloader": "^1.6.28",
|
|
163
|
+
"webpack-dev-server": "^4.0.0"
|
|
158
164
|
},
|
|
159
165
|
"dependencies": {
|
|
160
166
|
"@octokit/rest": "^18.12.0",
|
|
161
167
|
"@popperjs/core": "^2.11.2",
|
|
162
|
-
"@sage/design-tokens": "^1.93.0",
|
|
163
168
|
"@styled-system/prop-types": "^5.1.5",
|
|
164
169
|
"@tippyjs/react": "^4.2.5",
|
|
165
170
|
"@types/styled-system": "^5.1.11",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ether
|
|
3
|
-
*
|
|
4
|
-
* Ether provides functional-like helper methods for Carbon specific tasks.
|
|
5
|
-
* As we are dealing with stateful values (user input, browser state) Ether
|
|
6
|
-
* does not provide pure functions in all cases.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Returns the props that were passed to a component but excludes the props listed in propTypes
|
|
10
|
-
*
|
|
11
|
-
* Optionally includes the safeProps which can be defined as a static property on a Class or passed as the second
|
|
12
|
-
* argument.
|
|
13
|
-
*
|
|
14
|
-
* @method validProps
|
|
15
|
-
* @param {Object} instance
|
|
16
|
-
* @param {Array?} safeProps
|
|
17
|
-
* @return {Object} props
|
|
18
|
-
*/
|
|
19
|
-
export function validProps(instance: Object, safeProps: any[] | null): Object;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { omit, difference } from "lodash";
|
|
2
|
-
/**
|
|
3
|
-
* Ether
|
|
4
|
-
*
|
|
5
|
-
* Ether provides functional-like helper methods for Carbon specific tasks.
|
|
6
|
-
* As we are dealing with stateful values (user input, browser state) Ether
|
|
7
|
-
* does not provide pure functions in all cases.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Returns the props that were passed to a component but excludes the props listed in propTypes
|
|
12
|
-
*
|
|
13
|
-
* Optionally includes the safeProps which can be defined as a static property on a Class or passed as the second
|
|
14
|
-
* argument.
|
|
15
|
-
*
|
|
16
|
-
* @method validProps
|
|
17
|
-
* @param {Object} instance
|
|
18
|
-
* @param {Array?} safeProps
|
|
19
|
-
* @return {Object} props
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
function validProps(instance, safeProps) {
|
|
23
|
-
const component = instance.isReactComponent ? instance.constructor : instance;
|
|
24
|
-
const unsafeProps = difference(Object.keys(component.propTypes), safeProps || component.safeProps || []);
|
|
25
|
-
return omit(instance.props, unsafeProps);
|
|
26
|
-
} // eslint-disable-next-line import/prefer-default-export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export { validProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ether";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ether";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export default Browser;
|
|
2
|
-
declare namespace Browser {
|
|
3
|
-
function isDomAvailable(): boolean;
|
|
4
|
-
function getWindow(): any;
|
|
5
|
-
function getDocument(): Document;
|
|
6
|
-
function getActiveElement(): Element | null;
|
|
7
|
-
function redirectTo(url: any): void;
|
|
8
|
-
function redirectAfter(url: any, seconds: any): NodeJS.Timeout;
|
|
9
|
-
function reload(): void;
|
|
10
|
-
function editFocus(ref: any): void;
|
|
11
|
-
function setFocus(reactNode: any): void;
|
|
12
|
-
function setInputFocus(inputComponent: any): void;
|
|
13
|
-
function setCookie(name: any, value: any, options?: Object): void;
|
|
14
|
-
function getCookie(name: string): string | null;
|
|
15
|
-
function postToNewWindow(url: string, data: Object, target?: Object): void;
|
|
16
|
-
function submitForm(form: any): void;
|
|
17
|
-
}
|