@abydahana/aksara-ui 0.1.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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +163 -0
  3. package/dist/aksara.css +33499 -0
  4. package/dist/aksara.d.ts +284 -0
  5. package/dist/aksara.esm.js +1604 -0
  6. package/dist/aksara.js +1608 -0
  7. package/dist/aksara.min.css +1 -0
  8. package/dist/aksara.min.js +1 -0
  9. package/dist/components/buttons/button-group.d.ts +10 -0
  10. package/dist/components/buttons/button-group.js +12 -0
  11. package/dist/components/buttons/button.d.ts +18 -0
  12. package/dist/components/buttons/button.js +28 -0
  13. package/dist/components/buttons/close-button.d.ts +9 -0
  14. package/dist/components/buttons/close-button.js +13 -0
  15. package/dist/components/buttons/index.d.ts +3 -0
  16. package/dist/components/buttons/index.js +3 -0
  17. package/dist/components/data/accordion.d.ts +17 -0
  18. package/dist/components/data/accordion.js +37 -0
  19. package/dist/components/data/avatar.d.ts +26 -0
  20. package/dist/components/data/avatar.js +64 -0
  21. package/dist/components/data/card.d.ts +39 -0
  22. package/dist/components/data/card.js +34 -0
  23. package/dist/components/data/carousel.d.ts +15 -0
  24. package/dist/components/data/carousel.js +47 -0
  25. package/dist/components/data/index.d.ts +7 -0
  26. package/dist/components/data/index.js +7 -0
  27. package/dist/components/data/list-group.d.ts +22 -0
  28. package/dist/components/data/list-group.js +30 -0
  29. package/dist/components/data/media-grid.d.ts +19 -0
  30. package/dist/components/data/media-grid.js +47 -0
  31. package/dist/components/data/table.d.ts +35 -0
  32. package/dist/components/data/table.js +30 -0
  33. package/dist/components/feedback/alert.d.ts +10 -0
  34. package/dist/components/feedback/alert.js +19 -0
  35. package/dist/components/feedback/badge.d.ts +13 -0
  36. package/dist/components/feedback/badge.js +10 -0
  37. package/dist/components/feedback/index.d.ts +6 -0
  38. package/dist/components/feedback/index.js +6 -0
  39. package/dist/components/feedback/placeholder.d.ts +9 -0
  40. package/dist/components/feedback/placeholder.js +11 -0
  41. package/dist/components/feedback/progress.d.ts +14 -0
  42. package/dist/components/feedback/progress.js +22 -0
  43. package/dist/components/feedback/spinner.d.ts +9 -0
  44. package/dist/components/feedback/spinner.js +12 -0
  45. package/dist/components/feedback/toast.d.ts +22 -0
  46. package/dist/components/feedback/toast.js +36 -0
  47. package/dist/components/form/checkbox.d.ts +17 -0
  48. package/dist/components/form/checkbox.js +29 -0
  49. package/dist/components/form/floating-label.d.ts +9 -0
  50. package/dist/components/form/floating-label.js +14 -0
  51. package/dist/components/form/form-control.d.ts +30 -0
  52. package/dist/components/form/form-control.js +28 -0
  53. package/dist/components/form/index.d.ts +11 -0
  54. package/dist/components/form/index.js +11 -0
  55. package/dist/components/form/input-group.d.ts +16 -0
  56. package/dist/components/form/input-group.js +14 -0
  57. package/dist/components/form/input.d.ts +18 -0
  58. package/dist/components/form/input.js +19 -0
  59. package/dist/components/form/layout.d.ts +20 -0
  60. package/dist/components/form/layout.js +15 -0
  61. package/dist/components/form/radio.d.ts +32 -0
  62. package/dist/components/form/radio.js +49 -0
  63. package/dist/components/form/range.d.ts +13 -0
  64. package/dist/components/form/range.js +18 -0
  65. package/dist/components/form/select.d.ts +25 -0
  66. package/dist/components/form/select.js +37 -0
  67. package/dist/components/form/switch.d.ts +16 -0
  68. package/dist/components/form/switch.js +30 -0
  69. package/dist/components/form/textarea.d.ts +17 -0
  70. package/dist/components/form/textarea.js +19 -0
  71. package/dist/components/index.d.ts +7 -0
  72. package/dist/components/index.js +7 -0
  73. package/dist/components/navigation/breadcrumb.d.ts +13 -0
  74. package/dist/components/navigation/breadcrumb.js +25 -0
  75. package/dist/components/navigation/index.d.ts +5 -0
  76. package/dist/components/navigation/index.js +5 -0
  77. package/dist/components/navigation/navbar.d.ts +20 -0
  78. package/dist/components/navigation/navbar.js +22 -0
  79. package/dist/components/navigation/pagination.d.ts +15 -0
  80. package/dist/components/navigation/pagination.js +31 -0
  81. package/dist/components/navigation/scrollspy.d.ts +23 -0
  82. package/dist/components/navigation/scrollspy.js +43 -0
  83. package/dist/components/navigation/tabs.d.ts +15 -0
  84. package/dist/components/navigation/tabs.js +56 -0
  85. package/dist/components/overlay/collapse.d.ts +20 -0
  86. package/dist/components/overlay/collapse.js +27 -0
  87. package/dist/components/overlay/dropdown.d.ts +33 -0
  88. package/dist/components/overlay/dropdown.js +41 -0
  89. package/dist/components/overlay/index.d.ts +7 -0
  90. package/dist/components/overlay/index.js +7 -0
  91. package/dist/components/overlay/media-modal.d.ts +15 -0
  92. package/dist/components/overlay/media-modal.js +83 -0
  93. package/dist/components/overlay/modal.d.ts +32 -0
  94. package/dist/components/overlay/modal.js +47 -0
  95. package/dist/components/overlay/offcanvas.d.ts +20 -0
  96. package/dist/components/overlay/offcanvas.js +33 -0
  97. package/dist/components/overlay/popover.d.ts +19 -0
  98. package/dist/components/overlay/popover.js +24 -0
  99. package/dist/components/overlay/tooltip.d.ts +17 -0
  100. package/dist/components/overlay/tooltip.js +21 -0
  101. package/dist/components/utils.d.ts +3 -0
  102. package/dist/components/utils.js +25 -0
  103. package/package.json +111 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aby Dahana
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # Aksara UI
2
+
3
+ Bootstrap readability with Tailwind flexibility: a static CSS and vanilla JavaScript frontend framework.
4
+
5
+ Aksara UI is built around one promise: users can ship a modern interface with static files only. No Node.js, bundler, compiler, JIT server, runtime style injection, or framework adapter is required in production.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - **Static CSS Ahead-of-Time**: Predictable utility ranges and component classes precompiled into pure CSS. Dynamic class names are safe because utilities already exist in the stylesheet.
12
+ - **Strict Variant Ordering**: Clean, enforceable modifier hierarchy (`theme -> breakpoint -> state -> utility`, e.g. `dark:md:hover:border-primary`).
13
+ - **RTL-First Architecture**: Built on CSS logical properties (`ms`, `me`, `ps`, `pe`, `text-start`, `text-end`) ensuring seamless bidirectional layout support.
14
+ - **Zero-Dependency Vanilla JS**: Modular, lightweight interactive components (Modal, Dropdown, Tooltip, Toast, Offcanvas, Accordion, Tab) accessible globally via `Aksara` or modular imports.
15
+ - **Icon Integration**: Bundled with Material Design Icons (`@mdi/font`).
16
+
17
+ ---
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ npm install @abydahana/aksara-ui
23
+ ```
24
+
25
+ ```bash
26
+ yarn add @abydahana/aksara-ui
27
+ ```
28
+
29
+ ```bash
30
+ pnpm add @abydahana/aksara-ui
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Quick Start
36
+
37
+ ### 1. In a Modern Bundler (Vite, Next.js, Webpack)
38
+
39
+ ```ts
40
+ import "@abydahana/aksara-ui/css";
41
+ import Aksara from "@abydahana/aksara-ui";
42
+
43
+ // Initialize data-API attributes across the document
44
+ Aksara.init();
45
+ ```
46
+
47
+ ### 2. In Plain HTML (via CDN)
48
+
49
+ ```html
50
+ <!DOCTYPE html>
51
+ <html lang="en">
52
+ <head>
53
+ <meta charset="UTF-8" />
54
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
55
+ <title>Aksara UI Demo</title>
56
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@abydahana/aksara-ui/dist/aksara.min.css" />
57
+ </head>
58
+ <body>
59
+ <div class="container py-20">
60
+ <button class="btn btn-primary" data-modal="#demoModal">Open Modal</button>
61
+
62
+ <div class="modal fade" id="demoModal" tabindex="-1">
63
+ <div class="modal-dialog">
64
+ <div class="modal-content">
65
+ <div class="modal-header">
66
+ <h5 class="modal-title">Hello Aksara</h5>
67
+ <button type="button" class="btn-close" data-dismiss="modal"></button>
68
+ </div>
69
+ <div class="modal-body">
70
+ <p>Modern frontend framework with zero runtime dependencies.</p>
71
+ </div>
72
+ <div class="modal-footer">
73
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ <script src="https://cdn.jsdelivr.net/npm/@abydahana/aksara-ui/dist/aksara.min.js"></script>
81
+ <script>
82
+ Aksara.init();
83
+ </script>
84
+ </body>
85
+ </html>
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Package Subpath Exports
91
+
92
+ | Import Path | Output |
93
+ | ----------------------------------- | ---------------------------------- |
94
+ | `@abydahana/aksara-ui` | JavaScript entry point (ESM / CJS) |
95
+ | `@abydahana/aksara-ui/css` | Standard compiled CSS bundle |
96
+ | `@abydahana/aksara-ui/css/min` | Minified production CSS bundle |
97
+ | `@abydahana/aksara-ui/components/*` | Specific component scripts & types |
98
+
99
+ ---
100
+
101
+ ## JavaScript API
102
+
103
+ ```ts
104
+ import Aksara from "@abydahana/aksara-ui";
105
+
106
+ // Modal
107
+ const modal = Aksara.modal("#myModal", {
108
+ backdrop: true,
109
+ keyboard: true
110
+ });
111
+ modal.show();
112
+ modal.hide();
113
+
114
+ // Tooltip
115
+ Aksara.tooltip("[data-tooltip]", {
116
+ placement: "top",
117
+ container: "body"
118
+ });
119
+
120
+ // Toast
121
+ Aksara.toast("#notification", {
122
+ delay: 5000
123
+ }).show();
124
+
125
+ // Dropdown
126
+ Aksara.dropdown("#profileMenu").toggle();
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Development
132
+
133
+ ```bash
134
+ # Format, lint, and build all at once
135
+ npm run all
136
+
137
+ # Build CSS, JS bundles, and documentation assets
138
+ npm run build
139
+
140
+ # Run unit tests
141
+ npm run test
142
+
143
+ # Type check
144
+ npm run check
145
+
146
+ # Lint source files
147
+ npm run lint
148
+
149
+ # Automatically fix linting issues
150
+ npm run lint:fix
151
+
152
+ # Format source files with Prettier
153
+ npm run format
154
+
155
+ # Verify formatting and linting
156
+ npm run format:check
157
+ ```
158
+
159
+ ---
160
+
161
+ ## License
162
+
163
+ MIT © Aby Dahana