clio.css-preact 2.0.0 → 2.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.
- package/README.md +43 -17
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,33 +1,59 @@
|
|
|
1
|
-
# clio.css
|
|
1
|
+
# clio.css-preact
|
|
2
2
|
|
|
3
3
|
clio.css's 32 components (windows, menus, controls, dialogs, the NeXTSTEP dock…) as Preact
|
|
4
4
|
components. Each renders exactly the markup documented at https://surfine.github.io/clio.css/,
|
|
5
|
-
so the look comes from clio.css itself and the
|
|
6
|
-
outlines) from clio.js. The
|
|
5
|
+
so the look comes from [clio.css](https://www.npmjs.com/package/clio.css) itself and the
|
|
6
|
+
behaviour (menu tracking, scroll bars, dragged outlines) from its optional clio.js. The
|
|
7
|
+
components are controlled: props in, events out, no state or behaviour of their own.
|
|
7
8
|
|
|
8
9
|
```bash
|
|
9
|
-
npm install clio.css
|
|
10
|
+
npm install clio.css clio.css-preact preact
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
```tsx
|
|
13
|
-
import "clio.css
|
|
14
|
-
import { install } from "clio.css/js.esm";
|
|
14
|
+
import "clio.css"; // with a bundler; or link dist/clio.css
|
|
15
|
+
import { install } from "clio.css/js.esm"; // optional: clio.js's behaviour
|
|
15
16
|
import { Window, Button, FieldRow } from "clio.css-preact";
|
|
16
17
|
|
|
17
|
-
install();
|
|
18
|
+
install();
|
|
18
19
|
|
|
19
20
|
export const App = () => (
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
<div data-era="platinum">
|
|
22
|
+
<Window title="Macintosh HD" style={{ width: "300px" }}>
|
|
23
|
+
<FieldRow>
|
|
24
|
+
<Button>Cancel</Button>
|
|
25
|
+
<Button default>OK</Button>
|
|
26
|
+
</FieldRow>
|
|
27
|
+
</Window>
|
|
28
|
+
</div>
|
|
26
29
|
);
|
|
27
30
|
```
|
|
28
31
|
|
|
29
|
-
Set the era with `data-era` on any ancestor
|
|
30
|
-
`platinum
|
|
32
|
+
Set the era with `data-era` on any ancestor: `system6` (default), `system7`, `drawingboard`,
|
|
33
|
+
`platinum`. NeXTSTEP needs `clio.css/nextstep` instead of the default stylesheet; `Browser`,
|
|
34
|
+
`PullDown`, `Dock` and `DockItem` are drawn only there.
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
## Components
|
|
37
|
+
|
|
38
|
+
`AlertBox`, `Balloon`, `BevelButton`, `Browser`, `Button`, `ChasingArrows`, `Checkbox`, `ClioScope`, `ControlStrip`, `ControlStripModule`, `Desktop`, `DesktopIcon`, `Disclosure`, `Dock`, `DockItem`, `FieldRow`, `Fieldset`, `HelpButton`, `ImageWell`, `ListView`, `ListViewCell`, `ListViewHeader`, `Listbox`, `ListboxOption`, `LittleArrows`, `MenuBar`, `MenuBarItem`, `MenuItem`, `MenuSeparator`, `Placard`, `Progress`, `PullDown`, `Radio`, `RoundedWindow`, `ScrollArea`, `Select`, `Slider`, `SortDirectionHeader`, `SplitBar`, `SplitLine`, `SplitView`, `StandardDialog`, `Tab`, `TabList`, `TabPanel`, `Text`, `TextArea`, `TextField`, `UtilityWindow`, `Window`.
|
|
39
|
+
|
|
40
|
+
Props are typed (`dist/types`); each component's markup, tokens and evidence are on the docs
|
|
41
|
+
site under the same name, and `clio.css/components.json` lists them for tools.
|
|
42
|
+
|
|
43
|
+
## Versions
|
|
44
|
+
|
|
45
|
+
- Same version number as clio.css; the peer range is `clio.css >= 2.0.0` and preact >= 11.
|
|
46
|
+
- The DOM each component renders is part of clio.css's markup: it changes only with
|
|
47
|
+
clio.css's, and both are checked to match `components.json` in `npm test` and, from the
|
|
48
|
+
packed tarballs, in `npm run verify`.
|
|
49
|
+
- Component names and props follow semver only and are not part of clio.css's long-term
|
|
50
|
+
promise: they may change in a minor version, with a CHANGELOG note. The rendered DOM is.
|
|
51
|
+
|
|
52
|
+
## Source
|
|
53
|
+
|
|
54
|
+
Written once in JSX in [`packages/components`](https://github.com/surfine/clio.css/tree/main/packages/components),
|
|
55
|
+
which builds this package and its React twin (`clio.css-react`). Built with heavy AI
|
|
56
|
+
assistance; the markup check and clio.css's [EVIDENCE.md](https://github.com/surfine/clio.css/blob/main/EVIDENCE.md)
|
|
57
|
+
are how to verify it.
|
|
58
|
+
|
|
59
|
+
MIT, see [LICENSE](LICENSE). Not affiliated with or endorsed by Apple Inc. or NeXT.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clio.css-preact",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "clio.css components for Preact: one JSX source, rendering clio.css markup (load clio.css and, for behaviour, clio.js).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"default": "./dist/index.js"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
+
"types": "./dist/types/components/src/index.d.ts",
|
|
13
14
|
"files": [
|
|
14
15
|
"dist",
|
|
15
16
|
"LICENSE",
|
|
@@ -21,6 +22,9 @@
|
|
|
21
22
|
},
|
|
22
23
|
"sideEffects": false,
|
|
23
24
|
"homepage": "https://surfine.github.io/clio.css/",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/surfine/clio.css/issues"
|
|
27
|
+
},
|
|
24
28
|
"repository": {
|
|
25
29
|
"type": "git",
|
|
26
30
|
"url": "git+https://github.com/surfine/clio.css.git",
|
|
@@ -38,6 +42,7 @@
|
|
|
38
42
|
"components"
|
|
39
43
|
],
|
|
40
44
|
"scripts": {
|
|
41
|
-
"prepack": "cd ../.. && node tooling/build.ts && node tooling/build-components.ts"
|
|
45
|
+
"prepack": "cd ../.. && node tooling/build.ts && node tooling/build-components.ts",
|
|
46
|
+
"prepublishOnly": "node ../../tooling/release-guard.ts --stamp"
|
|
42
47
|
}
|
|
43
48
|
}
|