Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
RadioGroupContext: function() {
return RadioGroupContext;
},
RadioGroupProvider: function() {
return RadioGroupProvider;
},
useRadioGroupContextValue_unstable: function() {
return useRadioGroupContextValue_unstable;
},
useRadioGroupContext_unstable: function() {
return useRadioGroupContext_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const RadioGroupContext = /*#__PURE__*/ _react.createContext(undefined);
const radioGroupContextDefaultValue = {};
const RadioGroupProvider = RadioGroupContext.Provider;
const useRadioGroupContextValue_unstable = ()=>_react.useContext(RadioGroupContext) || radioGroupContextDefaultValue;
const useRadioGroupContext_unstable = (selector)=>selector(useRadioGroupContextValue_unstable());
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/RadioGroupContext.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext = React.createContext<RadioGroupContextValue | undefined>(undefined);\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\n/**\n * Get the value of the RadioGroupContext.\n */\nexport const useRadioGroupContextValue_unstable = () =>\n React.useContext(RadioGroupContext) || radioGroupContextDefaultValue;\n\n/**\n * @deprecated Use useRadioGroupContextValue_unstable instead.\n * RadioGroupContext is no longer a selector context, and no longer benefits from having a selector.\n */\nexport const useRadioGroupContext_unstable = <T>(selector: (ctx: RadioGroupContextValue) => T): T =>\n selector(useRadioGroupContextValue_unstable());\n"],"names":["RadioGroupContext","RadioGroupProvider","useRadioGroupContextValue_unstable","useRadioGroupContext_unstable","React","createContext","undefined","radioGroupContextDefaultValue","Provider","useContext","selector"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOaA,iBAAAA;eAAAA;;IAIAC,kBAAAA;eAAAA;;IAKAC,kCAAAA;eAAAA;;IAOAC,6BAAAA;eAAAA;;;;iEAvBU;AAOhB,MAAMH,kCAAoBI,OAAMC,aAAa,CAAqCC;AAEzF,MAAMC,gCAAwD,CAAC;AAExD,MAAMN,qBAAqBD,kBAAkBQ,QAAQ;AAKrD,MAAMN,qCAAqC,IAChDE,OAAMK,UAAU,CAACT,sBAAsBO;AAMlC,MAAMJ,gCAAgC,CAAIO,WAC/CA,SAASR"}
+29
View File
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
RadioGroupContext: function() {
return _RadioGroupContext.RadioGroupContext;
},
RadioGroupProvider: function() {
return _RadioGroupContext.RadioGroupProvider;
},
useRadioGroupContextValue_unstable: function() {
return _RadioGroupContext.useRadioGroupContextValue_unstable;
},
useRadioGroupContextValues: function() {
return _useRadioGroupContextValues.useRadioGroupContextValues;
},
useRadioGroupContext_unstable: function() {
return _RadioGroupContext.useRadioGroupContext_unstable;
}
});
const _RadioGroupContext = require("./RadioGroupContext");
const _useRadioGroupContextValues = require("./useRadioGroupContextValues");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export {\n RadioGroupContext,\n RadioGroupProvider,\n useRadioGroupContextValue_unstable,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n useRadioGroupContext_unstable,\n} from './RadioGroupContext';\nexport { useRadioGroupContextValues } from './useRadioGroupContextValues';\n"],"names":["RadioGroupContext","RadioGroupProvider","useRadioGroupContextValue_unstable","useRadioGroupContextValues","useRadioGroupContext_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,iBAAiB;eAAjBA,oCAAiB;;IACjBC,kBAAkB;eAAlBA,qCAAkB;;IAClBC,kCAAkC;eAAlCA,qDAAkC;;IAI3BC,0BAA0B;eAA1BA,sDAA0B;;IAFjCC,6BAA6B;eAA7BA,gDAA6B;;;mCACxB;4CACoC"}
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useRadioGroupContextValues", {
enumerable: true,
get: function() {
return useRadioGroupContextValues;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const useRadioGroupContextValues = (state)=>{
const { name, value, defaultValue, disabled, layout, required } = state;
const ariaDescribedBy = state.root['aria-describedby'];
const radioGroup = _react.useMemo(()=>({
name,
value,
defaultValue,
disabled,
layout,
required,
'aria-describedby': ariaDescribedBy
}), [
name,
value,
defaultValue,
disabled,
layout,
required,
ariaDescribedBy
]);
return {
radioGroup
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/useRadioGroupContextValues.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n const ariaDescribedBy = state.root['aria-describedby'];\n\n const radioGroup = React.useMemo<RadioGroupContextValue>(\n () => ({\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n 'aria-describedby': ariaDescribedBy,\n }),\n [name, value, defaultValue, disabled, layout, required, ariaDescribedBy],\n );\n\n return { radioGroup };\n};\n"],"names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","ariaDescribedBy","root","radioGroup","React","useMemo"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;AAIhB,MAAMA,6BAA6B,CAACC;IACzC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGN;IAClE,MAAMO,kBAAkBP,MAAMQ,IAAI,CAAC,mBAAmB;IAEtD,MAAMC,aAAaC,OAAMC,OAAO,CAC9B,IAAO,CAAA;YACLV;YACAC;YACAC;YACAC;YACAC;YACAC;YACA,oBAAoBC;QACtB,CAAA,GACA;QAACN;QAAMC;QAAOC;QAAcC;QAAUC;QAAQC;QAAUC;KAAgB;IAG1E,OAAO;QAAEE;IAAW;AACtB"}