periplo-ui 3.2.0 → 3.3.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/dist/components/Separator/Separator.d.ts +17 -0
- package/dist/components/Separator/Separator.js +26 -0
- package/dist/components/Separator/Separator.js.map +1 -0
- package/dist/components/Separator/index.d.ts +1 -0
- package/dist/components/Separator/index.js +2 -0
- package/dist/components/Separator/index.js.map +1 -0
- package/package.json +6 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {
|
|
4
|
+
/** The orientation of the separator.
|
|
5
|
+
* @default horizontal
|
|
6
|
+
*/
|
|
7
|
+
orientation?: 'horizontal' | 'vertical';
|
|
8
|
+
/** Whether the separator is decorative or semantic. Decorative separators are hidden from screen readers.
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
decorative?: boolean;
|
|
12
|
+
/** Change the default rendered element for the one passed as a child, merging their props and behavior. */
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { Separator };
|
|
17
|
+
export type { SeparatorProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
|
|
7
|
+
const Separator = React.forwardRef(
|
|
8
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
SeparatorPrimitive.Root,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
decorative,
|
|
13
|
+
orientation,
|
|
14
|
+
className: cn(
|
|
15
|
+
"shrink-0 bg-neutral-100",
|
|
16
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
24
|
+
|
|
25
|
+
export { Separator };
|
|
26
|
+
//# sourceMappingURL=Separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.js","sources":["../../../src/components/Separator/Separator.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\n\nimport { cn } from '@/lib/utils'\n\ninterface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {\n /** The orientation of the separator.\n * @default horizontal\n */\n orientation?: 'horizontal' | 'vertical'\n /** Whether the separator is decorative or semantic. Decorative separators are hidden from screen readers.\n * @default true\n */\n decorative?: boolean\n /** Change the default rendered element for the one passed as a child, merging their props and behavior. */\n asChild?: boolean\n}\n\nconst Separator = React.forwardRef<React.ElementRef<typeof SeparatorPrimitive.Root>, SeparatorProps>(\n ({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-neutral-100',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className,\n )}\n {...props}\n />\n ),\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\nexport type { SeparatorProps }\n"],"names":[],"mappings":";;;;;;AAoBA;AAAwB;AAEpB;AAAoB;AAAnB;AACC;AACA;AACA;AACW;AACT;AACkD;AAClD;AACF;AACI;AAAA;AAGV;AACA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Separator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "periplo-ui",
|
|
3
3
|
"description": "IATI UI library",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
"react-dom": "^18.0 || ^19.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"react": "^19.0.0",
|
|
33
|
-
"react-dom": "^19.0.0",
|
|
34
32
|
"@chromatic-com/storybook": "1.9.0",
|
|
35
33
|
"@commitlint/cli": "19.6.1",
|
|
36
34
|
"@commitlint/config-conventional": "19.6.0",
|
|
@@ -76,14 +74,16 @@
|
|
|
76
74
|
"postcss": "8.4.49",
|
|
77
75
|
"prettier": "3.4.2",
|
|
78
76
|
"prettier-plugin-tailwindcss": "0.6.9",
|
|
77
|
+
"react": "^19.0.0",
|
|
78
|
+
"react-dom": "^19.0.0",
|
|
79
79
|
"rollup-plugin-preserve-directives": "0.4.0",
|
|
80
80
|
"semantic-release": "24.0.0",
|
|
81
|
+
"storybook": "^8.4.7",
|
|
81
82
|
"tailwindcss": "3.4.17",
|
|
82
83
|
"typescript": "5.7.3",
|
|
83
84
|
"vite": "5.4.11",
|
|
84
85
|
"vite-plugin-dts": "4.5.0",
|
|
85
|
-
"vitest": "1.6.0"
|
|
86
|
-
"storybook": "^8.4.7"
|
|
86
|
+
"vitest": "1.6.0"
|
|
87
87
|
},
|
|
88
88
|
"files": [
|
|
89
89
|
"dist"
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"@radix-ui/react-progress": "1.1.1",
|
|
102
102
|
"@radix-ui/react-radio-group": "1.2.2",
|
|
103
103
|
"@radix-ui/react-select": "2.1.4",
|
|
104
|
+
"@radix-ui/react-separator": "^1.1.1",
|
|
104
105
|
"@radix-ui/react-slot": "1.1.1",
|
|
105
106
|
"@radix-ui/react-tabs": "1.1.2",
|
|
106
107
|
"@radix-ui/react-toggle": "1.1.1",
|