UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines • 31.7 kB
{"version":3,"file":"conditions.cjs","names":[],"sources":["../../../../src/core/css/conditions.ts"],"sourcesContent":["import type { Length } from \"../../utils\"\nimport type { DOMElement } from \"../components\"\nimport type { CSSObject } from \"./index.types\"\n\ntype ReplaceSelector<\n Y extends string[],\n M extends string,\n D extends string,\n> = Y extends [infer H extends string, ...infer R extends string[]]\n ? `${H}${M extends `&${infer T}` ? `${T} ${D}` : `${M} ${D}`}${Length<R> extends 0 ? \"\" : `, `}${ReplaceSelector<R, M, D>}`\n : \"\"\n\nconst toGroup = <Y extends string>(selector: Y) =>\n [\"[role=group]\", \"[data-group]\", \".group\"]\n .map((prefix) => `${prefix}${selector.slice(1)} &`)\n .join(\", \") as ReplaceSelector<\n [\"[role=group]\", \"[data-group]\", \".group\"],\n Y,\n \"&\"\n >\n\nconst toPeer = <Y extends string>(selector: Y) =>\n [\n ...[\"[data-peer]\", \".peer\"].flatMap((prefix) => [\n `&:has(~ ${prefix}${selector.slice(1)})`,\n `${prefix}${selector.slice(1)} ~ &`,\n ]),\n ...[\"[data-peer]\", \".peer\"].flatMap((prefix) => [\n `&:has(~ ${prefix} *${selector.slice(1)})`,\n `${prefix}:has(*${selector.slice(1)}) ~ &`,\n ]),\n ].join(\", \") as ReplaceSelector<[\"[data-peer]\", \".peer\"], Y, \"~ &\">\n\nexport type AnySelector =\n | `${string}${\" \" | \"#\" | \"*\" | \"+\" | \",\" | \".\" | \":\" | \">\" | \"@\" | \"[\" | \"]\" | \"~\"}${string}`\n | DOMElement\n\nexport const attributes = {\n /**\n * The CSS `&[data-accept]` attribute selector.\n */\n _accept: \"&[data-accept]\",\n /**\n * The CSS `&[data-between]` attribute selector.\n */\n _between: \"&[data-between]\",\n /**\n * The CSS `&[data-complete]` attribute selector.\n */\n _complete: \"&[data-complete]\",\n /**\n * The CSS `&:is([aria-current], [data-current]):not([aria-current='false'])` attribute selector.\n */\n _current: \"&:is([aria-current], [data-current]):not([aria-current='false'])\",\n /**\n * Styles for when `data-mode` is applied to any parent of this component or element.\n */\n _dark:\n \".dark &:not([data-mode]), [data-mode=dark] &:not([data-mode]), &[data-mode=dark]\",\n /**\n * The CSS `&:is([data-end], [data-group-end])` attribute selector.\n */\n _end: \"&:is([data-end], [data-group-end])\",\n /**\n * The CSS `&:is([data-expanded], [aria-expanded=true])` attribute selector.\n */\n _expanded: \"&:is([data-expanded], [aria-expanded=true])\",\n /**\n * The CSS `&[data-fallback]` attribute selector.\n */\n _fallback: \"&[data-fallback]\",\n /**\n * The CSS `&[data-filled]` attribute selector.\n */\n _filled: \"&[data-filled]\",\n /**\n * The CSS `&:is([data-grabbed], [aria-grabbed=true])` attribute selector.\n */\n _grabbed: \"&:is([data-grabbed], [aria-grabbed=true])\",\n /**\n * The CSS `&:is([role=grid], [data-grid])` attribute selector.\n */\n _grid: \"&:is([role=grid], [data-grid])\",\n /**\n * The CSS `&:has(> [data-icon])` attribute selector.\n */\n _hasIcon: \"&:has(> [data-icon])\",\n /**\n * The CSS `&[data-idle]` attribute selector.\n */\n _idle: \"&[data-idle]\",\n /**\n * The CSS `&[data-incomplete]` attribute selector.\n */\n _incomplete: \"&[data-incomplete]\",\n /**\n * Styles for when `data-mode` is applied to any parent of this component or element.\n */\n _light:\n \".light &:not([data-mode]), [data-mode=light] &:not([data-mode]), &[data-mode=light]\",\n /**\n * The CSS `&[data-loaded]` attribute selector.\n */\n _loaded: \"&[data-loaded]\",\n /**\n * The CSS `&:is([data-loading], [aria-busy=true])` attribute selector.\n */\n _loading: \"&:is([data-loading], [aria-busy=true])\",\n /**\n * The CSS `&[dir=ltr]` attribute selector.\n */\n _ltr: \"[dir=ltr] &\",\n /**\n * The CSS `&[hidden]` attribute selector.\n */\n _nativeHidden: \"&[hidden]\",\n /**\n * The CSS `&[data-not-allowed]` attribute selector.\n */\n _notAllowed: \"&[data-not-allowed]\",\n /**\n * The CSS `&[aria-current='false']` attribute selector.\n */\n _notCurrent: \"&:not([aria-current], [data-current]), &[aria-current='false']\",\n /**\n * The CSS `&:not([data-fallback])` attribute selector.\n */\n _notFallback: \"&:not([data-fallback])\",\n /**\n * The CSS `&:not([data-selected]):not([aria-selected=true])` attribute selector.\n */\n _notSelected: \"&:not([data-selected]):not([aria-selected=true])\",\n /**\n * The CSS `&[data-numeric]` attribute selector.\n */\n _numeric: \"&[data-numeric]\",\n /**\n * The CSS `&:is([data-pressed], [aria-pressed=true])` attribute selector.\n */\n _pressed: \"&:is([data-pressed], [aria-pressed=true])\",\n /**\n * The CSS `&:is([data-range])` attribute selector.\n */\n _range: \"&:is([data-range])\",\n /**\n * The CSS `&[data-reject]` attribute selector.\n */\n _reject: \"&[data-reject]\",\n /**\n * The CSS `& .ui-ripple` attribute selector.\n */\n _ripple: \"& .ui-ripple\",\n /**\n * The CSS `&[dir=rtl]` attribute selector.\n */\n _rtl: \"[dir=rtl] &\",\n /**\n * The CSS `&:is([data-start], [data-group-start])` attribute selector.\n */\n _start: \"&:is([data-start], [data-group-start])\",\n /**\n * The CSS `&:is([data-selected], [aria-selected=true])` attribute selector.\n */\n _selected: \"&:is([data-selected], [aria-selected=true])\",\n /**\n * The CSS `&:is([hidden], [data-hidden])` attribute selector.\n */\n _hidden: \"&:is([hidden], [data-hidden])\",\n /**\n * The CSS `&[data-never]` attribute selector.\n */\n _never: \"&[data-never]\",\n} as const\n\nexport type Attributes = typeof attributes\nexport type AttributeProperty = keyof Attributes\nexport type AttributeProps = {\n [K in AttributeProperty]?: CSSObject\n}\n\nexport const attributeProperties = Object.keys(\n attributes,\n) as AttributeProperty[]\nexport const attributeSelectors = Object.values(attributes)\n\nexport const pseudoElements = {\n /**\n * The CSS `&::after` pseudo-element.\n */\n _after: \"&::after\",\n /**\n * The CSS `&::backdrop` pseudo-element.\n */\n _backdrop: \"&::backdrop\",\n /**\n * The CSS `&::before` pseudo-element.\n */\n _before: \"&::before\",\n /**\n * The CSS `&::cue` pseudo-element.\n */\n _cue: \"&::cue\",\n /**\n * The CSS `&::cue-region` pseudo-element.\n */\n _cueRegion: \"&::cue-region\",\n /**\n * The CSS `&::file-selector-button` pseudo-element.\n */\n _fileSelector: \"&::file-selector-button\",\n /**\n * The CSS `&::first-letter` pseudo-element.\n */\n _firstLetter: \"&::first-letter\",\n /**\n * The CSS `&::first-line` pseudo-element.\n */\n _firstLine: \"&::first-line\",\n /**\n * The CSS `&::marker` pseudo-element.\n */\n _marker: \"&::marker\",\n /**\n * The CSS `&::placeholder, &[data-placeholder]` pseudo-element.\n */\n _placeholder: \"&::placeholder, &[data-placeholder]\",\n /**\n * The CSS `&::-webkit-scrollbar, &[data-scrollbar]` pseudo-element.\n */\n _scrollbar: \"&::-webkit-scrollbar, &[data-scrollbar]\",\n /**\n * The CSS `&::-webkit-scrollbar-button` pseudo-element.\n */\n _scrollbarButton: \"&::-webkit-scrollbar-button\",\n /**\n * The CSS `&::-webkit-scrollbar-corner` pseudo-element.\n */\n _scrollbarCorner: \"&::-webkit-scrollbar-corner\",\n /**\n * The CSS `&::-webkit-scrollbar-thumb` pseudo-element.\n */\n _scrollbarThumb: \"&::-webkit-scrollbar-thumb\",\n /**\n * The CSS `&::-webkit-scrollbar-track` pseudo-element.\n */\n _scrollbarTrack: \"&::-webkit-scrollbar-track\",\n /**\n * The CSS `&::-webkit-scrollbar-track-piece` pseudo-element.\n */\n _scrollbarTrackPiece: \"&::-webkit-scrollbar-track-piece\",\n /**\n * The CSS `&::selection` pseudo-element.\n */\n _selection: \"&::selection\",\n} as const\n\nexport type PseudoElements = typeof pseudoElements\nexport type PseudoElementProperty = keyof PseudoElements\nexport type PseudoElementProps = {\n [K in PseudoElementProperty]?: CSSObject\n}\n\nexport const pseudoElementProperties = Object.keys(\n pseudoElements,\n) as PseudoElementProperty[]\nexport const pseudoElementSelectors = Object.values(pseudoElements)\n\nexport const pseudoClasses = {\n /**\n * The CSS `&:is([data-activedescendant])` pseudo-class.\n */\n _activedescendant: \"&:is([data-activedescendant])\",\n /**\n * The CSS `:any-link` pseudo-class.\n */\n _anyLink: \"&:is(:any-link, [data-any-link])\",\n /**\n * The CSS `&:autofill` pseudo-class.\n */\n _autofill: \"&:autofill\",\n /**\n * The CSS `&:is(:blank, [data-blank])` pseudo-class.\n */\n _blank: \"&:is(:blank, [data-blank])\",\n /**\n * The CSS `&:is(:checked, [data-checked], [aria-checked=true])` pseudo-class.\n */\n _checked: \"&:is(:checked, [data-checked], [aria-checked=true])\",\n /**\n * The CSS `& > *` child combinator selector.\n */\n _child: \"& > *\",\n /**\n * The CSS `&:default` pseudo-class.\n */\n _default: \"&:default\",\n /**\n * The CSS `&:empty` pseudo-class.\n */\n _empty: \"&:empty\",\n /**\n * The CSS `&:is(:enabled, [data-enabled])` pseudo-class.\n */\n _enabled: \"&:is(:enabled, [data-enabled])\",\n /**\n * The CSS `&:nth-of-type(even)` pseudo-class.\n */\n _even: \"&:nth-of-type(even)\",\n /**\n * The CSS `&:first-of-type` pseudo-class.\n */\n _first: \"&:first-of-type\",\n /**\n * The CSS `& > *:first-child` pseudo-class.\n */\n _firstChild: \"& > *:first-child\",\n /**\n * The CSS `&:not(:focus-within, [data-focus-within])` pseudo-class.\n */\n _focusWithin: \"&:not(:focus-within, [data-focus-within])\",\n /**\n * The CSS `&:fullscreen` pseudo-class.\n */\n _fullScreen: \"&:fullscreen\",\n /**\n * The CSS `&:is([data-orientation=horizontal], [aria-orientation=horizontal])` pseudo-class.\n */\n _horizontal:\n \"&:is([data-orientation=horizontal], [aria-orientation=horizontal])\",\n /**\n * The CSS `&:where(svg:not([data-loading])), & > [data-icon]` pseudo-class.\n */\n _icon: \"&:where(svg:not([data-loading])), & > [data-icon]\",\n /**\n * The CSS `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])` pseudo-class.\n */\n _indeterminate:\n \"&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed])\",\n /**\n * The CSS `&:is(:in-range, [data-in-range])` pseudo-class.\n */\n _inRange: \"&:is(:in-range, [data-in-range])\",\n /**\n * The CSS `&:last-of-type` pseudo-class.\n */\n _last: \"&:last-of-type\",\n /**\n * The CSS `& > *:last-child` pseudo-class.\n */\n _lastChild: \"& > *:last-child\",\n /**\n * The CSS `&:is(:link, [data-link])` pseudo-class.\n */\n _link: \"&:is(:link, [data-link])\",\n /**\n * The CSS `&:modal` pseudo-class.\n */\n _modal: \"&:modal\",\n /**\n * The CSS `&:active` pseudo-class.\n */\n _nativeActive: \"&:active\",\n /**\n * The CSS `&:checked` pseudo-class.\n */\n _nativeChecked: \"&:checked\",\n /**\n * The CSS `&:is(disabled, [disabled])` pseudo-class.\n */\n _nativeDisabled: \"&:is(disabled, [disabled])\",\n /**\n * The CSS `&:focus` pseudo-class.\n */\n _nativeFocus: \"&:focus\",\n /**\n * The CSS `&:focus-visible` pseudo-class.\n */\n _nativeFocusVisible: \"&:focus-visible\",\n /**\n * The CSS `&:focus-within` pseudo-class.\n */\n _nativeFocusWithin: \"&:focus-within\",\n /**\n * The CSS `&:hover` pseudo-class.\n */\n _nativeHover: \"&:hover\",\n /**\n * The CSS `&:is([readonly], [aria-readonly=true])` pseudo-class.\n */\n _nativeReadOnly: \"&:is([readonly], [aria-readonly=true])\",\n /**\n * The CSS `&:target` pseudo-class.\n */\n _nativeTarget: \"&:target\",\n /**\n * The CSS `&:valid` pseudo-class.\n */\n _nativeValid: \"&:valid\",\n /**\n * The CSS `&:not(:checked):not([data-checked]):not([aria-checked=true])` pseudo-class.\n */\n _notChecked: \"&:not(:checked):not([data-checked]):not([aria-checked=true])\",\n /**\n * The CSS `&:not(:empty)` pseudo-class.\n */\n _notEmpty: \"&:not(:empty)\",\n /**\n * The CSS `&:not(:first-of-type)` pseudo-class.\n */\n _notFirst: \"&:not(:first-of-type)\",\n /**\n * The CSS `& > *:not(:first-child)` pseudo-class.\n */\n _notFirstChild: \"& > *:not(:first-child)\",\n /**\n * The CSS `&:not(:last-of-type)` pseudo-class.\n */\n _notLast: \"&:not(:last-of-type)\",\n /**\n * The CSS `& > *:not(:last-child)` pseudo-class.\n */\n _notLastChild: \"& > *:not(:last-child)\",\n /**\n * The CSS `&:not(:target)` pseudo-class.\n */\n _notTarget: \"&:not(:target)\",\n /**\n * The CSS `&:nth-of-type(odd)` pseudo-class.\n */\n _odd: \"&:nth-of-type(odd)\",\n /**\n * The CSS `&:only-of-type` pseudo-class.\n */\n _only: \"&:only-of-type\",\n /**\n * The CSS `&:only-child` pseudo-class.\n */\n _onlyChild: \"&:only-child\",\n /**\n * The CSS `&:is(:optional, [data-optional])` pseudo-class.\n */\n _optional: \"&:is(:optional, [data-optional])\",\n /**\n * The CSS `&:is(:out-of-range, [data-out-of-range])` pseudo-class.\n */\n _outRange: \"&:is(:out-of-range, [data-out-of-range])\",\n /**\n * The CSS `&:is(:paused, [data-paused])` pseudo-class.\n */\n _paused: \"&:is(:paused, [data-paused])\",\n /**\n * The CSS `&:picture-in-picture` pseudo-class.\n */\n _picture: \"&:picture-in-picture\",\n /**\n * The CSS `&:placeholder-shown` pseudo-class.\n */\n _placeholderShown: \"&:placeholder-shown\",\n /**\n * The CSS `&:is(:playing, [data-playing])` pseudo-class.\n */\n _playing: \"&:is(:playing, [data-playing])\",\n /**\n * The CSS `&:is(:read-write, [data-read-write])` pseudo-class.\n */\n _readWrite: \"&:is(:read-write, [data-read-write])\",\n /**\n * The CSS `&:is(:required, [required])` pseudo-class.\n */\n _required: \"&:is(:required, [required])\",\n /**\n * The CSS `&:is(:target, [data-target])` pseudo-class.\n */\n _target: \"&:is(:target, [data-target])\",\n /**\n * The CSS `&:is(:user-invalid, [data-user-invalid])` pseudo-class.\n */\n _userInvalid: \"&:is(:user-invalid, [data-user-invalid])\",\n /**\n * The CSS `&:is(:valid, [data-valid])` pseudo-class.\n */\n _valid: \"&:is(:valid, [data-valid])\",\n /**\n * The CSS `&:is([data-orientation=vertical], [aria-orientation=vertical])` pseudo-class.\n */\n _vertical: \"&:is([data-orientation=vertical], [aria-orientation=vertical])\",\n /**\n * The CSS `&:visited` pseudo-class.\n */\n _visited: \"&:visited\",\n /**\n * The CSS `&:is(:hover, [data-hover])` pseudo-class.\n */\n _hover:\n \"&:is(:hover, [data-hover]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])\",\n /**\n * The CSS `&:is(:active, [data-active])` pseudo-class.\n */\n _active:\n \"&:is(:active, [data-active]):not(:disabled, [disabled], [aria-disabled=true], [data-disabled])\",\n /**\n * The CSS `&:is(:focus, [data-focus])` pseudo-class.\n */\n _focus: \"&:is(:focus, [data-focus])\",\n /**\n * The CSS `&:is(:focus-visible, [data-focus-visible])` pseudo-class.\n */\n _focusVisible: \"&:is(:focus-visible, [data-focus-visible])\",\n /**\n * The CSS `&:is([data-invalid], [aria-invalid=true])` attribute selector.\n */\n _invalid: \"&:is([data-invalid], [aria-invalid=true])\",\n /**\n * The CSS `&:is([readonly], [data-readonly], [aria-readonly=true])` pseudo-class.\n */\n _readOnly: \"&:is([readonly], [data-readonly], [aria-readonly=true])\",\n /**\n * The CSS `&:is(:disabled, [disabled], [data-disabled])` pseudo-class.\n */\n _disabled: \"&:is(:disabled, [disabled], [data-disabled])\",\n} as const\n\nexport type PseudoClasses = typeof pseudoClasses\nexport type PseudoClassProperty = keyof PseudoClasses\nexport type PseudoClassProps = {\n [K in PseudoClassProperty]?: CSSObject\n}\n\nexport const pseudoClassProperties = Object.keys(\n pseudoClasses,\n) as PseudoClassProperty[]\nexport const pseudoClassSelectors = Object.values(pseudoClasses)\n\nexport const groupAttributes = {\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is accepted.\n */\n _groupAccept: toGroup(attributes._accept),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is active.\n */\n _groupActive: toGroup(pseudoClasses._active),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is activedescendant.\n */\n _groupActivedescendant: toGroup(pseudoClasses._activedescendant),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is blank.\n */\n _groupBlank: toGroup(pseudoClasses._blank),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is checked.\n */\n _groupChecked: toGroup(pseudoClasses._checked),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is complete.\n */\n _groupComplete: toGroup(attributes._complete),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is current.\n */\n _groupCurrent: toGroup(attributes._current),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is disabled.\n */\n _groupDisabled: toGroup(pseudoClasses._disabled),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is enabled.\n */\n _groupEnabled: toGroup(pseudoClasses._enabled),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is expanded.\n */\n _groupExpanded: toGroup(attributes._expanded),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focused.\n */\n _groupFocus: toGroup(pseudoClasses._focus),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focused-visible.\n */\n _groupFocusVisible: toGroup(pseudoClasses._focusVisible),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is focus-within.\n */\n _groupFocusWithin: toGroup(pseudoClasses._focusWithin),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is grabbed.\n */\n _groupGrabbed: toGroup(attributes._grabbed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is horizontal.\n */\n _groupHorizontal: toGroup(pseudoClasses._horizontal),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is hovered.\n */\n _groupHover: toGroup(pseudoClasses._hover),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is idle.\n */\n _groupIdle: toGroup(attributes._idle),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is incomplete.\n */\n _groupIncomplete: toGroup(attributes._incomplete),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is invalid.\n */\n _groupInvalid: toGroup(pseudoClasses._invalid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is loaded.\n */\n _groupLoaded: toGroup(attributes._loaded),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is loading.\n */\n _groupLoading: toGroup(attributes._loading),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is optional.\n */\n _groupOptional: toGroup(pseudoClasses._optional),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` has a placeholder shown.\n */\n _groupPlaceholderShown: toGroup(pseudoClasses._placeholderShown),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is pressed.\n */\n _groupPressed: toGroup(attributes._pressed),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is range.\n */\n _groupRange: toGroup(attributes._range),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is read-only.\n */\n _groupReadOnly: toGroup(pseudoClasses._readOnly),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is read-write.\n */\n _groupReadWrite: toGroup(pseudoClasses._readWrite),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is rejected.\n */\n _groupReject: toGroup(attributes._reject),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is required.\n */\n _groupRequired: toGroup(pseudoClasses._required),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is selected.\n */\n _groupSelected: toGroup(attributes._selected),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is user-invalid.\n */\n _groupUserInvalid: toGroup(pseudoClasses._userInvalid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is valid.\n */\n _groupValid: toGroup(pseudoClasses._valid),\n /**\n * Styles to apply when a parent element with `role=group`, `data-group` or `.group` is vertical.\n */\n _groupVertical: toGroup(pseudoClasses._vertical),\n} as const\n\nexport type GroupAttributes = typeof groupAttributes\nexport type GroupAttributeProperty = keyof GroupAttributes\nexport type GroupAttributeProps = {\n [K in GroupAttributeProperty]?: CSSObject\n}\n\nexport const groupAttributeProperties = Object.keys(\n groupAttributes,\n) as GroupAttributeProperty[]\nexport const groupAttributeSelectors = Object.values(groupAttributes)\n\nexport const peerAttributes = {\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is accepted.\n */\n _peerAccept: toPeer(attributes._accept),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is active.\n */\n _peerActive: toPeer(pseudoClasses._active),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is blank.\n */\n _peerBlank: toPeer(pseudoClasses._blank),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is checked.\n */\n _peerChecked: toPeer(pseudoClasses._checked),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is complete.\n */\n _peerComplete: toPeer(attributes._complete),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is current.\n */\n _peerCurrent: toPeer(attributes._current),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is disabled.\n */\n _peerDisabled: toPeer(pseudoClasses._disabled),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is enabled.\n */\n _peerEnabled: toPeer(pseudoClasses._enabled),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is expanded.\n */\n _peerExpanded: toPeer(attributes._expanded),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is focused.\n */\n _peerFocus: toPeer(pseudoClasses._focus),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is focused-visible.\n */\n _peerFocusVisible: toPeer(pseudoClasses._focusVisible),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is focus-within.\n */\n _peerFocusWithin: toPeer(pseudoClasses._focusWithin),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is grabbed.\n */\n _peerGrabbed: toPeer(attributes._grabbed),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is horizontal.\n */\n _peerHorizontal: toPeer(pseudoClasses._horizontal),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is hovered.\n */\n _peerHover: toPeer(pseudoClasses._hover),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is idle.\n */\n _peerIdle: toPeer(attributes._idle),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is incomplete.\n */\n _peerIncomplete: toPeer(attributes._incomplete),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is invalid.\n */\n _peerInvalid: toPeer(pseudoClasses._invalid),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is loaded.\n */\n _peerLoaded: toPeer(attributes._loaded),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is loading.\n */\n _peerLoading: toPeer(attributes._loading),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is optional.\n */\n _peerOptional: toPeer(pseudoClasses._optional),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` has a placeholder shown.\n */\n _peerPlaceholderShown: toPeer(pseudoClasses._placeholderShown),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is pressed.\n */\n _peerPressed: toPeer(attributes._pressed),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is range.\n */\n _peerRange: toPeer(attributes._range),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is read-only.\n */\n _peerReadOnly: toPeer(pseudoClasses._readOnly),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is read-write.\n */\n _peerReadWrite: toPeer(pseudoClasses._readWrite),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is rejected.\n */\n _peerReject: toPeer(attributes._reject),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is required.\n */\n _peerRequired: toPeer(pseudoClasses._required),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is selected.\n */\n _peerSelected: toPeer(attributes._selected),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is user-invalid.\n */\n _peerUserInvalid: toPeer(pseudoClasses._userInvalid),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is valid.\n */\n _peerValid: toPeer(pseudoClasses._valid),\n /**\n * Styles to apply when a parent element with `data-peer` or `.peer` is vertical.\n */\n _peerVertical: toPeer(pseudoClasses._vertical),\n} as const\n\nexport type PeerAttributes = typeof peerAttributes\nexport type PeerAttributeProperty = keyof PeerAttributes\nexport type PeerAttributeProps = {\n [K in PeerAttributeProperty]?: CSSObject\n}\n\nexport const peerAttributeProperties = Object.keys(\n peerAttributes,\n) as PeerAttributeProperty[]\nexport const peerAttributeSelectors = Object.values(peerAttributes)\n\nexport const conditions = {\n ...pseudoElements,\n ...attributes,\n ...pseudoClasses,\n ...groupAttributes,\n ...peerAttributes,\n} as const\n\nexport type Conditions = typeof conditions\nexport type ConditionProperty = keyof Conditions\nexport type ConditionSelector = Conditions[ConditionProperty]\nexport type ConditionProps = {\n [K in keyof Conditions]?: CSSObject\n}\n\nexport const conditionProperties = Object.keys(\n conditions,\n) as ConditionProperty[]\nexport const conditionSelectors = Object.values(conditions)\n\nexport function getCondition(key: string) {\n return key in conditions ? conditions[key as ConditionProperty] : key\n}\n"],"mappings":";;AAYA,MAAM,WAA6B,aACjC;CAAC;CAAgB;CAAgB;CAAS,CACvC,KAAK,WAAW,GAAG,SAAS,SAAS,MAAM,EAAE,CAAC,IAAI,CAClD,KAAK,KAAK;AAMf,MAAM,UAA4B,aAChC,CACE,GAAG,CAAC,eAAe,QAAQ,CAAC,SAAS,WAAW,CAC9C,WAAW,SAAS,SAAS,MAAM,EAAE,CAAC,IACtC,GAAG,SAAS,SAAS,MAAM,EAAE,CAAC,MAC/B,CAAC,EACF,GAAG,CAAC,eAAe,QAAQ,CAAC,SAAS,WAAW,CAC9C,WAAW,OAAO,IAAI,SAAS,MAAM,EAAE,CAAC,IACxC,GAAG,OAAO,QAAQ,SAAS,MAAM,EAAE,CAAC,OACrC,CAAC,CACH,CAAC,KAAK,KAAK;AAMd,MAAa,aAAa;CAIxB,SAAS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