@pindoba/astro-separator 0.0.0-alpha-20260829223243

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/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright 2025 Eduardo Lopes
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
8
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
9
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
10
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
11
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
12
+ DEALINGS IN THE SOFTWARE.
package/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ // Do not write code directly here, instead use the `src` folder!
2
+ // Then, use this file to export everything you want your user to access.
3
+
4
+ import Separator from "./src/Separator.astro";
5
+ export * from "./src/Separator.astro";
6
+ export default Separator;
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@pindoba/astro-separator",
3
+ "version": "0.0.0-alpha-20260829223243",
4
+ "homepage": "https://github.com/EduardoLopes/pindoba/tree/main/packages/ui/astro/separator#README.md",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/EduardoLopes/pindoba.git",
8
+ "directory": "packages/ui/astro/separator"
9
+ },
10
+ "sideEffects": false,
11
+ "license": "MIT",
12
+ "type": "module",
13
+ "exports": {
14
+ ".": "./index.ts",
15
+ "./demos": "./src/demos/index.ts",
16
+ "./demos/orientation": "./src/demos/orientation.astro",
17
+ "./demos/emphasis": "./src/demos/emphasis.astro",
18
+ "./demos/label": "./src/demos/label.astro",
19
+ "./demos/custom": "./src/demos/custom.astro"
20
+ },
21
+ "files": [
22
+ "src",
23
+ "index.ts"
24
+ ],
25
+ "keywords": [
26
+ "astro-component"
27
+ ],
28
+ "devDependencies": {
29
+ "@astrojs/check": "^0.9.10",
30
+ "astro": "^7.2.9",
31
+ "typescript": "^7.0.2"
32
+ },
33
+ "peerDependencies": {
34
+ "astro": "^4.0.0"
35
+ },
36
+ "dependencies": {
37
+ "@pindoba/core-separator": "0.0.0-alpha-20260829223243",
38
+ "@pindoba/styled-system": "0.0.0-alpha-20260829223243"
39
+ },
40
+ "scripts": {
41
+ "lint": "TIMING=1 eslint . --max-warnings 0",
42
+ "lint:fix": "TIMING=1 eslint . --fix --max-warnings 0",
43
+ "link": "pnpm link",
44
+ "unlink": "pnpm unlink",
45
+ "check": "astro check",
46
+ "dev": "astro check --watch",
47
+ "clean": "rm -rf .astro && rm -rf node_modules && rm -rf .turbo",
48
+ "format": "prettier --check . --ignore-path \"$PRETTIER_IGNORE_PATH\"",
49
+ "format:fix": "prettier --write . --ignore-path \"$PRETTIER_IGNORE_PATH\""
50
+ }
51
+ }
@@ -0,0 +1,25 @@
1
+ ---
2
+ import {
3
+ connectSeparator,
4
+ type SeparatorBaseProps,
5
+ } from "@pindoba/core-separator";
6
+ import type { HTMLAttributes } from "astro/types";
7
+
8
+ export type SeparatorProps = HTMLAttributes<"div"> &
9
+ SeparatorBaseProps<HTMLAttributes<"div">>;
10
+
11
+ const { class: className, ...rest }: SeparatorProps = Astro.props;
12
+
13
+ const api = connectSeparator({ ...rest, class: className });
14
+ ---
15
+
16
+ <div {...api.rootProps}>
17
+ {
18
+ Astro.slots.has("default") && (
19
+ <span {...api.labelProps}>
20
+ {/* Optional label content rendered over the separator line. @group Slots */}
21
+ <slot />
22
+ </span>
23
+ )
24
+ }
25
+ </div>
@@ -0,0 +1,29 @@
1
+ ---
2
+ import Separator from "../Separator.astro";
3
+ import { stack } from "@pindoba/styled-system/patterns";
4
+ import { css } from "@pindoba/styled-system/css";
5
+ ---
6
+
7
+ <div class={stack({ gap: "xl", direction: "column" })}>
8
+ <Separator
9
+ passThrough={{
10
+ root: { style: css.raw({ "--separator-thickness": "3px" }) },
11
+ }}
12
+ emphasis="bold"
13
+ />
14
+
15
+ <Separator
16
+ labelAlign="start"
17
+ passThrough={{
18
+ root: { style: css.raw({ "--separator-inset": "3rem" }) },
19
+ label: { style: css.raw({ fontWeight: "bold", color: "primary.text" }) },
20
+ }}
21
+ >
22
+ Retuned inset
23
+ </Separator>
24
+
25
+ <Separator
26
+ decorative
27
+ passThrough={{ root: { props: { "data-decorative": "true" } } }}
28
+ />
29
+ </div>
@@ -0,0 +1,12 @@
1
+ ---
2
+ import Separator from "../Separator.astro";
3
+ import { stack } from "@pindoba/styled-system/patterns";
4
+ ---
5
+
6
+ <div class={stack({ gap: "lg", direction: "column" })}>
7
+ <Separator emphasis="subtle" />
8
+ <Separator emphasis="bold" />
9
+ <Separator emphasis="accent" feedback="primary" />
10
+ <Separator pattern="dashed" emphasis="bold" />
11
+ <Separator pattern="dotted" emphasis="bold" />
12
+ </div>
@@ -0,0 +1,4 @@
1
+ export { default as Orientation } from "./orientation.astro";
2
+ export { default as Emphasis } from "./emphasis.astro";
3
+ export { default as Label } from "./label.astro";
4
+ export { default as Custom } from "./custom.astro";
@@ -0,0 +1,11 @@
1
+ ---
2
+ import Separator from "../Separator.astro";
3
+ import { stack } from "@pindoba/styled-system/patterns";
4
+ ---
5
+
6
+ <div class={stack({ gap: "xl", direction: "column" })}>
7
+ <Separator labelAlign="start">Start</Separator>
8
+ <Separator labelAlign="center">Center</Separator>
9
+ <Separator labelAlign="end">End</Separator>
10
+ <Separator emphasis="bold" pattern="dashed">Dashed with a label</Separator>
11
+ </div>
@@ -0,0 +1,18 @@
1
+ ---
2
+ import Separator from "../Separator.astro";
3
+ import { stack, flex } from "@pindoba/styled-system/patterns";
4
+ ---
5
+
6
+ <div class={stack({ gap: "xl", direction: "column" })}>
7
+ <div class={stack({ gap: "sm", direction: "column" })}>
8
+ <p>Above the rule</p>
9
+ <Separator />
10
+ <p>Below the rule</p>
11
+ </div>
12
+
13
+ <div class={flex({ gap: "sm", align: "center", height: "3rem" })}>
14
+ <span>Left</span>
15
+ <Separator orientation="vertical" />
16
+ <span>Right</span>
17
+ </div>
18
+ </div>
package/src/env.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line @typescript-eslint/triple-slash-reference
2
+ /// <reference path="../.astro/types.d.ts" />