@dtlvmw/react 0.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.
Files changed (35) hide show
  1. package/dist/index.d.ts +457 -0
  2. package/dist/index.js +772 -0
  3. package/guidelines/Guidelines.md +53 -0
  4. package/guidelines/components/accordion.md +109 -0
  5. package/guidelines/components/alert.md +107 -0
  6. package/guidelines/components/badge-label.md +100 -0
  7. package/guidelines/components/breadcrumbs.md +45 -0
  8. package/guidelines/components/button.md +77 -0
  9. package/guidelines/components/card.md +78 -0
  10. package/guidelines/components/dropdown.md +75 -0
  11. package/guidelines/components/forms.md +133 -0
  12. package/guidelines/components/header.md +59 -0
  13. package/guidelines/components/icon.md +64 -0
  14. package/guidelines/components/login.md +59 -0
  15. package/guidelines/components/modal.md +87 -0
  16. package/guidelines/components/progress.md +75 -0
  17. package/guidelines/components/spinner.md +52 -0
  18. package/guidelines/components/stack-view.md +57 -0
  19. package/guidelines/components/table.md +76 -0
  20. package/guidelines/components/tabs.md +70 -0
  21. package/guidelines/components/timeline.md +87 -0
  22. package/guidelines/components/wizard.md +160 -0
  23. package/guidelines/design-tokens/colors.md +21 -0
  24. package/guidelines/design-tokens/spacing.md +15 -0
  25. package/guidelines/design-tokens/typography.md +11 -0
  26. package/guidelines/overview-components.md +48 -0
  27. package/guidelines/tier2/combobox.md +48 -0
  28. package/guidelines/tier2/datagrid.md +62 -0
  29. package/guidelines/tier2/datepicker.md +26 -0
  30. package/guidelines/tier2/overview.md +69 -0
  31. package/guidelines/tier2/popovers.md +81 -0
  32. package/guidelines/tier2/stepper.md +39 -0
  33. package/guidelines/tier2/tree-view.md +45 -0
  34. package/guidelines/tier2/vertical-nav.md +52 -0
  35. package/package.json +52 -0
@@ -0,0 +1,81 @@
1
+ # Signpost, Tooltip & Dropdown Angular (Tier 2 — Angular Elements)
2
+
3
+ ## Signpost
4
+
5
+ Positioned info popover triggered by a button.
6
+
7
+ ```tsx
8
+ import { Signpost } from '@dtlvmw/react';
9
+
10
+ <Signpost position="right-middle">
11
+ This is signpost content with helpful information.
12
+ </Signpost>
13
+ ```
14
+
15
+ ### Signpost Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ |------|------|---------|-------------|
19
+ | `position` | `string` | `'right-middle'` | Popover position |
20
+
21
+ Supported positions: `top-left`, `top-middle`, `top-right`, `right-top`, `right-middle`, `right-bottom`, `bottom-right`, `bottom-middle`, `bottom-left`, `left-bottom`, `left-middle`, `left-top`
22
+
23
+ ---
24
+
25
+ ## Tooltip
26
+
27
+ Hover tooltip with positioned content.
28
+
29
+ ```tsx
30
+ import { Tooltip } from '@dtlvmw/react';
31
+
32
+ <Tooltip tooltipText="Helpful info" position="right" size="sm">
33
+ <button className="btn btn-sm">Hover me</button>
34
+ </Tooltip>
35
+ ```
36
+
37
+ ### Tooltip Props
38
+
39
+ | Prop | Type | Default | Description |
40
+ |------|------|---------|-------------|
41
+ | `tooltipText` | `string` | — | Tooltip content |
42
+ | `position` | `string` | `'right'` | Tooltip position |
43
+ | `size` | `string` | `'sm'` | Tooltip size (`xs`, `sm`, `md`, `lg`) |
44
+
45
+ ---
46
+
47
+ ## Dropdown Angular
48
+
49
+ Full Angular-backed dropdown with keyboard navigation. Use this when you need keyboard navigation and focus management beyond what the CSS-only Dropdown provides.
50
+
51
+ ```tsx
52
+ import { DropdownAngular } from '@dtlvmw/react';
53
+
54
+ const items = [
55
+ { label: 'Actions', header: true },
56
+ { label: 'Edit' },
57
+ { label: 'Delete' },
58
+ { label: '', separator: true },
59
+ { label: 'Disabled', disabled: true },
60
+ ];
61
+
62
+ <DropdownAngular triggerLabel="Actions" items={items} />
63
+ ```
64
+
65
+ ### DropdownAngular Props
66
+
67
+ | Prop | Type | Default | Description |
68
+ |------|------|---------|-------------|
69
+ | `triggerLabel` | `string` | `'Dropdown'` | Trigger button text |
70
+ | `items` | `DropdownAngularItem[]` | `[]` | Menu items |
71
+
72
+ ### DropdownAngularItem
73
+
74
+ ```ts
75
+ interface DropdownAngularItem {
76
+ label: string;
77
+ disabled?: boolean;
78
+ separator?: boolean; // renders <div class="dropdown-divider">
79
+ header?: boolean; // renders <div class="dropdown-header">
80
+ }
81
+ ```
@@ -0,0 +1,39 @@
1
+ # Stepper (Tier 2 — Angular Element)
2
+
3
+ Form-integrated step flow with validation. Wraps `ClrStepper`.
4
+
5
+ ## React Component
6
+
7
+ ```tsx
8
+ import { Stepper } from '@dtlvmw/react';
9
+ ```
10
+
11
+ ### Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ |------|------|---------|-------------|
15
+ | `steps` | `StepperStep[]` | `[]` | Step definitions |
16
+ | `onSubmit` | `() => void` | — | Form submit callback |
17
+
18
+ ### StepperStep
19
+
20
+ ```ts
21
+ interface StepperStep {
22
+ id: string;
23
+ title: string;
24
+ description?: string;
25
+ content: string;
26
+ }
27
+ ```
28
+
29
+ ### Example
30
+
31
+ ```tsx
32
+ const steps = [
33
+ { id: 'info', title: 'Basic Info', description: 'Enter details', content: 'Fill in your name and email.' },
34
+ { id: 'prefs', title: 'Preferences', content: 'Select your preferences.' },
35
+ { id: 'confirm', title: 'Confirm', content: 'Review and submit.' },
36
+ ];
37
+
38
+ <Stepper steps={steps} onSubmit={() => console.log('submitted')} />
39
+ ```
@@ -0,0 +1,45 @@
1
+ # Tree View (Tier 2 — Angular Element)
2
+
3
+ Recursive tree with expand/collapse and selection. Wraps `ClrTreeView`.
4
+
5
+ ## React Component
6
+
7
+ ```tsx
8
+ import { TreeView } from '@dtlvmw/react';
9
+ ```
10
+
11
+ ### Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ |------|------|---------|-------------|
15
+ | `nodes` | `TreeNode[]` | `[]` | Tree data |
16
+
17
+ ### TreeNode
18
+
19
+ ```ts
20
+ interface TreeNode {
21
+ label: string;
22
+ expanded?: boolean;
23
+ selected?: boolean;
24
+ children?: TreeNode[];
25
+ data?: any;
26
+ }
27
+ ```
28
+
29
+ ### Example
30
+
31
+ ```tsx
32
+ const nodes = [
33
+ {
34
+ label: 'src',
35
+ expanded: true,
36
+ children: [
37
+ { label: 'components', children: [{ label: 'App.tsx' }, { label: 'Header.tsx' }] },
38
+ { label: 'utils', children: [{ label: 'helpers.ts' }] },
39
+ ],
40
+ },
41
+ { label: 'package.json' },
42
+ ];
43
+
44
+ <TreeView nodes={nodes} />
45
+ ```
@@ -0,0 +1,52 @@
1
+ # Vertical Nav (Tier 2 — Angular Element)
2
+
3
+ Collapsible side navigation with groups and icons. Wraps `ClrVerticalNav`.
4
+
5
+ ## React Component
6
+
7
+ ```tsx
8
+ import { VerticalNav } from '@dtlvmw/react';
9
+ ```
10
+
11
+ ### Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ |------|------|---------|-------------|
15
+ | `items` | `NavItem[]` | `[]` | Navigation items |
16
+ | `collapsible` | `boolean` | — | Allow collapse |
17
+ | `collapsed` | `boolean` | — | Collapsed state |
18
+ | `onNavItemClick` | `(item: NavItem) => void` | — | Click callback |
19
+
20
+ ### NavItem
21
+
22
+ ```ts
23
+ interface NavItem {
24
+ label: string;
25
+ icon?: string; // Clarity icon shape name
26
+ active?: boolean;
27
+ children?: NavItem[]; // Creates a nav group
28
+ }
29
+ ```
30
+
31
+ ### Example
32
+
33
+ ```tsx
34
+ const items = [
35
+ { label: 'Dashboard', icon: 'home', active: true },
36
+ {
37
+ label: 'Settings',
38
+ icon: 'cog',
39
+ children: [
40
+ { label: 'Profile' },
41
+ { label: 'Security' },
42
+ ],
43
+ },
44
+ { label: 'Users', icon: 'users' },
45
+ ];
46
+
47
+ <VerticalNav
48
+ items={items}
49
+ collapsible
50
+ onNavItemClick={(item) => navigate(item.label)}
51
+ />
52
+ ```
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@dtlvmw/react",
3
+ "version": "0.0.1",
4
+ "description": "Clarity React components — CSS-only Tier 1 + Angular Element Tier 2 wrappers",
5
+ "license": "MIT",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "author": "Clarity Design System",
10
+ "type": "module",
11
+ "main": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "files": [
14
+ "dist",
15
+ "guidelines"
16
+ ],
17
+ "exports": {
18
+ ".": {
19
+ "import": "./dist/index.js",
20
+ "types": "./dist/index.d.ts"
21
+ }
22
+ },
23
+ "scripts": {
24
+ "build": "vite build",
25
+ "demo": "vite --config vite.demo.config.ts"
26
+ },
27
+ "peerDependencies": {
28
+ "react": "^18 || ^19",
29
+ "react-dom": "^18 || ^19",
30
+ "@dtlvmw/ui": "^0.0.1"
31
+ },
32
+ "optionalDependencies": {
33
+ "@dtlvmw/elements": "^0.0.1"
34
+ },
35
+ "devDependencies": {
36
+ "@types/react": "^19.0.0",
37
+ "@types/react-dom": "^19.0.0",
38
+ "@vitejs/plugin-react": "^4.0.0",
39
+ "react": "^19.0.0",
40
+ "react-dom": "^19.0.0",
41
+ "typescript": "^5.7.0",
42
+ "vite": "^6.0.0",
43
+ "vite-plugin-dts": "^4.0.0"
44
+ },
45
+ "keywords": [
46
+ "clarity",
47
+ "react",
48
+ "design-system",
49
+ "css",
50
+ "angular-elements"
51
+ ]
52
+ }