@pathscale/ui 1.6.0 → 2.1.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.
- package/README.md +37 -4
- package/dist/components/flex/Flex.generated.d.ts +4 -0
- package/dist/components/flex/Flex.generated.js +5 -1
- package/dist/components/flex/Flex.recipe.d.ts +12 -0
- package/dist/components/flex/Flex.recipe.js +12 -0
- package/dist/layouts.manifest.json +1 -1
- package/dist/purge-manifest.json +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,22 +11,44 @@ dark themes built in.
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
bun add @pathscale/ui
|
|
14
|
+
bun add @pathscale/ui solid-layouts
|
|
15
|
+
bun add -d rsbuild-plugin-solid-layouts
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
<details>
|
|
18
19
|
<summary>npm · pnpm · yarn</summary>
|
|
19
20
|
|
|
20
21
|
```sh
|
|
21
|
-
npm install @pathscale/ui
|
|
22
|
-
pnpm add @pathscale/ui
|
|
23
|
-
yarn add @pathscale/ui
|
|
22
|
+
npm install @pathscale/ui solid-layouts && npm install -D rsbuild-plugin-solid-layouts
|
|
23
|
+
pnpm add @pathscale/ui solid-layouts && pnpm add -D rsbuild-plugin-solid-layouts
|
|
24
|
+
yarn add @pathscale/ui solid-layouts && yarn add -D rsbuild-plugin-solid-layouts
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
</details>
|
|
27
28
|
|
|
28
29
|
## Setup
|
|
29
30
|
|
|
31
|
+
`@pathscale/ui` 2.x is a compiled Layout bundle. Configure the application compiler before
|
|
32
|
+
Solid transforms JSX:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { pluginBabel } from "@rsbuild/plugin-babel";
|
|
36
|
+
import { pluginSolid } from "@rsbuild/plugin-solid";
|
|
37
|
+
import { defineConfig } from "@rsbuild/core";
|
|
38
|
+
import { pluginSolidLayoutsApplication } from "rsbuild-plugin-solid-layouts";
|
|
39
|
+
|
|
40
|
+
export default defineConfig({
|
|
41
|
+
plugins: [
|
|
42
|
+
pluginSolidLayoutsApplication({ layouts: ["@pathscale/ui"] }),
|
|
43
|
+
pluginBabel({ include: /\.(?:jsx|tsx|ts)$/ }),
|
|
44
|
+
pluginSolid(),
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The Layout plugin must run before Solid. A missing package, manifest, recipe, compiler, or
|
|
50
|
+
runtime is an error; there is no uncompiled fallback.
|
|
51
|
+
|
|
30
52
|
Two imports. Everything comes from the root barrel, and **one stylesheet is all you need** —
|
|
31
53
|
`index.css` pulls in the base styles, both themes and the icon set:
|
|
32
54
|
|
|
@@ -102,8 +124,19 @@ from hooks. Both, with toasts, icons and dates, are covered in
|
|
|
102
124
|
## Requirements
|
|
103
125
|
|
|
104
126
|
- **SolidJS ^1.9**
|
|
127
|
+
- **solid-layouts** runtime
|
|
128
|
+
- **rsbuild-plugin-solid-layouts** application compiler integration
|
|
105
129
|
- **Tailwind v4** — optional, but required for the `@theme` token utilities
|
|
106
130
|
|
|
131
|
+
## Migrating from 1.x
|
|
132
|
+
|
|
133
|
+
`1.4.0` is the last pre-Layouts 1.x release. Layout-authored components begin at `2.0.0` and
|
|
134
|
+
require the setup above. Versions `1.5.0` and `1.6.0` were incorrectly published on the 1.x
|
|
135
|
+
line and must not be used.
|
|
136
|
+
|
|
137
|
+
The complete compiler contract, hard-error behavior, commands, and porting analyzer are
|
|
138
|
+
documented in [docs/layouts.md](docs/layouts.md).
|
|
139
|
+
|
|
107
140
|
Peers include `@solid-primitives/*`, `@tanstack/solid-form` and `@tanstack/solid-table`.
|
|
108
141
|
Two are optional and only needed for the features they back: `popmotion` (JS animation
|
|
109
142
|
driver) and `@standard-schema/spec` (schema validation).
|
|
@@ -14,6 +14,10 @@ export type FlexProps = IComponentBaseProps & Omit<JSX.HTMLAttributes<HTMLElemen
|
|
|
14
14
|
gapY?: ResponsiveProp<"none" | "sm" | "md" | "lg" | "xl">;
|
|
15
15
|
paddingInline?: ResponsiveProp<"none" | "sm" | "md" | "lg" | "xl">;
|
|
16
16
|
paddingBlock?: ResponsiveProp<"none" | "sm" | "md" | "lg" | "xl">;
|
|
17
|
+
width?: ResponsiveProp<"full">;
|
|
18
|
+
height?: ResponsiveProp<"full">;
|
|
19
|
+
minWidth?: ResponsiveProp<"zero">;
|
|
20
|
+
minHeight?: ResponsiveProp<"zero">;
|
|
17
21
|
grow?: ResponsiveProp<boolean>;
|
|
18
22
|
shrink?: ResponsiveProp<boolean>;
|
|
19
23
|
basis?: ResponsiveProp<"none" | "sm" | "md" | "lg" | "xl">;
|
|
@@ -21,13 +21,17 @@ const __solidLayoutFlex = (_stable, p)=>{
|
|
|
21
21
|
"gapY",
|
|
22
22
|
"paddingInline",
|
|
23
23
|
"paddingBlock",
|
|
24
|
+
"width",
|
|
25
|
+
"height",
|
|
26
|
+
"minWidth",
|
|
27
|
+
"minHeight",
|
|
24
28
|
"grow",
|
|
25
29
|
"shrink",
|
|
26
30
|
"basis"
|
|
27
31
|
]);
|
|
28
32
|
const tag = createMemo(()=>local.as || "div");
|
|
29
33
|
const resolvedChildren = children(()=>local.children);
|
|
30
|
-
const classes = createMemo(()=>twMerge(clsx(CLASSES.base, mapResponsiveProp(local.direction, CLASSES.direction), mapResponsiveProp(local.justify, CLASSES.justify), mapResponsiveProp(local.align, CLASSES.align), mapResponsiveProp(local.wrap, CLASSES.wrap), mapResponsiveProp(local.gap, CLASSES.gap), mapResponsiveProp(local.gapX, CLASSES.gapX), mapResponsiveProp(local.gapY, CLASSES.gapY), mapResponsiveProp(local.paddingInline, CLASSES.paddingInline), mapResponsiveProp(local.paddingBlock, CLASSES.paddingBlock), mapResponsiveProp(local.grow, CLASSES.grow), mapResponsiveProp(local.shrink, CLASSES.shrink), mapResponsiveProp(local.basis, CLASSES.basis), local.class, local.className)));
|
|
34
|
+
const classes = createMemo(()=>twMerge(clsx(CLASSES.base, mapResponsiveProp(local.direction, CLASSES.direction), mapResponsiveProp(local.justify, CLASSES.justify), mapResponsiveProp(local.align, CLASSES.align), mapResponsiveProp(local.wrap, CLASSES.wrap), mapResponsiveProp(local.gap, CLASSES.gap), mapResponsiveProp(local.gapX, CLASSES.gapX), mapResponsiveProp(local.gapY, CLASSES.gapY), mapResponsiveProp(local.paddingInline, CLASSES.paddingInline), mapResponsiveProp(local.paddingBlock, CLASSES.paddingBlock), mapResponsiveProp(local.width, CLASSES.width), mapResponsiveProp(local.height, CLASSES.height), mapResponsiveProp(local.minWidth, CLASSES.minWidth), mapResponsiveProp(local.minHeight, CLASSES.minHeight), mapResponsiveProp(local.grow, CLASSES.grow), mapResponsiveProp(local.shrink, CLASSES.shrink), mapResponsiveProp(local.basis, CLASSES.basis), local.class, local.className)));
|
|
31
35
|
return createComponent(Dynamic, mergeProps({
|
|
32
36
|
get component () {
|
|
33
37
|
return tag();
|
|
@@ -61,6 +61,18 @@ export declare const CLASSES: {
|
|
|
61
61
|
readonly lg: "py-6";
|
|
62
62
|
readonly xl: "py-8";
|
|
63
63
|
};
|
|
64
|
+
readonly width: {
|
|
65
|
+
readonly full: "w-full";
|
|
66
|
+
};
|
|
67
|
+
readonly height: {
|
|
68
|
+
readonly full: "h-full";
|
|
69
|
+
};
|
|
70
|
+
readonly minWidth: {
|
|
71
|
+
readonly zero: "min-w-0";
|
|
72
|
+
};
|
|
73
|
+
readonly minHeight: {
|
|
74
|
+
readonly zero: "min-h-0";
|
|
75
|
+
};
|
|
64
76
|
readonly grow: {
|
|
65
77
|
readonly true: "flex-grow";
|
|
66
78
|
readonly false: "flex-grow-0";
|
|
@@ -62,6 +62,18 @@ const CLASSES = {
|
|
|
62
62
|
lg: "py-6",
|
|
63
63
|
xl: "py-8"
|
|
64
64
|
},
|
|
65
|
+
width: {
|
|
66
|
+
full: "w-full"
|
|
67
|
+
},
|
|
68
|
+
height: {
|
|
69
|
+
full: "h-full"
|
|
70
|
+
},
|
|
71
|
+
minWidth: {
|
|
72
|
+
zero: "min-w-0"
|
|
73
|
+
},
|
|
74
|
+
minHeight: {
|
|
75
|
+
zero: "min-h-0"
|
|
76
|
+
},
|
|
65
77
|
grow: {
|
|
66
78
|
true: "flex-grow",
|
|
67
79
|
false: "flex-grow-0"
|
package/dist/purge-manifest.json
CHANGED
|
@@ -8926,6 +8926,18 @@
|
|
|
8926
8926
|
"lg": [],
|
|
8927
8927
|
"xl": []
|
|
8928
8928
|
},
|
|
8929
|
+
"width": {
|
|
8930
|
+
"full": []
|
|
8931
|
+
},
|
|
8932
|
+
"height": {
|
|
8933
|
+
"full": []
|
|
8934
|
+
},
|
|
8935
|
+
"minWidth": {
|
|
8936
|
+
"zero": []
|
|
8937
|
+
},
|
|
8938
|
+
"minHeight": {
|
|
8939
|
+
"zero": []
|
|
8940
|
+
},
|
|
8929
8941
|
"grow": {
|
|
8930
8942
|
"true": [],
|
|
8931
8943
|
"false": []
|