@axis-ds/ui-react 1.1.1 → 1.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axis-ds/ui-react",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "AXIS Design System - Core React UI Components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -12,124 +12,154 @@
12
12
  "require": "./dist/index.js"
13
13
  },
14
14
  "./accordion": {
15
- "types": "./dist/accordion.d.ts",
16
- "import": "./dist/accordion.mjs",
17
- "require": "./dist/accordion.js"
15
+ "types": "./dist/accordion/index.d.ts",
16
+ "import": "./dist/accordion/index.mjs",
17
+ "require": "./dist/accordion/index.js"
18
18
  },
19
- "./button": {
20
- "types": "./dist/button.d.ts",
21
- "import": "./dist/button.mjs",
22
- "require": "./dist/button.js"
23
- },
24
- "./input": {
25
- "types": "./dist/input.d.ts",
26
- "import": "./dist/input.mjs",
27
- "require": "./dist/input.js"
28
- },
29
- "./card": {
30
- "types": "./dist/card.d.ts",
31
- "import": "./dist/card.mjs",
32
- "require": "./dist/card.js"
33
- },
34
- "./dialog": {
35
- "types": "./dist/dialog.d.ts",
36
- "import": "./dist/dialog.mjs",
37
- "require": "./dist/dialog.js"
19
+ "./alert": {
20
+ "types": "./dist/alert/index.d.ts",
21
+ "import": "./dist/alert/index.mjs",
22
+ "require": "./dist/alert/index.js"
38
23
  },
39
24
  "./avatar": {
40
- "types": "./dist/avatar.d.ts",
41
- "import": "./dist/avatar.mjs",
42
- "require": "./dist/avatar.js"
25
+ "types": "./dist/avatar/index.d.ts",
26
+ "import": "./dist/avatar/index.mjs",
27
+ "require": "./dist/avatar/index.js"
43
28
  },
44
- "./tooltip": {
45
- "types": "./dist/tooltip.d.ts",
46
- "import": "./dist/tooltip.mjs",
47
- "require": "./dist/tooltip.js"
48
- },
49
- "./skeleton": {
50
- "types": "./dist/skeleton.d.ts",
51
- "import": "./dist/skeleton.mjs",
52
- "require": "./dist/skeleton.js"
29
+ "./badge": {
30
+ "types": "./dist/badge/index.d.ts",
31
+ "import": "./dist/badge/index.mjs",
32
+ "require": "./dist/badge/index.js"
53
33
  },
54
- "./alert": {
55
- "types": "./dist/alert.d.ts",
56
- "import": "./dist/alert.mjs",
57
- "require": "./dist/alert.js"
34
+ "./breadcrumb": {
35
+ "types": "./dist/breadcrumb/index.d.ts",
36
+ "import": "./dist/breadcrumb/index.mjs",
37
+ "require": "./dist/breadcrumb/index.js"
58
38
  },
59
- "./progress": {
60
- "types": "./dist/progress.d.ts",
61
- "import": "./dist/progress.mjs",
62
- "require": "./dist/progress.js"
39
+ "./button": {
40
+ "types": "./dist/button/index.d.ts",
41
+ "import": "./dist/button/index.mjs",
42
+ "require": "./dist/button/index.js"
63
43
  },
64
- "./breadcrumb": {
65
- "types": "./dist/breadcrumb.d.ts",
66
- "import": "./dist/breadcrumb.mjs",
67
- "require": "./dist/breadcrumb.js"
44
+ "./card": {
45
+ "types": "./dist/card/index.d.ts",
46
+ "import": "./dist/card/index.mjs",
47
+ "require": "./dist/card/index.js"
68
48
  },
69
49
  "./checkbox": {
70
- "types": "./dist/checkbox.d.ts",
71
- "import": "./dist/checkbox.mjs",
72
- "require": "./dist/checkbox.js"
50
+ "types": "./dist/checkbox/index.d.ts",
51
+ "import": "./dist/checkbox/index.mjs",
52
+ "require": "./dist/checkbox/index.js"
73
53
  },
74
54
  "./collapsible": {
75
- "types": "./dist/collapsible.d.ts",
76
- "import": "./dist/collapsible.mjs",
77
- "require": "./dist/collapsible.js"
55
+ "types": "./dist/collapsible/index.d.ts",
56
+ "import": "./dist/collapsible/index.mjs",
57
+ "require": "./dist/collapsible/index.js"
78
58
  },
79
59
  "./command": {
80
- "types": "./dist/command.d.ts",
81
- "import": "./dist/command.mjs",
82
- "require": "./dist/command.js"
60
+ "types": "./dist/command/index.d.ts",
61
+ "import": "./dist/command/index.mjs",
62
+ "require": "./dist/command/index.js"
63
+ },
64
+ "./dialog": {
65
+ "types": "./dist/dialog/index.d.ts",
66
+ "import": "./dist/dialog/index.mjs",
67
+ "require": "./dist/dialog/index.js"
83
68
  },
84
69
  "./dropdown-menu": {
85
- "types": "./dist/dropdown-menu.d.ts",
86
- "import": "./dist/dropdown-menu.mjs",
87
- "require": "./dist/dropdown-menu.js"
70
+ "types": "./dist/dropdown-menu/index.d.ts",
71
+ "import": "./dist/dropdown-menu/index.mjs",
72
+ "require": "./dist/dropdown-menu/index.js"
73
+ },
74
+ "./input": {
75
+ "types": "./dist/input/index.d.ts",
76
+ "import": "./dist/input/index.mjs",
77
+ "require": "./dist/input/index.js"
78
+ },
79
+ "./label": {
80
+ "types": "./dist/label/index.d.ts",
81
+ "import": "./dist/label/index.mjs",
82
+ "require": "./dist/label/index.js"
88
83
  },
89
84
  "./popover": {
90
- "types": "./dist/popover.d.ts",
91
- "import": "./dist/popover.mjs",
92
- "require": "./dist/popover.js"
85
+ "types": "./dist/popover/index.d.ts",
86
+ "import": "./dist/popover/index.mjs",
87
+ "require": "./dist/popover/index.js"
88
+ },
89
+ "./progress": {
90
+ "types": "./dist/progress/index.d.ts",
91
+ "import": "./dist/progress/index.mjs",
92
+ "require": "./dist/progress/index.js"
93
93
  },
94
94
  "./radio-group": {
95
- "types": "./dist/radio-group.d.ts",
96
- "import": "./dist/radio-group.mjs",
97
- "require": "./dist/radio-group.js"
95
+ "types": "./dist/radio-group/index.d.ts",
96
+ "import": "./dist/radio-group/index.mjs",
97
+ "require": "./dist/radio-group/index.js"
98
98
  },
99
99
  "./scroll-area": {
100
- "types": "./dist/scroll-area.d.ts",
101
- "import": "./dist/scroll-area.mjs",
102
- "require": "./dist/scroll-area.js"
100
+ "types": "./dist/scroll-area/index.d.ts",
101
+ "import": "./dist/scroll-area/index.mjs",
102
+ "require": "./dist/scroll-area/index.js"
103
+ },
104
+ "./select": {
105
+ "types": "./dist/select/index.d.ts",
106
+ "import": "./dist/select/index.mjs",
107
+ "require": "./dist/select/index.js"
108
+ },
109
+ "./separator": {
110
+ "types": "./dist/separator/index.d.ts",
111
+ "import": "./dist/separator/index.mjs",
112
+ "require": "./dist/separator/index.js"
103
113
  },
104
114
  "./sheet": {
105
- "types": "./dist/sheet.d.ts",
106
- "import": "./dist/sheet.mjs",
107
- "require": "./dist/sheet.js"
115
+ "types": "./dist/sheet/index.d.ts",
116
+ "import": "./dist/sheet/index.mjs",
117
+ "require": "./dist/sheet/index.js"
118
+ },
119
+ "./skeleton": {
120
+ "types": "./dist/skeleton/index.d.ts",
121
+ "import": "./dist/skeleton/index.mjs",
122
+ "require": "./dist/skeleton/index.js"
108
123
  },
109
124
  "./slider": {
110
- "types": "./dist/slider.d.ts",
111
- "import": "./dist/slider.mjs",
112
- "require": "./dist/slider.js"
125
+ "types": "./dist/slider/index.d.ts",
126
+ "import": "./dist/slider/index.mjs",
127
+ "require": "./dist/slider/index.js"
113
128
  },
114
129
  "./switch": {
115
- "types": "./dist/switch.d.ts",
116
- "import": "./dist/switch.mjs",
117
- "require": "./dist/switch.js"
130
+ "types": "./dist/switch/index.d.ts",
131
+ "import": "./dist/switch/index.mjs",
132
+ "require": "./dist/switch/index.js"
118
133
  },
119
134
  "./table": {
120
- "types": "./dist/table.d.ts",
121
- "import": "./dist/table.mjs",
122
- "require": "./dist/table.js"
135
+ "types": "./dist/table/index.d.ts",
136
+ "import": "./dist/table/index.mjs",
137
+ "require": "./dist/table/index.js"
138
+ },
139
+ "./tabs": {
140
+ "types": "./dist/tabs/index.d.ts",
141
+ "import": "./dist/tabs/index.mjs",
142
+ "require": "./dist/tabs/index.js"
123
143
  },
124
144
  "./textarea": {
125
- "types": "./dist/textarea.d.ts",
126
- "import": "./dist/textarea.mjs",
127
- "require": "./dist/textarea.js"
145
+ "types": "./dist/textarea/index.d.ts",
146
+ "import": "./dist/textarea/index.mjs",
147
+ "require": "./dist/textarea/index.js"
148
+ },
149
+ "./toast": {
150
+ "types": "./dist/toast/index.d.ts",
151
+ "import": "./dist/toast/index.mjs",
152
+ "require": "./dist/toast/index.js"
128
153
  },
129
154
  "./toggle": {
130
- "types": "./dist/toggle.d.ts",
131
- "import": "./dist/toggle.mjs",
132
- "require": "./dist/toggle.js"
155
+ "types": "./dist/toggle/index.d.ts",
156
+ "import": "./dist/toggle/index.mjs",
157
+ "require": "./dist/toggle/index.js"
158
+ },
159
+ "./tooltip": {
160
+ "types": "./dist/tooltip/index.d.ts",
161
+ "import": "./dist/tooltip/index.mjs",
162
+ "require": "./dist/tooltip/index.js"
133
163
  }
134
164
  },
135
165
  "sideEffects": false,
@@ -166,13 +196,16 @@
166
196
  "clsx": "^2.1.0",
167
197
  "cmdk": "^1.1.1",
168
198
  "tailwind-merge": "^2.5.0",
169
- "@axis-ds/tokens": "1.1.1"
199
+ "@axis-ds/tokens": "1.1.3"
170
200
  },
171
201
  "devDependencies": {
172
202
  "@testing-library/jest-dom": "^6.9.1",
173
203
  "@testing-library/react": "^16.3.2",
174
204
  "@types/react": "^19.0.0",
175
205
  "@vitejs/plugin-react": "^5.1.2",
206
+ "@vitest/coverage-v8": "^2.1.0",
207
+ "jest-axe": "^9.0.0",
208
+ "@types/jest-axe": "^3.5.9",
176
209
  "jsdom": "^27.4.0",
177
210
  "react": "^19.0.0",
178
211
  "react-dom": "^19.0.0",
@@ -196,11 +229,14 @@
196
229
  },
197
230
  "homepage": "https://axis.minu.best",
198
231
  "scripts": {
199
- "build": "tsup src/index.ts src/*/index.tsx --format cjs,esm --dts --external react",
232
+ "build": "tsup src/index.ts src/*/index.tsx --format cjs,esm --dts --external react && node scripts/sync-exports.mjs",
200
233
  "dev": "tsup src/index.ts --format cjs,esm --dts --watch --external react",
201
234
  "clean": "rm -rf dist",
202
235
  "test": "vitest run",
236
+ "test:coverage": "vitest run --coverage",
203
237
  "test:watch": "vitest",
204
- "type-check": "tsc --noEmit"
238
+ "type-check": "tsc --noEmit",
239
+ "sync-exports": "node scripts/sync-exports.mjs",
240
+ "check-exports": "node scripts/sync-exports.mjs --check"
205
241
  }
206
242
  }
@@ -1,123 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-PJO7WJ4G.mjs";
4
-
5
- // src/command/index.tsx
6
- import * as React from "react";
7
- import { Command as CommandPrimitive } from "cmdk";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
- var Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
10
- CommandPrimitive,
11
- {
12
- ref,
13
- className: cn(
14
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-[var(--axis-surface-primary)] text-[var(--axis-text-primary)]",
15
- className
16
- ),
17
- ...props
18
- }
19
- ));
20
- Command.displayName = "Command";
21
- var CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-[var(--axis-border-default)] px-3", children: [
22
- /* @__PURE__ */ jsxs(
23
- "svg",
24
- {
25
- xmlns: "http://www.w3.org/2000/svg",
26
- width: "16",
27
- height: "16",
28
- viewBox: "0 0 24 24",
29
- fill: "none",
30
- stroke: "currentColor",
31
- strokeWidth: "2",
32
- strokeLinecap: "round",
33
- strokeLinejoin: "round",
34
- className: "mr-2 h-4 w-4 shrink-0 opacity-50",
35
- children: [
36
- /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
37
- /* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })
38
- ]
39
- }
40
- ),
41
- /* @__PURE__ */ jsx(
42
- CommandPrimitive.Input,
43
- {
44
- ref,
45
- className: cn(
46
- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none",
47
- "placeholder:text-[var(--axis-text-tertiary)]",
48
- "disabled:cursor-not-allowed disabled:opacity-50",
49
- className
50
- ),
51
- ...props
52
- }
53
- )
54
- ] }));
55
- CommandInput.displayName = CommandPrimitive.Input.displayName;
56
- var CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
57
- CommandPrimitive.List,
58
- {
59
- ref,
60
- className: cn(
61
- "max-h-[300px] overflow-y-auto overflow-x-hidden",
62
- className
63
- ),
64
- ...props
65
- }
66
- ));
67
- CommandList.displayName = CommandPrimitive.List.displayName;
68
- var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
69
- CommandPrimitive.Empty,
70
- {
71
- ref,
72
- className: "py-6 text-center text-sm text-[var(--axis-text-secondary)]",
73
- ...props
74
- }
75
- ));
76
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
77
- var CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
78
- CommandPrimitive.Group,
79
- {
80
- ref,
81
- className: cn(
82
- "overflow-hidden p-1 text-[var(--axis-text-primary)]",
83
- "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-[var(--axis-text-secondary)]",
84
- className
85
- ),
86
- ...props
87
- }
88
- ));
89
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
90
- var CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
91
- CommandPrimitive.Separator,
92
- {
93
- ref,
94
- className: cn("-mx-1 h-px bg-[var(--axis-border-default)]", className),
95
- ...props
96
- }
97
- ));
98
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
99
- var CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
100
- CommandPrimitive.Item,
101
- {
102
- ref,
103
- className: cn(
104
- "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
105
- "data-[selected=true]:bg-[var(--axis-surface-secondary)] data-[selected=true]:text-[var(--axis-text-primary)]",
106
- "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
107
- "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
108
- className
109
- ),
110
- ...props
111
- }
112
- ));
113
- CommandItem.displayName = CommandPrimitive.Item.displayName;
114
-
115
- export {
116
- Command,
117
- CommandInput,
118
- CommandList,
119
- CommandEmpty,
120
- CommandGroup,
121
- CommandSeparator,
122
- CommandItem
123
- };
@@ -1,28 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-PJO7WJ4G.mjs";
4
-
5
- // src/slider/index.tsx
6
- import * as React from "react";
7
- import * as SliderPrimitive from "@radix-ui/react-slider";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
- var Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
10
- SliderPrimitive.Root,
11
- {
12
- ref,
13
- className: cn(
14
- "relative flex w-full touch-none select-none items-center",
15
- className
16
- ),
17
- ...props,
18
- children: [
19
- /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-[var(--axis-surface-tertiary)]", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-[var(--axis-interactive-primary)]" }) }),
20
- /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-[var(--axis-interactive-primary)] bg-[var(--axis-surface-primary)] ring-offset-[var(--axis-surface-primary)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-ring)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
21
- ]
22
- }
23
- ));
24
- Slider.displayName = "Slider";
25
-
26
- export {
27
- Slider
28
- };
@@ -1,58 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-PJO7WJ4G.mjs";
4
-
5
- // src/tabs/index.tsx
6
- import * as React from "react";
7
- import * as TabsPrimitive from "@radix-ui/react-tabs";
8
- import { jsx } from "react/jsx-runtime";
9
- var Tabs = TabsPrimitive.Root;
10
- var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
11
- TabsPrimitive.List,
12
- {
13
- ref,
14
- className: cn(
15
- "inline-flex h-10 items-center justify-center rounded-md p-1",
16
- "bg-[var(--axis-surface-secondary)] text-[var(--axis-text-secondary)]",
17
- className
18
- ),
19
- ...props
20
- }
21
- ));
22
- TabsList.displayName = TabsPrimitive.List.displayName;
23
- var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
24
- TabsPrimitive.Trigger,
25
- {
26
- ref,
27
- className: cn(
28
- "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
29
- "ring-offset-[var(--axis-surface-default)]",
30
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
31
- "disabled:pointer-events-none disabled:opacity-50",
32
- "data-[state=active]:bg-[var(--axis-surface-default)] data-[state=active]:text-[var(--axis-text-primary)] data-[state=active]:shadow-sm",
33
- className
34
- ),
35
- ...props
36
- }
37
- ));
38
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
39
- var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
40
- TabsPrimitive.Content,
41
- {
42
- ref,
43
- className: cn(
44
- "mt-2 ring-offset-[var(--axis-surface-default)]",
45
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
46
- className
47
- ),
48
- ...props
49
- }
50
- ));
51
- TabsContent.displayName = TabsPrimitive.Content.displayName;
52
-
53
- export {
54
- Tabs,
55
- TabsList,
56
- TabsTrigger,
57
- TabsContent
58
- };