@diwauhris/ui 1.7.4 → 1.7.7

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 (39) hide show
  1. package/README.md +24 -64
  2. package/lib/assets/ui.css +189 -7
  3. package/lib/index.cjs +935 -340
  4. package/lib/index.mjs +935 -340
  5. package/lib/types/lib/composeRefs.d.ts +9 -0
  6. package/lib/types/ui-library/gallery/accordion/Accordion.d.ts +1 -1
  7. package/lib/types/ui-library/gallery/breadcrumb/Breadcrumb.d.ts +2 -1
  8. package/lib/types/ui-library/gallery/button/Button.d.ts +7 -1
  9. package/lib/types/ui-library/gallery/card/Card.d.ts +4 -3
  10. package/lib/types/ui-library/gallery/checkbox/Checkbox.d.ts +3 -1
  11. package/lib/types/ui-library/gallery/column-manager/ColumnManager.d.ts +2 -1
  12. package/lib/types/ui-library/gallery/combobox/Combobox.d.ts +14 -7
  13. package/lib/types/ui-library/gallery/command-palette/CommandPalette.d.ts +3 -1
  14. package/lib/types/ui-library/gallery/confirm-action/ConfirmAction.d.ts +3 -1
  15. package/lib/types/ui-library/gallery/confirm-dialog/ConfirmDialog.d.ts +3 -1
  16. package/lib/types/ui-library/gallery/date-picker/DatePicker.d.ts +3 -1
  17. package/lib/types/ui-library/gallery/dialog/Dialog.d.ts +9 -1
  18. package/lib/types/ui-library/gallery/drawer/Drawer.d.ts +3 -1
  19. package/lib/types/ui-library/gallery/field/Field.d.ts +2 -1
  20. package/lib/types/ui-library/gallery/field-input/FieldInput.d.ts +3 -1
  21. package/lib/types/ui-library/gallery/file-upload/FileUpload.d.ts +7 -1
  22. package/lib/types/ui-library/gallery/icon-button/IconButton.d.ts +6 -1
  23. package/lib/types/ui-library/gallery/input/Input.d.ts +3 -1
  24. package/lib/types/ui-library/gallery/menu/Menu.d.ts +7 -1
  25. package/lib/types/ui-library/gallery/modal/Modal.d.ts +11 -1
  26. package/lib/types/ui-library/gallery/pagination/Pagination.d.ts +2 -1
  27. package/lib/types/ui-library/gallery/popover/Popover.d.ts +3 -2
  28. package/lib/types/ui-library/gallery/radio-group/RadioGroup.d.ts +2 -1
  29. package/lib/types/ui-library/gallery/search/Search.d.ts +23 -0
  30. package/lib/types/ui-library/gallery/select/Select.d.ts +13 -1
  31. package/lib/types/ui-library/gallery/skeleton/Skeleton.d.ts +19 -9
  32. package/lib/types/ui-library/gallery/stat-card/Statistic.d.ts +2 -1
  33. package/lib/types/ui-library/gallery/stepper/Stepper.d.ts +3 -1
  34. package/lib/types/ui-library/gallery/switch/Switch.d.ts +6 -3
  35. package/lib/types/ui-library/gallery/textarea/Textarea.d.ts +3 -1
  36. package/lib/types/ui-library/gallery/timeline/Timeline.d.ts +4 -2
  37. package/lib/types/ui-library/gallery/tooltip/Tooltip.d.ts +8 -6
  38. package/lib/types/ui-library/index.d.ts +4 -2
  39. package/package.json +2 -3
package/README.md CHANGED
@@ -1,75 +1,35 @@
1
- # React + TypeScript + Vite
1
+ # UHRIS Component Gallery
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ Developer toolkit for the `@diwauhris/ui` component library.
4
4
 
5
- Currently, two official plugins are available:
5
+ > **This gallery is a developer reference, not a visual acceptance standard.**
6
+ > It documents component APIs, interaction behaviour, and default visual states.
7
+ > Application screens are expected to customise tone, content, labels, icon choice, and size
8
+ > for each feature context. Acceptance criteria should be evaluated against the feature
9
+ > specification — not pixel-for-pixel visual match with this gallery.
6
10
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
11
+ ## Running the gallery
9
12
 
10
- ## React Compiler
11
-
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
-
14
- ## Expanding the ESLint configuration
15
-
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
-
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
25
-
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
13
+ ```bash
14
+ npm install
15
+ npm run dev # starts at http://localhost:5174
16
+ ```
32
17
 
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
42
- },
43
- ])
18
+ ## What this gallery contains
44
19
 
45
- ```
20
+ - **Component pages** — API reference, live playground, and implementation examples for every `@diwauhris/ui` component.
21
+ - **Foundations** — Design tokens: colors, typography, spacing, elevation, and motion.
22
+ - **Patterns** — Real HRIS composition patterns (approval actions, modal footers, page headers).
46
23
 
47
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
24
+ ## Package test
48
25
 
49
- ```js
50
- // eslint.config.js
51
- import reactX from 'eslint-plugin-react-x'
52
- import reactDom from 'eslint-plugin-react-dom'
26
+ Navigate to `/ui-library/package-test` to verify the installed `@diwauhris/ui` build exposes
27
+ all expected exports without import errors.
53
28
 
54
- export default defineConfig([
55
- globalIgnores(['dist']),
56
- {
57
- files: ['**/*.{ts,tsx}'],
58
- extends: [
59
- // Other configs...
60
- // Enable lint rules for React
61
- reactX.configs['recommended-typescript'],
62
- // Enable lint rules for React DOM
63
- reactDom.configs.recommended,
64
- ],
65
- languageOptions: {
66
- parserOptions: {
67
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
68
- tsconfigRootDir: import.meta.dirname,
69
- },
70
- // other options...
71
- },
72
- },
73
- ])
29
+ ## Publishing a new version
74
30
 
31
+ ```bash
32
+ cd DIWA-UHRIS-UI-GUIDELINES
33
+ npm run build:lib
34
+ npm publish
75
35
  ```
package/lib/assets/ui.css CHANGED
@@ -492,11 +492,6 @@
492
492
  margin-right: 0.25rem;
493
493
  }
494
494
 
495
- .mx-1\.5 {
496
- margin-left: 0.375rem;
497
- margin-right: 0.375rem;
498
- }
499
-
500
495
  .mx-2 {
501
496
  margin-left: 0.5rem;
502
497
  margin-right: 0.5rem;
@@ -1559,6 +1554,14 @@
1559
1554
  grid-template-columns: minmax(8rem,14rem) 1fr;
1560
1555
  }
1561
1556
 
1557
+ .grid-rows-\[0fr\] {
1558
+ grid-template-rows: 0fr;
1559
+ }
1560
+
1561
+ .grid-rows-\[1fr\] {
1562
+ grid-template-rows: 1fr;
1563
+ }
1564
+
1562
1565
  .flex-col {
1563
1566
  flex-direction: column;
1564
1567
  }
@@ -2092,6 +2095,11 @@
2092
2095
  border-color: rgb(0 0 0 / 0.5);
2093
2096
  }
2094
2097
 
2098
+ .border-blue-100 {
2099
+ --tw-border-opacity: 1;
2100
+ border-color: rgb(219 234 254 / var(--tw-border-opacity, 1));
2101
+ }
2102
+
2095
2103
  .border-blue-600 {
2096
2104
  --tw-border-opacity: 1;
2097
2105
  border-color: rgb(37 99 235 / var(--tw-border-opacity, 1));
@@ -2324,6 +2332,10 @@
2324
2332
  border-color: rgb(255 255 255 / 0.2);
2325
2333
  }
2326
2334
 
2335
+ .border-white\/30 {
2336
+ border-color: rgb(255 255 255 / 0.3);
2337
+ }
2338
+
2327
2339
  .border-white\/50 {
2328
2340
  border-color: rgb(255 255 255 / 0.5);
2329
2341
  }
@@ -2366,6 +2378,10 @@
2366
2378
  background-color: rgb(45 138 202 / var(--tw-bg-opacity, 1));
2367
2379
  }
2368
2380
 
2381
+ .bg-\[\#2D8ACA\]\/50 {
2382
+ background-color: rgb(45 138 202 / 0.5);
2383
+ }
2384
+
2369
2385
  .bg-\[\#B91C1C\] {
2370
2386
  --tw-bg-opacity: 1;
2371
2387
  background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));
@@ -2871,6 +2887,10 @@
2871
2887
  background-color: rgb(255 255 255 / 0.3);
2872
2888
  }
2873
2889
 
2890
+ .bg-white\/5 {
2891
+ background-color: rgb(255 255 255 / 0.05);
2892
+ }
2893
+
2874
2894
  .bg-white\/60 {
2875
2895
  background-color: rgb(255 255 255 / 0.6);
2876
2896
  }
@@ -2959,6 +2979,11 @@
2959
2979
  padding: 2rem;
2960
2980
  }
2961
2981
 
2982
+ .px-0\.5 {
2983
+ padding-left: 0.125rem;
2984
+ padding-right: 0.125rem;
2985
+ }
2986
+
2962
2987
  .px-1 {
2963
2988
  padding-left: 0.25rem;
2964
2989
  padding-right: 0.25rem;
@@ -3159,6 +3184,10 @@
3159
3184
  padding-left: 0.5rem;
3160
3185
  }
3161
3186
 
3187
+ .pl-2\.5 {
3188
+ padding-left: 0.625rem;
3189
+ }
3190
+
3162
3191
  .pl-3 {
3163
3192
  padding-left: 0.75rem;
3164
3193
  }
@@ -3315,6 +3344,10 @@
3315
3344
  line-height: 1;
3316
3345
  }
3317
3346
 
3347
+ .text-\[0\.8125rem\] {
3348
+ font-size: 0.8125rem;
3349
+ }
3350
+
3318
3351
  .text-\[100px\] {
3319
3352
  font-size: 100px;
3320
3353
  }
@@ -3586,6 +3619,16 @@
3586
3619
  color: rgb(37 99 235 / var(--tw-text-opacity, 1));
3587
3620
  }
3588
3621
 
3622
+ .text-blue-700 {
3623
+ --tw-text-opacity: 1;
3624
+ color: rgb(29 78 216 / var(--tw-text-opacity, 1));
3625
+ }
3626
+
3627
+ .text-blue-800 {
3628
+ --tw-text-opacity: 1;
3629
+ color: rgb(30 64 175 / var(--tw-text-opacity, 1));
3630
+ }
3631
+
3589
3632
  .text-brand-blue {
3590
3633
  --tw-text-opacity: 1;
3591
3634
  color: rgb(3 78 162 / var(--tw-text-opacity, 1));
@@ -3775,6 +3818,10 @@
3775
3818
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
3776
3819
  }
3777
3820
 
3821
+ .text-white\/20 {
3822
+ color: rgb(255 255 255 / 0.2);
3823
+ }
3824
+
3778
3825
  .text-white\/30 {
3779
3826
  color: rgb(255 255 255 / 0.3);
3780
3827
  }
@@ -3928,6 +3975,11 @@
3928
3975
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
3929
3976
  }
3930
3977
 
3978
+ .shadow-black\/20 {
3979
+ --tw-shadow-color: rgb(0 0 0 / 0.2);
3980
+ --tw-shadow: var(--tw-shadow-colored);
3981
+ }
3982
+
3931
3983
  .shadow-brand-blue\/15 {
3932
3984
  --tw-shadow-color: rgb(3 78 162 / 0.15);
3933
3985
  --tw-shadow: var(--tw-shadow-colored);
@@ -4094,6 +4146,12 @@
4094
4146
  transition-duration: 150ms;
4095
4147
  }
4096
4148
 
4149
+ .transition-\[grid-template-rows\] {
4150
+ transition-property: grid-template-rows;
4151
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
4152
+ transition-duration: 150ms;
4153
+ }
4154
+
4097
4155
  .transition-\[width\] {
4098
4156
  transition-property: width;
4099
4157
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -4152,6 +4210,52 @@
4152
4210
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
4153
4211
  }
4154
4212
 
4213
+ @keyframes enter {
4214
+ from {
4215
+ opacity: var(--tw-enter-opacity, 1);
4216
+ transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
4217
+ }
4218
+ }
4219
+
4220
+ @keyframes exit {
4221
+ to {
4222
+ opacity: var(--tw-exit-opacity, 1);
4223
+ transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
4224
+ }
4225
+ }
4226
+
4227
+ .duration-100 {
4228
+ animation-duration: 100ms;
4229
+ }
4230
+
4231
+ .duration-150 {
4232
+ animation-duration: 150ms;
4233
+ }
4234
+
4235
+ .duration-200 {
4236
+ animation-duration: 200ms;
4237
+ }
4238
+
4239
+ .duration-300 {
4240
+ animation-duration: 300ms;
4241
+ }
4242
+
4243
+ .duration-500 {
4244
+ animation-duration: 500ms;
4245
+ }
4246
+
4247
+ .ease-in-out {
4248
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
4249
+ }
4250
+
4251
+ .ease-out {
4252
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
4253
+ }
4254
+
4255
+ .running {
4256
+ animation-play-state: running;
4257
+ }
4258
+
4155
4259
  .\[background-image\:linear-gradient\(rgba\(148\2c 163\2c 184\2c 0\.15\)_1px\2c transparent_1px\)\2c linear-gradient\(90deg\2c rgba\(148\2c 163\2c 184\2c 0\.15\)_1px\2c transparent_1px\)\] {
4156
4260
  background-image: linear-gradient(rgba(148,163,184,0.15) 1px,transparent 1px),linear-gradient(90deg,rgba(148,163,184,0.15) 1px,transparent 1px);
4157
4261
  }
@@ -4228,6 +4332,29 @@ body {
4228
4332
  @keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
4229
4333
  .skeleton-bar { display: inline-block; border-radius: 4px; background: #dde3ec; animation: skeleton-pulse 1.4s ease-in-out infinite; }
4230
4334
 
4335
+ @keyframes skeleton-shimmer {
4336
+ from { background-position: -200% center; }
4337
+ to { background-position: 200% center; }
4338
+ }
4339
+
4340
+ .skeleton-shimmer {
4341
+ background: linear-gradient(
4342
+ 90deg,
4343
+ #dde3ec 25%,
4344
+ #eef1f6 50%,
4345
+ #dde3ec 75%
4346
+ );
4347
+ background-size: 200% 100%;
4348
+ animation: skeleton-shimmer 1.6s linear infinite;
4349
+ }
4350
+
4351
+ @media (prefers-reduced-motion: reduce) {
4352
+ .skeleton-shimmer {
4353
+ animation: none;
4354
+ background: #dde3ec;
4355
+ }
4356
+ }
4357
+
4231
4358
  /* ── Field shake ─────────────────────────────────────────────────────────── */
4232
4359
  @keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
4233
4360
  .shake { animation: shake 0.4s ease-in-out; }
@@ -4447,6 +4574,10 @@ body {
4447
4574
  --tw-border-opacity: 1;
4448
4575
  border-color: rgb(251 113 133 / var(--tw-border-opacity, 1));
4449
4576
  }
4577
+ .focus-within\:bg-white:focus-within {
4578
+ --tw-bg-opacity: 1;
4579
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
4580
+ }
4450
4581
  .focus-within\:outline-none:focus-within {
4451
4582
  outline: 2px solid transparent;
4452
4583
  outline-offset: 2px;
@@ -4604,8 +4735,9 @@ body {
4604
4735
  --tw-bg-opacity: 1;
4605
4736
  background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));
4606
4737
  }
4607
- .hover\:bg-slate-100\/40:hover {
4608
- background-color: rgb(241 245 249 / 0.4);
4738
+ .hover\:bg-slate-200:hover {
4739
+ --tw-bg-opacity: 1;
4740
+ background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));
4609
4741
  }
4610
4742
  .hover\:bg-slate-50:hover {
4611
4743
  --tw-bg-opacity: 1;
@@ -4734,6 +4866,9 @@ body {
4734
4866
  --tw-shadow-color: rgb(3 78 162 / 0.3);
4735
4867
  --tw-shadow: var(--tw-shadow-colored);
4736
4868
  }
4869
+ .focus\:w-64:focus {
4870
+ width: 16rem;
4871
+ }
4737
4872
  .focus\:border-\[\#00377B\]:focus {
4738
4873
  --tw-border-opacity: 1;
4739
4874
  border-color: rgb(0 55 123 / var(--tw-border-opacity, 1));
@@ -4756,6 +4891,10 @@ body {
4756
4891
  --tw-border-opacity: 1;
4757
4892
  border-color: rgb(251 113 133 / var(--tw-border-opacity, 1));
4758
4893
  }
4894
+ .focus\:bg-white:focus {
4895
+ --tw-bg-opacity: 1;
4896
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
4897
+ }
4759
4898
  .focus\:outline-none:focus {
4760
4899
  outline: 2px solid transparent;
4761
4900
  outline-offset: 2px;
@@ -4793,6 +4932,10 @@ body {
4793
4932
  --tw-bg-opacity: 1;
4794
4933
  background-color: rgb(238 242 248 / var(--tw-bg-opacity, 1));
4795
4934
  }
4935
+ .focus-visible\:bg-blue-50:focus-visible {
4936
+ --tw-bg-opacity: 1;
4937
+ background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
4938
+ }
4796
4939
  .focus-visible\:opacity-100:focus-visible {
4797
4940
  opacity: 1;
4798
4941
  }
@@ -5029,6 +5172,36 @@ body {
5029
5172
  .peer:focus-visible ~ .peer-focus-visible\:ring-offset-1 {
5030
5173
  --tw-ring-offset-width: 1px;
5031
5174
  }
5175
+ .data-\[state\=open\]\:animate-in[data-state="open"] {
5176
+ animation-name: enter;
5177
+ animation-duration: 150ms;
5178
+ --tw-enter-opacity: initial;
5179
+ --tw-enter-scale: initial;
5180
+ --tw-enter-rotate: initial;
5181
+ --tw-enter-translate-x: initial;
5182
+ --tw-enter-translate-y: initial;
5183
+ }
5184
+ .data-\[state\=closed\]\:animate-out[data-state="closed"] {
5185
+ animation-name: exit;
5186
+ animation-duration: 150ms;
5187
+ --tw-exit-opacity: initial;
5188
+ --tw-exit-scale: initial;
5189
+ --tw-exit-rotate: initial;
5190
+ --tw-exit-translate-x: initial;
5191
+ --tw-exit-translate-y: initial;
5192
+ }
5193
+ .data-\[state\=closed\]\:fade-out-0[data-state="closed"] {
5194
+ --tw-exit-opacity: 0;
5195
+ }
5196
+ .data-\[state\=open\]\:fade-in-0[data-state="open"] {
5197
+ --tw-enter-opacity: 0;
5198
+ }
5199
+ .data-\[state\=closed\]\:zoom-out-95[data-state="closed"] {
5200
+ --tw-exit-scale: .95;
5201
+ }
5202
+ .data-\[state\=open\]\:zoom-in-95[data-state="open"] {
5203
+ --tw-enter-scale: .95;
5204
+ }
5032
5205
  @media (prefers-reduced-motion: no-preference) {
5033
5206
  @keyframes pulse {
5034
5207
  50% {
@@ -5054,6 +5227,9 @@ body {
5054
5227
  .sm\:inline {
5055
5228
  display: inline;
5056
5229
  }
5230
+ .sm\:flex {
5231
+ display: flex;
5232
+ }
5057
5233
  .sm\:grid-cols-2 {
5058
5234
  grid-template-columns: repeat(2, minmax(0, 1fr));
5059
5235
  }
@@ -5223,6 +5399,12 @@ body {
5223
5399
  grid-template-columns: 340px minmax(0,1fr);
5224
5400
  }
5225
5401
  }
5402
+ .\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button {
5403
+ display: none;
5404
+ }
5405
+ .\[\&\:\:-webkit-search-decoration\]\:hidden::-webkit-search-decoration {
5406
+ display: none;
5407
+ }
5226
5408
  .\[\&\>svg\]\:h-24>svg {
5227
5409
  height: 6rem;
5228
5410
  }