@jobber/components 8.7.0 → 8.8.0
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.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single entry point used only for the PREBUILD_CSS step (see rollup.config.mjs).
|
|
3
|
+
*
|
|
4
|
+
* Rollup traverses a single entry's import graph in a deterministic, depth-first
|
|
5
|
+
* order, which keeps the extracted styles.css ordering stable across builds.
|
|
6
|
+
* Update this file to include any new styles that should be included in the extracted stylesheet.
|
|
7
|
+
*
|
|
8
|
+
* Both the main barrel and the primitives barrel are imported here so that every
|
|
9
|
+
* component's and styled primitive's (under `src/primitives/`) CSS lands in the
|
|
10
|
+
* extracted stylesheet.
|
|
11
|
+
*/
|
|
12
|
+
import "./index";
|
|
13
|
+
import "./primitives/index";
|
|
@@ -7411,8 +7411,18 @@ var index_parts = /*#__PURE__*/Object.freeze({
|
|
|
7411
7411
|
ScrubAreaCursor: NumberFieldScrubAreaCursor
|
|
7412
7412
|
});
|
|
7413
7413
|
|
|
7414
|
+
/**
|
|
7415
|
+
* Renders a Base UI element.
|
|
7416
|
+
*
|
|
7417
|
+
* @public
|
|
7418
|
+
*/
|
|
7419
|
+
function useRender(params) {
|
|
7420
|
+
return useRenderElement.useRenderElement(params.defaultTagName ?? 'div', params, params);
|
|
7421
|
+
}
|
|
7422
|
+
|
|
7414
7423
|
exports.Separator = Separator.Separator;
|
|
7415
7424
|
exports.Combobox = index_parts$1;
|
|
7416
7425
|
exports.Drawer = index_parts$3;
|
|
7417
7426
|
exports.Menu = index_parts$2;
|
|
7418
7427
|
exports.NumberField = index_parts;
|
|
7428
|
+
exports.useRender = useRender;
|
|
@@ -7389,4 +7389,13 @@ var index_parts = /*#__PURE__*/Object.freeze({
|
|
|
7389
7389
|
ScrubAreaCursor: NumberFieldScrubAreaCursor
|
|
7390
7390
|
});
|
|
7391
7391
|
|
|
7392
|
-
|
|
7392
|
+
/**
|
|
7393
|
+
* Renders a Base UI element.
|
|
7394
|
+
*
|
|
7395
|
+
* @public
|
|
7396
|
+
*/
|
|
7397
|
+
function useRender(params) {
|
|
7398
|
+
return useRenderElement(params.defaultTagName ?? 'div', params, params);
|
|
7399
|
+
}
|
|
7400
|
+
|
|
7401
|
+
export { index_parts$1 as Combobox, index_parts$3 as Drawer, index_parts$2 as Menu, index_parts as NumberField, Separator, useRender };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -556,5 +556,5 @@
|
|
|
556
556
|
"> 1%",
|
|
557
557
|
"IE 10"
|
|
558
558
|
],
|
|
559
|
-
"gitHead": "
|
|
559
|
+
"gitHead": "954f61ec1d4a5015f706979a120c55af6115a711"
|
|
560
560
|
}
|
package/rollup.config.mjs
CHANGED
|
@@ -15,25 +15,24 @@ const createMultiInput =
|
|
|
15
15
|
typeof multiInput === "function" ? multiInput : multiInput.default;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* When PREBUILD_CSS is supplied, only
|
|
19
|
-
* This ensures postcss maintains consistent ordering of
|
|
18
|
+
* When PREBUILD_CSS is supplied, build only a single synthetic entry that
|
|
19
|
+
* imports every barrel. This ensures postcss maintains consistent ordering of
|
|
20
|
+
* styles across builds.
|
|
20
21
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* that order.
|
|
22
|
+
* Supplying multiple inputs (multiInput globs, or separate barrels) allows rollup
|
|
23
|
+
* discover css imports in a non-deterministic order, which postcss then bundles
|
|
24
|
+
* in that order, producing a styles.css that churns on every build. A single
|
|
25
|
+
* entry is traversed depth-first in a deterministic order, so the extracted
|
|
26
|
+
* styles.css is stable.
|
|
24
27
|
*
|
|
25
|
-
*
|
|
26
|
-
* primitives (under `src/primitives/`) contribute their
|
|
27
|
-
* extracted styles.css. Without
|
|
28
|
-
* bundle but not in the stylesheet, so
|
|
28
|
+
* `src/prebuildCssEntry.ts` imports both the main barrel and the primitives
|
|
29
|
+
* barrel so that styled primitives (under `src/primitives/`) contribute their
|
|
30
|
+
* CSS module hashes to the extracted styles.css. Without the primitives barrel
|
|
31
|
+
* their class hashes appear in the JS bundle but not in the stylesheet, so
|
|
32
|
+
* consumers see no styles applied.
|
|
29
33
|
*/
|
|
30
34
|
const PREBUILD_CSS = process.env.PREBUILD_CSS === "true";
|
|
31
|
-
|
|
32
|
-
// inputs share the basename `index.ts`, so the array form would collide.
|
|
33
|
-
const PREBUILD_CSS_INPUTS = {
|
|
34
|
-
index: "src/index.ts",
|
|
35
|
-
"primitives/index": "src/primitives/index.ts",
|
|
36
|
-
};
|
|
35
|
+
const PREBUILD_CSS_INPUT = "src/prebuildCssEntry.ts";
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
* PostCSS plugin to remove @charset declarations.
|
|
@@ -63,7 +62,7 @@ export default {
|
|
|
63
62
|
|
|
64
63
|
warn(warning);
|
|
65
64
|
},
|
|
66
|
-
input: PREBUILD_CSS ?
|
|
65
|
+
input: PREBUILD_CSS ? PREBUILD_CSS_INPUT : `src/**/index.{ts,tsx}`,
|
|
67
66
|
plugins: [
|
|
68
67
|
nodePolyfills(),
|
|
69
68
|
nodeResolve(),
|