@dxos/react-ui 0.7.2 → 0.7.3-staging.971cd8d
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/lib/browser/index.mjs +7 -4
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +7 -4
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +7 -4
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/components/Icon/Icon.tsx +5 -2
- package/src/components/ThemeProvider/ThemeProvider.tsx +3 -1
|
@@ -155,8 +155,10 @@ import { useId } from "@dxos/react-hooks";
|
|
|
155
155
|
|
|
156
156
|
// packages/ui/react-ui/src/components/Icon/Icon.tsx
|
|
157
157
|
import React3, { forwardRef as forwardRef2, memo } from "react";
|
|
158
|
+
var ICONS_URL = "/icons.svg";
|
|
158
159
|
var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames, size, ...props }, forwardedRef) => {
|
|
159
|
-
const { tx } = useThemeContext();
|
|
160
|
+
const { tx, noCache } = useThemeContext();
|
|
161
|
+
const url = noCache ? `${ICONS_URL}?nocache=${(/* @__PURE__ */ new Date()).getMinutes()}` : ICONS_URL;
|
|
160
162
|
return /* @__PURE__ */ React3.createElement("svg", {
|
|
161
163
|
...props,
|
|
162
164
|
className: tx("icon.root", "icon", {
|
|
@@ -164,7 +166,7 @@ var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames,
|
|
|
164
166
|
}, classNames),
|
|
165
167
|
ref: forwardedRef
|
|
166
168
|
}, /* @__PURE__ */ React3.createElement("use", {
|
|
167
|
-
href:
|
|
169
|
+
href: `${url}#${icon}`
|
|
168
170
|
}));
|
|
169
171
|
}));
|
|
170
172
|
|
|
@@ -2876,7 +2878,7 @@ var hasIosKeyboard = () => {
|
|
|
2876
2878
|
|
|
2877
2879
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
2878
2880
|
var ThemeContext = /* @__PURE__ */ createContext10(void 0);
|
|
2879
|
-
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", rootElevation = "base" }) => {
|
|
2881
|
+
var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName, themeMode = "dark", rootDensity = "fine", rootElevation = "base", ...rest }) => {
|
|
2880
2882
|
useEffect7(() => {
|
|
2881
2883
|
if (document.defaultView) {
|
|
2882
2884
|
const kb = createKeyborg(document.defaultView);
|
|
@@ -2888,7 +2890,8 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
2888
2890
|
value: {
|
|
2889
2891
|
tx,
|
|
2890
2892
|
themeMode,
|
|
2891
|
-
hasIosKeyboard: hasIosKeyboard()
|
|
2893
|
+
hasIosKeyboard: hasIosKeyboard(),
|
|
2894
|
+
...rest
|
|
2892
2895
|
}
|
|
2893
2896
|
}, /* @__PURE__ */ React33.createElement(TranslationsProvider, {
|
|
2894
2897
|
fallback,
|