@vodafone_de/brix-components 3.0.1 → 3.0.2
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/dist/BackgroundColor-JObp_2xA.js +14 -0
- package/dist/BorderColor-BummoQ1-.js +24 -0
- package/dist/BorderRadius-ClUShVLu.js +10 -0
- package/dist/BorderWidth-DfOlyKK7.js +16 -0
- package/dist/CornerStyle-JEbGNArR.js +6 -0
- package/dist/FontWeight-CR22KTex.js +8 -0
- package/dist/HeadingSize-CfCRn3Lh.js +12 -0
- package/dist/IconColor-CtC9WUgr.js +10 -0
- package/dist/ObjectColor-BZDBuV8H.js +22 -0
- package/dist/Opacity-smkGiwsf.js +6 -0
- package/dist/SizeTypes-Ck_RdzIf.js +8 -0
- package/dist/Spacing-D0HQH9YJ.js +16 -0
- package/dist/TextBodySize-BcZR9mh2.js +6 -0
- package/dist/TextColor-BXiR5Uq9.js +16 -0
- package/dist/colorUtils-uLZF5UIN.js +94 -0
- package/dist/components/Accordion/index.js +195 -0
- package/dist/components/AccordionGroup/index.js +59 -0
- package/dist/components/Badge/index.js +11 -0
- package/dist/components/Body/index.js +72 -6
- package/dist/components/BottomBar/index.js +79 -0
- package/dist/components/Button/index.js +24 -0
- package/dist/components/ButtonAsLink/index.js +7 -0
- package/dist/components/ButtonGroup/index.js +34 -0
- package/dist/components/Card/index.js +18 -0
- package/dist/components/Carousel/index.js +497 -0
- package/dist/components/Checkbox/index.js +218 -0
- package/dist/components/CheckboxGroup/index.js +58 -0
- package/dist/components/Collapsible/index.js +85 -0
- package/dist/components/ColorSwatch/index.js +87 -0
- package/dist/components/ColorSwatchGroup/index.js +43 -0
- package/dist/components/Container/index.js +76 -0
- package/dist/components/DateInput/index.js +86 -0
- package/dist/components/DemoBox/index.js +21 -0
- package/dist/components/Dialog/index.js +172 -0
- package/dist/components/DiscoveryCard/index.js +130 -0
- package/dist/components/DiscoveryCardGroup/index.js +53 -0
- package/dist/components/Divider/index.js +30 -0
- package/dist/components/Fieldset/index.js +41 -0
- package/dist/components/FilterGroup/index.js +148 -0
- package/dist/components/Flex/index.js +17 -0
- package/dist/components/FlexItem/index.js +41 -0
- package/dist/components/FootnoteContent/index.js +39 -0
- package/dist/components/FootnoteLink/index.js +46 -0
- package/dist/components/Form/index.js +20 -0
- package/dist/components/FormElement/index.js +31 -0
- package/dist/components/FormHelperLabel/index.js +21 -0
- package/dist/components/FormHelperMessage/index.js +47 -0
- package/dist/components/FormHelperStatusIcon/index.js +50 -0
- package/dist/components/GoogleMap/index.js +196 -0
- package/dist/components/Grid/index.js +39 -0
- package/dist/components/GridItem/index.js +12 -0
- package/dist/components/Heading/index.js +94 -0
- package/dist/components/HifiIcon/index.js +31 -0
- package/dist/components/Icon/index.js +38 -0
- package/dist/components/IconButton/index.js +85 -0
- package/dist/components/IconSnippet/index.js +112 -0
- package/dist/components/IconSnippet/styled.d.ts +1 -1
- package/dist/components/IconSnippetList/index.js +25 -0
- package/dist/components/Image/index.js +84 -0
- package/dist/components/ImageHeader/index.js +262 -0
- package/dist/components/ImageHeader/styled.d.ts +4 -4
- package/dist/components/InlineLink/index.js +43 -0
- package/dist/components/Input/index.js +55 -0
- package/dist/components/Label/index.js +22 -0
- package/dist/components/Legend/index.js +60 -0
- package/dist/components/Link/index.js +19 -0
- package/dist/components/LinkAsButton/index.js +7 -0
- package/dist/components/LinkList/index.js +64 -0
- package/dist/components/LinkListItem/index.js +316 -0
- package/dist/components/LoadingSpinner/index.js +70 -0
- package/dist/components/Notification/index.js +181 -0
- package/dist/components/Overlay/index.js +33 -0
- package/dist/components/PickerGroup/index.js +282 -0
- package/dist/components/Price/index.js +18 -0
- package/dist/components/ProductCard/index.js +81 -0
- package/dist/components/RadioGroup/index.js +197 -0
- package/dist/components/ResponsiveImage/index.js +89 -0
- package/dist/components/RichText/index.js +7 -0
- package/dist/components/ScreenreaderOnly/index.js +6 -0
- package/dist/components/SearchInput/index.js +140 -0
- package/dist/components/SelectInput/index.js +160 -0
- package/dist/components/Stepper/index.js +205 -0
- package/dist/components/SuggestInput/index.js +387 -0
- package/dist/components/Switch/index.js +169 -0
- package/dist/components/TabularPrice/index.js +8 -0
- package/dist/components/TextList/index.js +10 -0
- package/dist/components/Textarea/index.js +156 -0
- package/dist/components/Tray/index.js +218 -0
- package/dist/easing-Dm-pO8SY.js +6 -0
- package/dist/filterProps-Cewck8OH.js +13 -0
- package/dist/foundations/GlobalStyle/index.js +3 -292
- package/dist/foundations/PatternProps/index.js +1 -0
- package/dist/foundations/media-query/forcedColors/index.js +12 -0
- package/dist/foundations/media-query/reducedMotion/index.js +21 -0
- package/dist/foundations/media-query/viewport/index.js +6 -0
- package/dist/foundations/token/getBackgroundColor/index.js +5 -0
- package/dist/foundations/token/getBodySize/index.js +13 -2
- package/dist/foundations/token/getBorderColor/index.js +5 -0
- package/dist/foundations/token/getBorderRadius/index.js +15 -0
- package/dist/foundations/token/getBorderWidth/index.js +19 -0
- package/dist/foundations/token/getBottomSpacing/index.js +14 -0
- package/dist/foundations/token/getFontWeight/index.js +13 -0
- package/dist/foundations/token/getHeadingSize/index.js +27 -0
- package/dist/foundations/token/getHoverColor/index.js +7 -0
- package/dist/foundations/token/getIconColor/index.js +5 -0
- package/dist/foundations/token/getObjectColor/index.js +5 -0
- package/dist/foundations/token/getOpacity/index.js +11 -0
- package/dist/foundations/token/getPressColor/index.js +7 -0
- package/dist/foundations/token/getSpacing/index.js +5 -0
- package/dist/foundations/token/getTextColor/index.js +5 -0
- package/dist/foundations/token/getTextDecoration/index.js +13 -0
- package/dist/getCssVar-BP6T9pFM.js +6 -0
- package/dist/hooks/useFocusWithin/index.js +36 -0
- package/dist/hooks/useForcedColors/index.js +9 -0
- package/dist/hooks/useMediaQuery/index.js +19 -0
- package/dist/hooks/useReducedMotion/index.js +9 -0
- package/dist/hooks/useThirdPartyConsent/index.js +54 -0
- package/dist/hooks/useViewport/index.js +24 -0
- package/dist/index-BXLT6ke-.js +79 -0
- package/dist/index-C4XnzWFL.js +61 -0
- package/dist/index-CeJsIf3Z.js +208 -0
- package/dist/index-Ck2bCrhT.js +32 -0
- package/dist/index-CzTqNQTT.js +79 -0
- package/dist/index-D6hvbziL.js +167 -0
- package/dist/index-DQhtQZ85.js +24 -0
- package/dist/props-Czq9XX2J.js +6 -0
- package/dist/{index-BaPlSfS3.js → renderInlineRichTextFromOpenText-CA52y1-B.js} +3 -105
- package/dist/shadow-u158mzuN.js +4 -0
- package/dist/styled-BpvuD699.js +45 -0
- package/dist/styled-CDWclYAa.js +124 -0
- package/dist/styled-CXSdomF5.js +34 -0
- package/dist/styled-CpoX5USb.js +71 -0
- package/dist/styled-DZo6MwrF.js +245 -0
- package/dist/styled-FNJyDkPV.js +165 -0
- package/dist/styled-Wlt68LfQ.js +133 -0
- package/dist/styled-ZpQohvyx.js +29 -0
- package/dist/tags-DI6H1biK.js +29 -0
- package/package.json +2 -1
- package/dist/index-BoPDwZgt.js +0 -18
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
import require$$0 from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { g as getCssVar, a as getBodySize } from "./index-BoPDwZgt.js";
|
|
5
|
-
const spacingNone = "None";
|
|
6
|
-
const spacingSm = "Sm";
|
|
7
|
-
const spacingMd = "Md";
|
|
8
|
-
const textBodyMd = "md";
|
|
9
|
-
const textBodySm = "sm";
|
|
10
2
|
function getDefaultExportFromCjs(x) {
|
|
11
3
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
12
4
|
}
|
|
@@ -2384,102 +2376,8 @@ const renderInlineRichTextFromOpenText = (fromCms) => {
|
|
|
2384
2376
|
}
|
|
2385
2377
|
return fromCms;
|
|
2386
2378
|
};
|
|
2387
|
-
const getSpacing = (spacing) => getCssVar(`spacing${spacing}`);
|
|
2388
|
-
const getBottomSpacing = ({
|
|
2389
|
-
bottomSpacing
|
|
2390
|
-
}) => {
|
|
2391
|
-
if (!bottomSpacing) {
|
|
2392
|
-
return {};
|
|
2393
|
-
}
|
|
2394
|
-
return {
|
|
2395
|
-
marginBottom: getSpacing(bottomSpacing)
|
|
2396
|
-
};
|
|
2397
|
-
};
|
|
2398
|
-
const baseWeight300 = "fontWeightLight";
|
|
2399
|
-
const baseWeight400 = "fontWeightRegular";
|
|
2400
|
-
const baseWeight700 = "fontWeightBold";
|
|
2401
|
-
const fontWeights = {
|
|
2402
|
-
light: baseWeight300,
|
|
2403
|
-
regular: baseWeight400,
|
|
2404
|
-
bold: baseWeight700
|
|
2405
|
-
};
|
|
2406
|
-
const getFontWeight = (weight) => getCssVar(fontWeights[weight]);
|
|
2407
|
-
const fontWeightBold = "bold";
|
|
2408
|
-
const propsNotPassToDomDefault = ["accordionType", "activeId", "activeIndex", "setActiveId", "align", "animated", "appearance", "aspectRatio", "autoLayout", "apiKey", "badge", "borderBottom", "bottomSpacing", "buttonLink", "buttons", "coloringMode", "colorSwatch", "component", "corners", "description", "expanded", "filterItems", "gapSpacing", "grow", "handleOnClick", "handleOnToogle", "hasOverlay", "heading", "heightSm", "heightMd", "heightLg", "horizontalAlignment", "icon", "iconAlign", "iconName", "iconPosition", "images", "isActive", "isChecked", "isDisabled", "isFullscreen", "isOpen", "isOrdered", "isSelected", "isTransparentBackground", "items", "jumpToClickedItem", "justify", "justifyHorizontal", "lg", "loadingSpinnerChild", "mapId", "md", "message", "more", "nextAriaLabel", "notificationType", "objectFit", "objectPosition", "offset", "onUpdate", "openMultiple", "orientation", "padding", "prefix", "prefixWeight", "prevAriaLabel", "price", "productId", "promoPrice", "screenReaderInstruction", "showList", "size", "sm", "spacing", "spinnerType", "status", "stretch", "strikePrice", "suffix", "tag", "textContent", "uid", "variant", "verticalPadding", "viewportHeight", "weight", "width"];
|
|
2409
|
-
const filterProps = (propsNotPassToDom = []) => {
|
|
2410
|
-
const shouldForwardProp = (prop) => {
|
|
2411
|
-
if ("string" !== typeof prop) {
|
|
2412
|
-
return false;
|
|
2413
|
-
}
|
|
2414
|
-
return ![...propsNotPassToDom, ...propsNotPassToDomDefault].includes(prop);
|
|
2415
|
-
};
|
|
2416
|
-
return shouldForwardProp;
|
|
2417
|
-
};
|
|
2418
|
-
const BodyStyled = styled.p.withConfig({
|
|
2419
|
-
shouldForwardProp: filterProps(),
|
|
2420
|
-
displayName: "BodyStyled",
|
|
2421
|
-
componentId: "sc-1n7n7pv-0"
|
|
2422
|
-
})({
|
|
2423
|
-
outline: "none",
|
|
2424
|
-
color: "inherit",
|
|
2425
|
-
verticalAlign: "baseline"
|
|
2426
|
-
}, ({
|
|
2427
|
-
size = textBodyMd
|
|
2428
|
-
}) => getBodySize(size), ({
|
|
2429
|
-
weight,
|
|
2430
|
-
tag
|
|
2431
|
-
}) => {
|
|
2432
|
-
if ("strong" === tag) {
|
|
2433
|
-
return {
|
|
2434
|
-
fontWeight: getFontWeight(fontWeightBold)
|
|
2435
|
-
};
|
|
2436
|
-
}
|
|
2437
|
-
if (!weight) {
|
|
2438
|
-
return {};
|
|
2439
|
-
}
|
|
2440
|
-
return {
|
|
2441
|
-
fontWeight: getFontWeight(weight)
|
|
2442
|
-
};
|
|
2443
|
-
}, ({
|
|
2444
|
-
tag
|
|
2445
|
-
}) => {
|
|
2446
|
-
if ("sup" === tag) {
|
|
2447
|
-
return {
|
|
2448
|
-
verticalAlign: "super",
|
|
2449
|
-
fontSize: "smaller"
|
|
2450
|
-
};
|
|
2451
|
-
}
|
|
2452
|
-
if ("span" === tag) {
|
|
2453
|
-
return {
|
|
2454
|
-
display: "inline-block"
|
|
2455
|
-
};
|
|
2456
|
-
}
|
|
2457
|
-
return {};
|
|
2458
|
-
}, ({
|
|
2459
|
-
align
|
|
2460
|
-
}) => ({
|
|
2461
|
-
textAlign: align
|
|
2462
|
-
}), getBottomSpacing);
|
|
2463
|
-
const bodyAlignLeft = "left";
|
|
2464
|
-
const bodyAlignCenter = "center";
|
|
2465
|
-
const bodyAlignRight = "right";
|
|
2466
|
-
const Body = ({
|
|
2467
|
-
tag = "p",
|
|
2468
|
-
bottomSpacing,
|
|
2469
|
-
...props
|
|
2470
|
-
}) => {
|
|
2471
|
-
if (!bottomSpacing) {
|
|
2472
|
-
bottomSpacing = textBodySm === props.size ? spacingSm : spacingMd;
|
|
2473
|
-
}
|
|
2474
|
-
return /* @__PURE__ */ jsx(BodyStyled, { ...props, bottomSpacing, as: tag, tag, children: renderInlineRichTextFromOpenText(props.children) });
|
|
2475
|
-
};
|
|
2476
2379
|
export {
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
bodyAlignCenter as c,
|
|
2481
|
-
bodyAlignRight as d,
|
|
2482
|
-
filterProps as f,
|
|
2483
|
-
getBottomSpacing as g,
|
|
2484
|
-
spacingNone as s
|
|
2380
|
+
libExports as l,
|
|
2381
|
+
parse as p,
|
|
2382
|
+
renderInlineRichTextFromOpenText as r
|
|
2485
2383
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import forcedColors from "./foundations/media-query/forcedColors/index.js";
|
|
3
|
+
import { s as shadow28 } from "./shadow-u158mzuN.js";
|
|
4
|
+
import { getBackgroundColor } from "./foundations/token/getBackgroundColor/index.js";
|
|
5
|
+
import { getBorderRadius } from "./foundations/token/getBorderRadius/index.js";
|
|
6
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
7
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
8
|
+
import { getTextColor } from "./foundations/token/getTextColor/index.js";
|
|
9
|
+
import { b as borderRadiusMd } from "./BorderRadius-ClUShVLu.js";
|
|
10
|
+
import { s as spacingMd } from "./Spacing-D0HQH9YJ.js";
|
|
11
|
+
import { a as colorTextNeutral } from "./TextColor-BXiR5Uq9.js";
|
|
12
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
13
|
+
import { g as getCssVar } from "./getCssVar-BP6T9pFM.js";
|
|
14
|
+
import { d as colorBackgroundBrandGradient, c as colorBackgroundNeutral } from "./BackgroundColor-JObp_2xA.js";
|
|
15
|
+
const CardAppearanceColor = {
|
|
16
|
+
primary: colorBackgroundNeutral,
|
|
17
|
+
secondary: colorBackgroundBrandGradient
|
|
18
|
+
};
|
|
19
|
+
const CardStyled = styled.div.withConfig({
|
|
20
|
+
shouldForwardProp: filterProps(),
|
|
21
|
+
displayName: "CardStyled",
|
|
22
|
+
componentId: "sc-1hs2vg8-0"
|
|
23
|
+
})({
|
|
24
|
+
...forcedColors({
|
|
25
|
+
border: "1px solid CanvasText"
|
|
26
|
+
}),
|
|
27
|
+
padding: `${getSpacing(spacingMd)}`,
|
|
28
|
+
boxShadow: getCssVar(shadow28),
|
|
29
|
+
borderRadius: getBorderRadius(borderRadiusMd),
|
|
30
|
+
height: "100%",
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
width: "100%",
|
|
34
|
+
color: getTextColor(colorTextNeutral)
|
|
35
|
+
}, ({
|
|
36
|
+
appearance = "primary"
|
|
37
|
+
}) => {
|
|
38
|
+
return {
|
|
39
|
+
background: getBackgroundColor(CardAppearanceColor[appearance])
|
|
40
|
+
};
|
|
41
|
+
}, getBottomSpacing);
|
|
42
|
+
export {
|
|
43
|
+
CardStyled as C,
|
|
44
|
+
CardAppearanceColor as a
|
|
45
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import forcedColors from "./foundations/media-query/forcedColors/index.js";
|
|
3
|
+
import { getBackgroundColor } from "./foundations/token/getBackgroundColor/index.js";
|
|
4
|
+
import { getBorderColor } from "./foundations/token/getBorderColor/index.js";
|
|
5
|
+
import { getBorderRadius } from "./foundations/token/getBorderRadius/index.js";
|
|
6
|
+
import { getBorderWidth } from "./foundations/token/getBorderWidth/index.js";
|
|
7
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
8
|
+
import { getHeadingSize } from "./foundations/token/getHeadingSize/index.js";
|
|
9
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
10
|
+
import { getTextColor } from "./foundations/token/getTextColor/index.js";
|
|
11
|
+
import { c as colorBackgroundNeutral } from "./BackgroundColor-JObp_2xA.js";
|
|
12
|
+
import { c as colorBorderFocus, a as colorBorderNeutral, b as colorBorderUnselected, d as colorBorderSuccess, e as colorBorderCritical } from "./BorderColor-BummoQ1-.js";
|
|
13
|
+
import { b as borderRadiusMd } from "./BorderRadius-ClUShVLu.js";
|
|
14
|
+
import { b as borderWidthUnselected } from "./BorderWidth-DfOlyKK7.js";
|
|
15
|
+
import { c as spacingSm, a as spacingXs } from "./Spacing-D0HQH9YJ.js";
|
|
16
|
+
import { e as colorTextPlaceholder, a as colorTextNeutral } from "./TextColor-BXiR5Uq9.js";
|
|
17
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
18
|
+
const InputWrapperStyled = styled.div.withConfig({
|
|
19
|
+
shouldForwardProp: filterProps(),
|
|
20
|
+
displayName: "InputWrapperStyled",
|
|
21
|
+
componentId: "sc-1lx2jz-0"
|
|
22
|
+
})({
|
|
23
|
+
...forcedColors({
|
|
24
|
+
backgroundColor: "Field",
|
|
25
|
+
border: "1px solid FieldText"
|
|
26
|
+
}),
|
|
27
|
+
display: "flex",
|
|
28
|
+
justifyItems: "center",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
gap: `${getSpacing(spacingXs)}`,
|
|
31
|
+
padding: `0 ${getSpacing(spacingSm)} 0 0`,
|
|
32
|
+
borderRadius: getBorderRadius(borderRadiusMd),
|
|
33
|
+
backgroundColor: getBackgroundColor(colorBackgroundNeutral)
|
|
34
|
+
}, ({
|
|
35
|
+
status
|
|
36
|
+
}) => {
|
|
37
|
+
if (!status) {
|
|
38
|
+
return {
|
|
39
|
+
boxShadow: `inset ${getBorderColor(colorBorderUnselected)} 0px 0px 0px 1px`,
|
|
40
|
+
"&:focus-within": {
|
|
41
|
+
...forcedColors({
|
|
42
|
+
outline: "4px solid CanvasText"
|
|
43
|
+
}),
|
|
44
|
+
boxShadow: `${getBorderColor(colorBorderFocus)} 0px 0px 0px 4px, inset ${getBorderColor(colorBorderNeutral)} 0px 0px 0px 1px`,
|
|
45
|
+
outline: "none"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if ("success" === status) {
|
|
50
|
+
return {
|
|
51
|
+
boxShadow: `inset ${getBorderColor(colorBorderSuccess)} 0px 0px 0px 2px`,
|
|
52
|
+
"&:focus-within": {
|
|
53
|
+
...forcedColors({
|
|
54
|
+
outline: "4px solid CanvasText"
|
|
55
|
+
}),
|
|
56
|
+
boxShadow: `${getBorderColor(colorBorderFocus)} 0px 0px 0px 4px, inset ${getBorderColor(colorBorderSuccess)} 0px 0px 0px 2px`
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if ("error" === status) {
|
|
61
|
+
return {
|
|
62
|
+
boxShadow: `inset ${getBorderColor(colorBorderCritical)} 0px 0px 0px 2px`,
|
|
63
|
+
"&:focus-within": {
|
|
64
|
+
...forcedColors({
|
|
65
|
+
outline: "4px solid CanvasText"
|
|
66
|
+
}),
|
|
67
|
+
boxShadow: `${getBorderColor(colorBorderFocus)} 0px 0px 0px 4px, inset ${getBorderColor(colorBorderCritical)} 0px 0px 0px 2px`
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}, getBottomSpacing);
|
|
72
|
+
const InputStyled = styled.input.withConfig({
|
|
73
|
+
shouldForwardProp: filterProps(),
|
|
74
|
+
displayName: "InputStyled",
|
|
75
|
+
componentId: "sc-1lx2jz-1"
|
|
76
|
+
})(getHeadingSize("xs"), forcedColors({
|
|
77
|
+
border: "none"
|
|
78
|
+
}), {
|
|
79
|
+
fontWeight: "normal",
|
|
80
|
+
width: "100%",
|
|
81
|
+
flex: 1,
|
|
82
|
+
/**
|
|
83
|
+
* Since we use a boxshadow as 'border' on the outer div,
|
|
84
|
+
* we put a 1px invisible border on it
|
|
85
|
+
* so that we reach the required height overall
|
|
86
|
+
*/
|
|
87
|
+
border: `${getBorderWidth(borderWidthUnselected)} solid transparent`,
|
|
88
|
+
outline: "none",
|
|
89
|
+
backgroundColor: "transparent",
|
|
90
|
+
color: getTextColor(colorTextNeutral),
|
|
91
|
+
padding: `${getSpacing(spacingXs)} 0 ${getSpacing(spacingXs)} ${getSpacing(spacingSm)}`,
|
|
92
|
+
"&::placeholder": {
|
|
93
|
+
color: getTextColor(colorTextPlaceholder)
|
|
94
|
+
},
|
|
95
|
+
height: "44px"
|
|
96
|
+
}, {
|
|
97
|
+
/**
|
|
98
|
+
* overwrite simplicity styles
|
|
99
|
+
*/
|
|
100
|
+
"input&": {
|
|
101
|
+
maxWidth: "unset",
|
|
102
|
+
borderRadius: "unset",
|
|
103
|
+
boxShadow: "unset",
|
|
104
|
+
"&:focus": {
|
|
105
|
+
...forcedColors({
|
|
106
|
+
border: "none"
|
|
107
|
+
}),
|
|
108
|
+
outline: "unset",
|
|
109
|
+
border: `${getBorderWidth(borderWidthUnselected)} solid transparent`
|
|
110
|
+
},
|
|
111
|
+
"&:disabled": {
|
|
112
|
+
...forcedColors({
|
|
113
|
+
border: "none"
|
|
114
|
+
}),
|
|
115
|
+
color: "unset",
|
|
116
|
+
background: "unset",
|
|
117
|
+
border: `${getBorderWidth(borderWidthUnselected)} solid transparent`
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export {
|
|
122
|
+
InputWrapperStyled as I,
|
|
123
|
+
InputStyled as a
|
|
124
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { getBorderColor } from "./foundations/token/getBorderColor/index.js";
|
|
3
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
4
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
5
|
+
import { getTextColor } from "./foundations/token/getTextColor/index.js";
|
|
6
|
+
import { f as colorBorderWarning } from "./BorderColor-BummoQ1-.js";
|
|
7
|
+
import { c as spacingSm, s as spacingMd } from "./Spacing-D0HQH9YJ.js";
|
|
8
|
+
import { c as colorTextInverseStatic } from "./TextColor-BXiR5Uq9.js";
|
|
9
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
10
|
+
const DemoBoxStyled = styled.div.withConfig({
|
|
11
|
+
shouldForwardProp: filterProps(),
|
|
12
|
+
displayName: "DemoBoxStyled",
|
|
13
|
+
componentId: "sc-xo01zx-0"
|
|
14
|
+
})({
|
|
15
|
+
height: "100px",
|
|
16
|
+
background: "#FFC5A8",
|
|
17
|
+
border: `1px dashed ${getBorderColor(colorBorderWarning)}`,
|
|
18
|
+
color: getTextColor(colorTextInverseStatic),
|
|
19
|
+
display: "flex",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
textAlign: "center",
|
|
23
|
+
width: "100%",
|
|
24
|
+
flexDirection: "column",
|
|
25
|
+
lineBreak: "anywhere",
|
|
26
|
+
padding: getSpacing(spacingSm)
|
|
27
|
+
}, ({
|
|
28
|
+
bottomSpacing = spacingMd
|
|
29
|
+
}) => getBottomSpacing({
|
|
30
|
+
bottomSpacing
|
|
31
|
+
}));
|
|
32
|
+
export {
|
|
33
|
+
DemoBoxStyled as D
|
|
34
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
3
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
4
|
+
import { s as spacingMd, b as spacingNone } from "./Spacing-D0HQH9YJ.js";
|
|
5
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
6
|
+
const flexOrientationHorizontal = "horizontal";
|
|
7
|
+
const flexOrientationVertical = "vertical";
|
|
8
|
+
const flexJustifyStart = "start";
|
|
9
|
+
const flexJustifyEnd = "end";
|
|
10
|
+
const flexJustifyCenter = "center";
|
|
11
|
+
const flexJustifyBetween = "between";
|
|
12
|
+
const translateToJustifyContent = (justify) => {
|
|
13
|
+
if (!justify) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const justifyValues = {
|
|
17
|
+
[flexJustifyEnd]: "flex-end",
|
|
18
|
+
[flexJustifyCenter]: "center",
|
|
19
|
+
[flexJustifyBetween]: "space-between",
|
|
20
|
+
[flexJustifyStart]: "flex-start"
|
|
21
|
+
};
|
|
22
|
+
return justifyValues[justify];
|
|
23
|
+
};
|
|
24
|
+
const FlexStyled = styled.div.withConfig({
|
|
25
|
+
shouldForwardProp: filterProps(),
|
|
26
|
+
displayName: "FlexStyled",
|
|
27
|
+
componentId: "sc-1m7hd4c-0"
|
|
28
|
+
})({
|
|
29
|
+
display: "flex"
|
|
30
|
+
}, ({
|
|
31
|
+
wrap = false
|
|
32
|
+
}) => {
|
|
33
|
+
if (wrap) {
|
|
34
|
+
return {
|
|
35
|
+
flexWrap: "wrap"
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
flexWrap: "nowrap"
|
|
40
|
+
};
|
|
41
|
+
}, ({
|
|
42
|
+
orientation = flexOrientationHorizontal
|
|
43
|
+
}) => ({
|
|
44
|
+
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
45
|
+
height: orientation === "horizontal" ? "auto" : "100%"
|
|
46
|
+
}), ({
|
|
47
|
+
justify = flexJustifyStart
|
|
48
|
+
}) => ({
|
|
49
|
+
justifyContent: translateToJustifyContent(justify)
|
|
50
|
+
}), ({
|
|
51
|
+
gapSpacing = spacingMd
|
|
52
|
+
}) => {
|
|
53
|
+
if (gapSpacing) {
|
|
54
|
+
return {
|
|
55
|
+
gap: getSpacing(gapSpacing)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}, ({
|
|
59
|
+
bottomSpacing = spacingNone
|
|
60
|
+
}) => getBottomSpacing({
|
|
61
|
+
bottomSpacing
|
|
62
|
+
}));
|
|
63
|
+
export {
|
|
64
|
+
FlexStyled as F,
|
|
65
|
+
flexJustifyStart as a,
|
|
66
|
+
flexOrientationVertical as b,
|
|
67
|
+
flexJustifyEnd as c,
|
|
68
|
+
flexJustifyCenter as d,
|
|
69
|
+
flexJustifyBetween as e,
|
|
70
|
+
flexOrientationHorizontal as f
|
|
71
|
+
};
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import styled, { keyframes, css } from "styled-components";
|
|
2
|
+
import forcedColors from "./foundations/media-query/forcedColors/index.js";
|
|
3
|
+
import reducedMotion from "./foundations/media-query/reducedMotion/index.js";
|
|
4
|
+
import { v as viewport } from "./index-Ck2bCrhT.js";
|
|
5
|
+
import { getBackgroundColor } from "./foundations/token/getBackgroundColor/index.js";
|
|
6
|
+
import { getBodySize } from "./foundations/token/getBodySize/index.js";
|
|
7
|
+
import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
|
|
8
|
+
import { getHeadingSize } from "./foundations/token/getHeadingSize/index.js";
|
|
9
|
+
import { getObjectColor } from "./foundations/token/getObjectColor/index.js";
|
|
10
|
+
import { getOpacity } from "./foundations/token/getOpacity/index.js";
|
|
11
|
+
import { getSpacing } from "./foundations/token/getSpacing/index.js";
|
|
12
|
+
import { a as colorBackgroundOverlay } from "./BackgroundColor-JObp_2xA.js";
|
|
13
|
+
import { o as opacityOverlay } from "./Opacity-smkGiwsf.js";
|
|
14
|
+
import { b as spacingNone } from "./Spacing-D0HQH9YJ.js";
|
|
15
|
+
import { l as largeSize } from "./SizeTypes-Ck_RdzIf.js";
|
|
16
|
+
import { f as filterProps } from "./filterProps-Cewck8OH.js";
|
|
17
|
+
import Body from "./components/Body/index.js";
|
|
18
|
+
const loadingSpinnerOverlays = {
|
|
19
|
+
Light: `rgba(255, 255, 255, ${getOpacity(opacityOverlay)})`,
|
|
20
|
+
Dark: `rgba(38, 38, 38, ${getOpacity(opacityOverlay)})`
|
|
21
|
+
};
|
|
22
|
+
const loadingSpinnerOverlayCssVar = "loadingSpinnerOverlay";
|
|
23
|
+
const calculateSpinnerHeight = (size, bottomSpacing, label) => {
|
|
24
|
+
const spinnerHeight = spinnerSvgSizes[size];
|
|
25
|
+
const labelHeight = label ? `${mapLabelStyleToSpinnerSize[size].fontSize} * ${mapLabelStyleToSpinnerSize[size].lineHeight}` : "0px";
|
|
26
|
+
return `calc(${spinnerHeight} + ${getSpacing(bottomSpacing)} + ${labelHeight})`;
|
|
27
|
+
};
|
|
28
|
+
const spinnerSvgSizes = {
|
|
29
|
+
xs: "24px",
|
|
30
|
+
sm: "76px",
|
|
31
|
+
md: "148px",
|
|
32
|
+
lg: "300px"
|
|
33
|
+
};
|
|
34
|
+
const LoadingSpinnerContainerStyled = styled.div.withConfig({
|
|
35
|
+
shouldForwardProp: filterProps(),
|
|
36
|
+
displayName: "LoadingSpinnerContainerStyled",
|
|
37
|
+
componentId: "sc-1bnjzqj-0"
|
|
38
|
+
})({
|
|
39
|
+
position: "relative",
|
|
40
|
+
height: "100%"
|
|
41
|
+
}, ({
|
|
42
|
+
coversFullPage
|
|
43
|
+
}) => {
|
|
44
|
+
if (coversFullPage) {
|
|
45
|
+
return {
|
|
46
|
+
position: "fixed",
|
|
47
|
+
zIndex: "1001"
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return {};
|
|
51
|
+
}, ({
|
|
52
|
+
bottomSpacing = spacingNone
|
|
53
|
+
}) => getBottomSpacing({
|
|
54
|
+
bottomSpacing
|
|
55
|
+
}));
|
|
56
|
+
const LoadingSpinnerContentStyled = styled.div.withConfig({
|
|
57
|
+
shouldForwardProp: filterProps(),
|
|
58
|
+
displayName: "LoadingSpinnerContentStyled",
|
|
59
|
+
componentId: "sc-1bnjzqj-1"
|
|
60
|
+
})({
|
|
61
|
+
display: "flex",
|
|
62
|
+
flexDirection: "column",
|
|
63
|
+
minHeight: "100%",
|
|
64
|
+
width: "fit-content",
|
|
65
|
+
justifyContent: "center",
|
|
66
|
+
alignItems: "center"
|
|
67
|
+
}, ({
|
|
68
|
+
hasOverlay
|
|
69
|
+
}) => {
|
|
70
|
+
if (hasOverlay) {
|
|
71
|
+
return {
|
|
72
|
+
background: getBackgroundColor(colorBackgroundOverlay),
|
|
73
|
+
position: "absolute",
|
|
74
|
+
zIndex: 1001,
|
|
75
|
+
width: "100%",
|
|
76
|
+
left: 0,
|
|
77
|
+
top: 0
|
|
78
|
+
};
|
|
79
|
+
} else {
|
|
80
|
+
return {};
|
|
81
|
+
}
|
|
82
|
+
}, ({
|
|
83
|
+
coversFullPage
|
|
84
|
+
}) => {
|
|
85
|
+
if (coversFullPage) {
|
|
86
|
+
return {
|
|
87
|
+
position: "fixed",
|
|
88
|
+
zIndex: "1001"
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {};
|
|
92
|
+
});
|
|
93
|
+
const LoadingSpinnerChildrenStyled = styled.div.withConfig({
|
|
94
|
+
shouldForwardProp: filterProps(),
|
|
95
|
+
displayName: "LoadingSpinnerChildrenStyled",
|
|
96
|
+
componentId: "sc-1bnjzqj-2"
|
|
97
|
+
})({
|
|
98
|
+
width: "100%",
|
|
99
|
+
height: "100%",
|
|
100
|
+
"> *": {
|
|
101
|
+
minHeight: "inherit"
|
|
102
|
+
}
|
|
103
|
+
}, ({
|
|
104
|
+
size = largeSize,
|
|
105
|
+
bottomSpacing = spacingNone,
|
|
106
|
+
label,
|
|
107
|
+
isActive
|
|
108
|
+
}) => {
|
|
109
|
+
return isActive ? {
|
|
110
|
+
minHeight: calculateSpinnerHeight(size, bottomSpacing, label)
|
|
111
|
+
} : {};
|
|
112
|
+
});
|
|
113
|
+
const LoadingSpinnerSVGStyled = styled.svg.withConfig({
|
|
114
|
+
shouldForwardProp: filterProps(),
|
|
115
|
+
displayName: "LoadingSpinnerSVGStyled",
|
|
116
|
+
componentId: "sc-1bnjzqj-3"
|
|
117
|
+
})({
|
|
118
|
+
...forcedColors({
|
|
119
|
+
stroke: "CanvasText"
|
|
120
|
+
}),
|
|
121
|
+
zIndex: 1001,
|
|
122
|
+
stroke: getObjectColor("colorObjectBrand")
|
|
123
|
+
}, ({
|
|
124
|
+
size = largeSize
|
|
125
|
+
}) => {
|
|
126
|
+
if (size === "xs") {
|
|
127
|
+
return {
|
|
128
|
+
width: "20px",
|
|
129
|
+
height: "20px",
|
|
130
|
+
...viewport.md({
|
|
131
|
+
width: spinnerSvgSizes[size],
|
|
132
|
+
height: spinnerSvgSizes[size]
|
|
133
|
+
})
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
width: spinnerSvgSizes[size],
|
|
138
|
+
height: spinnerSvgSizes[size]
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
const loadingSpinnerRotate = keyframes({
|
|
142
|
+
to: {
|
|
143
|
+
strokeDashoffset: 610
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const loadingSpinnerXsRotate = keyframes({
|
|
147
|
+
to: {
|
|
148
|
+
strokeDashoffset: 166
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
const LoadingSpinnerPathStyled = styled.path.withConfig({
|
|
152
|
+
shouldForwardProp: filterProps(),
|
|
153
|
+
displayName: "LoadingSpinnerPathStyled",
|
|
154
|
+
componentId: "sc-1bnjzqj-4"
|
|
155
|
+
})({
|
|
156
|
+
fill: "none",
|
|
157
|
+
strokeLinejoin: "round",
|
|
158
|
+
strokeLinecap: "round",
|
|
159
|
+
strokeDasharray: "120 32",
|
|
160
|
+
animationDuration: "5.0s",
|
|
161
|
+
animationTimingFunction: "linear",
|
|
162
|
+
animationIterationCount: "infinite"
|
|
163
|
+
}, reducedMotion({
|
|
164
|
+
animation: "none"
|
|
165
|
+
}), css(["animation-name:", ";"], loadingSpinnerRotate));
|
|
166
|
+
const LoadingSpinnerPathOuter3Styled = styled(LoadingSpinnerPathStyled).withConfig({
|
|
167
|
+
shouldForwardProp: filterProps(),
|
|
168
|
+
displayName: "LoadingSpinnerPathOuter3Styled",
|
|
169
|
+
componentId: "sc-1bnjzqj-5"
|
|
170
|
+
})({
|
|
171
|
+
strokeWidth: 2,
|
|
172
|
+
opacity: "0.3"
|
|
173
|
+
});
|
|
174
|
+
const LoadingSpinnerPathOuter2Styled = styled(LoadingSpinnerPathStyled).withConfig({
|
|
175
|
+
shouldForwardProp: filterProps(),
|
|
176
|
+
displayName: "LoadingSpinnerPathOuter2Styled",
|
|
177
|
+
componentId: "sc-1bnjzqj-6"
|
|
178
|
+
})({
|
|
179
|
+
strokeWidth: 3,
|
|
180
|
+
opacity: "0.6"
|
|
181
|
+
});
|
|
182
|
+
const LoadingSpinnerPathOuter1Styled = styled(LoadingSpinnerPathStyled).withConfig({
|
|
183
|
+
shouldForwardProp: filterProps(),
|
|
184
|
+
displayName: "LoadingSpinnerPathOuter1Styled",
|
|
185
|
+
componentId: "sc-1bnjzqj-7"
|
|
186
|
+
})({
|
|
187
|
+
strokeWidth: 4
|
|
188
|
+
});
|
|
189
|
+
const LoadingSpinnerPathCenterStyled = styled.path.withConfig({
|
|
190
|
+
shouldForwardProp: filterProps(),
|
|
191
|
+
displayName: "LoadingSpinnerPathCenterStyled",
|
|
192
|
+
componentId: "sc-1bnjzqj-8"
|
|
193
|
+
})({
|
|
194
|
+
...forcedColors({
|
|
195
|
+
fill: "CanvasText"
|
|
196
|
+
}),
|
|
197
|
+
fill: "#E60000"
|
|
198
|
+
});
|
|
199
|
+
const LoadingSpinnerPathXsStyled = styled.path.withConfig({
|
|
200
|
+
shouldForwardProp: filterProps(),
|
|
201
|
+
displayName: "LoadingSpinnerPathXsStyled",
|
|
202
|
+
componentId: "sc-1bnjzqj-9"
|
|
203
|
+
})({
|
|
204
|
+
fill: "none",
|
|
205
|
+
strokeLinecap: "butt",
|
|
206
|
+
strokeWidth: 2,
|
|
207
|
+
strokeDasharray: "48 8",
|
|
208
|
+
strokeDashoffset: 56,
|
|
209
|
+
animationDuration: "5.0s",
|
|
210
|
+
animationTimingFunction: "linear",
|
|
211
|
+
animationIterationCount: "infinite"
|
|
212
|
+
}, css(["animation-name:", ";"], loadingSpinnerXsRotate));
|
|
213
|
+
const mapLabelStyleToSpinnerSize = {
|
|
214
|
+
xs: getBodySize("md"),
|
|
215
|
+
sm: getHeadingSize("xs"),
|
|
216
|
+
md: getHeadingSize("sm"),
|
|
217
|
+
lg: getHeadingSize("lg")
|
|
218
|
+
};
|
|
219
|
+
const LoadingSpinnerLabelStyled = styled(Body).withConfig({
|
|
220
|
+
shouldForwardProp: filterProps(),
|
|
221
|
+
displayName: "LoadingSpinnerLabelStyled",
|
|
222
|
+
componentId: "sc-1bnjzqj-10"
|
|
223
|
+
})(({
|
|
224
|
+
size = "lg"
|
|
225
|
+
}) => {
|
|
226
|
+
return mapLabelStyleToSpinnerSize[size];
|
|
227
|
+
}, getBottomSpacing({
|
|
228
|
+
bottomSpacing: spacingNone
|
|
229
|
+
}), {
|
|
230
|
+
textAlign: "center"
|
|
231
|
+
});
|
|
232
|
+
export {
|
|
233
|
+
LoadingSpinnerSVGStyled as L,
|
|
234
|
+
LoadingSpinnerPathXsStyled as a,
|
|
235
|
+
LoadingSpinnerPathOuter3Styled as b,
|
|
236
|
+
LoadingSpinnerPathOuter2Styled as c,
|
|
237
|
+
LoadingSpinnerPathOuter1Styled as d,
|
|
238
|
+
LoadingSpinnerPathCenterStyled as e,
|
|
239
|
+
LoadingSpinnerContainerStyled as f,
|
|
240
|
+
LoadingSpinnerContentStyled as g,
|
|
241
|
+
LoadingSpinnerLabelStyled as h,
|
|
242
|
+
LoadingSpinnerChildrenStyled as i,
|
|
243
|
+
loadingSpinnerOverlays as j,
|
|
244
|
+
loadingSpinnerOverlayCssVar as l
|
|
245
|
+
};
|