@utrecht/root-react 1.0.0 → 1.0.1

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.
@@ -6,35 +6,16 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var clsx = require('clsx');
7
7
  var react = require('react');
8
8
 
9
- function styleInject(css, ref) {
10
- if ( ref === void 0 ) ref = {};
11
- var insertAt = ref.insertAt;
9
+ var css = ".utrecht-root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;background-color:var(--utrecht-root-background-color);block-size:100%;color:var(--utrecht-root-color);font-family:var(--utrecht-root-font-family);inline-size:100%;overflow-block:auto;overflow-inline:auto;position:relative;text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none}";
12
10
 
13
- if (typeof document === 'undefined') { return; }
14
-
15
- var head = document.head || document.getElementsByTagName('head')[0];
16
- var style = document.createElement('style');
17
- style.type = 'text/css';
18
-
19
- if (insertAt === 'top') {
20
- if (head.firstChild) {
21
- head.insertBefore(style, head.firstChild);
22
- } else {
23
- head.appendChild(style);
24
- }
25
- } else {
26
- head.appendChild(style);
27
- }
28
-
29
- if (style.styleSheet) {
30
- style.styleSheet.cssText = css;
31
- } else {
11
+ var insertStyle = function insertStyle(css) {
12
+ if (typeof document !== 'undefined') {
13
+ var head = document.head || document.getElementsByTagName('head')[0];
14
+ var style = document.createElement('style');
32
15
  style.appendChild(document.createTextNode(css));
16
+ head.appendChild(style);
33
17
  }
34
- }
35
-
36
- var css_248z = ".utrecht-root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;background-color:var(--utrecht-root-background-color);block-size:100%;color:var(--utrecht-root-color);font-family:var(--utrecht-root-font-family);inline-size:100%;overflow-block:auto;overflow-inline:auto;position:relative;text-rendering:optimizeLegibility}";
37
- styleInject(css_248z);
18
+ };
38
19
 
39
20
  var _excluded = ["children", "className", "Component"];
40
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -53,5 +34,12 @@ var Root = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
53
34
  });
54
35
  Root.displayName = 'Root';
55
36
 
37
+ /**
38
+ * @license EUPL-1.2
39
+ * Copyright (c) 2020-2024 Frameless B.V.
40
+ * Copyright (c) 2021-2024 Gemeente Utrecht
41
+ */
42
+ insertStyle(css);
43
+
56
44
  exports.Root = Root;
57
- //# sourceMappingURL=css.js.map
45
+ //# sourceMappingURL=css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.cjs","sources":["../../../../components/root/dist/index.mjs","../src/insert-style.ts","../src/index.tsx","../src/css.tsx"],"sourcesContent":["export default \".utrecht-root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;background-color:var(--utrecht-root-background-color);block-size:100%;color:var(--utrecht-root-color);font-family:var(--utrecht-root-font-family);inline-size:100%;overflow-block:auto;overflow-inline:auto;position:relative;text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none}\";\n","export const insertStyle = function (css: string) {\n if (typeof document !== 'undefined') {\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.appendChild(document.createTextNode(css));\n head.appendChild(style);\n }\n};\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport css from '@utrecht/root-css/dist/index.mjs';\nimport { insertStyle } from './insert-style';\n\ninsertStyle(css);\n\nexport * from './index';\n"],"names":["insertStyle","css","document","head","getElementsByTagName","style","createElement","appendChild","createTextNode","Root","forwardRef","_ref","ref","children","className","_ref$Component","Component","restProps","_objectWithoutProperties","_excluded","_jsx","_objectSpread","clsx","displayName"],"mappings":";;;;;;;;AAAA,UAAe,4aAA4a;;ACApb,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAaC,GAAW,EAAA;AAC9C,EAAA,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;AACnC,IAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAID,QAAQ,CAACE,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpE,IAAA,IAAIC,KAAK,GAAGH,QAAQ,CAACI,aAAa,CAAC,OAAO,CAAC,CAAA;IAC3CD,KAAK,CAACE,WAAW,CAACL,QAAQ,CAACM,cAAc,CAACP,GAAG,CAAC,CAAC,CAAA;AAC/CE,IAAAA,IAAI,CAACI,WAAW,CAACF,KAAK,CAAC,CAAA;AACzB,GAAA;AACF,CAAC;;;;;ACUM,IAAMI,IAAI,gBAAGC,gBAAU,CAC5B,UAAAC,IAAA,EAOEC,GAA8B,EAAA;AAAA,EAAA,IAL5BC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,cAAA,GAAAJ,IAAA,CACTK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;AACfE,IAAAA,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;EAAA,OAIdC,cAAA,CAACJ,SAAS,EAAAK,aAAA,CAAAA,aAAA,KAAKJ,SAAS,CAAA,EAAA,EAAA,EAAA;AAAEL,IAAAA,GAAG,EAAEA,GAAU;AAAEE,IAAAA,SAAS,EAAEQ,IAAI,CAAC,cAAc,EAAER,SAAS,CAAC;cAClFD,QAAAA;AAAQ,GAAA,CAAA,CACC,CAAA;AAAA,CACb,EACF;AAEDJ,IAAI,CAACc,WAAW,GAAG,MAAM;;ACjCzB;;;;AAIG;AAKHvB,WAAW,CAACC,GAAG,CAAC;;;;"}
package/dist/css.d.ts CHANGED
@@ -3,6 +3,5 @@
3
3
  * Copyright (c) 2020-2024 Frameless B.V.
4
4
  * Copyright (c) 2021-2024 Gemeente Utrecht
5
5
  */
6
- import '@utrecht/root-css/src/index.scss';
7
6
  export * from './index';
8
7
  //# sourceMappingURL=css.d.ts.map
package/dist/css.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,kCAAkC,CAAC;AAE1C,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,cAAc,SAAS,CAAC"}
package/dist/css.mjs CHANGED
@@ -1,55 +1,28 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
1
  import { jsx } from 'react/jsx-runtime';
4
- import clsx from 'clsx';
5
2
  import { forwardRef } from 'react';
6
3
 
7
- function styleInject(css, ref) {
8
- if ( ref === void 0 ) ref = {};
9
- var insertAt = ref.insertAt;
4
+ var css = ".utrecht-root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;background-color:var(--utrecht-root-background-color);block-size:100%;color:var(--utrecht-root-color);font-family:var(--utrecht-root-font-family);inline-size:100%;overflow-block:auto;overflow-inline:auto;position:relative;text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none}";
10
5
 
11
- if (typeof document === 'undefined') { return; }
12
-
13
- var head = document.head || document.getElementsByTagName('head')[0];
14
- var style = document.createElement('style');
15
- style.type = 'text/css';
16
-
17
- if (insertAt === 'top') {
18
- if (head.firstChild) {
19
- head.insertBefore(style, head.firstChild);
20
- } else {
21
- head.appendChild(style);
6
+ const insertStyle = function (css) {
7
+ if (typeof document !== 'undefined') {
8
+ var head = document.head || document.getElementsByTagName('head')[0];
9
+ var style = document.createElement('style');
10
+ style.appendChild(document.createTextNode(css));
11
+ head.appendChild(style);
22
12
  }
23
- } else {
24
- head.appendChild(style);
25
- }
13
+ };
26
14
 
27
- if (style.styleSheet) {
28
- style.styleSheet.cssText = css;
29
- } else {
30
- style.appendChild(document.createTextNode(css));
31
- }
32
- }
15
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
33
16
 
34
- var css_248z = ".utrecht-root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;background-color:var(--utrecht-root-background-color);block-size:100%;color:var(--utrecht-root-color);font-family:var(--utrecht-root-font-family);inline-size:100%;overflow-block:auto;overflow-inline:auto;position:relative;text-rendering:optimizeLegibility}";
35
- styleInject(css_248z);
36
-
37
- var _excluded = ["children", "className", "Component"];
38
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
39
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
40
- var Root = /*#__PURE__*/forwardRef(function (_ref, ref) {
41
- var children = _ref.children,
42
- className = _ref.className,
43
- _ref$Component = _ref.Component,
44
- Component = _ref$Component === void 0 ? 'html' : _ref$Component,
45
- restProps = _objectWithoutProperties(_ref, _excluded);
46
- return jsx(Component, _objectSpread(_objectSpread({}, restProps), {}, {
47
- ref: ref,
48
- className: clsx('utrecht-root', className),
49
- children: children
50
- }));
51
- });
17
+ const Root = forwardRef(({ children, className, Component = 'html', ...restProps }, ref) => (jsx(Component, { ...restProps, ref: ref, className: clsx('utrecht-root', className), children: children })));
52
18
  Root.displayName = 'Root';
53
19
 
20
+ /**
21
+ * @license EUPL-1.2
22
+ * Copyright (c) 2020-2024 Frameless B.V.
23
+ * Copyright (c) 2021-2024 Gemeente Utrecht
24
+ */
25
+ insertStyle(css);
26
+
54
27
  export { Root };
55
28
  //# sourceMappingURL=css.mjs.map
package/dist/css.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"css.mjs","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/index.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n"],"names":["Root","forwardRef","_ref","ref","children","className","_ref$Component","Component","restProps","_objectWithoutProperties","_excluded","_jsx","_objectSpread","clsx","displayName"],"mappings":";;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,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,IAAI,CAAC,cAAc,EAAER,SAAS,CAAC;cAClFD,QAAAA;AAAQ,GAAA,CAAA,CACC,CAAA;AAAA,CACb,EACF;AAEDJ,IAAI,CAACc,WAAW,GAAG,MAAM;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"css.mjs","sources":["../../../../components/root/dist/index.mjs","../src/insert-style.ts","../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/index.tsx","../src/css.tsx"],"sourcesContent":["export default \".utrecht-root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;background-color:var(--utrecht-root-background-color);block-size:100%;color:var(--utrecht-root-color);font-family:var(--utrecht-root-font-family);inline-size:100%;overflow-block:auto;overflow-inline:auto;position:relative;text-rendering:optimizeLegibility;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none}\";\n","export const insertStyle = function (css: string) {\n if (typeof document !== 'undefined') {\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.appendChild(document.createTextNode(css));\n head.appendChild(style);\n }\n};\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport css from '@utrecht/root-css/dist/index.mjs';\nimport { insertStyle } from './insert-style';\n\ninsertStyle(css);\n\nexport * from './index';\n"],"names":["_jsx"],"mappings":";;;AAAA,UAAe,4aAA4a;;ACApb,MAAM,WAAW,GAAG,UAAU,GAAW,EAAA;AAC9C,IAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnC,QAAA,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC5C,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAChD,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KACzB;AACH,CAAC;;ACPD,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAA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ports.Root = Root;
27
- //# sourceMappingURL=index.cjs.js.map
27
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.tsx"],"sourcesContent":["/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n"],"names":["Root","forwardRef","_ref","ref","children","className","_ref$Component","Component","restProps","_objectWithoutProperties","_excluded","_jsx","_objectSpread","clsx","displayName"],"mappings":";;;;;;;;;;;AAiBO,IAAMA,IAAI,gBAAGC,gBAAU,CAC5B,UAAAC,IAAA,EAOEC,GAA8B,EAAA;AAAA,EAAA,IAL5BC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,cAAA,GAAAJ,IAAA,CACTK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;AACfE,IAAAA,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;EAAA,OAIdC,cAAA,CAACJ,SAAS,EAAAK,aAAA,CAAAA,aAAA,KAAKJ,SAAS,CAAA,EAAA,EAAA,EAAA;AAAEL,IAAAA,GAAG,EAAEA,GAAU;AAAEE,IAAAA,SAAS,EAAEQ,IAAI,CAAC,cAAc,EAAER,SAAS,CAAC;cAClFD,QAAAA;AAAQ,GAAA,CAAA,CACC,CAAA;AAAA,CACb,EACF;AAEDJ,IAAI,CAACc,WAAW,GAAG,MAAM;;;;"}
package/dist/index.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+
4
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
5
+
6
+ const Root = forwardRef(({ children, className, Component = 'html', ...restProps }, ref) => (jsx(Component, { ...restProps, ref: ref, className: clsx('utrecht-root', className), children: children })));
7
+ Root.displayName = 'Root';
8
+
9
+ export { Root };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/index.tsx"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n"],"names":["_jsx"],"mappings":";;;AAAA,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAQ,SAAS,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;;MCiBlW,IAAI,GAAG,UAAU,CAC5B,CACE,EACE,QAAQ,EACR,SAAS,EACT,SAAS,GAAG,MAAM,EAClB,GAAG,SAAS,EACuD,EACrE,GAA8B,MAE9BA,GAAA,CAAC,SAAS,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAU,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,YAClF,QAAQ,EAAA,CACC,CACb,EACD;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ export declare const insertStyle: (css: string) => void;
2
+ //# sourceMappingURL=insert-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insert-style.d.ts","sourceRoot":"","sources":["../src/insert-style.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAkB,MAAM,SAO/C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utrecht/root-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "author": "Community for NL Design System",
5
5
  "description": "Root component for the Municipality of Utrecht based on the NL Design System architecture",
6
6
  "license": "EUPL-1.2",
@@ -13,15 +13,6 @@
13
13
  ],
14
14
  "sideEffects": false,
15
15
  "devDependencies": {
16
- "@babel/plugin-transform-runtime": "7.24.7",
17
- "@babel/preset-env": "7.24.7",
18
- "@babel/preset-react": "7.24.7",
19
- "@babel/preset-typescript": "7.24.7",
20
- "@rollup/plugin-babel": "6.0.4",
21
- "@rollup/plugin-commonjs": "26.0.1",
22
- "@rollup/plugin-json": "6.1.0",
23
- "@rollup/plugin-node-resolve": "15.2.3",
24
- "@rollup/plugin-typescript": "12.1.0",
25
16
  "@testing-library/dom": "8.20.1",
26
17
  "@testing-library/jest-dom": "6.5.0",
27
18
  "@testing-library/react": "16.0.1",
@@ -33,11 +24,8 @@
33
24
  "jest-environment-jsdom": "29.7.0",
34
25
  "react": "18.3.1",
35
26
  "rollup": "4.23.0",
36
- "rollup-plugin-filesize": "10.0.0",
37
- "rollup-plugin-node-externals": "7.1.2",
38
- "rollup-plugin-peer-deps-external": "2.2.4",
39
- "rollup-plugin-postcss": "4.0.2",
40
27
  "typescript": "5.6.2",
28
+ "@utrecht/build-utils-react": "0.0.1",
41
29
  "@utrecht/root-css": "1.0.0"
42
30
  },
43
31
  "keywords": [
package/src/css.tsx CHANGED
@@ -4,6 +4,9 @@
4
4
  * Copyright (c) 2021-2024 Gemeente Utrecht
5
5
  */
6
6
 
7
- import '@utrecht/root-css/src/index.scss';
7
+ import css from '@utrecht/root-css/dist/index.mjs';
8
+ import { insertStyle } from './insert-style';
9
+
10
+ insertStyle(css);
8
11
 
9
12
  export * from './index';
@@ -0,0 +1,8 @@
1
+ export const insertStyle = function (css: string) {
2
+ if (typeof document !== 'undefined') {
3
+ var head = document.head || document.getElementsByTagName('head')[0];
4
+ var style = document.createElement('style');
5
+ style.appendChild(document.createTextNode(css));
6
+ head.appendChild(style);
7
+ }
8
+ };
package/dist/css.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"css.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/index.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n"],"names":["Root","forwardRef","_ref","ref","children","className","_ref$Component","Component","restProps","_objectWithoutProperties","_excluded","_jsx","_objectSpread","clsx","displayName"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,I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,GAAG,MAAM;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/index.tsx"],"sourcesContent":["/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n"],"names":["Root","forwardRef","_ref","ref","children","className","_ref$Component","Component","restProps","_objectWithoutProperties","_excluded","_jsx","_objectSpread","clsx","displayName"],"mappings":";;;;;;;;;;;AAiBO,IAAMA,IAAI,gBAAGC,gBAAU,CAC5B,UAAAC,IAAA,EAOEC,GAA8B,EAAA;AAAA,EAAA,IAL5BC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,cAAA,GAAAJ,IAAA,CACTK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;AACfE,IAAAA,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;EAAA,OAIdC,cAAA,CAACJ,SAAS,EAAAK,aAAA,CAAAA,aAAA,KAAKJ,SAAS,CAAA,EAAA,EAAA,EAAA;AAAEL,IAAAA,GAAG,EAAEA,GAAU;AAAEE,IAAAA,SAAS,EAAEQ,IAAI,CAAC,cAAc,EAAER,SAAS,CAAC;cAClFD,QAAAA;AAAQ,GAAA,CAAA,CACC,CAAA;AAAA,CACb,EACF;AAEDJ,IAAI,CAACc,WAAW,GAAG,MAAM;;;;"}
package/dist/index.esm.js DELETED
@@ -1,25 +0,0 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { jsx } from 'react/jsx-runtime';
4
- import clsx from 'clsx';
5
- import { forwardRef } from 'react';
6
-
7
- var _excluded = ["children", "className", "Component"];
8
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
- var Root = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
- var children = _ref.children,
12
- className = _ref.className,
13
- _ref$Component = _ref.Component,
14
- Component = _ref$Component === void 0 ? 'html' : _ref$Component,
15
- restProps = _objectWithoutProperties(_ref, _excluded);
16
- return jsx(Component, _objectSpread(_objectSpread({}, restProps), {}, {
17
- ref: ref,
18
- className: clsx('utrecht-root', className),
19
- children: children
20
- }));
21
- });
22
- Root.displayName = 'Root';
23
-
24
- export { Root };
25
- //# sourceMappingURL=index.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/index.tsx"],"sourcesContent":["/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport clsx from 'clsx';\nimport { ForwardedRef, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';\n\nexport interface HtmlRootProps extends HTMLAttributes<HTMLElement> {\n Component?: 'html';\n}\n\nexport interface DivRootProps extends HTMLAttributes<HTMLElement> {\n Component: 'div';\n}\n\nexport const Root = forwardRef(\n (\n {\n children,\n className,\n Component = 'html',\n ...restProps\n }: PropsWithChildren<HtmlRootProps> | PropsWithChildren<DivRootProps>,\n ref: ForwardedRef<HTMLElement>,\n ) => (\n <Component {...restProps} ref={ref as any} className={clsx('utrecht-root', className)}>\n {children}\n </Component>\n ),\n);\n\nRoot.displayName = 'Root';\n"],"names":["Root","forwardRef","_ref","ref","children","className","_ref$Component","Component","restProps","_objectWithoutProperties","_excluded","_jsx","_objectSpread","clsx","displayName"],"mappings":";;;;;;;;;AAiBO,IAAMA,IAAI,gBAAGC,UAAU,CAC5B,UAAAC,IAAA,EAOEC,GAA8B,EAAA;AAAA,EAAA,IAL5BC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,cAAA,GAAAJ,IAAA,CACTK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;AACfE,IAAAA,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;EAAA,OAIdC,GAAA,CAACJ,SAAS,EAAAK,aAAA,CAAAA,aAAA,KAAKJ,SAAS,CAAA,EAAA,EAAA,EAAA;AAAEL,IAAAA,GAAG,EAAEA,GAAU;AAAEE,IAAAA,SAAS,EAAEQ,IAAI,CAAC,cAAc,EAAER,SAAS,CAAC;cAClFD,QAAAA;AAAQ,GAAA,CAAA,CACC,CAAA;AAAA,CACb,EACF;AAEDJ,IAAI,CAACc,WAAW,GAAG,MAAM;;;;"}