@sanity/ui 5.0.0-alpha.10 → 5.0.0-alpha.11
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/dist/LazyRefractor-CQ22IeXB.js +19 -0
- package/dist/LazyRefractor-CQ22IeXB.js.map +1 -0
- package/dist/index.d.ts +405 -825
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2033 -1972
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -1
- package/dist/polyfills.js +4 -4
- package/dist/polyfills.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -7
- package/src/components/box/Box.tsx +1 -6
- package/src/components/box/box.css +5 -0
- package/src/components/checkbox/Checkbox.tsx +1 -1
- package/src/components/container/Container.tsx +5 -1
- package/src/components/container/container.css +4 -0
- package/src/components/flex/Flex.tsx +1 -6
- package/src/components/flex/flex.css +5 -0
- package/src/components/grid/Grid.tsx +1 -6
- package/src/components/grid/grid.css +5 -0
- package/src/components/h-stack/HStack.tsx +8 -14
- package/src/components/h-stack/hStack.props.ts +5 -15
- package/src/components/index.css +1 -0
- package/src/components/select/Select.tsx +47 -0
- package/src/components/select/select.css +67 -0
- package/src/components/select/select.props.ts +25 -0
- package/src/components/v-stack/VStack.tsx +8 -14
- package/src/components/v-stack/vStack.props.ts +5 -15
- package/src/css/classes/system/shadow.css +6 -6
- package/src/css/global/reset.css +12 -1
- package/src/css/tokens/surface.css +2 -0
- package/src/index.ts +3 -0
- package/src/polyfills.ts +2 -0
- package/src/props/formElement.ts +34 -0
- package/src/types/FormElement.ts +2 -0
- package/src/utils/getProps.ts +1 -1
- package/src/version.ts +2 -2
- package/dist/_chunks-es/LazyRefractor.js +0 -20
- package/dist/_chunks-es/LazyRefractor.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Refractor, hasLanguage } from "react-refractor";
|
|
4
|
+
function LazyRefractor(t0) {
|
|
5
|
+
let $ = c(5), { language, value } = t0;
|
|
6
|
+
if (!hasLanguage(language)) {
|
|
7
|
+
let t1;
|
|
8
|
+
return $[0] === value ? t1 = $[1] : (t1 = /* @__PURE__ */ jsx("code", { children: value }), $[0] = value, $[1] = t1), t1;
|
|
9
|
+
}
|
|
10
|
+
let t1;
|
|
11
|
+
return $[2] !== language || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(Refractor, {
|
|
12
|
+
inline: !0,
|
|
13
|
+
language,
|
|
14
|
+
value
|
|
15
|
+
}), $[2] = language, $[3] = value, $[4] = t1) : t1 = $[4], t1;
|
|
16
|
+
}
|
|
17
|
+
export { LazyRefractor as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=LazyRefractor-CQ22IeXB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LazyRefractor-CQ22IeXB.js","names":["{language, value}: RefractorProps","<code>{value}</code>","<Refractor inline language={language} value={value} />"],"sources":["../src/components/code/LazyRefractor.tsx"],"sourcesContent":["import {hasLanguage, Refractor, type RefractorProps} from 'react-refractor'\n\nexport default function LazyRefractor({language, value}: RefractorProps) {\n if (!hasLanguage(language)) {\n return <code>{value}</code>\n }\n\n return <Refractor inline language={language} value={value} />\n}\n"],"mappings":";;;AAEA,SAAwB,cAAA,IAAiD;eAAnC,EAAC,UAAU,UAAXA;CACpC,IAAI,CAAC,YAAY,QAAQ,GAAG;EACnBC,IAAAA;EAAP,OAAc,EAAA,OAAA,qBAAP,KAAA,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,GAAZ,EAAA,KAAA,mBAAPA;CACT;CAEOC,IAAAA;CAAP,OAAmC,EAAA,OAAA,YAAA,EAAA,OAAiB,SAA7C,KAAA,oBAAC,WAAD;EAAW,QAAA;EAAiB;EAAiB;CAAQ,CAAA,GAAzB,EAAA,KAAA,UAAiB,EAAA,KAAA,+BAA7CA;AACT"}
|