@semcore/radio 16.0.0-prerelease.2 → 16.0.0-prerelease.20

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/CHANGELOG.md CHANGED
@@ -2,12 +2,30 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [16.0.0] - 2025-02-13
5
+ ## [16.0.0] - 2025-05-19
6
6
 
7
- ### Changed
7
+ ### Break
8
8
 
9
9
  - `keyboardFocusEnhance` to css `:focus-visible` property.
10
10
 
11
+ ## [6.43.4] - 2025-05-13
12
+
13
+ ### Changed
14
+
15
+ - Version patch update due to children dependencies update (`@semcore/utils` [4.48.4 ~> 4.48.5], `@semcore/flex-box` [5.41.3 ~> 5.41.4], `@semcore/core` [2.39.3 ~> 2.39.4]).
16
+
17
+ ## [6.43.3] - 2025-05-09
18
+
19
+ ### Changed
20
+
21
+ - Version patch update due to children dependencies update (`@semcore/utils` [4.48.2 ~> 4.48.4], `@semcore/flex-box` [5.41.2 ~> 5.41.3], `@semcore/core` [2.39.2 ~> 2.39.3]).
22
+
23
+ ## [6.43.2] - 2025-04-04
24
+
25
+ ### Changed
26
+
27
+ - Version patch update due to children dependencies update (`@semcore/utils` [4.48.1 ~> 4.48.2], `@semcore/flex-box` [5.41.1 ~> 5.41.2], `@semcore/core` [2.39.1 ~> 2.39.2]).
28
+
11
29
  ## [6.43.1] - 2025-03-20
12
30
 
13
31
  ### Changed
package/lib/cjs/Radio.js CHANGED
@@ -33,8 +33,10 @@ var _logger = _interopRequireDefault(require("@semcore/core/lib/utils/logger"));
33
33
  var _typography = require("@semcore/typography");
34
34
  var _excluded = ["size", "state", "theme", "keyboardFocused", "value", "tag", "disabled", "includeInputProps", "resolveColor"],
35
35
  _excluded2 = ["children", "Children"];
36
- /*__reshadow-styles__:"./style/radio.shadow.css"*/
37
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SRadio_lyu5n_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary, #191b23)}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_.__color_lyu5n_gg_{color:var(--color_lyu5n)}.___SRadio_lyu5n_gg_.__disabled_lyu5n_gg_{pointer-events:none}.___SText_lyu5n_gg_._size_m_lyu5n_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_lyu5n_gg_._size_l_lyu5n_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SValue_lyu5n_gg_{position:relative;flex-shrink:0;padding:0;outline:0;z-index:0;margin-top:var(--intergalactic-spacing-05x, 2px)}.___SValue_lyu5n_gg_::after,.___SValue_lyu5n_gg_::before{content:\"\";position:absolute;right:0;bottom:0;border-radius:50%;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SValue_lyu5n_gg_::before{top:0;left:0;border:1px solid;transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___SValue_lyu5n_gg_::after{top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0}.___SValue_lyu5n_gg_.__disabled_lyu5n_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_{width:16px;height:16px}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:14px;height:14px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_{width:20px;height:20px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:18px;height:18px}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SControl_lyu5n_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_::before{border-color:var(--intergalactic-control-primary-info, #008ff8);background-color:var(--intergalactic-control-primary-info, #008ff8)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_m_lyu5n_gg_::after{width:6px;height:6px}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_l_lyu5n_gg_::after{width:8px;height:8px}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n);background-color:var(--theme_lyu5n)}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n)}.___SInvalidPattern_lyu5n_gg_{background:0 0;overflow:hidden}.___SInvalidPattern_lyu5n_gg_:before{content:\"\";position:absolute;top:1px;left:1px;border-radius:50%;background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}" /*__inner_css_end__*/, "lyu5n_gg_") /*__reshadow_css_end__*/, {
36
+ /*!__reshadow-styles__:"./style/radio.shadow.css"*/
37
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SRadio_lyu5n_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary, #191b23)}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_.__color_lyu5n_gg_{color:var(--color_lyu5n)}.___SRadio_lyu5n_gg_.__disabled_lyu5n_gg_{pointer-events:none}.___SText_lyu5n_gg_._size_m_lyu5n_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_lyu5n_gg_._size_l_lyu5n_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SValue_lyu5n_gg_{position:relative;flex-shrink:0;padding:0;outline:0;z-index:0;margin-top:var(--intergalactic-spacing-05x, 2px)}.___SValue_lyu5n_gg_::after,.___SValue_lyu5n_gg_::before{content:\"\";position:absolute;right:0;bottom:0;border-radius:50%;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SValue_lyu5n_gg_::before{top:0;left:0;border:1px solid;transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___SValue_lyu5n_gg_::after{top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0}.___SValue_lyu5n_gg_.__disabled_lyu5n_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_{width:16px;height:16px}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:14px;height:14px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_{width:20px;height:20px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:18px;height:18px}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SControl_lyu5n_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_::before{border-color:var(--intergalactic-control-primary-info, #008ff8);background-color:var(--intergalactic-control-primary-info, #008ff8)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_m_lyu5n_gg_::after{width:6px;height:6px}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_l_lyu5n_gg_::after{width:8px;height:8px}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n);background-color:var(--theme_lyu5n)}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n)}.___SInvalidPattern_lyu5n_gg_{background:0 0;overflow:hidden}.___SInvalidPattern_lyu5n_gg_:before{content:\"\";position:absolute;top:1px;left:1px;border-radius:50%;background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}", /*__inner_css_end__*/"lyu5n_gg_"),
38
+ /*__reshadow_css_end__*/
39
+ {
38
40
  "__SRadio": "___SRadio_lyu5n_gg_",
39
41
  "_disabled": "__disabled_lyu5n_gg_",
40
42
  "__SText": "___SText_lyu5n_gg_",
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","names":["_core","require","_react","_interopRequireDefault","_flexBox","_assignProps8","_interopRequireWildcard","_resolveColorEnhance","_inputProps","_useColorResolver","_logger","_typography","_excluded","_excluded2","style","sstyled","insert","RadioGroupRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","uncontrolledProps","setContext","_this$asProps","asProps","theme","size","name","onChange","disabled","render","_ref","Children","createElement","Flex","assignProps","Component","_defineProperty2","defaultValue","RadioGroup","createComponent","exports","RadioRoot","_Component2","_super2","_this","_len","length","args","Array","_key","call","concat","_assertThisInitialized2","hoistedDisabled","undefined","logger","warn","setState","getTextProps","_assignProps6","context","_assignProps6$size","label","state","textProps","children","hoistDisabled","rootDisabled","props","getValueProps","_this$props$size","_assignProps7","_assignProps7$size","_assignProps7$state","_this$asProps2","checked","_ref2","_ref6","SRadio","Box","_this$asProps3","styles","hasChildren","cn","_objectSpread2","Fragment","Radio","Value","Text","CONTEXT_COMPONENT","ValueRoot","_Component3","_super3","_this2","_len2","_key2","e","target","getControlProps","currentValue","_this$asProps4","forwardRef","includeInputProps","_getInputProps","getInputProps","_getInputProps2","_slicedToArray2","commonControlProps","inputValue","controlProps","ref","_this$props","onClick","callAllEventHandlers","bindHandlerChange","getRadioMarkProps","_this$asProps5","keyboardFocused","tag","resolveColor","other","_objectWithoutProperties2","_getInputProps3","_getInputProps4","radioMarkProps","propsWithoutChildren","markProps","componentDidUpdate","componentDidMount","_ref8","_this$asProps6","_ref7","Control","RadioMark","inputProps","defaultChecked","resolveColorEnhance","_ref3","arguments[0]","_ref9","SControl","displayName","_ref4","_ref10","SValue","SInvalidPattern","InvalidStateBox","_ref5","_ref11","SText","TypographyText","color","React","useEffect","useColorResolver","wrapRadioGroup","wrapper","_default"],"sources":["../../src/Radio.jsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, CONTEXT_COMPONENT, sstyled, Root } from '@semcore/core';\nimport { Flex, Box, InvalidStateBox } from '@semcore/flex-box';\nimport assignProps, { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport getInputProps, { inputProps } from '@semcore/core/lib/utils/inputProps';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\n\nimport style from './style/radio.shadow.css';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { Text as TypographyText } from '@semcore/typography';\n\nclass RadioGroupRoot extends Component {\n static displayName = 'RadioGroup';\n\n static defaultProps = {\n defaultValue: null,\n };\n\n uncontrolledProps() {\n return {\n value: null,\n };\n }\n\n setContext() {\n const { theme, size, name, value, onChange, disabled } = this.asProps;\n\n return {\n onChange,\n value,\n theme,\n size,\n name,\n disabled,\n };\n }\n\n render() {\n const { Children } = this.asProps;\n\n return (\n <Root render={Flex} direction='column' role='group' __excludeProps={['onChange']}>\n <Children />\n </Root>\n );\n }\n}\n\nconst RadioGroup = createComponent(RadioGroupRoot);\n\nclass RadioRoot extends Component {\n static displayName = 'Radio';\n static style = style;\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n\n state = {\n hoistedDisabled: undefined,\n };\n\n hoistDisabled = (disabled) => {\n logger.warn(\n true,\n `Don't set disabled on Radio.Value or Radio.Text, set it on Radio or on RadioGroup (for all items) instead. Otherwise it will produce wrong SSR output.`,\n this.asProps['data-ui-name'],\n );\n this.setState({ hoistedDisabled: disabled });\n };\n\n getTextProps() {\n // The default values are here, since you cannot rewrite out of context\n const { size = 'm', disabled, label } = assignProps(this.asProps, this.context);\n const { hoistedDisabled } = this.state;\n\n const textProps = {\n size,\n children: label,\n disabled: disabled ?? hoistedDisabled,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n\n return textProps;\n }\n\n getValueProps() {\n // The default values are here, since you cannot rewrite out of context\n const {\n size = 'm',\n state = 'normal',\n theme,\n disabled,\n name,\n } = assignProps(this.asProps, this.context);\n const { value, checked } = this.asProps;\n const { hoistedDisabled } = this.state;\n\n return {\n size: this.props.size ?? size,\n disabled: disabled ?? hoistedDisabled,\n state: state,\n theme,\n value,\n checked,\n name,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n }\n\n render() {\n const SRadio = Root;\n const { styles, Children, children: hasChildren } = this.asProps;\n\n return sstyled(styles)(\n <SRadio render={Box} tag='label' __excludeProps={['onChange', 'label', 'disabled']}>\n {hasChildren ? (\n <Children />\n ) : (\n <>\n <Radio.Value />\n <Radio.Text />\n </>\n )}\n </SRadio>,\n );\n }\n}\n\nclass ValueRoot extends Component {\n static defaultProps = {\n includeInputProps: inputProps,\n defaultChecked: false,\n };\n static enhance = [resolveColorEnhance()];\n static displayName = 'Value';\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n static style = style;\n\n bindHandlerChange = (value) => (e) => {\n if (typeof this.context.onChange === 'function') {\n this.context.onChange(value, e);\n }\n };\n\n uncontrolledProps() {\n return {\n checked: (e) => e.target.checked,\n };\n }\n\n getControlProps() {\n const currentValue = this.context.value;\n const { forwardRef, includeInputProps, state, value } = this.asProps;\n const [commonControlProps] = getInputProps(this.asProps, includeInputProps);\n const inputValue = value ?? '';\n\n const controlProps = {\n ref: forwardRef,\n state,\n ...commonControlProps,\n value: inputValue,\n };\n\n if (currentValue !== undefined) {\n const { onChange, onClick } = this.props;\n\n controlProps.checked = currentValue === inputValue;\n controlProps.onChange = callAllEventHandlers(onChange, this.bindHandlerChange(inputValue));\n }\n\n return controlProps;\n }\n\n getRadioMarkProps() {\n const currentValue = this.context.value;\n const {\n size,\n state,\n theme,\n keyboardFocused,\n value,\n tag,\n disabled,\n includeInputProps,\n resolveColor,\n ...other\n } = this.asProps;\n const [commonControlProps, radioMarkProps] = getInputProps(other, includeInputProps);\n const { children, Children, ...propsWithoutChildren } = radioMarkProps;\n const inputValue = value ?? '';\n\n const markProps = {\n theme,\n size,\n state,\n keyboardFocused,\n disabled,\n resolveColor,\n checked: commonControlProps.checked,\n ...propsWithoutChildren,\n };\n\n if (currentValue !== undefined) {\n const { onClick } = this.props;\n\n if (tag !== 'label') {\n markProps.onClick = callAllEventHandlers(onClick, this.bindHandlerChange(inputValue));\n }\n }\n\n return markProps;\n }\n\n componentDidUpdate() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n componentDidMount() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n\n render() {\n const { styles, children: hasChildren, Children } = this.asProps;\n\n if (!hasChildren) {\n return sstyled(styles)(\n <>\n <Radio.Value.Control />\n <Radio.Value.RadioMark />\n </>,\n );\n }\n\n return sstyled(styles)(<Children />);\n }\n}\n\nconst Control = (props) => {\n const SControl = Root;\n const { styles, state } = props;\n\n return sstyled(styles)(\n <SControl render={Box} tag='input' type='radio' aria-invalid={state === 'invalid'} />,\n );\n};\nControl.displayName = 'Control';\n\nconst RadioMark = (props) => {\n const SValue = Root;\n const SInvalidPattern = InvalidStateBox;\n const { theme, styles, resolveColor, state, checked } = props;\n\n return sstyled(styles)(\n <SValue render={Box} tag='div' use:theme={resolveColor(theme)} aria-hidden={true}>\n {state === 'invalid' && !checked && <SInvalidPattern />}\n </SValue>,\n );\n};\nRadioMark.displayName = 'RadioMark';\n\nconst Text = (props) => {\n const SText = Root;\n const { styles, color } = props;\n\n React.useEffect(() => {\n if (props.rootDisabled !== props.disabled) {\n props.hoistDisabled(props.disabled);\n }\n }, [props.rootDisabled, props.disabled, props.hoistDisabled]);\n const resolveColor = useColorResolver();\n\n return sstyled(styles)(\n <SText render={TypographyText} tag='span' use:color={resolveColor(color)} />,\n );\n};\nText.displayName = 'Text';\n\nexport { inputProps, RadioGroup };\n\nconst Value = createComponent(ValueRoot, {\n Control,\n RadioMark,\n});\n\nconst Radio = createComponent(RadioRoot, {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AAMtD,KAAK,GAAG,IAAAhD,qBAAe,EAACmD,SAAS,EAAE;EACvC0C,OAAO,EAAPA,OAAO;EACPC,SAAS,EAATA;AACF,CAAC,CAAC;AAEF,IAAM/C,KAAK,GAAG,IAAA/C,qBAAe,EAACE,SAAS,EAAE;EACvC+C,IAAI,EAAJA,IAAI;EACJD,KAAK,EAALA;AACF,CAAC,CAAC;AAEK,IAAMoE,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,OAAO;EAAA,OAAKA,OAAO;AAAA;AAACpH,OAAA,CAAAmH,cAAA,GAAAA,cAAA;AAAA,IAAAE,QAAA,GAEpCvE,KAAK;AAAA9C,OAAA,cAAAqH,QAAA"}
1
+ {"version":3,"file":"Radio.js","names":["_core","require","_react","_interopRequireDefault","_flexBox","_assignProps8","_interopRequireWildcard","_resolveColorEnhance","_inputProps","_useColorResolver","_logger","_typography","_excluded","_excluded2","style","sstyled","insert","RadioGroupRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","uncontrolledProps","setContext","_this$asProps","asProps","theme","size","name","onChange","disabled","render","_ref","Children","createElement","Flex","assignProps","Component","_defineProperty2","defaultValue","RadioGroup","createComponent","exports","RadioRoot","_Component2","_super2","_this","_len","length","args","Array","_key","call","concat","_assertThisInitialized2","hoistedDisabled","undefined","logger","warn","setState","getTextProps","_assignProps6","context","_assignProps6$size","label","state","textProps","children","hoistDisabled","rootDisabled","props","getValueProps","_this$props$size","_assignProps7","_assignProps7$size","_assignProps7$state","_this$asProps2","checked","_ref2","_ref6","SRadio","Box","_this$asProps3","styles","hasChildren","cn","_objectSpread2","Fragment","Radio","Value","Text","CONTEXT_COMPONENT","ValueRoot","_Component3","_super3","_this2","_len2","_key2","e","target","getControlProps","currentValue","_this$asProps4","forwardRef","includeInputProps","_getInputProps","getInputProps","_getInputProps2","_slicedToArray2","commonControlProps","inputValue","controlProps","ref","_this$props","onClick","callAllEventHandlers","bindHandlerChange","getRadioMarkProps","_this$asProps5","keyboardFocused","tag","resolveColor","other","_objectWithoutProperties2","_getInputProps3","_getInputProps4","radioMarkProps","propsWithoutChildren","markProps","componentDidUpdate","componentDidMount","_ref8","_this$asProps6","_ref7","Control","RadioMark","inputProps","defaultChecked","resolveColorEnhance","_ref3","arguments[0]","_ref9","SControl","displayName","_ref4","_ref10","SValue","SInvalidPattern","InvalidStateBox","_ref5","_ref11","SText","TypographyText","color","React","useEffect","useColorResolver","wrapRadioGroup","wrapper","_default"],"sources":["../../src/Radio.jsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, CONTEXT_COMPONENT, sstyled, Root } from '@semcore/core';\nimport { Flex, Box, InvalidStateBox } from '@semcore/flex-box';\nimport assignProps, { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport getInputProps, { inputProps } from '@semcore/core/lib/utils/inputProps';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\n\nimport style from './style/radio.shadow.css';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { Text as TypographyText } from '@semcore/typography';\n\nclass RadioGroupRoot extends Component {\n static displayName = 'RadioGroup';\n\n static defaultProps = {\n defaultValue: null,\n };\n\n uncontrolledProps() {\n return {\n value: null,\n };\n }\n\n setContext() {\n const { theme, size, name, value, onChange, disabled } = this.asProps;\n\n return {\n onChange,\n value,\n theme,\n size,\n name,\n disabled,\n };\n }\n\n render() {\n const { Children } = this.asProps;\n\n return (\n <Root render={Flex} direction='column' role='group' __excludeProps={['onChange']}>\n <Children />\n </Root>\n );\n }\n}\n\nconst RadioGroup = createComponent(RadioGroupRoot);\n\nclass RadioRoot extends Component {\n static displayName = 'Radio';\n static style = style;\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n\n state = {\n hoistedDisabled: undefined,\n };\n\n hoistDisabled = (disabled) => {\n logger.warn(\n true,\n `Don't set disabled on Radio.Value or Radio.Text, set it on Radio or on RadioGroup (for all items) instead. Otherwise it will produce wrong SSR output.`,\n this.asProps['data-ui-name'],\n );\n this.setState({ hoistedDisabled: disabled });\n };\n\n getTextProps() {\n // The default values are here, since you cannot rewrite out of context\n const { size = 'm', disabled, label } = assignProps(this.asProps, this.context);\n const { hoistedDisabled } = this.state;\n\n const textProps = {\n size,\n children: label,\n disabled: disabled ?? hoistedDisabled,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n\n return textProps;\n }\n\n getValueProps() {\n // The default values are here, since you cannot rewrite out of context\n const {\n size = 'm',\n state = 'normal',\n theme,\n disabled,\n name,\n } = assignProps(this.asProps, this.context);\n const { value, checked } = this.asProps;\n const { hoistedDisabled } = this.state;\n\n return {\n size: this.props.size ?? size,\n disabled: disabled ?? hoistedDisabled,\n state: state,\n theme,\n value,\n checked,\n name,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n }\n\n render() {\n const SRadio = Root;\n const { styles, Children, children: hasChildren } = this.asProps;\n\n return sstyled(styles)(\n <SRadio render={Box} tag='label' __excludeProps={['onChange', 'label', 'disabled']}>\n {hasChildren ? (\n <Children />\n ) : (\n <>\n <Radio.Value />\n <Radio.Text />\n </>\n )}\n </SRadio>,\n );\n }\n}\n\nclass ValueRoot extends Component {\n static defaultProps = {\n includeInputProps: inputProps,\n defaultChecked: false,\n };\n static enhance = [resolveColorEnhance()];\n static displayName = 'Value';\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n static style = style;\n\n bindHandlerChange = (value) => (e) => {\n if (typeof this.context.onChange === 'function') {\n this.context.onChange(value, e);\n }\n };\n\n uncontrolledProps() {\n return {\n checked: (e) => e.target.checked,\n };\n }\n\n getControlProps() {\n const currentValue = this.context.value;\n const { forwardRef, includeInputProps, state, value } = this.asProps;\n const [commonControlProps] = getInputProps(this.asProps, includeInputProps);\n const inputValue = value ?? '';\n\n const controlProps = {\n ref: forwardRef,\n state,\n ...commonControlProps,\n value: inputValue,\n };\n\n if (currentValue !== undefined) {\n const { onChange, onClick } = this.props;\n\n controlProps.checked = currentValue === inputValue;\n controlProps.onChange = callAllEventHandlers(onChange, this.bindHandlerChange(inputValue));\n }\n\n return controlProps;\n }\n\n getRadioMarkProps() {\n const currentValue = this.context.value;\n const {\n size,\n state,\n theme,\n keyboardFocused,\n value,\n tag,\n disabled,\n includeInputProps,\n resolveColor,\n ...other\n } = this.asProps;\n const [commonControlProps, radioMarkProps] = getInputProps(other, includeInputProps);\n const { children, Children, ...propsWithoutChildren } = radioMarkProps;\n const inputValue = value ?? '';\n\n const markProps = {\n theme,\n size,\n state,\n keyboardFocused,\n disabled,\n resolveColor,\n checked: commonControlProps.checked,\n ...propsWithoutChildren,\n };\n\n if (currentValue !== undefined) {\n const { onClick } = this.props;\n\n if (tag !== 'label') {\n markProps.onClick = callAllEventHandlers(onClick, this.bindHandlerChange(inputValue));\n }\n }\n\n return markProps;\n }\n\n componentDidUpdate() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n componentDidMount() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n\n render() {\n const { styles, children: hasChildren, Children } = this.asProps;\n\n if (!hasChildren) {\n return sstyled(styles)(\n <>\n <Radio.Value.Control />\n <Radio.Value.RadioMark />\n </>,\n );\n }\n\n return sstyled(styles)(<Children />);\n }\n}\n\nconst Control = (props) => {\n const SControl = Root;\n const { styles, state } = props;\n\n return sstyled(styles)(\n <SControl render={Box} tag='input' type='radio' aria-invalid={state === 'invalid'} />,\n );\n};\nControl.displayName = 'Control';\n\nconst RadioMark = (props) => {\n const SValue = Root;\n const SInvalidPattern = InvalidStateBox;\n const { theme, styles, resolveColor, state, checked } = props;\n\n return sstyled(styles)(\n <SValue render={Box} tag='div' use:theme={resolveColor(theme)} aria-hidden={true}>\n {state === 'invalid' && !checked && <SInvalidPattern />}\n </SValue>,\n );\n};\nRadioMark.displayName = 'RadioMark';\n\nconst Text = (props) => {\n const SText = Root;\n const { styles, color } = props;\n\n React.useEffect(() => {\n if (props.rootDisabled !== props.disabled) {\n props.hoistDisabled(props.disabled);\n }\n }, [props.rootDisabled, props.disabled, props.hoistDisabled]);\n const resolveColor = useColorResolver();\n\n return sstyled(styles)(\n <SText render={TypographyText} tag='span' use:color={resolveColor(color)} />,\n );\n};\nText.displayName = 'Text';\n\nexport { inputProps, RadioGroup };\n\nconst Value = createComponent(ValueRoot, {\n Control,\n RadioMark,\n});\n\nconst Radio = createComponent(RadioRoot, {\n Text,\n Value,\n});\n\nexport const wrapRadioGroup = (wrapper) => wrapper;\n\nexport default Radio;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,WAAA,GAAAF,uBAAA,CAAAL,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AAGA,IAAAS,OAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAA6D,IAAAW,SAAA;EAAAC,UAAA;AAAA;AAAA,IAAAC,KAAA,+BAAAd,KAAA,CAAAe,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAEvDC,cAAc,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,cAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,cAAA;EAAA,SAAAA,eAAA;IAAA,IAAAK,gBAAA,mBAAAL,cAAA;IAAA,OAAAG,MAAA,CAAAG,KA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C;EAC7D,IAAMqD,YAAY,GAAG,IAAAmC,kCAAgB,GAAE;EAEvC,OAAAN,MAAA,GAAO,IAAA7I,aAAO,EAAC0E,MAAM,CAAC,eACpBvF,MAAA,YAAAsC,aAAA,CAACqH,KAAK,EAAAD,MAAA,CAAAjE,EAAA,cAAAC,cAAA,qBAAA5F,KAAA,CAAA0C,WAAA;IAAA,OAA6B,MAAM;IAAA,aAAYqF,YAAY,CAACgC,KAAK;EAAC,GAAAJ,KAAA,IAAI;AAEhF,CAAC;AACD3D,IAAI,CAACqD,WAAW,GAAG,MAAM;AAIzB,IAAMtD,KAAK,GAAG,IAAAhD,qBAAe,EAACmD,SAAS,EAAE;EACvC0C,OAAO,EAAPA,OAAO;EACPC,SAAS,EAATA;AACF,CAAC,CAAC;AAEF,IAAM/C,KAAK,GAAG,IAAA/C,qBAAe,EAACE,SAAS,EAAE;EACvC+C,IAAI,EAAJA,IAAI;EACJD,KAAK,EAALA;AACF,CAAC,CAAC;AAEK,IAAMoE,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,OAAO;EAAA,OAAKA,OAAO;AAAA;AAACpH,OAAA,CAAAmH,cAAA,GAAAA,cAAA;AAAA,IAAAE,QAAA,GAEpCvE,KAAK;AAAA9C,OAAA,cAAAqH,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps, Flex } from '@semcore/flex-box';\nimport { KeyboardFocusProps } from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';\nimport { Text } from '@semcore/typography';\n\nexport type RadioSize = 'm' | 'l';\nexport type RadioState = 'normal' | 'invalid';\nexport type RadioValue = string | number | boolean;\n\n/** @deprecated */\nexport interface IRadioProps extends RadioProps, UnknownProperties {}\nexport type RadioProps = BoxProps & {\n /** Radio item value **/\n value?: RadioValue;\n\n /** Radio item checked flag **/\n checked?: boolean;\n\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * Radio button size\n * @default m\n **/\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Radio item text **/\n label?: string;\n /** Blocks access and changes to the radio item **/\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioGroupProps extends RadioGroupProps, UnknownProperties {\n /**\n * HTML tag name for the displayed item\n */\n tag?: React.ElementType | string;\n}\nexport type RadioGroupProps<T extends RadioValue = RadioValue> = {\n /** Radio group name */\n name?: string;\n /** Active default value */\n defaultValue?: T;\n /** Active value */\n value?: T;\n /** Called when the selected element is changed */\n onChange?:\n | ((value: T, e?: React.SyntheticEvent<HTMLInputElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Radio button size */\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioValueProps extends RadioValueProps, UnknownProperties {}\nexport type RadioValueProps = BoxProps &\n KeyboardFocusProps & {\n /** List of elements that can be put on a hidden input */\n includeInputProps?: string[];\n /**\n * @deprecated set `state` on root Radio instead\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * @deprecated\n * The theme of the radio button that you can send your color to\n */\n theme?: string;\n /**\n * @deprecated set `size` on root RadioGroup instead\n * Radio button size\n */\n size?: RadioSize;\n /**\n * @deprecated set `value` on root Radio instead\n * The element value is required for RadioGroup\n */\n value?: RadioValue;\n /**\n * @deprecated set `defaultValue` on root RadioGroup instead\n * Default value if `value` property is not provided\n */\n defaultValue?: RadioValue;\n /**\n * @deprecated set `onChange` on root RadioGroup instead\n * Called when the value changes\n */\n onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /**\n * @deprecated set `disabled` on root Radio instead\n * Blocks access and changes to the form field\n */\n disabled?: boolean;\n };\n\n/** @deprecated */\nexport interface IRadioCtx extends RadioCtx, UnknownProperties {}\nexport type RadioCtx = {\n getValueProps: PropGetterFn;\n getTextProps: PropGetterFn;\n};\n\ntype IntergalacticRadioGroupComponent<PropsExtending = {}> = (<\n Value extends RadioValue,\n Tag extends Intergalactic.Tag = typeof Flex,\n>(\n props: Intergalactic.InternalTypings.ComponentProps<Tag, typeof Flex, RadioGroupProps<Value>> &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', typeof Flex, RadioGroupProps>;\n\nexport type RadioValueControlProps = {};\nexport type RadioValueMarkProps = {};\n\ndeclare const RadioGroup: IntergalacticRadioGroupComponent;\n\nexport { RadioGroup };\n\ndeclare const Radio: Intergalactic.Component<'label', RadioProps, RadioCtx> & {\n Value: Intergalactic.Component<'input', RadioValueProps> & {\n Control: Intergalactic.Component<'input', RadioValueControlProps>;\n RadioMark: Intergalactic.Component<typeof Box, RadioValueMarkProps>;\n };\n Text: typeof Text;\n};\n\ndeclare const wrapRadioGroup: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticRadioGroupComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticRadioGroupComponent<PropsExtending>;\nexport { wrapRadioGroup };\n\nexport default Radio;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps, Flex } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\n\nexport type RadioSize = 'm' | 'l';\nexport type RadioState = 'normal' | 'invalid';\nexport type RadioValue = string | number | boolean;\n\n/** @deprecated */\nexport interface IRadioProps extends RadioProps, UnknownProperties {}\nexport type RadioProps = BoxProps & {\n /** Radio item value **/\n value?: RadioValue;\n\n /** Radio item checked flag **/\n checked?: boolean;\n\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * Radio button size\n * @default m\n **/\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Radio item text **/\n label?: string;\n /** Blocks access and changes to the radio item **/\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioGroupProps extends RadioGroupProps, UnknownProperties {\n /**\n * HTML tag name for the displayed item\n */\n tag?: React.ElementType | string;\n}\nexport type RadioGroupProps<T extends RadioValue = RadioValue> = {\n /** Radio group name */\n name?: string;\n /** Active default value */\n defaultValue?: T;\n /** Active value */\n value?: T;\n /** Called when the selected element is changed */\n onChange?:\n | ((value: T, e?: React.SyntheticEvent<HTMLInputElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Radio button size */\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioValueProps extends RadioValueProps, UnknownProperties {}\nexport type RadioValueProps = BoxProps & {\n /** List of elements that can be put on a hidden input */\n includeInputProps?: string[];\n /**\n * @deprecated set `state` on root Radio instead\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * @deprecated\n * The theme of the radio button that you can send your color to\n */\n theme?: string;\n /**\n * @deprecated set `size` on root RadioGroup instead\n * Radio button size\n */\n size?: RadioSize;\n /**\n * @deprecated set `value` on root Radio instead\n * The element value is required for RadioGroup\n */\n value?: RadioValue;\n /**\n * @deprecated set `defaultValue` on root RadioGroup instead\n * Default value if `value` property is not provided\n */\n defaultValue?: RadioValue;\n /**\n * @deprecated set `onChange` on root RadioGroup instead\n * Called when the value changes\n */\n onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /**\n * @deprecated set `disabled` on root Radio instead\n * Blocks access and changes to the form field\n */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioCtx extends RadioCtx, UnknownProperties {}\nexport type RadioCtx = {\n getValueProps: PropGetterFn;\n getTextProps: PropGetterFn;\n};\n\ntype IntergalacticRadioGroupComponent<PropsExtending = {}> = (<\n Value extends RadioValue,\n Tag extends Intergalactic.Tag = typeof Flex,\n>(\n props: Intergalactic.InternalTypings.ComponentProps<Tag, typeof Flex, RadioGroupProps<Value>> &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', typeof Flex, RadioGroupProps>;\n\nexport type RadioValueControlProps = {};\nexport type RadioValueMarkProps = {};\n\ndeclare const RadioGroup: IntergalacticRadioGroupComponent;\n\nexport { RadioGroup };\n\ndeclare const Radio: Intergalactic.Component<'label', RadioProps, RadioCtx> & {\n Value: Intergalactic.Component<'input', RadioValueProps> & {\n Control: Intergalactic.Component<'input', RadioValueControlProps>;\n RadioMark: Intergalactic.Component<typeof Box, RadioValueMarkProps>;\n };\n Text: typeof Text;\n};\n\ndeclare const wrapRadioGroup: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticRadioGroupComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticRadioGroupComponent<PropsExtending>;\nexport { wrapRadioGroup };\n\nexport default Radio;\n"],"mappings":""}
package/lib/es6/Radio.js CHANGED
@@ -22,8 +22,10 @@ import assignProps, { callAllEventHandlers } from '@semcore/core/lib/utils/assig
22
22
  import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
23
23
  import getInputProps, { inputProps } from '@semcore/core/lib/utils/inputProps';
24
24
  import { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';
25
- /*__reshadow-styles__:"./style/radio.shadow.css"*/
26
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SRadio_lyu5n_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary, #191b23)}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_.__color_lyu5n_gg_{color:var(--color_lyu5n)}.___SRadio_lyu5n_gg_.__disabled_lyu5n_gg_{pointer-events:none}.___SText_lyu5n_gg_._size_m_lyu5n_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_lyu5n_gg_._size_l_lyu5n_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SValue_lyu5n_gg_{position:relative;flex-shrink:0;padding:0;outline:0;z-index:0;margin-top:var(--intergalactic-spacing-05x, 2px)}.___SValue_lyu5n_gg_::after,.___SValue_lyu5n_gg_::before{content:\"\";position:absolute;right:0;bottom:0;border-radius:50%;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SValue_lyu5n_gg_::before{top:0;left:0;border:1px solid;transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___SValue_lyu5n_gg_::after{top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0}.___SValue_lyu5n_gg_.__disabled_lyu5n_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_{width:16px;height:16px}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:14px;height:14px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_{width:20px;height:20px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:18px;height:18px}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SControl_lyu5n_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_::before{border-color:var(--intergalactic-control-primary-info, #008ff8);background-color:var(--intergalactic-control-primary-info, #008ff8)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_m_lyu5n_gg_::after{width:6px;height:6px}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_l_lyu5n_gg_::after{width:8px;height:8px}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n);background-color:var(--theme_lyu5n)}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n)}.___SInvalidPattern_lyu5n_gg_{background:0 0;overflow:hidden}.___SInvalidPattern_lyu5n_gg_:before{content:\"\";position:absolute;top:1px;left:1px;border-radius:50%;background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}" /*__inner_css_end__*/, "lyu5n_gg_") /*__reshadow_css_end__*/, {
25
+ /*!__reshadow-styles__:"./style/radio.shadow.css"*/
26
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SRadio_lyu5n_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary, #191b23)}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_.__color_lyu5n_gg_{color:var(--color_lyu5n)}.___SRadio_lyu5n_gg_.__disabled_lyu5n_gg_{pointer-events:none}.___SText_lyu5n_gg_._size_m_lyu5n_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_lyu5n_gg_._size_l_lyu5n_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SValue_lyu5n_gg_{position:relative;flex-shrink:0;padding:0;outline:0;z-index:0;margin-top:var(--intergalactic-spacing-05x, 2px)}.___SValue_lyu5n_gg_::after,.___SValue_lyu5n_gg_::before{content:\"\";position:absolute;right:0;bottom:0;border-radius:50%;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SValue_lyu5n_gg_::before{top:0;left:0;border:1px solid;transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___SValue_lyu5n_gg_::after{top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0}.___SValue_lyu5n_gg_.__disabled_lyu5n_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_{width:16px;height:16px}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:14px;height:14px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_{width:20px;height:20px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:18px;height:18px}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SControl_lyu5n_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_::before{border-color:var(--intergalactic-control-primary-info, #008ff8);background-color:var(--intergalactic-control-primary-info, #008ff8)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_m_lyu5n_gg_::after{width:6px;height:6px}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_l_lyu5n_gg_::after{width:8px;height:8px}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n);background-color:var(--theme_lyu5n)}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n)}.___SInvalidPattern_lyu5n_gg_{background:0 0;overflow:hidden}.___SInvalidPattern_lyu5n_gg_:before{content:\"\";position:absolute;top:1px;left:1px;border-radius:50%;background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}", /*__inner_css_end__*/"lyu5n_gg_"),
27
+ /*__reshadow_css_end__*/
28
+ {
27
29
  "__SRadio": "___SRadio_lyu5n_gg_",
28
30
  "_disabled": "__disabled_lyu5n_gg_",
29
31
  "__SText": "___SText_lyu5n_gg_",
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","names":["React","createComponent","Component","CONTEXT_COMPONENT","sstyled","Root","Flex","Box","InvalidStateBox","assignProps","callAllEventHandlers","resolveColorEnhance","getInputProps","inputProps","useColorResolver","style","_sstyled","insert","logger","Text","TypographyText","RadioGroupRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","uncontrolledProps","setContext","_this$asProps","asProps","theme","size","name","onChange","disabled","render","_ref","Children","createElement","_assignProps","_defineProperty","defaultValue","RadioGroup","RadioRoot","_Component2","_super2","_this","_len","length","args","Array","_key","call","concat","_assertThisInitialized","hoistedDisabled","undefined","warn","setState","getTextProps","_assignProps6","context","_assignProps6$size","label","state","textProps","children","hoistDisabled","rootDisabled","props","getValueProps","_this$props$size","_assignProps7","_assignProps7$size","_assignProps7$state","_this$asProps2","checked","_ref2","_ref6","SRadio","_this$asProps3","styles","hasChildren","cn","_objectSpread","_assignProps2","Fragment","Radio","Value","ValueRoot","_Component3","_super3","_this2","_len2","_key2","e","target","getControlProps","currentValue","_this$asProps4","forwardRef","includeInputProps","_getInputProps","_getInputProps2","_slicedToArray","commonControlProps","inputValue","controlProps","ref","_this$props","onClick","bindHandlerChange","getRadioMarkProps","_this$asProps5","keyboardFocused","tag","resolveColor","other","_objectWithoutProperties","_excluded","_getInputProps3","_getInputProps4","radioMarkProps","propsWithoutChildren","_excluded2","markProps","componentDidUpdate","componentDidMount","_ref8","_this$asProps6","_ref7","Control","RadioMark","defaultChecked","_ref3","arguments[0]","_ref9","SControl","_assignProps3","displayName","_ref4","_ref10","SValue","SInvalidPattern","_assignProps4","_ref5","_ref11","SText","color","useEffect","_assignProps5","wrapRadioGroup","wrapper"],"sources":["../../src/Radio.jsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, CONTEXT_COMPONENT, sstyled, Root } from '@semcore/core';\nimport { Flex, Box, InvalidStateBox } from '@semcore/flex-box';\nimport assignProps, { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport getInputProps, { inputProps } from '@semcore/core/lib/utils/inputProps';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\n\nimport style from './style/radio.shadow.css';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { Text as TypographyText } from '@semcore/typography';\n\nclass RadioGroupRoot extends Component {\n static displayName = 'RadioGroup';\n\n static defaultProps = {\n defaultValue: null,\n };\n\n uncontrolledProps() {\n return {\n value: null,\n };\n }\n\n setContext() {\n const { theme, size, name, value, onChange, disabled } = this.asProps;\n\n return {\n onChange,\n value,\n theme,\n size,\n name,\n disabled,\n };\n }\n\n render() {\n const { Children } = this.asProps;\n\n return (\n <Root render={Flex} direction='column' role='group' __excludeProps={['onChange']}>\n <Children />\n </Root>\n );\n }\n}\n\nconst RadioGroup = createComponent(RadioGroupRoot);\n\nclass RadioRoot extends Component {\n static displayName = 'Radio';\n static style = style;\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n\n state = {\n hoistedDisabled: undefined,\n };\n\n hoistDisabled = (disabled) => {\n logger.warn(\n true,\n `Don't set disabled on Radio.Value or Radio.Text, set it on Radio or on RadioGroup (for all items) instead. Otherwise it will produce wrong SSR output.`,\n this.asProps['data-ui-name'],\n );\n this.setState({ hoistedDisabled: disabled });\n };\n\n getTextProps() {\n // The default values are here, since you cannot rewrite out of context\n const { size = 'm', disabled, label } = assignProps(this.asProps, this.context);\n const { hoistedDisabled } = this.state;\n\n const textProps = {\n size,\n children: label,\n disabled: disabled ?? hoistedDisabled,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n\n return textProps;\n }\n\n getValueProps() {\n // The default values are here, since you cannot rewrite out of context\n const {\n size = 'm',\n state = 'normal',\n theme,\n disabled,\n name,\n } = assignProps(this.asProps, this.context);\n const { value, checked } = this.asProps;\n const { hoistedDisabled } = this.state;\n\n return {\n size: this.props.size ?? size,\n disabled: disabled ?? hoistedDisabled,\n state: state,\n theme,\n value,\n checked,\n name,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n }\n\n render() {\n const SRadio = Root;\n const { styles, Children, children: hasChildren } = this.asProps;\n\n return sstyled(styles)(\n <SRadio render={Box} tag='label' __excludeProps={['onChange', 'label', 'disabled']}>\n {hasChildren ? (\n <Children />\n ) : (\n <>\n <Radio.Value />\n <Radio.Text />\n </>\n )}\n </SRadio>,\n );\n }\n}\n\nclass ValueRoot extends Component {\n static defaultProps = {\n includeInputProps: inputProps,\n defaultChecked: false,\n };\n static enhance = [resolveColorEnhance()];\n static displayName = 'Value';\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n static style = style;\n\n bindHandlerChange = (value) => (e) => {\n if (typeof this.context.onChange === 'function') {\n this.context.onChange(value, e);\n }\n };\n\n uncontrolledProps() {\n return {\n checked: (e) => e.target.checked,\n };\n }\n\n getControlProps() {\n const currentValue = this.context.value;\n const { forwardRef, includeInputProps, state, value } = this.asProps;\n const [commonControlProps] = getInputProps(this.asProps, includeInputProps);\n const inputValue = value ?? '';\n\n const controlProps = {\n ref: forwardRef,\n state,\n ...commonControlProps,\n value: inputValue,\n };\n\n if (currentValue !== undefined) {\n const { onChange, onClick } = this.props;\n\n controlProps.checked = currentValue === inputValue;\n controlProps.onChange = callAllEventHandlers(onChange, this.bindHandlerChange(inputValue));\n }\n\n return controlProps;\n }\n\n getRadioMarkProps() {\n const currentValue = this.context.value;\n const {\n size,\n state,\n theme,\n keyboardFocused,\n value,\n tag,\n disabled,\n includeInputProps,\n resolveColor,\n ...other\n } = this.asProps;\n const [commonControlProps, radioMarkProps] = getInputProps(other, includeInputProps);\n const { children, Children, ...propsWithoutChildren } = radioMarkProps;\n const inputValue = value ?? '';\n\n const markProps = {\n theme,\n size,\n state,\n keyboardFocused,\n disabled,\n resolveColor,\n checked: commonControlProps.checked,\n ...propsWithoutChildren,\n };\n\n if (currentValue !== undefined) {\n const { onClick } = this.props;\n\n if (tag !== 'label') {\n markProps.onClick = callAllEventHandlers(onClick, this.bindHandlerChange(inputValue));\n }\n }\n\n return markProps;\n }\n\n componentDidUpdate() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n componentDidMount() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n\n render() {\n const { styles, children: hasChildren, Children } = this.asProps;\n\n if (!hasChildren) {\n return sstyled(styles)(\n <>\n <Radio.Value.Control />\n <Radio.Value.RadioMark />\n </>,\n );\n }\n\n return sstyled(styles)(<Children />);\n }\n}\n\nconst Control = (props) => {\n const SControl = Root;\n const { styles, state } = props;\n\n return sstyled(styles)(\n <SControl render={Box} tag='input' type='radio' aria-invalid={state === 'invalid'} />,\n );\n};\nControl.displayName = 'Control';\n\nconst RadioMark = (props) => {\n const SValue = Root;\n const SInvalidPattern = InvalidStateBox;\n const { theme, styles, resolveColor, state, checked } = props;\n\n return sstyled(styles)(\n <SValue render={Box} tag='div' use:theme={resolveColor(theme)} aria-hidden={true}>\n {state === 'invalid' && !checked && <SInvalidPattern />}\n </SValue>,\n );\n};\nRadioMark.displayName = 'RadioMark';\n\nconst Text = (props) => {\n const SText = Root;\n const { styles, color } = props;\n\n React.useEffect(() => {\n if (props.rootDisabled !== props.disabled) {\n props.hoistDisabled(props.disabled);\n }\n }, [props.rootDisabled, props.disabled, props.hoistDisabled]);\n const resolveColor = useColorResolver();\n\n return sstyled(styles)(\n <SText render={TypographyText} tag='span' use:color={resolveColor(color)} />,\n );\n};\nText.displayName = 'Text';\n\nexport { inputProps, RadioGroup };\n\nconst Value = createComponent(ValueRoot, {\n Control,\n RadioMark,\n});\n\nconst Radio = createComponent(RadioRoot, {\n Text,\n Value,\n});\n\nexport const wrapRadioGroup = (wrapper) => wrapper;\n\nexport default Radio;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAE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K,GAWMrI,cAAc;EAV/B,IAAQmE,MAAM,GAAYZ,KAAK,CAAvBY,MAAM;IAAEmE,KAAK,GAAK/E,KAAK,CAAf+E,KAAK;EAErB1J,KAAK,CAAC2J,SAAS,CAAC,YAAM;IACpB,IAAIhF,KAAK,CAACD,YAAY,KAAKC,KAAK,CAACnC,QAAQ,EAAE;MACzCmC,KAAK,CAACF,aAAa,CAACE,KAAK,CAACnC,QAAQ,CAAC;IACrC;EACF,CAAC,EAAE,CAACmC,KAAK,CAACD,YAAY,EAAEC,KAAK,CAACnC,QAAQ,EAAEmC,KAAK,CAACF,aAAa,CAAC,CAAC;EAC7D,IAAMiD,YAAY,GAAG5G,gBAAgB,EAAE;EAEvC,OAAA0I,MAAA,GAAOpJ,OAAO,CAACmF,MAAM,CAAC,eACpBvF,KAAA,CAAA4C,aAAA,CAAC6G,KAAK,EAAAD,MAAA,CAAA/D,EAAA,UAAAC,aAAA,KAAAkE,aAAA;IAAA,OAA6B,MAAM;IAAA,aAAYlC,YAAY,CAACgC,KAAK;EAAC,GAAAH,KAAA,IAAI;AAEhF,CAAC;AACDpI,IAAI,CAAC8H,WAAW,GAAG,MAAM;AAEzB,SAASpI,UAAU,EAAEmC,UAAU;AAE/B,IAAM8C,KAAK,GAAG7F,eAAe,CAAC8F,SAAS,EAAE;EACvC0C,OAAO,EAAPA,OAAO;EACPC,SAAS,EAATA;AACF,CAAC,CAAC;AAEF,IAAM7C,KAAK,GAAG5F,eAAe,CAACgD,SAAS,EAAE;EACvC9B,IAAI,EAAJA,IAAI;EACJ2E,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,OAAO,IAAM+D,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,OAAO;EAAA,OAAKA,OAAO;AAAA;AAElD,eAAejE,KAAK"}
1
+ {"version":3,"file":"Radio.js","names":["React","createComponent","Component","CONTEXT_COMPONENT","sstyled","Root","Flex","Box","InvalidStateBox","assignProps","callAllEventHandlers","resolveColorEnhance","getInputProps","inputProps","useColorResolver","style","_sstyled","insert","logger","Text","TypographyText","RadioGroupRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","uncontrolledProps","setContext","_this$asProps","asProps","theme","size","name","onChange","disabled","render","_ref","Children","createElement","_assignProps","_defineProperty","defaultValue","RadioGroup","RadioRoot","_Component2","_super2","_this","_len","length","args","Array","_key","call","concat","_assertThisInitialized","hoistedDisabled","undefined","warn","setState","getTextProps","_assignProps6","context","_assignProps6$size","label","state","textProps","children","hoistDisabled","rootDisabled","props","getValueProps","_this$props$size","_assignProps7","_assignProps7$size","_assignProps7$state","_this$asProps2","checked","_ref2","_ref6","SRadio","_this$asProps3","styles","hasChildren","cn","_objectSpread","_assignProps2","Fragment","Radio","Value","ValueRoot","_Component3","_super3","_this2","_len2","_key2","e","target","getControlProps","currentValue","_this$asProps4","forwardRef","includeInputProps","_getInputProps","_getInputProps2","_slicedToArray","commonControlProps","inputValue","controlProps","ref","_this$props","onClick","bindHandlerChange","getRadioMarkProps","_this$asProps5","keyboardFocused","tag","resolveColor","other","_objectWithoutProperties","_excluded","_getInputProps3","_getInputProps4","radioMarkProps","propsWithoutChildren","_excluded2","markProps","componentDidUpdate","componentDidMount","_ref8","_this$asProps6","_ref7","Control","RadioMark","defaultChecked","_ref3","arguments[0]","_ref9","SControl","_assignProps3","displayName","_ref4","_ref10","SValue","SInvalidPattern","_assignProps4","_ref5","_ref11","SText","color","useEffect","_assignProps5","wrapRadioGroup","wrapper"],"sources":["../../src/Radio.jsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, Component, CONTEXT_COMPONENT, sstyled, Root } from '@semcore/core';\nimport { Flex, Box, InvalidStateBox } from '@semcore/flex-box';\nimport assignProps, { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport getInputProps, { inputProps } from '@semcore/core/lib/utils/inputProps';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\n\nimport style from './style/radio.shadow.css';\nimport logger from '@semcore/core/lib/utils/logger';\nimport { Text as TypographyText } from '@semcore/typography';\n\nclass RadioGroupRoot extends Component {\n static displayName = 'RadioGroup';\n\n static defaultProps = {\n defaultValue: null,\n };\n\n uncontrolledProps() {\n return {\n value: null,\n };\n }\n\n setContext() {\n const { theme, size, name, value, onChange, disabled } = this.asProps;\n\n return {\n onChange,\n value,\n theme,\n size,\n name,\n disabled,\n };\n }\n\n render() {\n const { Children } = this.asProps;\n\n return (\n <Root render={Flex} direction='column' role='group' __excludeProps={['onChange']}>\n <Children />\n </Root>\n );\n }\n}\n\nconst RadioGroup = createComponent(RadioGroupRoot);\n\nclass RadioRoot extends Component {\n static displayName = 'Radio';\n static style = style;\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n\n state = {\n hoistedDisabled: undefined,\n };\n\n hoistDisabled = (disabled) => {\n logger.warn(\n true,\n `Don't set disabled on Radio.Value or Radio.Text, set it on Radio or on RadioGroup (for all items) instead. Otherwise it will produce wrong SSR output.`,\n this.asProps['data-ui-name'],\n );\n this.setState({ hoistedDisabled: disabled });\n };\n\n getTextProps() {\n // The default values are here, since you cannot rewrite out of context\n const { size = 'm', disabled, label } = assignProps(this.asProps, this.context);\n const { hoistedDisabled } = this.state;\n\n const textProps = {\n size,\n children: label,\n disabled: disabled ?? hoistedDisabled,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n\n return textProps;\n }\n\n getValueProps() {\n // The default values are here, since you cannot rewrite out of context\n const {\n size = 'm',\n state = 'normal',\n theme,\n disabled,\n name,\n } = assignProps(this.asProps, this.context);\n const { value, checked } = this.asProps;\n const { hoistedDisabled } = this.state;\n\n return {\n size: this.props.size ?? size,\n disabled: disabled ?? hoistedDisabled,\n state: state,\n theme,\n value,\n checked,\n name,\n hoistDisabled: this.hoistDisabled,\n rootDisabled: this.props.disabled,\n };\n }\n\n render() {\n const SRadio = Root;\n const { styles, Children, children: hasChildren } = this.asProps;\n\n return sstyled(styles)(\n <SRadio render={Box} tag='label' __excludeProps={['onChange', 'label', 'disabled']}>\n {hasChildren ? (\n <Children />\n ) : (\n <>\n <Radio.Value />\n <Radio.Text />\n </>\n )}\n </SRadio>,\n );\n }\n}\n\nclass ValueRoot extends Component {\n static defaultProps = {\n includeInputProps: inputProps,\n defaultChecked: false,\n };\n static enhance = [resolveColorEnhance()];\n static displayName = 'Value';\n static contextType = RadioGroup[CONTEXT_COMPONENT];\n static style = style;\n\n bindHandlerChange = (value) => (e) => {\n if (typeof this.context.onChange === 'function') {\n this.context.onChange(value, e);\n }\n };\n\n uncontrolledProps() {\n return {\n checked: (e) => e.target.checked,\n };\n }\n\n getControlProps() {\n const currentValue = this.context.value;\n const { forwardRef, includeInputProps, state, value } = this.asProps;\n const [commonControlProps] = getInputProps(this.asProps, includeInputProps);\n const inputValue = value ?? '';\n\n const controlProps = {\n ref: forwardRef,\n state,\n ...commonControlProps,\n value: inputValue,\n };\n\n if (currentValue !== undefined) {\n const { onChange, onClick } = this.props;\n\n controlProps.checked = currentValue === inputValue;\n controlProps.onChange = callAllEventHandlers(onChange, this.bindHandlerChange(inputValue));\n }\n\n return controlProps;\n }\n\n getRadioMarkProps() {\n const currentValue = this.context.value;\n const {\n size,\n state,\n theme,\n keyboardFocused,\n value,\n tag,\n disabled,\n includeInputProps,\n resolveColor,\n ...other\n } = this.asProps;\n const [commonControlProps, radioMarkProps] = getInputProps(other, includeInputProps);\n const { children, Children, ...propsWithoutChildren } = radioMarkProps;\n const inputValue = value ?? '';\n\n const markProps = {\n theme,\n size,\n state,\n keyboardFocused,\n disabled,\n resolveColor,\n checked: commonControlProps.checked,\n ...propsWithoutChildren,\n };\n\n if (currentValue !== undefined) {\n const { onClick } = this.props;\n\n if (tag !== 'label') {\n markProps.onClick = callAllEventHandlers(onClick, this.bindHandlerChange(inputValue));\n }\n }\n\n return markProps;\n }\n\n componentDidUpdate() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n componentDidMount() {\n if (this.asProps.rootDisabled !== this.asProps.disabled) {\n this.asProps.hoistDisabled(this.asProps.disabled);\n }\n }\n\n render() {\n const { styles, children: hasChildren, Children } = this.asProps;\n\n if (!hasChildren) {\n return sstyled(styles)(\n <>\n <Radio.Value.Control />\n <Radio.Value.RadioMark />\n </>,\n );\n }\n\n return sstyled(styles)(<Children />);\n }\n}\n\nconst Control = (props) => {\n const SControl = Root;\n const { styles, state } = props;\n\n return sstyled(styles)(\n <SControl render={Box} tag='input' type='radio' aria-invalid={state === 'invalid'} />,\n );\n};\nControl.displayName = 'Control';\n\nconst RadioMark = (props) => {\n const SValue = Root;\n const SInvalidPattern = InvalidStateBox;\n const { theme, styles, resolveColor, state, checked } = props;\n\n return sstyled(styles)(\n <SValue render={Box} tag='div' use:theme={resolveColor(theme)} aria-hidden={true}>\n {state === 'invalid' && !checked && <SInvalidPattern />}\n </SValue>,\n );\n};\nRadioMark.displayName = 'RadioMark';\n\nconst Text = (props) => {\n const SText = Root;\n const { styles, color } = props;\n\n React.useEffect(() => {\n if (props.rootDisabled !== props.disabled) {\n props.hoistDisabled(props.disabled);\n }\n }, [props.rootDisabled, props.disabled, props.hoistDisabled]);\n const resolveColor = useColorResolver();\n\n return sstyled(styles)(\n <SText render={TypographyText} tag='span' use:color={resolveColor(color)} />,\n );\n};\nText.displayName = 'Text';\n\nexport { inputProps, RadioGroup };\n\nconst Value = createComponent(ValueRoot, {\n Control,\n RadioMark,\n});\n\nconst Radio = createComponent(RadioRoot, {\n Text,\n Value,\n});\n\nexport const wrapRadioGroup = (wrapper) => wrapper;\n\nexport default Radio;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAEC,SAAS,EAAEC,iBAAiB,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAC5F,SAASC,IAAI,EAAEC,GAAG,EAAEC,eAAe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CAAf+E,KAAK;EAErB1J,KAAK,CAAC2J,SAAS,CAAC,YAAM;IACpB,IAAIhF,KAAK,CAACD,YAAY,KAAKC,KAAK,CAACnC,QAAQ,EAAE;MACzCmC,KAAK,CAACF,aAAa,CAACE,KAAK,CAACnC,QAAQ,CAAC;IACrC;EACF,CAAC,EAAE,CAACmC,KAAK,CAACD,YAAY,EAAEC,KAAK,CAACnC,QAAQ,EAAEmC,KAAK,CAACF,aAAa,CAAC,CAAC;EAC7D,IAAMiD,YAAY,GAAG5G,gBAAgB,EAAE;EAEvC,OAAA0I,MAAA,GAAOpJ,OAAO,CAACmF,MAAM,CAAC,eACpBvF,KAAA,CAAA4C,aAAA,CAAC6G,KAAK,EAAAD,MAAA,CAAA/D,EAAA,UAAAC,aAAA,KAAAkE,aAAA;IAAA,OAA6B,MAAM;IAAA,aAAYlC,YAAY,CAACgC,KAAK;EAAC,GAAAH,KAAA,IAAI;AAEhF,CAAC;AACDpI,IAAI,CAAC8H,WAAW,GAAG,MAAM;AAEzB,SAASpI,UAAU,EAAEmC,UAAU;AAE/B,IAAM8C,KAAK,GAAG7F,eAAe,CAAC8F,SAAS,EAAE;EACvC0C,OAAO,EAAPA,OAAO;EACPC,SAAS,EAATA;AACF,CAAC,CAAC;AAEF,IAAM7C,KAAK,GAAG5F,eAAe,CAACgD,SAAS,EAAE;EACvC9B,IAAI,EAAJA,IAAI;EACJ2E,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,OAAO,IAAM+D,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,OAAO;EAAA,OAAKA,OAAO;AAAA;AAElD,eAAejE,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps, Flex } from '@semcore/flex-box';\nimport { KeyboardFocusProps } from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';\nimport { Text } from '@semcore/typography';\n\nexport type RadioSize = 'm' | 'l';\nexport type RadioState = 'normal' | 'invalid';\nexport type RadioValue = string | number | boolean;\n\n/** @deprecated */\nexport interface IRadioProps extends RadioProps, UnknownProperties {}\nexport type RadioProps = BoxProps & {\n /** Radio item value **/\n value?: RadioValue;\n\n /** Radio item checked flag **/\n checked?: boolean;\n\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * Radio button size\n * @default m\n **/\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Radio item text **/\n label?: string;\n /** Blocks access and changes to the radio item **/\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioGroupProps extends RadioGroupProps, UnknownProperties {\n /**\n * HTML tag name for the displayed item\n */\n tag?: React.ElementType | string;\n}\nexport type RadioGroupProps<T extends RadioValue = RadioValue> = {\n /** Radio group name */\n name?: string;\n /** Active default value */\n defaultValue?: T;\n /** Active value */\n value?: T;\n /** Called when the selected element is changed */\n onChange?:\n | ((value: T, e?: React.SyntheticEvent<HTMLInputElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Radio button size */\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioValueProps extends RadioValueProps, UnknownProperties {}\nexport type RadioValueProps = BoxProps &\n KeyboardFocusProps & {\n /** List of elements that can be put on a hidden input */\n includeInputProps?: string[];\n /**\n * @deprecated set `state` on root Radio instead\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * @deprecated\n * The theme of the radio button that you can send your color to\n */\n theme?: string;\n /**\n * @deprecated set `size` on root RadioGroup instead\n * Radio button size\n */\n size?: RadioSize;\n /**\n * @deprecated set `value` on root Radio instead\n * The element value is required for RadioGroup\n */\n value?: RadioValue;\n /**\n * @deprecated set `defaultValue` on root RadioGroup instead\n * Default value if `value` property is not provided\n */\n defaultValue?: RadioValue;\n /**\n * @deprecated set `onChange` on root RadioGroup instead\n * Called when the value changes\n */\n onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /**\n * @deprecated set `disabled` on root Radio instead\n * Blocks access and changes to the form field\n */\n disabled?: boolean;\n };\n\n/** @deprecated */\nexport interface IRadioCtx extends RadioCtx, UnknownProperties {}\nexport type RadioCtx = {\n getValueProps: PropGetterFn;\n getTextProps: PropGetterFn;\n};\n\ntype IntergalacticRadioGroupComponent<PropsExtending = {}> = (<\n Value extends RadioValue,\n Tag extends Intergalactic.Tag = typeof Flex,\n>(\n props: Intergalactic.InternalTypings.ComponentProps<Tag, typeof Flex, RadioGroupProps<Value>> &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', typeof Flex, RadioGroupProps>;\n\nexport type RadioValueControlProps = {};\nexport type RadioValueMarkProps = {};\n\ndeclare const RadioGroup: IntergalacticRadioGroupComponent;\n\nexport { RadioGroup };\n\ndeclare const Radio: Intergalactic.Component<'label', RadioProps, RadioCtx> & {\n Value: Intergalactic.Component<'input', RadioValueProps> & {\n Control: Intergalactic.Component<'input', RadioValueControlProps>;\n RadioMark: Intergalactic.Component<typeof Box, RadioValueMarkProps>;\n };\n Text: typeof Text;\n};\n\ndeclare const wrapRadioGroup: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticRadioGroupComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticRadioGroupComponent<PropsExtending>;\nexport { wrapRadioGroup };\n\nexport default Radio;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps, Flex } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\n\nexport type RadioSize = 'm' | 'l';\nexport type RadioState = 'normal' | 'invalid';\nexport type RadioValue = string | number | boolean;\n\n/** @deprecated */\nexport interface IRadioProps extends RadioProps, UnknownProperties {}\nexport type RadioProps = BoxProps & {\n /** Radio item value **/\n value?: RadioValue;\n\n /** Radio item checked flag **/\n checked?: boolean;\n\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * Radio button size\n * @default m\n **/\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Radio item text **/\n label?: string;\n /** Blocks access and changes to the radio item **/\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioGroupProps extends RadioGroupProps, UnknownProperties {\n /**\n * HTML tag name for the displayed item\n */\n tag?: React.ElementType | string;\n}\nexport type RadioGroupProps<T extends RadioValue = RadioValue> = {\n /** Radio group name */\n name?: string;\n /** Active default value */\n defaultValue?: T;\n /** Active value */\n value?: T;\n /** Called when the selected element is changed */\n onChange?:\n | ((value: T, e?: React.SyntheticEvent<HTMLInputElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Radio button size */\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioValueProps extends RadioValueProps, UnknownProperties {}\nexport type RadioValueProps = BoxProps & {\n /** List of elements that can be put on a hidden input */\n includeInputProps?: string[];\n /**\n * @deprecated set `state` on root Radio instead\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * @deprecated\n * The theme of the radio button that you can send your color to\n */\n theme?: string;\n /**\n * @deprecated set `size` on root RadioGroup instead\n * Radio button size\n */\n size?: RadioSize;\n /**\n * @deprecated set `value` on root Radio instead\n * The element value is required for RadioGroup\n */\n value?: RadioValue;\n /**\n * @deprecated set `defaultValue` on root RadioGroup instead\n * Default value if `value` property is not provided\n */\n defaultValue?: RadioValue;\n /**\n * @deprecated set `onChange` on root RadioGroup instead\n * Called when the value changes\n */\n onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /**\n * @deprecated set `disabled` on root Radio instead\n * Blocks access and changes to the form field\n */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IRadioCtx extends RadioCtx, UnknownProperties {}\nexport type RadioCtx = {\n getValueProps: PropGetterFn;\n getTextProps: PropGetterFn;\n};\n\ntype IntergalacticRadioGroupComponent<PropsExtending = {}> = (<\n Value extends RadioValue,\n Tag extends Intergalactic.Tag = typeof Flex,\n>(\n props: Intergalactic.InternalTypings.ComponentProps<Tag, typeof Flex, RadioGroupProps<Value>> &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', typeof Flex, RadioGroupProps>;\n\nexport type RadioValueControlProps = {};\nexport type RadioValueMarkProps = {};\n\ndeclare const RadioGroup: IntergalacticRadioGroupComponent;\n\nexport { RadioGroup };\n\ndeclare const Radio: Intergalactic.Component<'label', RadioProps, RadioCtx> & {\n Value: Intergalactic.Component<'input', RadioValueProps> & {\n Control: Intergalactic.Component<'input', RadioValueControlProps>;\n RadioMark: Intergalactic.Component<typeof Box, RadioValueMarkProps>;\n };\n Text: typeof Text;\n};\n\ndeclare const wrapRadioGroup: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticRadioGroupComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticRadioGroupComponent<PropsExtending>;\nexport { wrapRadioGroup };\n\nexport default Radio;\n"],"mappings":""}
package/lib/esm/Radio.mjs CHANGED
@@ -1,270 +1,330 @@
1
- import G from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- import F from "@babel/runtime/helpers/esm/slicedToArray";
3
- import v from "@babel/runtime/helpers/esm/objectSpread2";
4
- import R from "@babel/runtime/helpers/esm/assertThisInitialized";
5
- import V from "@babel/runtime/helpers/esm/classCallCheck";
6
- import z from "@babel/runtime/helpers/esm/createClass";
7
- import D from "@babel/runtime/helpers/esm/inherits";
8
- import T from "@babel/runtime/helpers/esm/createSuper";
9
- import d from "@babel/runtime/helpers/esm/defineProperty";
10
- import { sstyled as f, createComponent as w, CONTEXT_COMPONENT as j, assignProps as P, Component as I } from "@semcore/core";
11
- import _ from "react";
12
- import { Flex as Y, Box as E, InvalidStateBox as Z } from "@semcore/flex-box";
13
- import A, { callAllEventHandlers as H } from "@semcore/core/lib/utils/assignProps";
14
- import ee from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
15
- import O, { inputProps as te } from "@semcore/core/lib/utils/inputProps";
16
- import { inputProps as De } from "@semcore/core/lib/utils/inputProps";
17
- import { useColorResolver as re } from "@semcore/core/lib/utils/use/useColorResolver";
18
- import ae from "@semcore/core/lib/utils/logger";
19
- import { Text as oe } from "@semcore/typography";
20
- var ne = ["size", "state", "theme", "keyboardFocused", "value", "tag", "disabled", "includeInputProps", "resolveColor"], le = ["children", "Children"], B = (
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
6
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
7
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
8
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
9
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
+ import { sstyled, createComponent, CONTEXT_COMPONENT, assignProps, Component } from "@semcore/core";
11
+ import React from "react";
12
+ import { Flex, Box, InvalidStateBox } from "@semcore/flex-box";
13
+ import assignProps$1, { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
14
+ import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
15
+ import getInputProps, { inputProps } from "@semcore/core/lib/utils/inputProps";
16
+ import { inputProps as inputProps2 } from "@semcore/core/lib/utils/inputProps";
17
+ import { useColorResolver } from "@semcore/core/lib/utils/use/useColorResolver";
18
+ import logger from "@semcore/core/lib/utils/logger";
19
+ import { Text as Text$1 } from "@semcore/typography";
20
+ var _excluded = ["size", "state", "theme", "keyboardFocused", "value", "tag", "disabled", "includeInputProps", "resolveColor"], _excluded2 = ["children", "Children"];
21
+ /*!__reshadow-styles__:"./style/radio.shadow.css"*/
22
+ var style = (
21
23
  /*__reshadow_css_start__*/
22
- (f.insert(
24
+ (sstyled.insert(
23
25
  /*__inner_css_start__*/
24
26
  '.___SRadio_lyu5n_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_{margin-left:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary, #191b23)}.___SRadio_lyu5n_gg_ .___SText_lyu5n_gg_.__color_lyu5n_gg_{color:var(--color_lyu5n)}.___SRadio_lyu5n_gg_.__disabled_lyu5n_gg_{pointer-events:none}.___SText_lyu5n_gg_._size_m_lyu5n_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_lyu5n_gg_._size_l_lyu5n_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SValue_lyu5n_gg_{position:relative;flex-shrink:0;padding:0;outline:0;z-index:0;margin-top:var(--intergalactic-spacing-05x, 2px)}.___SValue_lyu5n_gg_::after,.___SValue_lyu5n_gg_::before{content:"";position:absolute;right:0;bottom:0;border-radius:50%;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SValue_lyu5n_gg_::before{top:0;left:0;border:1px solid;transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___SValue_lyu5n_gg_::after{top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0}.___SValue_lyu5n_gg_.__disabled_lyu5n_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_{width:16px;height:16px}.___SValue_lyu5n_gg_._size_m_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:14px;height:14px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_{width:20px;height:20px}.___SValue_lyu5n_gg_._size_l_lyu5n_gg_ .___SInvalidPattern_lyu5n_gg_:before{width:18px;height:18px}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SControl_lyu5n_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_::before{border-color:var(--intergalactic-control-primary-info, #008ff8);background-color:var(--intergalactic-control-primary-info, #008ff8)}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_m_lyu5n_gg_::after{width:6px;height:6px}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_._size_l_lyu5n_gg_::after{width:8px;height:8px}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));border-color:var(--intergalactic-border-info-active, #006dca)}.___SControl_lyu5n_gg_:focus-visible+.___SValue_lyu5n_gg_._state_invalid_lyu5n_gg_::before{box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SControl_lyu5n_gg_:checked~.___SValue_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n);background-color:var(--theme_lyu5n)}.___SValue_lyu5n_gg_._state_normal_lyu5n_gg_.__theme_lyu5n_gg_::before{border-color:var(--theme_lyu5n)}.___SInvalidPattern_lyu5n_gg_{background:0 0;overflow:hidden}.___SInvalidPattern_lyu5n_gg_:before{content:"";position:absolute;top:1px;left:1px;border-radius:50%;background-image:var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));background-size:6px 6px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}',
27
+ /*__inner_css_end__*/
25
28
  "lyu5n_gg_"
26
- ), {
27
- __SRadio: "___SRadio_lyu5n_gg_",
28
- _disabled: "__disabled_lyu5n_gg_",
29
- __SText: "___SText_lyu5n_gg_",
30
- _size_m: "_size_m_lyu5n_gg_",
31
- _size_l: "_size_l_lyu5n_gg_",
32
- __SValue: "___SValue_lyu5n_gg_",
33
- _state_normal: "_state_normal_lyu5n_gg_",
34
- _state_invalid: "_state_invalid_lyu5n_gg_",
35
- __SControl: "___SControl_lyu5n_gg_",
36
- _theme: "__theme_lyu5n_gg_",
29
+ ), /*__reshadow_css_end__*/
30
+ {
31
+ "__SRadio": "___SRadio_lyu5n_gg_",
32
+ "_disabled": "__disabled_lyu5n_gg_",
33
+ "__SText": "___SText_lyu5n_gg_",
34
+ "_size_m": "_size_m_lyu5n_gg_",
35
+ "_size_l": "_size_l_lyu5n_gg_",
36
+ "__SValue": "___SValue_lyu5n_gg_",
37
+ "_state_normal": "_state_normal_lyu5n_gg_",
38
+ "_state_invalid": "_state_invalid_lyu5n_gg_",
39
+ "__SControl": "___SControl_lyu5n_gg_",
40
+ "_theme": "__theme_lyu5n_gg_",
37
41
  "--theme": "--theme_lyu5n",
38
- _color: "__color_lyu5n_gg_",
42
+ "_color": "__color_lyu5n_gg_",
39
43
  "--color": "--color_lyu5n",
40
- __SInvalidPattern: "___SInvalidPattern_lyu5n_gg_"
44
+ "__SInvalidPattern": "___SInvalidPattern_lyu5n_gg_"
41
45
  })
42
- ), $ = /* @__PURE__ */ function(g) {
43
- D(l, g);
44
- var o = T(l);
45
- function l() {
46
- return V(this, l), o.apply(this, arguments);
46
+ );
47
+ var RadioGroupRoot = /* @__PURE__ */ function(_Component) {
48
+ _inherits(RadioGroupRoot2, _Component);
49
+ var _super = _createSuper(RadioGroupRoot2);
50
+ function RadioGroupRoot2() {
51
+ _classCallCheck(this, RadioGroupRoot2);
52
+ return _super.apply(this, arguments);
47
53
  }
48
- return z(l, [{
54
+ _createClass(RadioGroupRoot2, [{
49
55
  key: "uncontrolledProps",
50
- value: function() {
56
+ value: function uncontrolledProps() {
51
57
  return {
52
58
  value: null
53
59
  };
54
60
  }
55
61
  }, {
56
62
  key: "setContext",
57
- value: function() {
58
- var t = this.asProps, e = t.theme, a = t.size, n = t.name, i = t.value, s = t.onChange, u = t.disabled;
63
+ value: function setContext() {
64
+ var _this$asProps = this.asProps, theme = _this$asProps.theme, size = _this$asProps.size, name = _this$asProps.name, value = _this$asProps.value, onChange = _this$asProps.onChange, disabled = _this$asProps.disabled;
59
65
  return {
60
- onChange: s,
61
- value: i,
62
- theme: e,
63
- size: a,
64
- name: n,
65
- disabled: u
66
+ onChange,
67
+ value,
68
+ theme,
69
+ size,
70
+ name,
71
+ disabled
66
72
  };
67
73
  }
68
74
  }, {
69
75
  key: "render",
70
- value: function() {
71
- var t = this.asProps, e = this.asProps.Children;
72
- return /* @__PURE__ */ _.createElement(Y, P({
73
- direction: "column",
74
- role: "group",
75
- __excludeProps: ["onChange"]
76
- }, t), /* @__PURE__ */ _.createElement(e, null));
76
+ value: function render() {
77
+ var _ref = this.asProps;
78
+ var Children = this.asProps.Children;
79
+ return /* @__PURE__ */ React.createElement(Flex, assignProps({
80
+ "direction": "column",
81
+ "role": "group",
82
+ "__excludeProps": ["onChange"]
83
+ }, _ref), /* @__PURE__ */ React.createElement(Children, null));
77
84
  }
78
- }]), l;
79
- }(I);
80
- d($, "displayName", "RadioGroup");
81
- d($, "defaultProps", {
85
+ }]);
86
+ return RadioGroupRoot2;
87
+ }(Component);
88
+ _defineProperty(RadioGroupRoot, "displayName", "RadioGroup");
89
+ _defineProperty(RadioGroupRoot, "defaultProps", {
82
90
  defaultValue: null
83
91
  });
84
- var U = w($), S = /* @__PURE__ */ function(g) {
85
- D(l, g);
86
- var o = T(l);
87
- function l() {
88
- var r;
89
- V(this, l);
90
- for (var t = arguments.length, e = new Array(t), a = 0; a < t; a++)
91
- e[a] = arguments[a];
92
- return r = o.call.apply(o, [this].concat(e)), d(R(r), "state", {
92
+ var RadioGroup = createComponent(RadioGroupRoot);
93
+ var RadioRoot = /* @__PURE__ */ function(_Component2) {
94
+ _inherits(RadioRoot2, _Component2);
95
+ var _super2 = _createSuper(RadioRoot2);
96
+ function RadioRoot2() {
97
+ var _this;
98
+ _classCallCheck(this, RadioRoot2);
99
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
100
+ args[_key] = arguments[_key];
101
+ }
102
+ _this = _super2.call.apply(_super2, [this].concat(args));
103
+ _defineProperty(_assertThisInitialized(_this), "state", {
93
104
  hoistedDisabled: void 0
94
- }), d(R(r), "hoistDisabled", function(n) {
95
- ae.warn(!0, "Don't set disabled on Radio.Value or Radio.Text, set it on Radio or on RadioGroup (for all items) instead. Otherwise it will produce wrong SSR output.", r.asProps["data-ui-name"]), r.setState({
96
- hoistedDisabled: n
105
+ });
106
+ _defineProperty(_assertThisInitialized(_this), "hoistDisabled", function(disabled) {
107
+ logger.warn(true, "Don't set disabled on Radio.Value or Radio.Text, set it on Radio or on RadioGroup (for all items) instead. Otherwise it will produce wrong SSR output.", _this.asProps["data-ui-name"]);
108
+ _this.setState({
109
+ hoistedDisabled: disabled
97
110
  });
98
- }), r;
111
+ });
112
+ return _this;
99
113
  }
100
- return z(l, [{
114
+ _createClass(RadioRoot2, [{
101
115
  key: "getTextProps",
102
- value: function() {
103
- var t = A(this.asProps, this.context), e = t.size, a = e === void 0 ? "m" : e, n = t.disabled, i = t.label, s = this.state.hoistedDisabled, u = {
104
- size: a,
105
- children: i,
106
- disabled: n ?? s,
116
+ value: function getTextProps() {
117
+ var _assignProps6 = assignProps$1(this.asProps, this.context), _assignProps6$size = _assignProps6.size, size = _assignProps6$size === void 0 ? "m" : _assignProps6$size, disabled = _assignProps6.disabled, label = _assignProps6.label;
118
+ var hoistedDisabled = this.state.hoistedDisabled;
119
+ var textProps = {
120
+ size,
121
+ children: label,
122
+ disabled: disabled !== null && disabled !== void 0 ? disabled : hoistedDisabled,
107
123
  hoistDisabled: this.hoistDisabled,
108
124
  rootDisabled: this.props.disabled
109
125
  };
110
- return u;
126
+ return textProps;
111
127
  }
112
128
  }, {
113
129
  key: "getValueProps",
114
- value: function() {
115
- var t, e = A(this.asProps, this.context), a = e.size, n = a === void 0 ? "m" : a, i = e.state, s = i === void 0 ? "normal" : i, u = e.theme, p = e.disabled, b = e.name, c = this.asProps, h = c.value, m = c.checked, x = this.state.hoistedDisabled;
130
+ value: function getValueProps() {
131
+ var _this$props$size;
132
+ var _assignProps7 = assignProps$1(this.asProps, this.context), _assignProps7$size = _assignProps7.size, size = _assignProps7$size === void 0 ? "m" : _assignProps7$size, _assignProps7$state = _assignProps7.state, state = _assignProps7$state === void 0 ? "normal" : _assignProps7$state, theme = _assignProps7.theme, disabled = _assignProps7.disabled, name = _assignProps7.name;
133
+ var _this$asProps2 = this.asProps, value = _this$asProps2.value, checked = _this$asProps2.checked;
134
+ var hoistedDisabled = this.state.hoistedDisabled;
116
135
  return {
117
- size: (t = this.props.size) !== null && t !== void 0 ? t : n,
118
- disabled: p ?? x,
119
- state: s,
120
- theme: u,
121
- value: h,
122
- checked: m,
123
- name: b,
136
+ size: (_this$props$size = this.props.size) !== null && _this$props$size !== void 0 ? _this$props$size : size,
137
+ disabled: disabled !== null && disabled !== void 0 ? disabled : hoistedDisabled,
138
+ state,
139
+ theme,
140
+ value,
141
+ checked,
142
+ name,
124
143
  hoistDisabled: this.hoistDisabled,
125
144
  rootDisabled: this.props.disabled
126
145
  };
127
146
  }
128
147
  }, {
129
148
  key: "render",
130
- value: function() {
131
- var t = this.asProps, e, a = E, n = this.asProps, i = n.styles, s = n.Children, u = n.children;
132
- return e = f(i), /* @__PURE__ */ _.createElement(a, e.cn("SRadio", v({}, P({
133
- tag: "label",
134
- __excludeProps: ["onChange", "label", "disabled"]
135
- }, t))), u ? /* @__PURE__ */ _.createElement(s, e.cn("Children", {})) : /* @__PURE__ */ _.createElement(_.Fragment, null, /* @__PURE__ */ _.createElement(C.Value, null), /* @__PURE__ */ _.createElement(C.Text, null)));
149
+ value: function render() {
150
+ var _ref2 = this.asProps, _ref6;
151
+ var SRadio = Box;
152
+ var _this$asProps3 = this.asProps, styles = _this$asProps3.styles, Children = _this$asProps3.Children, hasChildren = _this$asProps3.children;
153
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SRadio, _ref6.cn("SRadio", _objectSpread({}, assignProps({
154
+ "tag": "label",
155
+ "__excludeProps": ["onChange", "label", "disabled"]
156
+ }, _ref2))), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref6.cn("Children", {})) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Radio.Value, null), /* @__PURE__ */ React.createElement(Radio.Text, null)));
157
+ }
158
+ }]);
159
+ return RadioRoot2;
160
+ }(Component);
161
+ _defineProperty(RadioRoot, "displayName", "Radio");
162
+ _defineProperty(RadioRoot, "style", style);
163
+ _defineProperty(RadioRoot, "contextType", RadioGroup[CONTEXT_COMPONENT]);
164
+ var ValueRoot = /* @__PURE__ */ function(_Component3) {
165
+ _inherits(ValueRoot2, _Component3);
166
+ var _super3 = _createSuper(ValueRoot2);
167
+ function ValueRoot2() {
168
+ var _this2;
169
+ _classCallCheck(this, ValueRoot2);
170
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
171
+ args[_key2] = arguments[_key2];
136
172
  }
137
- }]), l;
138
- }(I);
139
- d(S, "displayName", "Radio");
140
- d(S, "style", B);
141
- d(S, "contextType", U[j]);
142
- var y = /* @__PURE__ */ function(g) {
143
- D(l, g);
144
- var o = T(l);
145
- function l() {
146
- var r;
147
- V(this, l);
148
- for (var t = arguments.length, e = new Array(t), a = 0; a < t; a++)
149
- e[a] = arguments[a];
150
- return r = o.call.apply(o, [this].concat(e)), d(R(r), "bindHandlerChange", function(n) {
151
- return function(i) {
152
- typeof r.context.onChange == "function" && r.context.onChange(n, i);
173
+ _this2 = _super3.call.apply(_super3, [this].concat(args));
174
+ _defineProperty(_assertThisInitialized(_this2), "bindHandlerChange", function(value) {
175
+ return function(e) {
176
+ if (typeof _this2.context.onChange === "function") {
177
+ _this2.context.onChange(value, e);
178
+ }
153
179
  };
154
- }), r;
180
+ });
181
+ return _this2;
155
182
  }
156
- return z(l, [{
183
+ _createClass(ValueRoot2, [{
157
184
  key: "uncontrolledProps",
158
- value: function() {
185
+ value: function uncontrolledProps() {
159
186
  return {
160
- checked: function(e) {
187
+ checked: function checked(e) {
161
188
  return e.target.checked;
162
189
  }
163
190
  };
164
191
  }
165
192
  }, {
166
193
  key: "getControlProps",
167
- value: function() {
168
- var t = this.context.value, e = this.asProps, a = e.forwardRef, n = e.includeInputProps, i = e.state, s = e.value, u = O(this.asProps, n), p = F(u, 1), b = p[0], c = s ?? "", h = v(v({
169
- ref: a,
170
- state: i
171
- }, b), {}, {
172
- value: c
194
+ value: function getControlProps() {
195
+ var currentValue = this.context.value;
196
+ var _this$asProps4 = this.asProps, forwardRef = _this$asProps4.forwardRef, includeInputProps = _this$asProps4.includeInputProps, state = _this$asProps4.state, value = _this$asProps4.value;
197
+ var _getInputProps = getInputProps(this.asProps, includeInputProps), _getInputProps2 = _slicedToArray(_getInputProps, 1), commonControlProps = _getInputProps2[0];
198
+ var inputValue = value !== null && value !== void 0 ? value : "";
199
+ var controlProps = _objectSpread(_objectSpread({
200
+ ref: forwardRef,
201
+ state
202
+ }, commonControlProps), {}, {
203
+ value: inputValue
173
204
  });
174
- if (t !== void 0) {
175
- var m = this.props, x = m.onChange;
176
- m.onClick, h.checked = t === c, h.onChange = H(x, this.bindHandlerChange(c));
205
+ if (currentValue !== void 0) {
206
+ var _this$props = this.props, onChange = _this$props.onChange;
207
+ _this$props.onClick;
208
+ controlProps.checked = currentValue === inputValue;
209
+ controlProps.onChange = callAllEventHandlers(onChange, this.bindHandlerChange(inputValue));
177
210
  }
178
- return h;
211
+ return controlProps;
179
212
  }
180
213
  }, {
181
214
  key: "getRadioMarkProps",
182
- value: function() {
183
- var t = this.context.value, e = this.asProps, a = e.size, n = e.state, i = e.theme, s = e.keyboardFocused, u = e.value, p = e.tag, b = e.disabled, c = e.includeInputProps, h = e.resolveColor, m = G(e, ne), x = O(m, c), M = F(x, 2), J = M[0], k = M[1];
184
- k.children, k.Children;
185
- var K = G(k, le), L = u ?? "", N = v({
186
- theme: i,
187
- size: a,
188
- state: n,
189
- keyboardFocused: s,
190
- disabled: b,
191
- resolveColor: h,
192
- checked: J.checked
193
- }, K);
194
- if (t !== void 0) {
195
- var Q = this.props.onClick;
196
- p !== "label" && (N.onClick = H(Q, this.bindHandlerChange(L)));
215
+ value: function getRadioMarkProps() {
216
+ var currentValue = this.context.value;
217
+ var _this$asProps5 = this.asProps, size = _this$asProps5.size, state = _this$asProps5.state, theme = _this$asProps5.theme, keyboardFocused = _this$asProps5.keyboardFocused, value = _this$asProps5.value, tag = _this$asProps5.tag, disabled = _this$asProps5.disabled, includeInputProps = _this$asProps5.includeInputProps, resolveColor = _this$asProps5.resolveColor, other = _objectWithoutProperties(_this$asProps5, _excluded);
218
+ var _getInputProps3 = getInputProps(other, includeInputProps), _getInputProps4 = _slicedToArray(_getInputProps3, 2), commonControlProps = _getInputProps4[0], radioMarkProps = _getInputProps4[1];
219
+ radioMarkProps.children;
220
+ radioMarkProps.Children;
221
+ var propsWithoutChildren = _objectWithoutProperties(radioMarkProps, _excluded2);
222
+ var inputValue = value !== null && value !== void 0 ? value : "";
223
+ var markProps = _objectSpread({
224
+ theme,
225
+ size,
226
+ state,
227
+ keyboardFocused,
228
+ disabled,
229
+ resolveColor,
230
+ checked: commonControlProps.checked
231
+ }, propsWithoutChildren);
232
+ if (currentValue !== void 0) {
233
+ var onClick = this.props.onClick;
234
+ if (tag !== "label") {
235
+ markProps.onClick = callAllEventHandlers(onClick, this.bindHandlerChange(inputValue));
236
+ }
197
237
  }
198
- return N;
238
+ return markProps;
199
239
  }
200
240
  }, {
201
241
  key: "componentDidUpdate",
202
- value: function() {
203
- this.asProps.rootDisabled !== this.asProps.disabled && this.asProps.hoistDisabled(this.asProps.disabled);
242
+ value: function componentDidUpdate() {
243
+ if (this.asProps.rootDisabled !== this.asProps.disabled) {
244
+ this.asProps.hoistDisabled(this.asProps.disabled);
245
+ }
204
246
  }
205
247
  }, {
206
248
  key: "componentDidMount",
207
- value: function() {
208
- this.asProps.rootDisabled !== this.asProps.disabled && this.asProps.hoistDisabled(this.asProps.disabled);
249
+ value: function componentDidMount() {
250
+ if (this.asProps.rootDisabled !== this.asProps.disabled) {
251
+ this.asProps.hoistDisabled(this.asProps.disabled);
252
+ }
209
253
  }
210
254
  }, {
211
255
  key: "render",
212
- value: function() {
213
- var t, e = this.asProps, a = e.styles, n = e.children, i = e.Children;
214
- return n ? (t = f(a), /* @__PURE__ */ _.createElement(i, t.cn("Children", {}))) : (f(a), /* @__PURE__ */ _.createElement(_.Fragment, null, /* @__PURE__ */ _.createElement(C.Value.Control, null), /* @__PURE__ */ _.createElement(C.Value.RadioMark, null)));
256
+ value: function render() {
257
+ var _ref8;
258
+ var _this$asProps6 = this.asProps, styles = _this$asProps6.styles, hasChildren = _this$asProps6.children, Children = _this$asProps6.Children;
259
+ if (!hasChildren) {
260
+ return sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Radio.Value.Control, null), /* @__PURE__ */ React.createElement(Radio.Value.RadioMark, null));
261
+ }
262
+ return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {}));
215
263
  }
216
- }]), l;
217
- }(I);
218
- d(y, "defaultProps", {
219
- includeInputProps: te,
220
- defaultChecked: !1
264
+ }]);
265
+ return ValueRoot2;
266
+ }(Component);
267
+ _defineProperty(ValueRoot, "defaultProps", {
268
+ includeInputProps: inputProps,
269
+ defaultChecked: false
221
270
  });
222
- d(y, "enhance", [ee()]);
223
- d(y, "displayName", "Value");
224
- d(y, "contextType", U[j]);
225
- d(y, "style", B);
226
- var W = function(o) {
227
- var l = arguments[0], r, t = E, e = o.styles, a = o.state;
228
- return r = f(e), /* @__PURE__ */ _.createElement(t, r.cn("SControl", v({}, P({
229
- tag: "input",
230
- type: "radio",
231
- "aria-invalid": a === "invalid"
232
- }, l))));
271
+ _defineProperty(ValueRoot, "enhance", [resolveColorEnhance()]);
272
+ _defineProperty(ValueRoot, "displayName", "Value");
273
+ _defineProperty(ValueRoot, "contextType", RadioGroup[CONTEXT_COMPONENT]);
274
+ _defineProperty(ValueRoot, "style", style);
275
+ var Control = function Control2(props) {
276
+ var _ref3 = arguments[0], _ref9;
277
+ var SControl = Box;
278
+ var styles = props.styles, state = props.state;
279
+ return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SControl, _ref9.cn("SControl", _objectSpread({}, assignProps({
280
+ "tag": "input",
281
+ "type": "radio",
282
+ "aria-invalid": state === "invalid"
283
+ }, _ref3))));
233
284
  };
234
- W.displayName = "Control";
235
- var X = function(o) {
236
- var l = arguments[0], r, t = E, e = Z, a = o.theme, n = o.styles, i = o.resolveColor, s = o.state, u = o.checked;
237
- return r = f(n), /* @__PURE__ */ _.createElement(t, r.cn("SValue", v({}, P({
238
- tag: "div",
239
- "use:theme": i(a),
240
- "aria-hidden": !0
241
- }, l))), s === "invalid" && !u && /* @__PURE__ */ _.createElement(e, r.cn("SInvalidPattern", {})));
285
+ Control.displayName = "Control";
286
+ var RadioMark = function RadioMark2(props) {
287
+ var _ref4 = arguments[0], _ref10;
288
+ var SValue = Box;
289
+ var SInvalidPattern = InvalidStateBox;
290
+ var theme = props.theme, styles = props.styles, resolveColor = props.resolveColor, state = props.state, checked = props.checked;
291
+ return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SValue, _ref10.cn("SValue", _objectSpread({}, assignProps({
292
+ "tag": "div",
293
+ "use:theme": resolveColor(theme),
294
+ "aria-hidden": true
295
+ }, _ref4))), state === "invalid" && !checked && /* @__PURE__ */ React.createElement(SInvalidPattern, _ref10.cn("SInvalidPattern", {})));
242
296
  };
243
- X.displayName = "RadioMark";
244
- var q = function(o) {
245
- var l = arguments[0], r, t = oe, e = o.styles, a = o.color;
246
- _.useEffect(function() {
247
- o.rootDisabled !== o.disabled && o.hoistDisabled(o.disabled);
248
- }, [o.rootDisabled, o.disabled, o.hoistDisabled]);
249
- var n = re();
250
- return r = f(e), /* @__PURE__ */ _.createElement(t, r.cn("SText", v({}, P({
251
- tag: "span",
252
- "use:color": n(a)
253
- }, l))));
297
+ RadioMark.displayName = "RadioMark";
298
+ var Text = function Text2(props) {
299
+ var _ref5 = arguments[0], _ref11;
300
+ var SText = Text$1;
301
+ var styles = props.styles, color = props.color;
302
+ React.useEffect(function() {
303
+ if (props.rootDisabled !== props.disabled) {
304
+ props.hoistDisabled(props.disabled);
305
+ }
306
+ }, [props.rootDisabled, props.disabled, props.hoistDisabled]);
307
+ var resolveColor = useColorResolver();
308
+ return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SText, _ref11.cn("SText", _objectSpread({}, assignProps({
309
+ "tag": "span",
310
+ "use:color": resolveColor(color)
311
+ }, _ref5))));
254
312
  };
255
- q.displayName = "Text";
256
- var ie = w(y, {
257
- Control: W,
258
- RadioMark: X
259
- }), C = w(S, {
260
- Text: q,
261
- Value: ie
262
- }), Re = function(o) {
263
- return o;
313
+ Text.displayName = "Text";
314
+ var Value = createComponent(ValueRoot, {
315
+ Control,
316
+ RadioMark
317
+ });
318
+ var Radio = createComponent(RadioRoot, {
319
+ Text,
320
+ Value
321
+ });
322
+ var wrapRadioGroup = function wrapRadioGroup2(wrapper) {
323
+ return wrapper;
264
324
  };
265
325
  export {
266
- U as RadioGroup,
267
- C as default,
268
- De as inputProps,
269
- Re as wrapRadioGroup
326
+ RadioGroup,
327
+ Radio as default,
328
+ inputProps2 as inputProps,
329
+ wrapRadioGroup
270
330
  };
package/lib/esm/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { RadioGroup as p, default as a, wrapRadioGroup as t } from "./Radio.mjs";
2
- import { inputProps as d } from "@semcore/core/lib/utils/inputProps";
1
+ import { RadioGroup, default as default2, wrapRadioGroup } from "./Radio.mjs";
2
+ import { inputProps } from "@semcore/core/lib/utils/inputProps";
3
3
  export {
4
- p as RadioGroup,
5
- a as default,
6
- d as inputProps,
7
- t as wrapRadioGroup
4
+ RadioGroup,
5
+ default2 as default,
6
+ inputProps,
7
+ wrapRadioGroup
8
8
  };
@@ -0,0 +1,154 @@
1
+ SRadio {
2
+ display: inline-flex;
3
+ align-items: flex-start;
4
+ cursor: pointer;
5
+
6
+ SText {
7
+ margin-left: var(--intergalactic-spacing-2x, 8px);
8
+ color: var(--intergalactic-text-primary, #191b23);
9
+ }
10
+
11
+ SText[color] {
12
+ color: var(--color);
13
+ }
14
+ }
15
+
16
+ SRadio[disabled] {
17
+ pointer-events: none;
18
+ }
19
+
20
+ SText[size='m'] {
21
+ font-size: var(--intergalactic-fs-200, 14px);
22
+ line-height: var(--intergalactic-lh-200, 142%);
23
+ }
24
+
25
+ SText[size='l'] {
26
+ font-size: var(--intergalactic-fs-300, 16px);
27
+ line-height: var(--intergalactic-lh-300, 150%);
28
+ }
29
+
30
+ SValue {
31
+ position: relative;
32
+ flex-shrink: 0;
33
+ padding: 0;
34
+ outline: none;
35
+ z-index: 0;
36
+
37
+ margin-top: var(--intergalactic-spacing-05x, 2px);
38
+
39
+ &::before {
40
+ content: '';
41
+ position: absolute;
42
+ top: 0;
43
+ left: 0;
44
+ right: 0;
45
+ bottom: 0;
46
+ background: var(--intergalactic-bg-primary-neutral, #ffffff);
47
+ border: 1px solid;
48
+ border-radius: 50%;
49
+ transition: calc(var(--intergalactic-duration-control, 200) * 1ms) all ease-in-out;
50
+ }
51
+
52
+ &::after {
53
+ content: '';
54
+ position: absolute;
55
+ right: 0;
56
+ bottom: 0;
57
+ top: 50%;
58
+ left: 50%;
59
+ transform: translate(-50%, -50%);
60
+ width: 0;
61
+ height: 0;
62
+ border-radius: 50%;
63
+ background: var(--intergalactic-bg-primary-neutral, #ffffff);
64
+ }
65
+ }
66
+
67
+ SValue[disabled] {
68
+ opacity: var(--intergalactic-disabled-opacity, 0.3);
69
+ cursor: default;
70
+ pointer-events: none;
71
+ user-select: none;
72
+ }
73
+
74
+ SValue[size='m'] {
75
+ width: 16px;
76
+ height: 16px;
77
+
78
+ SInvalidPattern:before {
79
+ width: 14px;
80
+ height: 14px;
81
+ }
82
+ }
83
+
84
+ SValue[size='l'] {
85
+ width: 20px;
86
+ height: 20px;
87
+
88
+ SInvalidPattern:before {
89
+ width: 18px;
90
+ height: 18px;
91
+ }
92
+ }
93
+
94
+ SValue[state='normal']::before {
95
+ border-color: var(--intergalactic-border-primary, #c4c7cf);
96
+ }
97
+
98
+ SValue[state='invalid']::before {
99
+ border-color: var(--intergalactic-border-critical-active, #d1002f);
100
+ }
101
+
102
+ SControl {
103
+ position: absolute;
104
+ clip: rect(1px, 1px, 1px, 1px);
105
+ }
106
+
107
+ SControl:checked~SValue::before {
108
+ border-color: var(--intergalactic-control-primary-info, #008ff8);
109
+ background-color: var(--intergalactic-control-primary-info, #008ff8);
110
+ }
111
+
112
+ SControl:checked~SValue[size='m']::after {
113
+ width: 6px;
114
+ height: 6px;
115
+ }
116
+
117
+ SControl:checked~SValue[size='l']::after {
118
+ width: 8px;
119
+ height: 8px;
120
+ }
121
+
122
+ SControl:focus-visible + SValue[state='normal']::before {
123
+ box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));
124
+ border-color: var(--intergalactic-border-info-active, #006dca);
125
+ }
126
+
127
+ SControl:focus-visible + SValue[state='invalid']::before {
128
+ box-shadow: var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5));
129
+ }
130
+
131
+ SControl:checked~SValue[theme]::before {
132
+ border-color: var(--theme);
133
+ background-color: var(--theme);
134
+ }
135
+
136
+ SValue[state='normal'][theme]::before {
137
+ border-color: var(--theme);
138
+ }
139
+
140
+ SInvalidPattern {
141
+ background: transparent;
142
+ overflow: hidden;
143
+
144
+ &:before {
145
+ content: "";
146
+ position: absolute;
147
+ top: 1px;
148
+ left: 1px;
149
+ border-radius: 50%;
150
+ background-image: var(--intergalactic-border-critical-pattern, repeating-linear-gradient(315deg, rgba(209, 0, 47, 1) 0, rgba(209, 0, 47, 1) 2px, transparent 0, transparent 50%));
151
+ background-size: 6px 6px;
152
+ background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
153
+ }
154
+ }
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
3
3
  import { Box, BoxProps, Flex } from '@semcore/flex-box';
4
- import { KeyboardFocusProps } from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';
5
4
  import { Text } from '@semcore/typography';
6
5
 
7
6
  export type RadioSize = 'm' | 'l';
@@ -63,47 +62,46 @@ export type RadioGroupProps<T extends RadioValue = RadioValue> = {
63
62
 
64
63
  /** @deprecated */
65
64
  export interface IRadioValueProps extends RadioValueProps, UnknownProperties {}
66
- export type RadioValueProps = BoxProps &
67
- KeyboardFocusProps & {
68
- /** List of elements that can be put on a hidden input */
69
- includeInputProps?: string[];
70
- /**
71
- * @deprecated set `state` on root Radio instead
72
- * The value displaying the state of the component
73
- * @default normal
74
- */
75
- state?: RadioState;
76
- /**
77
- * @deprecated
78
- * The theme of the radio button that you can send your color to
79
- */
80
- theme?: string;
81
- /**
82
- * @deprecated set `size` on root RadioGroup instead
83
- * Radio button size
84
- */
85
- size?: RadioSize;
86
- /**
87
- * @deprecated set `value` on root Radio instead
88
- * The element value is required for RadioGroup
89
- */
90
- value?: RadioValue;
91
- /**
92
- * @deprecated set `defaultValue` on root RadioGroup instead
93
- * Default value if `value` property is not provided
94
- */
95
- defaultValue?: RadioValue;
96
- /**
97
- * @deprecated set `onChange` on root RadioGroup instead
98
- * Called when the value changes
99
- */
100
- onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
101
- /**
102
- * @deprecated set `disabled` on root Radio instead
103
- * Blocks access and changes to the form field
104
- */
105
- disabled?: boolean;
106
- };
65
+ export type RadioValueProps = BoxProps & {
66
+ /** List of elements that can be put on a hidden input */
67
+ includeInputProps?: string[];
68
+ /**
69
+ * @deprecated set `state` on root Radio instead
70
+ * The value displaying the state of the component
71
+ * @default normal
72
+ */
73
+ state?: RadioState;
74
+ /**
75
+ * @deprecated
76
+ * The theme of the radio button that you can send your color to
77
+ */
78
+ theme?: string;
79
+ /**
80
+ * @deprecated set `size` on root RadioGroup instead
81
+ * Radio button size
82
+ */
83
+ size?: RadioSize;
84
+ /**
85
+ * @deprecated set `value` on root Radio instead
86
+ * The element value is required for RadioGroup
87
+ */
88
+ value?: RadioValue;
89
+ /**
90
+ * @deprecated set `defaultValue` on root RadioGroup instead
91
+ * Default value if `value` property is not provided
92
+ */
93
+ defaultValue?: RadioValue;
94
+ /**
95
+ * @deprecated set `onChange` on root RadioGroup instead
96
+ * Called when the value changes
97
+ */
98
+ onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
99
+ /**
100
+ * @deprecated set `disabled` on root Radio instead
101
+ * Blocks access and changes to the form field
102
+ */
103
+ disabled?: boolean;
104
+ };
107
105
 
108
106
  /** @deprecated */
109
107
  export interface IRadioCtx extends RadioCtx, UnknownProperties {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/radio",
3
3
  "description": "Semrush Radio Component",
4
- "version": "16.0.0-prerelease.2",
4
+ "version": "16.0.0-prerelease.20",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,11 +14,11 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/flex-box": "16.0.0-prerelease.2",
18
- "@semcore/typography": "16.0.0-prerelease.2"
17
+ "@semcore/flex-box": "16.0.0-prerelease.20",
18
+ "@semcore/typography": "16.0.0-prerelease.20"
19
19
  },
20
20
  "peerDependencies": {
21
- "@semcore/base-components": "^16.0.0-prerelease.2"
21
+ "@semcore/base-components": "^16.0.0-prerelease.20"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",