Repository: streamlit/streamlit
File: frontend/lib/src/components/widgets/BidiComponent/utils/theme.ts (TypeScript)

Code before:
      theme.fontSizes.h6FontSize,
    ],
    headingFontWeights: [
      theme.fontWeights.h1FontWeight,
      theme.fontWeights.h2FontWeight,
      theme.fontWeights.h3FontWeight,
      theme.fontWeights.h4FontWeight,
      theme.fontWeights.h5FontWeight,
      theme.fontWeights.h6FontWeight,
    ],
    borderColor: theme.colors.borderColor,
    dataframeBorderColor: theme.colors.dataframeBorderColor,
    dataframeHeaderBackgroundColor:
      theme.colors.dataframeHeaderBackgroundColor,
    codeBackgroundColor: theme.colors.codeBackgroundColor,
    font: theme.genericFonts.bodyFont,
    chartCategoricalColors: theme.colors.chartCategoricalColors,
    chartSequentialColors: theme.colors.chartSequentialColors,

    headingColor: theme.colors.headingColor,
    borderColorLight: theme.colors.borderColorLight,
    codeTextColor: theme.colors.codeTextColor,

    // Computed property that falls back to transparent if widgetBorderColor
    // (the config option) is not set.
    widgetBorderColor: theme.colors.widgetBorderColor || "transparent",

    redColor: theme.colors.redColor,
    orangeColor: theme.colors.orangeColor,
    yellowColor: theme.colors.yellowColor,
    blueColor: theme.colors.blueColor,
    greenColor: theme.colors.greenColor,
    violetColor: theme.colors.violetColor,
    grayColor: theme.colors.grayColor,
    redBackgroundColor: theme.colors.redBackgroundColor,
    orangeBackgroundColor: theme.colors.orangeBackgroundColor,
    yellowBackgroundColor: theme.colors.yellowBackgroundColor,
    blueBackgroundColor: theme.colors.blueBackgroundColor,
    greenBackgroundColor: theme.colors.greenBackgroundColor,
    violetBackgroundColor: theme.colors.violetBackgroundColor,
    grayBackgroundColor: theme.colors.grayBackgroundColor,

    redTextColor: theme.colors.redTextColor,
    orangeTextColor: theme.colors.orangeTextColor,
    yellowTextColor: theme.colors.yellowTextColor,
    blueTextColor: theme.colors.blueTextColor,
    greenTextColor: theme.colors.greenTextColor,
    violetTextColor: theme.colors.violetTextColor,
    grayTextColor: theme.colors.grayTextColor,
  }
}

Review comment (suggestion):
**Nit**: Think this comment could be more explicit, like:
```
/**
 * Computed effective border color for widget elements.
 * 
 * This value is derived from theme configuration:
 * - When showWidgetBorder=false: undefined from theme (fallback to transparent here)
 * - When showWidgetBorder=true: uses theme's borderColor
 * - Legacy: uses deprecated widgetBorderColor config if explicitly set
 * 
 * Note: This is NOT the deprecated widgetBorderColor theme config input.
 * This is the computed OUTPUT that components should use.
 */
```

Code after:
    linkUnderline: theme.linkUnderline,
    headingFont: theme.genericFonts.headingFont,
    codeFont: theme.genericFonts.codeFont,
    baseRadius: theme.radii.default,
    buttonRadius: theme.radii.button,
    baseFontSize:
      typeof theme.fontSizes.baseFontSize === "number"
        ? `${theme.fontSizes.baseFontSize}px`
        : String(theme.fontSizes.baseFontSize),
    baseFontWeight: theme.fontWeights.normal,
    codeFontWeight: theme.fontWeights.code,
    codeFontSize: theme.fontSizes.codeFontSize,
    headingFontSizes,
    headingFontSize1: headingFontSizes[0],
    headingFontSize2: headingFontSizes[1],
    headingFontSize3: headingFontSizes[2],
    headingFontSize4: headingFontSizes[3],
    headingFontSize5: headingFontSizes[4],
    headingFontSize6: headingFontSizes[5],
    headingFontWeights,
    headingFontWeight1: headingFontWeights[0],
    headingFontWeight2: headingFontWeights[1],
    headingFontWeight3: headingFontWeights[2],
    headingFontWeight4: headingFontWeights[3],
    headingFontWeight5: headingFontWeights[4],
    headingFontWeight6: headingFontWeights[5],
    borderColor: theme.colors.borderColor,
    dataframeBorderColor: theme.colors.dataframeBorderColor,
    dataframeHeaderBackgroundColor:
      theme.colors.dataframeHeaderBackgroundColor,
    codeBackgroundColor: theme.colors.codeBackgroundColor,
    font: theme.genericFonts.bodyFont,
    chartCategoricalColors: theme.colors.chartCategoricalColors,
    chartSequentialColors: theme.colors.chartSequentialColors,

    headingColor: theme.colors.headingColor,
    borderColorLight: theme.colors.borderColorLight,
    codeTextColor: theme.colors.codeTextColor,

    /**
     * Computed effective border color for widget elements.
     *
     * This value is derived from theme configuration:
     * - When showWidgetBorder=false: undefined from theme (fallback to
     *   transparent here)
     * - When showWidgetBorder=true: uses theme's borderColor
     * - Legacy: uses deprecated widgetBorderColor config if explicitly set
     *
     * Note: This is NOT the deprecated widgetBorderColor theme config input.
     * This is the computed OUTPUT that custom components should use.
     */