@diwauhris/ui 1.7.4 → 1.7.6

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 (38) hide show
  1. package/README.md +24 -64
  2. package/lib/assets/ui.css +168 -7
  3. package/lib/index.cjs +892 -321
  4. package/lib/index.mjs +892 -321
  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/switch/Switch.d.ts +6 -3
  34. package/lib/types/ui-library/gallery/textarea/Textarea.d.ts +3 -1
  35. package/lib/types/ui-library/gallery/timeline/Timeline.d.ts +4 -2
  36. package/lib/types/ui-library/gallery/tooltip/Tooltip.d.ts +8 -6
  37. package/lib/types/ui-library/index.d.ts +4 -2
  38. 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));
@@ -2959,6 +2967,11 @@
2959
2967
  padding: 2rem;
2960
2968
  }
2961
2969
 
2970
+ .px-0\.5 {
2971
+ padding-left: 0.125rem;
2972
+ padding-right: 0.125rem;
2973
+ }
2974
+
2962
2975
  .px-1 {
2963
2976
  padding-left: 0.25rem;
2964
2977
  padding-right: 0.25rem;
@@ -3159,6 +3172,10 @@
3159
3172
  padding-left: 0.5rem;
3160
3173
  }
3161
3174
 
3175
+ .pl-2\.5 {
3176
+ padding-left: 0.625rem;
3177
+ }
3178
+
3162
3179
  .pl-3 {
3163
3180
  padding-left: 0.75rem;
3164
3181
  }
@@ -3315,6 +3332,10 @@
3315
3332
  line-height: 1;
3316
3333
  }
3317
3334
 
3335
+ .text-\[0\.8125rem\] {
3336
+ font-size: 0.8125rem;
3337
+ }
3338
+
3318
3339
  .text-\[100px\] {
3319
3340
  font-size: 100px;
3320
3341
  }
@@ -3586,6 +3607,16 @@
3586
3607
  color: rgb(37 99 235 / var(--tw-text-opacity, 1));
3587
3608
  }
3588
3609
 
3610
+ .text-blue-700 {
3611
+ --tw-text-opacity: 1;
3612
+ color: rgb(29 78 216 / var(--tw-text-opacity, 1));
3613
+ }
3614
+
3615
+ .text-blue-800 {
3616
+ --tw-text-opacity: 1;
3617
+ color: rgb(30 64 175 / var(--tw-text-opacity, 1));
3618
+ }
3619
+
3589
3620
  .text-brand-blue {
3590
3621
  --tw-text-opacity: 1;
3591
3622
  color: rgb(3 78 162 / var(--tw-text-opacity, 1));
@@ -4094,6 +4125,12 @@
4094
4125
  transition-duration: 150ms;
4095
4126
  }
4096
4127
 
4128
+ .transition-\[grid-template-rows\] {
4129
+ transition-property: grid-template-rows;
4130
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
4131
+ transition-duration: 150ms;
4132
+ }
4133
+
4097
4134
  .transition-\[width\] {
4098
4135
  transition-property: width;
4099
4136
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -4152,6 +4189,52 @@
4152
4189
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
4153
4190
  }
4154
4191
 
4192
+ @keyframes enter {
4193
+ from {
4194
+ opacity: var(--tw-enter-opacity, 1);
4195
+ 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));
4196
+ }
4197
+ }
4198
+
4199
+ @keyframes exit {
4200
+ to {
4201
+ opacity: var(--tw-exit-opacity, 1);
4202
+ 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));
4203
+ }
4204
+ }
4205
+
4206
+ .duration-100 {
4207
+ animation-duration: 100ms;
4208
+ }
4209
+
4210
+ .duration-150 {
4211
+ animation-duration: 150ms;
4212
+ }
4213
+
4214
+ .duration-200 {
4215
+ animation-duration: 200ms;
4216
+ }
4217
+
4218
+ .duration-300 {
4219
+ animation-duration: 300ms;
4220
+ }
4221
+
4222
+ .duration-500 {
4223
+ animation-duration: 500ms;
4224
+ }
4225
+
4226
+ .ease-in-out {
4227
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
4228
+ }
4229
+
4230
+ .ease-out {
4231
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
4232
+ }
4233
+
4234
+ .running {
4235
+ animation-play-state: running;
4236
+ }
4237
+
4155
4238
  .\[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
4239
  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
4240
  }
@@ -4228,6 +4311,29 @@ body {
4228
4311
  @keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
4229
4312
  .skeleton-bar { display: inline-block; border-radius: 4px; background: #dde3ec; animation: skeleton-pulse 1.4s ease-in-out infinite; }
4230
4313
 
4314
+ @keyframes skeleton-shimmer {
4315
+ from { background-position: -200% center; }
4316
+ to { background-position: 200% center; }
4317
+ }
4318
+
4319
+ .skeleton-shimmer {
4320
+ background: linear-gradient(
4321
+ 90deg,
4322
+ #dde3ec 25%,
4323
+ #eef1f6 50%,
4324
+ #dde3ec 75%
4325
+ );
4326
+ background-size: 200% 100%;
4327
+ animation: skeleton-shimmer 1.6s linear infinite;
4328
+ }
4329
+
4330
+ @media (prefers-reduced-motion: reduce) {
4331
+ .skeleton-shimmer {
4332
+ animation: none;
4333
+ background: #dde3ec;
4334
+ }
4335
+ }
4336
+
4231
4337
  /* ── Field shake ─────────────────────────────────────────────────────────── */
4232
4338
  @keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
4233
4339
  .shake { animation: shake 0.4s ease-in-out; }
@@ -4447,6 +4553,10 @@ body {
4447
4553
  --tw-border-opacity: 1;
4448
4554
  border-color: rgb(251 113 133 / var(--tw-border-opacity, 1));
4449
4555
  }
4556
+ .focus-within\:bg-white:focus-within {
4557
+ --tw-bg-opacity: 1;
4558
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
4559
+ }
4450
4560
  .focus-within\:outline-none:focus-within {
4451
4561
  outline: 2px solid transparent;
4452
4562
  outline-offset: 2px;
@@ -4604,8 +4714,9 @@ body {
4604
4714
  --tw-bg-opacity: 1;
4605
4715
  background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));
4606
4716
  }
4607
- .hover\:bg-slate-100\/40:hover {
4608
- background-color: rgb(241 245 249 / 0.4);
4717
+ .hover\:bg-slate-200:hover {
4718
+ --tw-bg-opacity: 1;
4719
+ background-color: rgb(226 232 240 / var(--tw-bg-opacity, 1));
4609
4720
  }
4610
4721
  .hover\:bg-slate-50:hover {
4611
4722
  --tw-bg-opacity: 1;
@@ -4734,6 +4845,9 @@ body {
4734
4845
  --tw-shadow-color: rgb(3 78 162 / 0.3);
4735
4846
  --tw-shadow: var(--tw-shadow-colored);
4736
4847
  }
4848
+ .focus\:w-64:focus {
4849
+ width: 16rem;
4850
+ }
4737
4851
  .focus\:border-\[\#00377B\]:focus {
4738
4852
  --tw-border-opacity: 1;
4739
4853
  border-color: rgb(0 55 123 / var(--tw-border-opacity, 1));
@@ -4756,6 +4870,10 @@ body {
4756
4870
  --tw-border-opacity: 1;
4757
4871
  border-color: rgb(251 113 133 / var(--tw-border-opacity, 1));
4758
4872
  }
4873
+ .focus\:bg-white:focus {
4874
+ --tw-bg-opacity: 1;
4875
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
4876
+ }
4759
4877
  .focus\:outline-none:focus {
4760
4878
  outline: 2px solid transparent;
4761
4879
  outline-offset: 2px;
@@ -4793,6 +4911,10 @@ body {
4793
4911
  --tw-bg-opacity: 1;
4794
4912
  background-color: rgb(238 242 248 / var(--tw-bg-opacity, 1));
4795
4913
  }
4914
+ .focus-visible\:bg-blue-50:focus-visible {
4915
+ --tw-bg-opacity: 1;
4916
+ background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
4917
+ }
4796
4918
  .focus-visible\:opacity-100:focus-visible {
4797
4919
  opacity: 1;
4798
4920
  }
@@ -5029,6 +5151,36 @@ body {
5029
5151
  .peer:focus-visible ~ .peer-focus-visible\:ring-offset-1 {
5030
5152
  --tw-ring-offset-width: 1px;
5031
5153
  }
5154
+ .data-\[state\=open\]\:animate-in[data-state="open"] {
5155
+ animation-name: enter;
5156
+ animation-duration: 150ms;
5157
+ --tw-enter-opacity: initial;
5158
+ --tw-enter-scale: initial;
5159
+ --tw-enter-rotate: initial;
5160
+ --tw-enter-translate-x: initial;
5161
+ --tw-enter-translate-y: initial;
5162
+ }
5163
+ .data-\[state\=closed\]\:animate-out[data-state="closed"] {
5164
+ animation-name: exit;
5165
+ animation-duration: 150ms;
5166
+ --tw-exit-opacity: initial;
5167
+ --tw-exit-scale: initial;
5168
+ --tw-exit-rotate: initial;
5169
+ --tw-exit-translate-x: initial;
5170
+ --tw-exit-translate-y: initial;
5171
+ }
5172
+ .data-\[state\=closed\]\:fade-out-0[data-state="closed"] {
5173
+ --tw-exit-opacity: 0;
5174
+ }
5175
+ .data-\[state\=open\]\:fade-in-0[data-state="open"] {
5176
+ --tw-enter-opacity: 0;
5177
+ }
5178
+ .data-\[state\=closed\]\:zoom-out-95[data-state="closed"] {
5179
+ --tw-exit-scale: .95;
5180
+ }
5181
+ .data-\[state\=open\]\:zoom-in-95[data-state="open"] {
5182
+ --tw-enter-scale: .95;
5183
+ }
5032
5184
  @media (prefers-reduced-motion: no-preference) {
5033
5185
  @keyframes pulse {
5034
5186
  50% {
@@ -5054,6 +5206,9 @@ body {
5054
5206
  .sm\:inline {
5055
5207
  display: inline;
5056
5208
  }
5209
+ .sm\:flex {
5210
+ display: flex;
5211
+ }
5057
5212
  .sm\:grid-cols-2 {
5058
5213
  grid-template-columns: repeat(2, minmax(0, 1fr));
5059
5214
  }
@@ -5223,6 +5378,12 @@ body {
5223
5378
  grid-template-columns: 340px minmax(0,1fr);
5224
5379
  }
5225
5380
  }
5381
+ .\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button {
5382
+ display: none;
5383
+ }
5384
+ .\[\&\:\:-webkit-search-decoration\]\:hidden::-webkit-search-decoration {
5385
+ display: none;
5386
+ }
5226
5387
  .\[\&\>svg\]\:h-24>svg {
5227
5388
  height: 6rem;
5228
5389
  }