@nordcom/nordstar-separator 0.0.75

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,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 Filiph Sandström <filfat@hotmail.se>
4
+ Copyright (c) 2023-2024 Nordcom AB <opensource@nordcom.io>
5
+ Copyright (c) 2020 Junior Garcia (Next UI)
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # [@nordcom/nordstar-separator](https://nordcominc.github.io/nordstar/docs/components/separator/?utm_source=nordstar&utm_campaign=oss)
2
+
3
+ A thin rule that divides content visually or semantically.
4
+
5
+ ## Installation
6
+
7
+ > [!TIP]
8
+ > This is an internal package and should probably not be installed by itself, but rather come as a dependency of `@nordcom/nordstar`.
9
+
10
+ ```sh
11
+ npm install @nordcom/nordstar-separator
12
+ ```
@@ -0,0 +1,4 @@
1
+ import { default as Separator } from './separator';
2
+ export type { SeparatorProps } from './separator';
3
+ export { Separator };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import Separator from "./separator.js";
2
+ export { Separator };
@@ -0,0 +1,35 @@
1
+ import { As, InternalForwardRefRenderFunction } from '../../../core/system';
2
+ export type SeparatorProps = {
3
+ as?: As;
4
+ /** Visual and semantic axis of the rule. Defaults to `'horizontal'`. */
5
+ orientation?: 'horizontal' | 'vertical';
6
+ /**
7
+ * When `true` (default) the rule is purely visual and removed from the accessibility
8
+ * tree (`role="none"`). Set to `false` when the divider conveys a real grouping
9
+ * boundary that assistive tech should announce (`role="separator"`).
10
+ */
11
+ decorative?: boolean;
12
+ };
13
+ /**
14
+ * `<Separator/>`, a thin rule dividing content along one axis.
15
+ *
16
+ * Hand-rolled (no Radix dependency): the separator is a single element that mirrors the
17
+ * decorative-vs-semantic distinction the WAI-ARIA `separator` role makes. A decorative
18
+ * separator is hidden from assistive tech; a non-decorative one is announced with an
19
+ * explicit `aria-orientation` so screen-reader users perceive the grouping the line implies.
20
+ *
21
+ * @param {object} props - `<Separator/>` props.
22
+ * @param {As} [props.as='div'] - The element to render the component as.
23
+ * @param {'horizontal' | 'vertical'} [props.orientation='horizontal'] - The axis of the rule.
24
+ * @param {boolean} [props.decorative=true] - Hide the rule from the accessibility tree.
25
+ * @returns {React.ReactNode} The `<Separator/>` component.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * <Separator />
30
+ * <Separator orientation="vertical" decorative={false} />
31
+ * ```
32
+ */
33
+ declare const Separator: InternalForwardRefRenderFunction<"div", SeparatorProps, never>;
34
+ export default Separator;
35
+ //# sourceMappingURL=separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../src/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IACzB,EAAE,CAAC,EAAE,EAAE,CAAC;IAER,wEAAwE;IACxE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAExC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,SAAS,mGAgBd,CAAC;AAIF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { cn, forwardRef } from "@nordcom/nordstar-system";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/separator.tsx
4
+ /**
5
+ * `<Separator/>`, a thin rule dividing content along one axis.
6
+ *
7
+ * Hand-rolled (no Radix dependency): the separator is a single element that mirrors the
8
+ * decorative-vs-semantic distinction the WAI-ARIA `separator` role makes. A decorative
9
+ * separator is hidden from assistive tech; a non-decorative one is announced with an
10
+ * explicit `aria-orientation` so screen-reader users perceive the grouping the line implies.
11
+ *
12
+ * @param {object} props - `<Separator/>` props.
13
+ * @param {As} [props.as='div'] - The element to render the component as.
14
+ * @param {'horizontal' | 'vertical'} [props.orientation='horizontal'] - The axis of the rule.
15
+ * @param {boolean} [props.decorative=true] - Hide the rule from the accessibility tree.
16
+ * @returns {React.ReactNode} The `<Separator/>` component.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Separator />
21
+ * <Separator orientation="vertical" decorative={false} />
22
+ * ```
23
+ */
24
+ var Separator = forwardRef(({ as: Tag = "div", orientation = "horizontal", decorative = true, className, ...props }, ref) => {
25
+ return /* @__PURE__ */ jsx(Tag, {
26
+ "data-orientation": orientation,
27
+ ref,
28
+ ...decorative ? { role: "none" } : {
29
+ "aria-orientation": orientation,
30
+ role: "separator"
31
+ },
32
+ className: cn("shrink-0 border-0 bg-foreground-highlight", orientation === "horizontal" ? "h-px w-full" : "h-full w-px self-stretch", className),
33
+ ...props
34
+ });
35
+ });
36
+ Separator.displayName = "Nordstar.Separator";
37
+ //#endregion
38
+ export { Separator as default };
39
+
40
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VwYXJhdG9yLmpzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXBhcmF0b3IudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQXMgfSBmcm9tICdAbm9yZGNvbS9ub3Jkc3Rhci1zeXN0ZW0nO1xuaW1wb3J0IHsgY24sIGZvcndhcmRSZWYgfSBmcm9tICdAbm9yZGNvbS9ub3Jkc3Rhci1zeXN0ZW0nO1xuXG5leHBvcnQgdHlwZSBTZXBhcmF0b3JQcm9wcyA9IHtcbiAgICBhcz86IEFzO1xuXG4gICAgLyoqIFZpc3VhbCBhbmQgc2VtYW50aWMgYXhpcyBvZiB0aGUgcnVsZS4gRGVmYXVsdHMgdG8gYCdob3Jpem9udGFsJ2AuICovXG4gICAgb3JpZW50YXRpb24/OiAnaG9yaXpvbnRhbCcgfCAndmVydGljYWwnO1xuXG4gICAgLyoqXG4gICAgICogV2hlbiBgdHJ1ZWAgKGRlZmF1bHQpIHRoZSBydWxlIGlzIHB1cmVseSB2aXN1YWwgYW5kIHJlbW92ZWQgZnJvbSB0aGUgYWNjZXNzaWJpbGl0eVxuICAgICAqIHRyZWUgKGByb2xlPVwibm9uZVwiYCkuIFNldCB0byBgZmFsc2VgIHdoZW4gdGhlIGRpdmlkZXIgY29udmV5cyBhIHJlYWwgZ3JvdXBpbmdcbiAgICAgKiBib3VuZGFyeSB0aGF0IGFzc2lzdGl2ZSB0ZWNo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gICAgey4uLnByb3BzfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgKTtcbiAgICB9LFxuKTtcblxuU2VwYXJhdG9yLmRpc3BsYXlOYW1lID0gJ05vcmRzdGFyLlNlcGFyYXRvcic7XG5cbmV4cG9ydCBkZWZhdWx0IFNlcGFyYXRvcjtcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFxQ0EsSUFBTSxZQUFZLFlBQ2IsRUFBRSxJQUFJLE1BQU0sT0FBTyxjQUFjLGNBQWMsYUFBYSxNQUFNLFdBQVcsR0FBRyxTQUFTLFFBQVE7Q0FDOUYsT0FDSSxvQkFBQyxLQUFEO0VBQ0ksb0JBQWtCO0VBQ2I7RUFDTCxHQUFLLGFBQWEsRUFBRSxNQUFNLE9BQU8sSUFBSTtHQUFFLG9CQUFvQjtHQUFhLE1BQU07RUFBWTtFQUMxRixXQUFXLEdBQ1AsNkNBQ0EsZ0JBQWdCLGVBQWUsZ0JBQWdCLDRCQUMvQyxTQUNKO0VBQ0EsR0FBSTtDQUNQLENBQUE7QUFFVCxDQUNKO0FBRUEsVUFBVSxjQUFjIn0=
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/package.json",
3
+ "name": "@nordcom/nordstar-separator",
4
+ "type": "module",
5
+ "version": "0.0.75",
6
+ "description": "A thin rule that divides content visually or semantically.",
7
+ "files": [
8
+ "dist",
9
+ "CHANGELOG.md",
10
+ "README.md"
11
+ ],
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "sideEffects": false,
26
+ "keywords": [
27
+ "nordstar",
28
+ "nordcom",
29
+ "component",
30
+ "react",
31
+ "separator",
32
+ "divider",
33
+ "nordstar-separator"
34
+ ],
35
+ "author": {
36
+ "name": "Filiph Sandström",
37
+ "email": "filfat@hotmail.se",
38
+ "url": "https://github.com/filiphsps/"
39
+ },
40
+ "contributors": [
41
+ {
42
+ "name": "Filiph Sandström",
43
+ "email": "filfat@hotmail.se",
44
+ "url": "https://github.com/filiphsps/"
45
+ }
46
+ ],
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/NordcomInc/nordstar.git",
50
+ "directory": "packages/components/separator"
51
+ },
52
+ "license": "MIT",
53
+ "bugs": {
54
+ "url": "https://github.com/NordcomInc/nordstar/issues"
55
+ },
56
+ "homepage": "https://nordcominc.github.io/nordstar/docs/components/separator/",
57
+ "dependencies": {
58
+ "@nordcom/nordstar-system": "0.0.75"
59
+ },
60
+ "peerDependencies": {
61
+ "react": ">=19",
62
+ "react-dom": ">=19"
63
+ },
64
+ "devDependencies": {
65
+ "@types/node": "25.9.3",
66
+ "@types/react": "19.2.17",
67
+ "@types/react-dom": "19.2.3",
68
+ "react": "19.2.7",
69
+ "react-dom": "19.2.7",
70
+ "typescript": "6.0.3",
71
+ "vite": "8.0.16",
72
+ "vite-plugin-dts": "5.0.2"
73
+ },
74
+ "scripts": {
75
+ "build": "tsc && vite build",
76
+ "dev": "vite build --watch",
77
+ "clean": "rm -rf dist coverage .turbo .next *.tsbuildinfo *.log",
78
+ "typecheck": "tsc --noEmit"
79
+ }
80
+ }