var $e4afbc04cc32bbe9$exports = require("./spectrum-theme.cjs");


function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}

$parcel$export(module.exports, "centerPadding", () => $138e630f79b81546$export$dc7aad089b8f5c30);
$parcel$export(module.exports, "setColorScheme", () => $138e630f79b81546$export$f2d00fe8ce80fd84);
/*
 * Copyright 2024 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 
function $138e630f79b81546$export$dc7aad089b8f5c30(minHeight = 'self(minHeight)') {
    return `[calc((${minHeight} - self(borderTopWidth, 0px) - self(borderBottomWidth, 0px) - 1lh) / 2)]`;
}
function $138e630f79b81546$var$fontRelative(base, baseFontSize = 14) {
    return `[${(0, $e4afbc04cc32bbe9$exports.fontRelative)(base, baseFontSize)}]`;
}
const $138e630f79b81546$export$e0f35d825088c098 = ()=>({
        display: 'grid',
        gridColumnStart: {
            isInForm: 1
        },
        gridColumnEnd: {
            isInForm: {
                labelPosition: {
                    side: 'span 2'
                }
            }
        },
        gridTemplateColumns: {
            default: {
                labelPosition: {
                    top: [
                        '1fr'
                    ],
                    side: [
                        'auto',
                        '1fr'
                    ]
                }
            },
            isInForm: 'subgrid'
        },
        gridTemplateRows: {
            labelPosition: {
                top: [
                    'auto',
                    '1fr',
                    'auto'
                ],
                side: [
                    'auto',
                    '1fr'
                ]
            }
        },
        gridTemplateAreas: {
            labelPosition: {
                top: [
                    'label',
                    'input',
                    'helptext'
                ],
                side: [
                    'label input',
                    'label helptext'
                ]
            }
        },
        fontSize: $138e630f79b81546$export$78327973879c938a(),
        alignItems: 'baseline',
        lineHeight: 'ui',
        '--field-height': {
            type: 'height',
            value: $138e630f79b81546$export$28c38c60b8df41e1()
        },
        // Spectrum defines the field label/help text with a (minimum) height, with text centered inside.
        // Calculate what the gap should be based on the height and line height.
        // Use a variable here rather than rowGap since it is applied to the children as padding.
        // This allows the gap to collapse when the label/help text is not present.
        // Eventually this may be possible to do in pure CSS: https://github.com/w3c/csswg-drafts/issues/5813
        '--field-gap': {
            type: 'rowGap',
            value: $138e630f79b81546$export$dc7aad089b8f5c30('var(--field-height)')
        },
        columnGap: 12,
        disableTapHighlight: true
    });
const $138e630f79b81546$export$48db87e3f4768880 = ()=>({
        font: $138e630f79b81546$export$78327973879c938a(),
        cursor: 'default',
        color: {
            default: 'neutral-subdued',
            isDisabled: 'disabled',
            isStaticColor: 'transparent-overlay-1000',
            forcedColors: 'ButtonText'
        }
    });
const $138e630f79b81546$export$62d8db6a307a015a = ()=>({
        gridArea: 'input',
        minWidth: $138e630f79b81546$export$28c38c60b8df41e1(),
        contain: {
            // Only apply size containment if contain-intrinsic-width is supported.
            // In older browsers, this will fall back to the default browser intrinsic width.
            '@supports (contain-intrinsic-width: 1px)': 'inline-size',
            isQuiet: 'none'
        },
        '--defaultWidth': {
            type: 'width',
            value: {
                default: 208,
                size: {
                    S: 192,
                    L: 224,
                    XL: 240
                }
            }
        },
        // contain-intrinsic-width only includes the width of children, not the padding or borders.
        containIntrinsicWidth: 'calc(var(--defaultWidth) - self(paddingStart, 0px) - self(paddingEnd, 0px) - self(borderStartWidth, 0px) - self(borderEndWidth, 0px))'
    });
const $138e630f79b81546$export$f2d00fe8ce80fd84 = ()=>({
        '--s2-color-scheme': {
            type: 'colorScheme',
            value: {
                colorScheme: {
                    'light dark': 'light dark',
                    light: 'light',
                    dark: 'dark'
                }
            }
        },
        colorScheme: '--s2-color-scheme'
    });
function $138e630f79b81546$export$1750a8f222a9157d() {
    return {
        '--s2-container-bg': {
            type: 'backgroundColor',
            value: {
                staticColor: {
                    black: 'white',
                    white: 'black'
                }
            }
        }
    };
}
const $138e630f79b81546$export$78327973879c938a = ()=>({
        default: 'ui',
        size: {
            XS: 'ui-xs',
            S: 'ui-sm',
            L: 'ui-lg',
            XL: 'ui-xl'
        }
    });
const $138e630f79b81546$export$28c38c60b8df41e1 = (size = 'md')=>size === 'sm' ? $138e630f79b81546$var$controlSizeS : $138e630f79b81546$var$controlSizeM;
const $138e630f79b81546$var$controlSizeM = {
    default: 32,
    size: {
        XS: 20,
        S: 24,
        L: 40,
        XL: 48
    }
};
const $138e630f79b81546$var$controlSizeS = {
    default: 16,
    size: {
        S: 14,
        L: 18,
        XL: 20
    }
};
const $138e630f79b81546$export$6565fa6b916ade8 = (size = 'default')=>({
        '--size': {
            type: 'order',
            value: {
                default: 1,
                size: {
                    XS: Math.pow(1.125, -2),
                    S: Math.pow(1.125, -1),
                    L: Math.pow(1.125, 1),
                    XL: Math.pow(1.125, 2)
                }
            }
        },
        '--radius': {
            type: 'borderTopStartRadius',
            value: size
        },
        borderRadius: 'round(var(--radius) * var(--size), 1px)'
    });
const $138e630f79b81546$var$iconOnly = ':has([slot=icon]):not(:has([data-rsp-slot=text]))';
function $138e630f79b81546$export$b5cde1de278b4330(options) {
    let paddingX = options.shape === 'pill' ? 'pill' : 'edge-to-text';
    let result = {
        font: $138e630f79b81546$export$78327973879c938a(),
        display: 'flex',
        alignItems: 'center',
        boxSizing: 'border-box',
        paddingX: paddingX,
        minWidth: $138e630f79b81546$export$28c38c60b8df41e1()
    };
    if (options.shape === 'pill') result.borderRadius = 'pill';
    else Object.assign(result, $138e630f79b81546$export$6565fa6b916ade8());
    if (options.icon) {
        result.columnGap = 'text-to-visual';
        result.paddingX = {
            default: paddingX,
            [$138e630f79b81546$var$iconOnly]: 0
        };
        result['--iconMargin'] = {
            type: 'marginStart',
            value: {
                default: $138e630f79b81546$var$fontRelative(-2),
                [$138e630f79b81546$var$iconOnly]: 0
            }
        };
    }
    if (options.wrap) {
        result.minHeight = $138e630f79b81546$export$28c38c60b8df41e1();
        if (options.icon) {
            result.paddingY = 0;
            result['--labelPadding'] = {
                type: 'paddingTop',
                value: $138e630f79b81546$export$dc7aad089b8f5c30()
            };
            result.alignItems = {
                default: 'baseline',
                [$138e630f79b81546$var$iconOnly]: 'center'
            };
        } else result.paddingY = $138e630f79b81546$export$dc7aad089b8f5c30();
    } else result.height = $138e630f79b81546$export$28c38c60b8df41e1();
    return result;
}
const $138e630f79b81546$var$allowedOverrides = [
    'margin',
    'marginStart',
    'marginEnd',
    'marginTop',
    'marginBottom',
    'marginX',
    'marginY',
    'flexGrow',
    'flexShrink',
    'flexBasis',
    'justifySelf',
    'alignSelf',
    'order',
    'gridArea',
    'gridRowStart',
    'gridRowEnd',
    'gridColumnStart',
    'gridColumnEnd',
    'position',
    'zIndex',
    'top',
    'bottom',
    'inset',
    'insetX',
    'insetY',
    'insetStart',
    'insetEnd',
    'visibility'
];
const $138e630f79b81546$export$c79e0499b545f2e4 = [
    'width',
    'minWidth',
    'maxWidth'
];
const $138e630f79b81546$export$dc00e1c899b7e80d = [
    'size',
    'height',
    'minHeight',
    'maxHeight'
];
function $138e630f79b81546$export$6c84136e3de2766e({ width: width = true, height: height = false } = {}) {
    return $138e630f79b81546$var$allowedOverrides.concat(width ? $138e630f79b81546$export$c79e0499b545f2e4 : []).concat(height ? $138e630f79b81546$export$dc00e1c899b7e80d : []);
}


//# sourceMappingURL=style-utils.cjs.map
