Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

150 changes: 145 additions & 5 deletions packages/plasma-b2c/src/components/DatePicker/DatePicker.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const config = {
defaults: {
view: 'default',
size: 'm',
hintSize: 'm',
},
variations: {
view: {
Expand All @@ -18,16 +19,33 @@ export const config = {
${tokens.leftHelperColorError}: var(--text-negative);
${tokens.leftHelperColorSuccess}: var(--text-positive);

${tokens.titleCaptionColor}: var(--text-secondary);
${tokens.hintIconColor}: var(--text-secondary);

${tokens.contentSlotColor}: var(--text-primary);
${tokens.contentSlotColorHover}: var(--text-primary-hover);
${tokens.contentSlotColorActive}: var(--text-primary-active);

${tokens.contentSlotRightColor}: var(--text-primary);
${tokens.contentSlotRightColorHover}: var(--text-primary-hover);
${tokens.contentSlotRightColorActive}: var(--text-primary-active);

${tokens.textFieldContentSlotColor}: var(--text-secondary);
${tokens.textFieldContentSlotColorHover}: var(--text-secondary-hover);
${tokens.textFieldContentSlotColorActive}: var(--text-secondary-active);

${tokens.textFieldContentSlotRightColor}: var(--text-secondary);
${tokens.textFieldContentSlotRightColorHover}: var(--text-secondary-hover);
${tokens.textFieldContentSlotRightColorActive}: var(--text-secondary-active);

${tokens.textFieldColor}: var(--text-primary);
${tokens.textFieldPlaceholderColor}: var(--text-secondary);
${tokens.textFieldCaretColor}: var(--text-accent);

${tokens.textFieldContentSlotColor}: var(--text-secondary);
${tokens.textFieldContentSlotColorHover}: var(--text-secondary-hover);
${tokens.textFieldContentSlotColorActive}: var(--text-secondary-active);

${tokens.textFieldContentRightSlotColor}: var(--text-secondary);
${tokens.textFieldContentRightSlotColorHover}: var(--text-secondary-hover);
${tokens.textFieldContentRightSlotColorActive}: var(--text-secondary-active);
Expand Down Expand Up @@ -132,6 +150,22 @@ export const config = {
${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorWithoutLabelInnerLeft}: auto auto -0.5rem 0;

${tokens.hintMargin}: -0.688rem -0.5rem;
${tokens.hintTargetSize}: 2.375rem;
${tokens.hintWithoutLabelPlacementOffset}: 1.438rem -2.938rem auto auto;
${tokens.hintPlacementInnerMargin}: 0 0.563rem 0 -0.438rem;

${tokens.hintInnerLabelPlacementOffset}: 0.563rem -2.938rem auto auto;
${tokens.clearHintInnerLabelPlacementOffset}: 0.563rem -2.188rem auto auto;

${tokens.titleCaptionOffset}: 0.375rem;
${tokens.titleCaptionFontFamily}: var(--plasma-typo-body-xs-font-family);
${tokens.titleCaptionFontSize}: var(--plasma-typo-body-xs-font-size);
${tokens.titleCaptionFontStyle}: var(--plasma-typo-body-xs-font-style);
${tokens.titleCaptionFontWeight}: var(--plasma-typo-body-xs-font-weight);
${tokens.titleCaptionLetterSpacing}: var(--plasma-typo-body-xs-letter-spacing);
${tokens.titleCaptionLineHeight}: var(--plasma-typo-body-xs-line-height);

${tokens.textFieldHeight}: 3.5rem;
${tokens.textFieldBorderRadius}: 0.875rem;
${tokens.textFieldPadding}: 1.0625rem 1.125rem 1.0625rem 1.125rem;
Expand Down Expand Up @@ -255,17 +289,33 @@ export const config = {
${tokens.indicatorWrapperGap}: 0.25rem;
${tokens.indicatorSizeInner}: 0.5rem;
${tokens.indicatorSizeOuter}: 0.375rem;

${tokens.indicatorPlacement}: 0 0 0 0;
${tokens.indicatorOuterPlacement}: 0.375rem auto auto -0.75rem;
${tokens.indicatorPlacementRight}: 0 0 auto auto;
${tokens.indicatorOuterPlacementRight}: 0.25rem -0.6875rem auto auto;

${tokens.indicatorMarginTop}: 0.25rem;
${tokens.indicatorOuterLeft}: -0.75rem
${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorOuterLeft}: -0.75rem;
${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorWithoutLabelInnerLeft}: auto auto -0.5rem 0;

${tokens.hintMargin}: -0.688rem;
${tokens.hintTargetSize}: 2.375rem;
${tokens.hintWithoutLabelPlacementOffset}: 1.1875rem -2.813rem auto auto;
${tokens.hintPlacementInnerMargin}: 0 0.313rem 0 -0.438rem;

${tokens.hintInnerLabelPlacementOffset}: 0.312rem -2.813rem auto auto;
${tokens.clearHintInnerLabelPlacementOffset}: 0.312rem -2.188rem auto auto;

${tokens.titleCaptionOffset}: 0.313rem;
${tokens.titleCaptionFontFamily}: var(--plasma-typo-body-xs-font-family);
${tokens.titleCaptionFontSize}: var(--plasma-typo-body-xs-font-size);
${tokens.titleCaptionFontStyle}: var(--plasma-typo-body-xs-font-style);
${tokens.titleCaptionFontWeight}: var(--plasma-typo-body-xs-font-weight);
${tokens.titleCaptionLetterSpacing}: var(--plasma-typo-body-xs-letter-spacing);
${tokens.titleCaptionLineHeight}: var(--plasma-typo-body-xs-line-height);

${tokens.textFieldHeight}: 3rem;
${tokens.textFieldBorderRadius}: 0.75rem;
${tokens.textFieldPadding}: 0.875rem 1rem 0.875rem 1rem;
Expand Down Expand Up @@ -396,10 +446,26 @@ ${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorOuterPlacementRight}: 0.25rem -0.625rem auto auto;

${tokens.indicatorMarginTop}: 0.25rem;
${tokens.indicatorOuterLeft}: -0.75rem
${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorOuterLeft}: -0.75rem;
${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorWithoutLabelInnerLeft}: auto auto -0.5rem 0;

${tokens.hintMargin}: -0.688rem;
${tokens.hintTargetSize}: 2.375rem;
${tokens.hintWithoutLabelPlacementOffset}: 0.938rem -2.688rem auto auto;
${tokens.hintPlacementInnerMargin}: 0 0.063rem 0 -0.438rem;

${tokens.hintInnerLabelPlacementOffset}: 0.062rem -2.688rem auto auto;
${tokens.clearHintInnerLabelPlacementOffset}: 0.062rem -2.188rem auto auto;

${tokens.titleCaptionOffset}: 0.188rem;
${tokens.titleCaptionFontFamily}: var(--plasma-typo-body-xs-font-family);
${tokens.titleCaptionFontSize}: var(--plasma-typo-body-xs-font-size);
${tokens.titleCaptionFontStyle}: var(--plasma-typo-body-xs-font-style);
${tokens.titleCaptionFontWeight}: var(--plasma-typo-body-xs-font-weight);
${tokens.titleCaptionLetterSpacing}: var(--plasma-typo-body-xs-letter-spacing);
${tokens.titleCaptionLineHeight}: var(--plasma-typo-body-xs-line-height);

${tokens.textFieldHeight}: 2.5rem;
${tokens.textFieldBorderRadius}: 0.625rem;
${tokens.textFieldPadding}: 0.6875rem 0.875rem 0.6875rem 0.875rem;
Expand Down Expand Up @@ -534,6 +600,22 @@ ${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.indicatorWithoutLabelInner}: auto 0 -0.375rem auto;
${tokens.indicatorWithoutLabelInnerLeft}: auto auto -0.375rem 0;

${tokens.hintMargin}: -0.688rem;
${tokens.hintTargetSize}: 2.375rem;
${tokens.hintWithoutLabelPlacementOffset}: 0.688rem -2.063rem auto auto;
${tokens.hintPlacementInnerMargin}: 0 -0.188rem 0 -0.688rem;

${tokens.hintInnerLabelPlacementOffset}: -0.188rem -2.1875rem auto auto;
${tokens.clearHintInnerLabelPlacementOffset}: -0.188rem -1.938rem auto auto;

${tokens.titleCaptionOffset}: 0;
${tokens.titleCaptionFontFamily}: var(--plasma-typo-body-xs-font-family);
${tokens.titleCaptionFontSize}: var(--plasma-typo-body-xs-font-size);
${tokens.titleCaptionFontStyle}: var(--plasma-typo-body-xs-font-style);
${tokens.titleCaptionFontWeight}: var(--plasma-typo-body-xs-font-weight);
${tokens.titleCaptionLetterSpacing}: var(--plasma-typo-body-xs-letter-spacing);
${tokens.titleCaptionLineHeight}: var(--plasma-typo-body-xs-line-height);

${tokens.textFieldHeight}: 2rem;
${tokens.textFieldBorderRadius}: 0.5rem;
${tokens.textFieldPadding}: 0.5625rem 0.625rem 0.5625rem 0.625rem;
Expand Down Expand Up @@ -680,6 +762,64 @@ ${tokens.indicatorWithoutLabelInner}: auto 0 -0.5rem auto;
${tokens.tooltipArrowBackground}: var(--surface-solid-card-brightness);
`,
},
hintView: {
default: css`
${tokens.hintTooltipBackgroundColor}: var(--surface-solid-card-brightness);
${tokens.hintTooltipBoxShadow}: var(--shadow-down-hard-m);
${tokens.hintTooltipColor}: var(--text-primary);
${tokens.hintTooltipArrowBackground}: var(--surface-solid-card-brightness);
`,
},
hintSize: {
m: css`
${tokens.hintTooltipPaddingTop}: 0.6875rem;
${tokens.hintTooltipPaddingRight}: 0.875rem;
${tokens.hintTooltipPaddingBottom}: 0.6875rem;
${tokens.hintTooltipPaddingLeft}: 0.875rem;

${tokens.hintTooltipMinHeight}: 2.5rem;
${tokens.hintTooltipBorderRadius}: 0.625rem;

${tokens.hintTooltipTextFontFamily}: var(--plasma-typo-body-s-font-family);
${tokens.hintTooltipTextFontSize}: var(--plasma-typo-body-s-font-size);
${tokens.hintTooltipTextFontStyle}: var(--plasma-typo-body-s-font-style);
${tokens.hintTooltipTextFontWeight}: var(--plasma-typo-body-s-font-weight);
${tokens.hintTooltipTextFontLetterSpacing}: var(--plasma-typo-body-s-letter-spacing);
${tokens.hintTooltipTextFontLineHeight}: var(--plasma-typo-body-s-line-height);

${tokens.hintTooltipContentLeftMargin}: 0.375rem;

${tokens.hintTooltipArrowMaskWidth}: 1.25rem;
${tokens.hintTooltipArrowMaskHeight}: 1.25rem;
${tokens.hintTooltipArrowMaskImage}: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggY2xpcC1ydWxlPSJldmVub2RkIiBkPSJtMC4xNywxMS44M2wyMCwwYy01LjUyLDAgLTEwLDMuNTkgLTEwLDhjMCwtNC40MSAtNC40OCwtOCAtMTAsLTh6IiBmaWxsPSIjMTcxNzE3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGlkPSJUYWlsIi8+Cjwvc3ZnPg==");
${tokens.hintTooltipArrowHeight}: 0.5rem;
${tokens.hintTooltipArrowEdgeMargin}: 0.625rem;
`,
s: css`
${tokens.hintTooltipPaddingTop}: 0.5rem;
${tokens.hintTooltipPaddingRight}: 0.75rem;
${tokens.hintTooltipPaddingBottom}: 0.5rem;
${tokens.hintTooltipPaddingLeft}: 0.75rem;

${tokens.hintTooltipMinHeight}: 2rem;
${tokens.hintTooltipBorderRadius}: 0.5rem;

${tokens.hintTooltipTextFontFamily}: var(--plasma-typo-body-xs-font-family);
${tokens.hintTooltipTextFontSize}: var(--plasma-typo-body-xs-font-size);
${tokens.hintTooltipTextFontStyle}: var(--plasma-typo-body-xs-font-style);
${tokens.hintTooltipTextFontWeight}: var(--plasma-typo-body-xs-font-weight);
${tokens.hintTooltipTextFontLetterSpacing}: var(--plasma-typo-body-xs-letter-spacing);
${tokens.hintTooltipTextFontLineHeight}: var(--plasma-typo-body-xs-line-height);

${tokens.hintTooltipContentLeftMargin}: 0.25rem;

${tokens.hintTooltipArrowMaskWidth}: 1rem;
${tokens.hintTooltipArrowMaskHeight}: 1rem;
${tokens.hintTooltipArrowMaskImage}: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggY2xpcC1ydWxlPSJldmVub2RkIiBkPSJtMCw5Ljg1bDE2LDBjLTQuNDEsMCAtOCwyLjY5IC04LDZjMCwtMy4zMSAtMy41OSwtNiAtOCwtNnoiIGZpbGw9IiMxNzE3MTciIGZpbGwtcnVsZT0iZXZlbm9kZCIgaWQ9IlRhaWwiLz4KPC9zdmc+");
${tokens.hintTooltipArrowHeight}: 0.375rem;
${tokens.hintTooltipArrowEdgeMargin}: 0.5625rem;
`,
},
disabled: {
true: css`
${tokens.disabledOpacity}: 0.4;
Expand Down
Loading