neba 0.0.1 → 1.0.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.
Files changed (141) hide show
  1. package/README.md +169 -2
  2. package/dist/components/accordion/Accordion.d.ts +97 -0
  3. package/dist/components/accordion/Accordion.js +1 -0
  4. package/dist/components/accordion/index.d.ts +2 -0
  5. package/dist/components/accordion/index.js +1 -0
  6. package/dist/components/alert/Alert.d.ts +47 -0
  7. package/dist/components/alert/Alert.js +1 -0
  8. package/dist/components/alert/index.d.ts +2 -0
  9. package/dist/components/alert/index.js +1 -0
  10. package/dist/components/badge/Badge.d.ts +80 -0
  11. package/dist/components/badge/Badge.js +1 -0
  12. package/dist/components/badge/index.d.ts +2 -0
  13. package/dist/components/badge/index.js +1 -0
  14. package/dist/components/box/Box.d.ts +50 -0
  15. package/dist/components/box/Box.js +1 -0
  16. package/dist/components/box/index.d.ts +2 -0
  17. package/dist/components/box/index.js +1 -0
  18. package/dist/components/button/Button.d.ts +25 -3
  19. package/dist/components/button/Button.js +1 -1
  20. package/dist/components/button/index.d.ts +1 -0
  21. package/dist/components/button-group/ButtonGroup.d.ts +31 -0
  22. package/dist/components/button-group/ButtonGroup.js +1 -0
  23. package/dist/components/button-group/index.d.ts +2 -0
  24. package/dist/components/button-group/index.js +1 -0
  25. package/dist/components/card/Card.d.ts +45 -0
  26. package/dist/components/card/Card.js +1 -0
  27. package/dist/components/card/index.d.ts +2 -0
  28. package/dist/components/card/index.js +1 -0
  29. package/dist/components/checkbox/Checkbox.d.ts +39 -0
  30. package/dist/components/checkbox/Checkbox.js +1 -0
  31. package/dist/components/checkbox/index.d.ts +2 -0
  32. package/dist/components/checkbox/index.js +1 -0
  33. package/dist/components/chip/Chip.d.ts +50 -0
  34. package/dist/components/chip/Chip.js +1 -0
  35. package/dist/components/chip/index.d.ts +2 -0
  36. package/dist/components/chip/index.js +1 -0
  37. package/dist/components/combobox/Combobox.d.ts +131 -0
  38. package/dist/components/combobox/Combobox.js +1 -0
  39. package/dist/components/combobox/index.d.ts +2 -0
  40. package/dist/components/combobox/index.js +1 -0
  41. package/dist/components/dialog/Dialog.d.ts +111 -0
  42. package/dist/components/dialog/Dialog.js +1 -0
  43. package/dist/components/dialog/index.d.ts +2 -0
  44. package/dist/components/dialog/index.js +1 -0
  45. package/dist/components/divider/Divider.d.ts +48 -0
  46. package/dist/components/divider/Divider.js +1 -0
  47. package/dist/components/divider/index.d.ts +2 -0
  48. package/dist/components/divider/index.js +1 -0
  49. package/dist/components/file-picker/FilePicker.d.ts +103 -0
  50. package/dist/components/file-picker/FilePicker.js +1 -0
  51. package/dist/components/file-picker/index.d.ts +2 -0
  52. package/dist/components/file-picker/index.js +1 -0
  53. package/dist/components/list/List.d.ts +81 -0
  54. package/dist/components/list/List.js +1 -0
  55. package/dist/components/list/index.d.ts +2 -0
  56. package/dist/components/list/index.js +1 -0
  57. package/dist/components/menu/Menu.d.ts +216 -0
  58. package/dist/components/menu/Menu.js +1 -0
  59. package/dist/components/menu/index.d.ts +2 -0
  60. package/dist/components/menu/index.js +1 -0
  61. package/dist/components/number-field/NumberField.d.ts +113 -0
  62. package/dist/components/number-field/NumberField.js +1 -0
  63. package/dist/components/number-field/index.d.ts +2 -0
  64. package/dist/components/number-field/index.js +1 -0
  65. package/dist/components/overlay/Overlay.d.ts +85 -0
  66. package/dist/components/overlay/Overlay.js +1 -0
  67. package/dist/components/overlay/index.d.ts +2 -0
  68. package/dist/components/overlay/index.js +1 -0
  69. package/dist/components/pagination/Pagination.d.ts +65 -0
  70. package/dist/components/pagination/Pagination.js +1 -0
  71. package/dist/components/pagination/index.d.ts +2 -0
  72. package/dist/components/pagination/index.js +1 -0
  73. package/dist/components/progress-box/ProgressBox.d.ts +33 -0
  74. package/dist/components/progress-box/ProgressBox.js +1 -0
  75. package/dist/components/progress-box/index.d.ts +2 -0
  76. package/dist/components/progress-box/index.js +1 -0
  77. package/dist/components/progress-circular/ProgressCircular.d.ts +19 -0
  78. package/dist/components/progress-circular/ProgressCircular.js +1 -0
  79. package/dist/components/progress-circular/index.d.ts +2 -0
  80. package/dist/components/progress-circular/index.js +1 -0
  81. package/dist/components/progress-linear/ProgressLinear.d.ts +20 -0
  82. package/dist/components/progress-linear/ProgressLinear.js +1 -0
  83. package/dist/components/progress-linear/index.d.ts +2 -0
  84. package/dist/components/progress-linear/index.js +1 -0
  85. package/dist/components/radio-group/RadioGroup.d.ts +51 -0
  86. package/dist/components/radio-group/RadioGroup.js +1 -0
  87. package/dist/components/radio-group/index.d.ts +2 -0
  88. package/dist/components/radio-group/index.js +1 -0
  89. package/dist/components/select/Select.d.ts +76 -0
  90. package/dist/components/select/Select.js +1 -0
  91. package/dist/components/select/index.d.ts +2 -0
  92. package/dist/components/select/index.js +1 -0
  93. package/dist/components/slider/Slider.d.ts +38 -0
  94. package/dist/components/slider/Slider.js +1 -0
  95. package/dist/components/slider/index.d.ts +2 -0
  96. package/dist/components/slider/index.js +1 -0
  97. package/dist/components/switch/Switch.d.ts +39 -0
  98. package/dist/components/switch/Switch.js +1 -0
  99. package/dist/components/switch/index.d.ts +2 -0
  100. package/dist/components/switch/index.js +1 -0
  101. package/dist/components/table/Table.d.ts +80 -0
  102. package/dist/components/table/Table.js +1 -0
  103. package/dist/components/table/index.d.ts +2 -0
  104. package/dist/components/table/index.js +1 -0
  105. package/dist/components/tabs/Tabs.d.ts +92 -0
  106. package/dist/components/tabs/Tabs.js +1 -0
  107. package/dist/components/tabs/index.d.ts +2 -0
  108. package/dist/components/tabs/index.js +1 -0
  109. package/dist/components/text-field/TextField.d.ts +63 -0
  110. package/dist/components/text-field/TextField.js +1 -0
  111. package/dist/components/text-field/index.d.ts +2 -0
  112. package/dist/components/text-field/index.js +1 -0
  113. package/dist/components/toast/Toast.d.ts +116 -0
  114. package/dist/components/toast/Toast.js +1 -0
  115. package/dist/components/toast/index.d.ts +2 -0
  116. package/dist/components/toast/index.js +1 -0
  117. package/dist/components/tooltip/Tooltip.d.ts +81 -0
  118. package/dist/components/tooltip/Tooltip.js +1 -0
  119. package/dist/components/tooltip/index.d.ts +2 -0
  120. package/dist/components/tooltip/index.js +1 -0
  121. package/dist/components/typography/Typography.d.ts +62 -0
  122. package/dist/components/typography/Typography.js +1 -0
  123. package/dist/components/typography/index.d.ts +2 -0
  124. package/dist/components/typography/index.js +1 -0
  125. package/dist/index.d.ts +32 -1
  126. package/dist/index.js +1 -1
  127. package/dist/internal/button-group.d.ts +25 -0
  128. package/dist/internal/button-group.js +1 -0
  129. package/dist/internal/icons.d.ts +48 -0
  130. package/dist/internal/icons.js +1 -0
  131. package/dist/internal/menu.d.ts +20 -0
  132. package/dist/internal/menu.js +1 -0
  133. package/dist/internal/progress.d.ts +122 -0
  134. package/dist/internal/progress.js +1 -0
  135. package/dist/internal/styles.d.ts +224 -0
  136. package/dist/internal/styles.js +1 -0
  137. package/dist/styles.css +758 -0
  138. package/dist/types.d.ts +77 -0
  139. package/dist/types.js +8 -0
  140. package/package.json +75 -19
  141. package/pnpm-workspace.yaml +0 -2
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Shared prop vocabulary for every Neba component.
3
+ *
4
+ * These names and values are deliberately generic: a `size` of `md` or a
5
+ * `color` of `primary` has to mean the same thing on a Button, a Chip, a
6
+ * TextField or a Dialog. Components pick the subset they need from here and
7
+ * never invent a parallel spelling of the same idea.
8
+ */
9
+ /** Scale of a component. `md` is the desktop default. */
10
+ export type NebaSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
+ /** Semantic color role. Maps to a token family in `styles.css`. */
12
+ export type NebaColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
13
+ /**
14
+ * How tightly a component packs its content. Only spacing changes — never the
15
+ * type scale or the control's own height — so a compact and a default control
16
+ * of the same `size` still line up on a shared baseline.
17
+ */
18
+ export type NebaDensity = 'default' | 'compact';
19
+ /**
20
+ * Which way a component runs. `horizontal` everywhere it is offered, because a
21
+ * vertical control is the exception and an exception should have to be asked
22
+ * for. Divider, ButtonGroup, RadioGroup and Slider all read this.
23
+ */
24
+ export type NebaOrientation = 'horizontal' | 'vertical';
25
+ /**
26
+ * Which edge of an anchor something is placed against. Tooltip reads this, and
27
+ * so does anything else that hangs a popup off an element.
28
+ *
29
+ * Logical rather than physical — `start`/`end` would be wrong here, because a
30
+ * tooltip above a button is above it in every writing direction.
31
+ */
32
+ export type NebaSide = 'top' | 'right' | 'bottom' | 'left';
33
+ /**
34
+ * Where something sits along the axis it is not placed on: a tooltip against
35
+ * its trigger, a label set into a divider, the content of a table cell.
36
+ *
37
+ * `start`/`end` rather than `left`/`right` because these flip under RTL, which
38
+ * is the whole reason the library never says `left`.
39
+ */
40
+ export type NebaAlign = 'start' | 'center' | 'end';
41
+ /**
42
+ * Which corner of a box something is pinned to. Badge reads this.
43
+ *
44
+ * Deliberately one word built out of the two the library already has —
45
+ * `top`/`bottom` from `NebaSide`, `start`/`end` from `NebaAlign` — rather than
46
+ * a pair of props. A corner is one decision, and splitting it into two would
47
+ * let a caller spell `{ vertical: 'left' }`.
48
+ */
49
+ export type NebaCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
50
+ /**
51
+ * Visual weight of a component's surface.
52
+ *
53
+ * - `solid` — filled, carries the color. One per view, for the primary action.
54
+ * - `outline` — translucent surface with a hairline border. Secondary actions.
55
+ * - `text` — no surface until hovered. Tertiary/inline actions.
56
+ */
57
+ export type NebaVariant = 'solid' | 'outline' | 'text';
58
+ /**
59
+ * How far a surface sits off the page, as a drop shadow.
60
+ *
61
+ * `0` is the default everywhere and means flat — the acrylic edge alone is what
62
+ * separates the control from its background. Raise it only for surfaces that
63
+ * genuinely float above the content around them. Hovering adds a level and
64
+ * pressing removes one, so a flat control still answers a press without moving.
65
+ */
66
+ export type NebaElevation = 0 | 1 | 2 | 3;
67
+ /** Style props shared by most components; spread into their own prop types. */
68
+ export interface NebaStyleProps {
69
+ /** @default 'solid' */
70
+ variant?: NebaVariant;
71
+ /** @default 'md' */
72
+ size?: NebaSize;
73
+ /** @default 'primary' */
74
+ color?: NebaColor;
75
+ /** @default 'default' */
76
+ density?: NebaDensity;
77
+ }
package/dist/types.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shared prop vocabulary for every Neba component.
3
+ *
4
+ * These names and values are deliberately generic: a `size` of `md` or a
5
+ * `color` of `primary` has to mean the same thing on a Button, a Chip, a
6
+ * TextField or a Dialog. Components pick the subset they need from here and
7
+ * never invent a parallel spelling of the same idea.
8
+ */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "neba",
3
- "version": "0.0.1",
4
- "description": "",
3
+ "version": "1.0.0",
4
+ "description": "A comprehensive React UI component library — buttons, fields, menus, dialogs, tables and much more — accessible and themeable, sharing one prop vocabulary and a translucent acrylic design language. ESM only, types included, dark mode built in.",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "CDGet <jooy2.contact@gmail.com>",
@@ -15,7 +15,7 @@
15
15
  "url": "https://github.com/jooy2/neba/issues"
16
16
  },
17
17
  "scripts": {
18
- "build": "npm run format:fix && tsc --project tsconfig.prod.json && npm run minify",
18
+ "build": "npm run format:fix && tsc --project tsconfig.prod.json && npm run minify && node scripts/copy-styles.mjs",
19
19
  "lint": "eslint . --ext .js,.ts .",
20
20
  "lint:fix": "eslint . --ext .js,.ts --fix .",
21
21
  "minify": "terser-glob 'dist/**/*.js' --config-file terser.config.json",
@@ -24,7 +24,10 @@
24
24
  "format:fix": "prettier . --write",
25
25
  "docs:dev": "npm run build && vitepress dev docs",
26
26
  "docs:build": "npm run build && vitepress build docs",
27
- "docs:serve": "npm run build && npm run docs:build && vitepress serve docs"
27
+ "docs:serve": "npm run build && npm run docs:build && vitepress serve docs",
28
+ "test": "vitest run",
29
+ "test:watch": "vitest",
30
+ "typecheck": "tsc --project tsconfig.prod.json --noEmit && tsc --project test/tsconfig.json && tsc --project docs/tsconfig.json"
28
31
  },
29
32
  "engines": {
30
33
  "node": ">=18.0.0"
@@ -40,7 +43,8 @@
40
43
  "types": "./dist/types.d.ts",
41
44
  "module": "./dist/types.js",
42
45
  "default": "./dist/types.js"
43
- }
46
+ },
47
+ "./styles.css": "./dist/styles.css"
44
48
  },
45
49
  "typesVersions": {
46
50
  "*": {
@@ -50,28 +54,80 @@
50
54
  }
51
55
  },
52
56
  "keywords": [
53
- "vitepress"
57
+ "neba",
58
+ "react",
59
+ "reactjs",
60
+ "react-components",
61
+ "react-ui",
62
+ "ui",
63
+ "ui-kit",
64
+ "ui-library",
65
+ "ui-components",
66
+ "component-library",
67
+ "components",
68
+ "design-system",
69
+ "design-language",
70
+ "frontend",
71
+ "web",
72
+ "typescript",
73
+ "tsx",
74
+ "esm",
75
+ "accessible",
76
+ "accessibility",
77
+ "a11y",
78
+ "aria",
79
+ "wai-aria",
80
+ "dark-mode",
81
+ "theming",
82
+ "responsive",
83
+ "acrylic",
84
+ "glass",
85
+ "glassmorphism",
86
+ "button",
87
+ "dialog",
88
+ "modal",
89
+ "menu",
90
+ "select",
91
+ "combobox",
92
+ "table",
93
+ "tabs",
94
+ "toast",
95
+ "tooltip",
96
+ "form"
54
97
  ],
55
98
  "devDependencies": {
56
99
  "@eslint/js": "^9.39.1",
57
- "@types/node": "^24.10.1",
58
- "@types/react": "^18.3.27",
59
- "@typescript-eslint/parser": "^8.48.0",
100
+ "@tailwindcss/postcss": "^4.3.3",
101
+ "@types/node": "^26.1.1",
102
+ "@types/react": "^19.2.17",
103
+ "@types/react-dom": "^19.2.3",
104
+ "@typescript-eslint/parser": "^8.65.0",
105
+ "@vitejs/plugin-react-swc": "^4.3.2",
106
+ "@vitest/browser": "^4.1.10",
107
+ "@vitest/browser-playwright": "^4.1.10",
60
108
  "eslint": "^9.39.1",
61
109
  "eslint-config-prettier": "^10.1.8",
62
- "eslint-plugin-n": "^17.23.1",
63
- "globals": "^16.5.0",
64
- "jiti": "^2.6.1",
65
- "prettier": "^3.7.2",
66
- "terser-glob": "^1.1.0",
67
- "tsx": "^4.20.6",
110
+ "eslint-plugin-n": "^18.2.2",
111
+ "globals": "^17.7.0",
112
+ "jiti": "^2.7.0",
113
+ "playwright": "^1.61.1",
114
+ "prettier": "^3.9.6",
115
+ "prettier-plugin-tailwindcss": "^0.8.1",
116
+ "react": "^19.2.8",
117
+ "react-dom": "^19.2.8",
118
+ "tailwindcss": "^4.3.3",
119
+ "terser-glob": "^1.2.1",
120
+ "tsx": "^4.23.1",
68
121
  "typescript": "^5.9.3",
69
- "typescript-eslint": "^8.48.0",
122
+ "typescript-eslint": "^8.65.0",
123
+ "vite": "^8.1.5",
70
124
  "vitepress": "^1.6.4",
71
- "vitepress-i18n": "^1.3.4",
72
- "vitepress-sidebar": "^1.33.1"
125
+ "vitepress-i18n": "^1.3.5",
126
+ "vitepress-sidebar": "^1.36.1",
127
+ "vitest": "^4.1.10",
128
+ "vitest-browser-react": "^2.2.0"
73
129
  },
74
130
  "dependencies": {
75
- "@base-ui-components/react": "^1.0.0-rc.0"
131
+ "@base-ui/react": "^1.6.0"
76
132
  }
77
133
  }
@@ -1,2 +0,0 @@
1
- onlyBuiltDependencies:
2
- - esbuild