@creativecodeco/ui 0.6.0 → 0.6.2

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.
@@ -1,24 +1,22 @@
1
- /// <reference types="react" />
2
- /// <reference types="react" />
3
1
  import type { ButtonEvent } from '../types';
4
2
  export default function useSafeButtonProps({ onClick, onSubmit, loading, ...props }: React.ComponentPropsWithoutRef<'button'> & {
5
3
  loading?: boolean;
6
4
  }): {
7
5
  onClick: (event: ButtonEvent) => void;
8
6
  onSubmit: (event: ButtonEvent) => void;
9
- children?: import("react").ReactNode;
7
+ children?: import("react").ReactNode | undefined;
10
8
  color?: string | undefined;
11
9
  name?: string | undefined;
12
10
  disabled?: boolean | undefined;
13
11
  onChange?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
14
- value?: string | number | readonly string[] | undefined;
12
+ value?: string | readonly string[] | number | undefined;
15
13
  form?: string | undefined;
16
- formAction?: string | undefined;
14
+ formAction?: string | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
17
15
  formEncType?: string | undefined;
18
16
  formMethod?: string | undefined;
19
17
  formNoValidate?: boolean | undefined;
20
18
  formTarget?: string | undefined;
21
- type?: "button" | "reset" | "submit" | undefined;
19
+ type?: "submit" | "reset" | "button" | undefined;
22
20
  defaultChecked?: boolean | undefined;
23
21
  defaultValue?: string | number | readonly string[] | undefined;
24
22
  suppressContentEditableWarning?: boolean | undefined;
@@ -63,34 +61,34 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
63
61
  itemRef?: string | undefined;
64
62
  results?: number | undefined;
65
63
  security?: string | undefined;
66
- unselectable?: "off" | "on" | undefined;
67
- inputMode?: "search" | "email" | "tel" | "text" | "url" | "none" | "numeric" | "decimal" | undefined;
64
+ unselectable?: "on" | "off" | undefined;
65
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
68
66
  is?: string | undefined;
69
67
  "aria-activedescendant"?: string | undefined;
70
68
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
71
- "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
69
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
72
70
  "aria-braillelabel"?: string | undefined;
73
71
  "aria-brailleroledescription"?: string | undefined;
74
72
  "aria-busy"?: (boolean | "true" | "false") | undefined;
75
- "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
73
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
76
74
  "aria-colcount"?: number | undefined;
77
75
  "aria-colindex"?: number | undefined;
78
76
  "aria-colindextext"?: string | undefined;
79
77
  "aria-colspan"?: number | undefined;
80
78
  "aria-controls"?: string | undefined;
81
- "aria-current"?: boolean | "step" | "date" | "time" | "true" | "false" | "page" | "location" | undefined;
79
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
82
80
  "aria-describedby"?: string | undefined;
83
81
  "aria-description"?: string | undefined;
84
82
  "aria-details"?: string | undefined;
85
83
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
86
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
84
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
87
85
  "aria-errormessage"?: string | undefined;
88
86
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
89
87
  "aria-flowto"?: string | undefined;
90
88
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
91
- "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
89
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
92
90
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
93
- "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
91
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
94
92
  "aria-keyshortcuts"?: string | undefined;
95
93
  "aria-label"?: string | undefined;
96
94
  "aria-labelledby"?: string | undefined;
@@ -103,9 +101,9 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
103
101
  "aria-owns"?: string | undefined;
104
102
  "aria-placeholder"?: string | undefined;
105
103
  "aria-posinset"?: number | undefined;
106
- "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
104
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
107
105
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
108
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
106
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
109
107
  "aria-required"?: (boolean | "true" | "false") | undefined;
110
108
  "aria-roledescription"?: string | undefined;
111
109
  "aria-rowcount"?: number | undefined;
@@ -258,9 +256,7 @@ export default function useSafeButtonProps({ onClick, onSubmit, loading, ...prop
258
256
  onPointerCancel?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
259
257
  onPointerCancelCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
260
258
  onPointerEnter?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
261
- onPointerEnterCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
262
259
  onPointerLeave?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
263
- onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
264
260
  onPointerOver?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
265
261
  onPointerOverCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
266
262
  onPointerOut?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
@@ -1,5 +1,5 @@
1
1
  /*
2
- ! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
2
+ ! tailwindcss v3.4.9 | MIT License | https://tailwindcss.com
3
3
  *//*
4
4
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
5
5
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -179,6 +179,7 @@ textarea {
179
179
  font-size: 100%; /* 1 */
180
180
  font-weight: inherit; /* 1 */
181
181
  line-height: inherit; /* 1 */
182
+ letter-spacing: inherit; /* 1 */
182
183
  color: inherit; /* 1 */
183
184
  margin: 0; /* 2 */
184
185
  padding: 0; /* 3 */
@@ -199,9 +200,9 @@ select {
199
200
  */
200
201
 
201
202
  button,
202
- [type='button'],
203
- [type='reset'],
204
- [type='submit'] {
203
+ input:where([type='button']),
204
+ input:where([type='reset']),
205
+ input:where([type='submit']) {
205
206
  -webkit-appearance: button; /* 1 */
206
207
  background-color: transparent; /* 2 */
207
208
  background-image: none; /* 2 */
@@ -399,7 +400,7 @@ video {
399
400
  color: var(--fallback-bc,oklch(var(--bc)/1));
400
401
  }
401
402
 
402
- @supports not (color: oklch(0 0 0)) {
403
+ @supports not (color: oklch(0% 0 0)) {
403
404
 
404
405
  :root {
405
406
  color-scheme: light;
@@ -457,18 +458,26 @@ html {
457
458
  -webkit-tap-highlight-color: transparent;
458
459
  }
459
460
 
461
+ * {
462
+ scrollbar-color: color-mix(in oklch, currentColor 35%, transparent) transparent;
463
+ }
464
+
465
+ *:hover {
466
+ scrollbar-color: color-mix(in oklch, currentColor 60%, transparent) transparent;
467
+ }
468
+
460
469
  :root {
461
470
  color-scheme: light;
462
- --in: 0.7206 0.191 231.6;
471
+ --in: 72.06% 0.191 231.6;
463
472
  --su: 64.8% 0.150 160;
464
- --wa: 0.8471 0.199 83.87;
465
- --er: 0.7176 0.221 22.18;
466
- --pc: 0.89824 0.06192 275.75;
467
- --ac: 0.15352 0.0368 183.61;
468
- --inc: 0 0 0;
469
- --suc: 0 0 0;
470
- --wac: 0 0 0;
471
- --erc: 0 0 0;
473
+ --wa: 84.71% 0.199 83.87;
474
+ --er: 71.76% 0.221 22.18;
475
+ --pc: 89.824% 0.06192 275.75;
476
+ --ac: 15.352% 0.0368 183.61;
477
+ --inc: 0% 0 0;
478
+ --suc: 0% 0 0;
479
+ --wac: 0% 0 0;
480
+ --erc: 0% 0 0;
472
481
  --rounded-box: 1rem;
473
482
  --rounded-btn: 0.5rem;
474
483
  --rounded-badge: 1.9rem;
@@ -478,16 +487,16 @@ html {
478
487
  --border-btn: 1px;
479
488
  --tab-border: 1px;
480
489
  --tab-radius: 0.5rem;
481
- --p: 0.4912 0.3096 275.75;
482
- --s: 0.6971 0.329 342.55;
483
- --sc: 0.9871 0.0106 342.55;
484
- --a: 0.7676 0.184 183.61;
485
- --n: 0.321785 0.02476 255.701624;
486
- --nc: 0.894994 0.011585 252.096176;
487
- --b1: 1 0 0;
488
- --b2: 0.961151 0 0;
489
- --b3: 0.924169 0.00108 197.137559;
490
- --bc: 0.278078 0.029596 256.847952;
490
+ --p: 49.12% 0.3096 275.75;
491
+ --s: 69.71% 0.329 342.55;
492
+ --sc: 98.71% 0.0106 342.55;
493
+ --a: 76.76% 0.184 183.61;
494
+ --n: 32.1785% 0.02476 255.701624;
495
+ --nc: 89.4994% 0.011585 252.096176;
496
+ --b1: 100% 0 0;
497
+ --b2: 96.1151% 0 0;
498
+ --b3: 92.4169% 0.00108 197.137559;
499
+ --bc: 27.8078% 0.029596 256.847952;
491
500
  }
492
501
 
493
502
  *, ::before, ::after {
@@ -538,6 +547,10 @@ html {
538
547
  --tw-backdrop-opacity: ;
539
548
  --tw-backdrop-saturate: ;
540
549
  --tw-backdrop-sepia: ;
550
+ --tw-contain-size: ;
551
+ --tw-contain-layout: ;
552
+ --tw-contain-paint: ;
553
+ --tw-contain-style: ;
541
554
  }
542
555
 
543
556
  ::backdrop {
@@ -588,6 +601,10 @@ html {
588
601
  --tw-backdrop-opacity: ;
589
602
  --tw-backdrop-saturate: ;
590
603
  --tw-backdrop-sepia: ;
604
+ --tw-contain-size: ;
605
+ --tw-contain-layout: ;
606
+ --tw-contain-paint: ;
607
+ --tw-contain-style: ;
591
608
  }
592
609
  .container {
593
610
  width: 100%;
@@ -750,7 +767,6 @@ html {
750
767
  transition-duration: 200ms;
751
768
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
752
769
  border-width: var(--border-btn, 1px);
753
- animation: button-pop var(--animation-btn, 0.25s) ease-out;
754
770
  transition-property: color, background-color, border-color, opacity, box-shadow, transform;
755
771
  --tw-text-opacity: 1;
756
772
  color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
@@ -963,7 +979,7 @@ html {
963
979
  }
964
980
  }
965
981
 
966
- @supports not (color: oklch(0 0 0)) {
982
+ @supports not (color: oklch(0% 0 0)) {
967
983
 
968
984
  .btn:hover {
969
985
  background-color: var(--btn-color, var(--fallback-b2));
@@ -1106,7 +1122,7 @@ html {
1106
1122
  outline-offset: 2px;
1107
1123
  }
1108
1124
 
1109
- @supports (color: oklch(0 0 0)) {
1125
+ @supports (color: oklch(0% 0 0)) {
1110
1126
 
1111
1127
  :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover {
1112
1128
  background-color: var(--fallback-bc,oklch(var(--bc)/0.1));
@@ -1371,8 +1387,8 @@ html {
1371
1387
  appearance: none;
1372
1388
  height: 3rem;
1373
1389
  min-height: 3rem;
1374
- padding-left: 1rem;
1375
- padding-right: 2.5rem;
1390
+ padding-inline-start: 1rem;
1391
+ padding-inline-end: 2.5rem;
1376
1392
  font-size: 0.875rem;
1377
1393
  line-height: 1.25rem;
1378
1394
  line-height: 2;
@@ -1495,12 +1511,18 @@ html {
1495
1511
  font-size: 1rem;
1496
1512
  line-height: 1.5rem;
1497
1513
  }
1514
+ @media (prefers-reduced-motion: no-preference) {
1515
+
1516
+ .btn {
1517
+ animation: button-pop var(--animation-btn, 0.25s) ease-out;
1518
+ }
1519
+ }
1498
1520
  .btn:active:hover,
1499
1521
  .btn:active:focus {
1500
1522
  animation: button-pop 0s ease-out;
1501
1523
  transform: scale(var(--btn-focus-scale, 0.97));
1502
1524
  }
1503
- @supports not (color: oklch(0 0 0)) {
1525
+ @supports not (color: oklch(0% 0 0)) {
1504
1526
 
1505
1527
  .btn {
1506
1528
  background-color: var(--btn-color, var(--fallback-b2));
@@ -1558,7 +1580,7 @@ html {
1558
1580
  color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
1559
1581
  outline-color: var(--fallback-p,oklch(var(--p)/1));
1560
1582
  }
1561
- @supports (color: oklch(0 0 0)) {
1583
+ @supports (color: oklch(0% 0 0)) {
1562
1584
 
1563
1585
  .btn-primary {
1564
1586
  --btn-color: var(--p);
@@ -1691,8 +1713,15 @@ html {
1691
1713
  outline-offset: 2px;
1692
1714
  outline-color: var(--fallback-bc,oklch(var(--bc)/1));
1693
1715
  }
1716
+ .checkbox:disabled {
1717
+ border-width: 0px;
1718
+ cursor: not-allowed;
1719
+ border-color: transparent;
1720
+ --tw-bg-opacity: 1;
1721
+ background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
1722
+ opacity: 0.2;
1723
+ }
1694
1724
  .checkbox:checked,
1695
- .checkbox[checked="true"],
1696
1725
  .checkbox[aria-checked="true"] {
1697
1726
  background-repeat: no-repeat;
1698
1727
  animation: checkmark var(--animation-input, 0.2s) ease-out;
@@ -1718,13 +1747,6 @@ html {
1718
1747
  linear-gradient(-90deg, transparent 80%, var(--chkbg) 80%),
1719
1748
  linear-gradient(0deg, var(--chkbg) 43%, var(--chkfg) 43%, var(--chkfg) 57%, var(--chkbg) 57%);
1720
1749
  }
1721
- .checkbox:disabled {
1722
- cursor: not-allowed;
1723
- border-color: transparent;
1724
- --tw-bg-opacity: 1;
1725
- background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
1726
- opacity: 0.2;
1727
- }
1728
1750
  @keyframes checkmark {
1729
1751
 
1730
1752
  0% {
@@ -1895,7 +1917,8 @@ details.collapse summary::-webkit-details-marker {
1895
1917
  border-color: var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));
1896
1918
  outline-color: var(--fallback-er,oklch(var(--er)/1));
1897
1919
  }
1898
- .input-disabled,
1920
+ .input:has(> input[disabled]),
1921
+ .input-disabled,
1899
1922
  .input:disabled,
1900
1923
  .input[disabled] {
1901
1924
  cursor: not-allowed;
@@ -1905,16 +1928,20 @@ details.collapse summary::-webkit-details-marker {
1905
1928
  background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
1906
1929
  color: var(--fallback-bc,oklch(var(--bc)/0.4));
1907
1930
  }
1908
- .input-disabled::-moz-placeholder, .input:disabled::-moz-placeholder, .input[disabled]::-moz-placeholder {
1931
+ .input:has(> input[disabled])::-moz-placeholder, .input-disabled::-moz-placeholder, .input:disabled::-moz-placeholder, .input[disabled]::-moz-placeholder {
1909
1932
  color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));
1910
1933
  --tw-placeholder-opacity: 0.2;
1911
1934
  }
1912
- .input-disabled::placeholder,
1935
+ .input:has(> input[disabled])::placeholder,
1936
+ .input-disabled::placeholder,
1913
1937
  .input:disabled::placeholder,
1914
1938
  .input[disabled]::placeholder {
1915
1939
  color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));
1916
1940
  --tw-placeholder-opacity: 0.2;
1917
1941
  }
1942
+ .input:has(> input[disabled]) > input[disabled] {
1943
+ cursor: not-allowed;
1944
+ }
1918
1945
  .input::-webkit-date-and-time-value {
1919
1946
  text-align: inherit;
1920
1947
  }
@@ -1928,6 +1955,12 @@ details.collapse summary::-webkit-details-marker {
1928
1955
  margin-bottom: 0px;
1929
1956
  margin-inline-start: -1px;
1930
1957
  }
1958
+ .\!join > :where(*:not(:first-child)):is(.btn) {
1959
+ margin-inline-start: calc(var(--border-btn) * -1) !important;
1960
+ }
1961
+ .join > :where(*:not(:first-child)):is(.btn) {
1962
+ margin-inline-start: calc(var(--border-btn) * -1);
1963
+ }
1931
1964
  .join-item:focus {
1932
1965
  isolation: isolate;
1933
1966
  }
@@ -2176,8 +2209,7 @@ details.collapse summary::-webkit-details-marker {
2176
2209
  border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));
2177
2210
  --tw-bg-opacity: 1;
2178
2211
  background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
2179
- color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
2180
- --tw-text-opacity: 0.2;
2212
+ color: var(--fallback-bc,oklch(var(--bc)/0.4));
2181
2213
  }
2182
2214
  .select-disabled::-moz-placeholder, .select:disabled::-moz-placeholder, .select[disabled]::-moz-placeholder {
2183
2215
  color: var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));
@@ -2209,7 +2241,7 @@ details.collapse summary::-webkit-details-marker {
2209
2241
  background-position: -50%;
2210
2242
  }
2211
2243
  }
2212
- :is([dir="rtl"] .table) {
2244
+ .table:where([dir="rtl"], [dir="rtl"] *) {
2213
2245
  text-align: right;
2214
2246
  }
2215
2247
  .table :where(th, td) {
@@ -2225,8 +2257,7 @@ details.collapse summary::-webkit-details-marker {
2225
2257
  --tw-bg-opacity: 1;
2226
2258
  background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
2227
2259
  }
2228
- .table :where(thead, tbody) :where(tr:not(:last-child)),
2229
- .table :where(thead, tbody) :where(tr:first-child:last-child) {
2260
+ .table :where(thead tr, tbody tr:not(:last-child), tbody tr:first-child:last-child) {
2230
2261
  border-bottom-width: 1px;
2231
2262
  --tw-border-opacity: 1;
2232
2263
  border-bottom-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));
@@ -2238,6 +2269,11 @@ details.collapse summary::-webkit-details-marker {
2238
2269
  font-weight: 700;
2239
2270
  color: var(--fallback-bc,oklch(var(--bc)/0.6));
2240
2271
  }
2272
+ .table :where(tfoot) {
2273
+ border-top-width: 1px;
2274
+ --tw-border-opacity: 1;
2275
+ border-top-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));
2276
+ }
2241
2277
  @keyframes toast-pop {
2242
2278
 
2243
2279
  0% {
@@ -2388,6 +2424,12 @@ details.collapse summary::-webkit-details-marker {
2388
2424
  margin-right: 0px;
2389
2425
  margin-top: -1px;
2390
2426
  }
2427
+ .\!join.join-vertical > :where(*:not(:first-child)):is(.btn) {
2428
+ margin-top: calc(var(--border-btn) * -1) !important;
2429
+ }
2430
+ .join.join-vertical > :where(*:not(:first-child)):is(.btn) {
2431
+ margin-top: calc(var(--border-btn) * -1);
2432
+ }
2391
2433
  .\!join.join-horizontal > :where(*:not(:first-child)) {
2392
2434
  margin-top: 0px !important;
2393
2435
  margin-bottom: 0px !important;
@@ -2398,6 +2440,12 @@ details.collapse summary::-webkit-details-marker {
2398
2440
  margin-bottom: 0px;
2399
2441
  margin-inline-start: -1px;
2400
2442
  }
2443
+ .\!join.join-horizontal > :where(*:not(:first-child)):is(.btn) {
2444
+ margin-inline-start: calc(var(--border-btn) * -1) !important;
2445
+ }
2446
+ .join.join-horizontal > :where(*:not(:first-child)):is(.btn) {
2447
+ margin-inline-start: calc(var(--border-btn) * -1);
2448
+ }
2401
2449
  .collapse {
2402
2450
  visibility: collapse;
2403
2451
  }
@@ -3003,13 +3051,13 @@ details.collapse summary::-webkit-details-marker {
3003
3051
  --tw-text-opacity: 1;
3004
3052
  color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));
3005
3053
  }
3006
- @supports not (color: oklch(0 0 0)) {
3054
+ @supports not (color: oklch(0% 0 0)) {
3007
3055
 
3008
3056
  .button-color-neutral {
3009
3057
  --btn-color: var(--fallback-n);
3010
3058
  }
3011
3059
  }
3012
- @supports (color: oklch(0 0 0)) {
3060
+ @supports (color: oklch(0% 0 0)) {
3013
3061
 
3014
3062
  .button-color-neutral {
3015
3063
  --btn-color: var(--n);
@@ -3048,7 +3096,7 @@ details.collapse summary::-webkit-details-marker {
3048
3096
  }
3049
3097
  }
3050
3098
  }
3051
- @supports not (color: oklch(0 0 0)) {
3099
+ @supports not (color: oklch(0% 0 0)) {
3052
3100
 
3053
3101
  .button-color-primary {
3054
3102
  --btn-color: var(--fallback-p);
@@ -3066,7 +3114,7 @@ details.collapse summary::-webkit-details-marker {
3066
3114
  color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
3067
3115
  outline-color: var(--fallback-p,oklch(var(--p)/1));
3068
3116
  }
3069
- @supports (color: oklch(0 0 0)) {
3117
+ @supports (color: oklch(0% 0 0)) {
3070
3118
 
3071
3119
  .button-color-primary {
3072
3120
  --btn-color: var(--p);
@@ -3108,7 +3156,7 @@ details.collapse summary::-webkit-details-marker {
3108
3156
  }
3109
3157
  }
3110
3158
  }
3111
- @supports not (color: oklch(0 0 0)) {
3159
+ @supports not (color: oklch(0% 0 0)) {
3112
3160
 
3113
3161
  .button-color-secondary {
3114
3162
  --btn-color: var(--fallback-s);
@@ -3121,7 +3169,7 @@ details.collapse summary::-webkit-details-marker {
3121
3169
  border-color: color-mix(in oklab, var(--fallback-s,oklch(var(--s)/1)) 90%, black);
3122
3170
  }
3123
3171
  }
3124
- @supports (color: oklch(0 0 0)) {
3172
+ @supports (color: oklch(0% 0 0)) {
3125
3173
 
3126
3174
  .button-color-secondary {
3127
3175
  --btn-color: var(--s);
@@ -3168,7 +3216,7 @@ details.collapse summary::-webkit-details-marker {
3168
3216
  }
3169
3217
  }
3170
3218
  }
3171
- @supports not (color: oklch(0 0 0)) {
3219
+ @supports not (color: oklch(0% 0 0)) {
3172
3220
 
3173
3221
  .button-color-accent {
3174
3222
  --btn-color: var(--fallback-a);
@@ -3181,7 +3229,7 @@ details.collapse summary::-webkit-details-marker {
3181
3229
  border-color: color-mix(in oklab, var(--fallback-a,oklch(var(--a)/1)) 90%, black);
3182
3230
  }
3183
3231
  }
3184
- @supports (color: oklch(0 0 0)) {
3232
+ @supports (color: oklch(0% 0 0)) {
3185
3233
 
3186
3234
  .button-color-accent {
3187
3235
  --btn-color: var(--a);
@@ -3228,7 +3276,7 @@ details.collapse summary::-webkit-details-marker {
3228
3276
  }
3229
3277
  }
3230
3278
  }
3231
- @supports not (color: oklch(0 0 0)) {
3279
+ @supports not (color: oklch(0% 0 0)) {
3232
3280
 
3233
3281
  .button-color-success {
3234
3282
  --btn-color: var(--fallback-su);
@@ -3241,7 +3289,7 @@ details.collapse summary::-webkit-details-marker {
3241
3289
  border-color: color-mix(in oklab, var(--fallback-su,oklch(var(--su)/1)) 90%, black);
3242
3290
  }
3243
3291
  }
3244
- @supports (color: oklch(0 0 0)) {
3292
+ @supports (color: oklch(0% 0 0)) {
3245
3293
 
3246
3294
  .button-color-success {
3247
3295
  --btn-color: var(--su);
@@ -3288,7 +3336,7 @@ details.collapse summary::-webkit-details-marker {
3288
3336
  }
3289
3337
  }
3290
3338
  }
3291
- @supports not (color: oklch(0 0 0)) {
3339
+ @supports not (color: oklch(0% 0 0)) {
3292
3340
 
3293
3341
  .button-color-warning {
3294
3342
  --btn-color: var(--fallback-wa);
@@ -3301,7 +3349,7 @@ details.collapse summary::-webkit-details-marker {
3301
3349
  border-color: color-mix(in oklab, var(--fallback-wa,oklch(var(--wa)/1)) 90%, black);
3302
3350
  }
3303
3351
  }
3304
- @supports (color: oklch(0 0 0)) {
3352
+ @supports (color: oklch(0% 0 0)) {
3305
3353
 
3306
3354
  .button-color-warning {
3307
3355
  --btn-color: var(--wa);
@@ -3348,7 +3396,7 @@ details.collapse summary::-webkit-details-marker {
3348
3396
  }
3349
3397
  }
3350
3398
  }
3351
- @supports not (color: oklch(0 0 0)) {
3399
+ @supports not (color: oklch(0% 0 0)) {
3352
3400
 
3353
3401
  .button-color-info {
3354
3402
  --btn-color: var(--fallback-in);
@@ -3361,7 +3409,7 @@ details.collapse summary::-webkit-details-marker {
3361
3409
  border-color: color-mix(in oklab, var(--fallback-in,oklch(var(--in)/1)) 90%, black);
3362
3410
  }
3363
3411
  }
3364
- @supports (color: oklch(0 0 0)) {
3412
+ @supports (color: oklch(0% 0 0)) {
3365
3413
 
3366
3414
  .button-color-info {
3367
3415
  --btn-color: var(--in);
@@ -3408,7 +3456,7 @@ details.collapse summary::-webkit-details-marker {
3408
3456
  }
3409
3457
  }
3410
3458
  }
3411
- @supports not (color: oklch(0 0 0)) {
3459
+ @supports not (color: oklch(0% 0 0)) {
3412
3460
 
3413
3461
  .button-color-error {
3414
3462
  --btn-color: var(--fallback-er);
@@ -3421,7 +3469,7 @@ details.collapse summary::-webkit-details-marker {
3421
3469
  border-color: color-mix(in oklab, var(--fallback-er,oklch(var(--er)/1)) 90%, black);
3422
3470
  }
3423
3471
  }
3424
- @supports (color: oklch(0 0 0)) {
3472
+ @supports (color: oklch(0% 0 0)) {
3425
3473
 
3426
3474
  .button-color-error {
3427
3475
  --btn-color: var(--er);
@@ -3446,7 +3494,7 @@ details.collapse summary::-webkit-details-marker {
3446
3494
  border-color: transparent;
3447
3495
  }
3448
3496
 
3449
- @supports (color: oklch(0 0 0)) {
3497
+ @supports (color: oklch(0% 0 0)) {
3450
3498
 
3451
3499
  .button-color-ghost:hover {
3452
3500
  background-color: var(--fallback-bc,oklch(var(--bc)/0.2));
@@ -3457,7 +3505,7 @@ details.collapse summary::-webkit-details-marker {
3457
3505
  border-color: transparent;
3458
3506
  }
3459
3507
 
3460
- @supports (color: oklch(0 0 0)) {
3508
+ @supports (color: oklch(0% 0 0)) {
3461
3509
 
3462
3510
  .button-color-ghost:hover {
3463
3511
  background-color: var(--fallback-bc,oklch(var(--bc)/0.2));
@@ -3737,7 +3785,7 @@ details.collapse summary::-webkit-details-marker {
3737
3785
  .checkbox-color-primary:focus-visible {
3738
3786
  outline-color: var(--fallback-p,oklch(var(--p)/1));
3739
3787
  }
3740
- .checkbox-color-primary:checked,.checkbox-color-primary[checked="true"],.checkbox-color-primary[aria-checked="true"] {
3788
+ .checkbox-color-primary:checked,.checkbox-color-primary[aria-checked="true"] {
3741
3789
  --tw-border-opacity: 1;
3742
3790
  border-color: var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));
3743
3791
  --tw-bg-opacity: 1;
@@ -3761,7 +3809,7 @@ details.collapse summary::-webkit-details-marker {
3761
3809
  .checkbox-color-secondary:focus-visible {
3762
3810
  outline-color: var(--fallback-s,oklch(var(--s)/1));
3763
3811
  }
3764
- .checkbox-color-secondary:checked,.checkbox-color-secondary[checked="true"],.checkbox-color-secondary[aria-checked="true"] {
3812
+ .checkbox-color-secondary:checked,.checkbox-color-secondary[aria-checked="true"] {
3765
3813
  --tw-border-opacity: 1;
3766
3814
  border-color: var(--fallback-s,oklch(var(--s)/var(--tw-border-opacity)));
3767
3815
  --tw-bg-opacity: 1;
@@ -3785,7 +3833,7 @@ details.collapse summary::-webkit-details-marker {
3785
3833
  .checkbox-color-accent:focus-visible {
3786
3834
  outline-color: var(--fallback-a,oklch(var(--a)/1));
3787
3835
  }
3788
- .checkbox-color-accent:checked,.checkbox-color-accent[checked="true"],.checkbox-color-accent[aria-checked="true"] {
3836
+ .checkbox-color-accent:checked,.checkbox-color-accent[aria-checked="true"] {
3789
3837
  --tw-border-opacity: 1;
3790
3838
  border-color: var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));
3791
3839
  --tw-bg-opacity: 1;
@@ -3809,7 +3857,7 @@ details.collapse summary::-webkit-details-marker {
3809
3857
  .checkbox-color-success:focus-visible {
3810
3858
  outline-color: var(--fallback-su,oklch(var(--su)/1));
3811
3859
  }
3812
- .checkbox-color-success:checked,.checkbox-color-success[checked="true"],.checkbox-color-success[aria-checked="true"] {
3860
+ .checkbox-color-success:checked,.checkbox-color-success[aria-checked="true"] {
3813
3861
  --tw-border-opacity: 1;
3814
3862
  border-color: var(--fallback-su,oklch(var(--su)/var(--tw-border-opacity)));
3815
3863
  --tw-bg-opacity: 1;
@@ -3833,7 +3881,7 @@ details.collapse summary::-webkit-details-marker {
3833
3881
  .checkbox-color-warning:focus-visible {
3834
3882
  outline-color: var(--fallback-wa,oklch(var(--wa)/1));
3835
3883
  }
3836
- .checkbox-color-warning:checked,.checkbox-color-warning[checked="true"],.checkbox-color-warning[aria-checked="true"] {
3884
+ .checkbox-color-warning:checked,.checkbox-color-warning[aria-checked="true"] {
3837
3885
  --tw-border-opacity: 1;
3838
3886
  border-color: var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity)));
3839
3887
  --tw-bg-opacity: 1;
@@ -3857,7 +3905,7 @@ details.collapse summary::-webkit-details-marker {
3857
3905
  .checkbox-color-info:focus-visible {
3858
3906
  outline-color: var(--fallback-in,oklch(var(--in)/1));
3859
3907
  }
3860
- .checkbox-color-info:checked,.checkbox-color-info[checked="true"],.checkbox-color-info[aria-checked="true"] {
3908
+ .checkbox-color-info:checked,.checkbox-color-info[aria-checked="true"] {
3861
3909
  --tw-border-opacity: 1;
3862
3910
  border-color: var(--fallback-in,oklch(var(--in)/var(--tw-border-opacity)));
3863
3911
  --tw-bg-opacity: 1;
@@ -3881,7 +3929,7 @@ details.collapse summary::-webkit-details-marker {
3881
3929
  .checkbox-color-error:focus-visible {
3882
3930
  outline-color: var(--fallback-er,oklch(var(--er)/1));
3883
3931
  }
3884
- .checkbox-color-error:checked,.checkbox-color-error[checked="true"],.checkbox-color-error[aria-checked="true"] {
3932
+ .checkbox-color-error:checked,.checkbox-color-error[aria-checked="true"] {
3885
3933
  --tw-border-opacity: 1;
3886
3934
  border-color: var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));
3887
3935
  --tw-bg-opacity: 1;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FieldPath, FieldValues, ControllerProps as RHFControllerProps } from 'react-hook-form';
3
2
  import { Dropdown, TextBox } from '../../ui/forms';
4
3
  type TextBoxType = {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export type ButtonEvent = React.MouseEvent<HTMLButtonElement, MouseEvent>;
3
2
  export type ButtonEventHandler = React.MouseEventHandler<HTMLButtonElement>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface AccordionType {
3
2
  name: string;
4
3
  iconType?: 'arrow' | 'plus';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ColorType, SizeType } from '../../../types';
3
2
  import type { IconType } from 'react-icons';
4
3
  import type { PositionType } from '../../../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { BadgeType, ColorButtonType, SizeType } from '../../../types';
3
2
  import type { IconType } from 'react-icons';
4
3
  import type { PositionType } from '../../../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextBoxType } from './text-box.types';
3
2
  export interface DropdownOption {
4
3
  value: string | number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { IconType } from 'react-icons';
3
2
  import type { ColorType, ErrorType, SizeType } from '../../../types';
4
3
  export interface TextBoxType extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, ErrorType {
@@ -9,7 +9,9 @@ const Avatar = ({ isOnline = false, ring = false, rounded = false, size = 'md',
9
9
  online: withStatus && isOnline,
10
10
  offline: withStatus && !isOnline,
11
11
  placeholder: !isUri
12
- }), children: _jsxs("div", { "data-testid": 'avatar-content', className: cls(`bg-neutral text-neutral-content avatar-size-${size}`, {
12
+ }), children: _jsxs("div", { "data-testid": 'avatar-content', className: cls('text-neutral-content', {
13
+ 'bg-neutral': !isUri,
14
+ [`avatar-size-${size}`]: size,
13
15
  'rounded-full': rounded,
14
16
  rounded: !rounded,
15
17
  'avatar-ring': ring
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "framework design",
11
11
  "design system"
12
12
  ],
13
- "version": "0.6.0",
13
+ "version": "0.6.2",
14
14
  "homepage": "https://github.com/creativecodeco/ui",
15
15
  "author": {
16
16
  "name": "John Toro",
@@ -31,7 +31,7 @@
31
31
  "lint:eslint": "eslint .",
32
32
  "lint:fix": "npm run lint:eslint --fix --quiet",
33
33
  "prepack": "npm run build",
34
- "prepare": "husky install",
34
+ "prepare": "husky",
35
35
  "release": "npm publish --access public",
36
36
  "storybook": "storybook dev -p 6006",
37
37
  "test": "jest .",
@@ -40,49 +40,52 @@
40
40
  "test:watch": "jest --watch"
41
41
  },
42
42
  "peerDependencies": {
43
- "postcss": "8.4.32",
44
- "postcss-import": "15.1.0",
45
- "react": "18.2.0",
46
- "react-hook-form": "7.49.2",
47
- "tailwindcss": "3.4.0",
48
- "usehooks-ts": "2.9.1"
43
+ "postcss": "8.4.41",
44
+ "postcss-import": "16.1.0",
45
+ "react": "18.3.1",
46
+ "react-hook-form": "7.52.2",
47
+ "tailwindcss": "3.4.9",
48
+ "usehooks-ts": "3.1.0"
49
49
  },
50
50
  "dependencies": {
51
- "postcss": "8.4.35",
52
- "postcss-import": "16.0.1",
53
- "react": "18.2.0",
54
- "react-hook-form": "7.50.1",
55
- "tailwindcss": "3.4.1",
56
- "usehooks-ts": "2.15.1"
51
+ "postcss": "8.4.41",
52
+ "postcss-import": "16.1.0",
53
+ "react": "18.3.1",
54
+ "react-hook-form": "7.52.2",
55
+ "tailwindcss": "3.4.9",
56
+ "usehooks-ts": "3.1.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@babel/core": "7.24.0",
60
- "@babel/preset-env": "7.24.0",
61
- "@babel/preset-react": "7.23.3",
62
- "@babel/preset-typescript": "7.23.3",
59
+ "@babel/core": "7.25.2",
60
+ "@babel/preset-env": "7.25.3",
61
+ "@babel/preset-react": "7.24.7",
62
+ "@babel/preset-typescript": "7.24.7",
63
+ "@chromatic-com/storybook": "1.6.1",
63
64
  "@jest/globals": "29.7.0",
64
- "@storybook/addon-essentials": "7.6.17",
65
- "@storybook/addon-interactions": "7.6.17",
66
- "@storybook/addon-links": "7.6.17",
67
- "@storybook/addon-mdx-gfm": "7.6.17",
68
- "@storybook/blocks": "7.6.17",
69
- "@storybook/react": "7.6.17",
70
- "@storybook/react-webpack5": "7.6.17",
71
- "@storybook/test": "7.6.17",
65
+ "@storybook/addon-essentials": "8.2.8",
66
+ "@storybook/addon-interactions": "8.2.8",
67
+ "@storybook/addon-links": "8.2.8",
68
+ "@storybook/addon-webpack5-compiler-swc": "1.0.5",
69
+ "@storybook/blocks": "8.2.8",
70
+ "@storybook/manager-api": "8.2.8",
71
+ "@storybook/react": "8.2.8",
72
+ "@storybook/react-webpack5": "8.2.8",
73
+ "@storybook/test": "8.2.8",
74
+ "@storybook/theming": "8.2.8",
72
75
  "@testing-library/dom": "9.3.4",
73
- "@testing-library/jest-dom": "6.4.2",
74
- "@testing-library/react": "14.2.1",
76
+ "@testing-library/jest-dom": "6.4.8",
77
+ "@testing-library/react": "14.3.1",
75
78
  "@testing-library/user-event": "14.5.2",
76
79
  "@types/jest": "29.5.12",
77
- "@types/node": "20.11.24",
78
- "@types/react": "18.2.61",
79
- "@types/react-dom": "18.2.19",
80
+ "@types/node": "22.1.0",
81
+ "@types/react": "18.3.3",
82
+ "@types/react-dom": "18.3.0",
80
83
  "@typescript-eslint/eslint-plugin": "6.21.0",
81
- "autoprefixer": "10.4.17",
82
- "chromatic": "11.0.0",
84
+ "autoprefixer": "10.4.20",
85
+ "chromatic": "11.7.0",
83
86
  "classnames": "2.5.1",
84
87
  "cpx2": "7.0.1",
85
- "daisyui": "4.7.2",
88
+ "daisyui": "4.12.10",
86
89
  "eslint": "8.57.0",
87
90
  "eslint-config-prettier": "9.1.0",
88
91
  "eslint-config-standard": "17.1.0",
@@ -92,32 +95,32 @@
92
95
  "eslint-plugin-import-order": "2.1.4",
93
96
  "eslint-plugin-n": "16.6.2",
94
97
  "eslint-plugin-node": "11.1.0",
95
- "eslint-plugin-prettier": "5.1.3",
96
- "eslint-plugin-promise": "6.1.1",
97
- "eslint-plugin-react": "7.33.2",
98
+ "eslint-plugin-prettier": "5.2.1",
99
+ "eslint-plugin-promise": "6.6.0",
100
+ "eslint-plugin-react": "7.35.0",
98
101
  "eslint-plugin-standard": "5.0.0",
99
102
  "eslint-plugin-storybook": "0.8.0",
100
- "eslint-plugin-unused-imports": "3.1.0",
101
- "husky": "9.0.11",
103
+ "eslint-plugin-unused-imports": "3.2.0",
104
+ "husky": "9.1.4",
102
105
  "jest": "29.7.0",
103
106
  "jest-environment-jsdom": "29.7.0",
104
107
  "jest-junit": "16.0.0",
105
108
  "jest-transform-css": "6.0.1",
106
109
  "postcss-cli": "11.0.0",
107
- "prettier": "3.2.5",
110
+ "prettier": "3.3.3",
108
111
  "prop-types": "15.8.1",
109
- "react-dom": "18.2.0",
110
- "react-icons": "5.0.1",
111
- "storybook": "7.6.17",
112
- "storybook-addon-themes": "6.1.0",
113
- "string-width": "7.1.0",
114
- "ts-jest": "29.1.2",
112
+ "react-dom": "18.3.1",
113
+ "react-icons": "5.2.1",
114
+ "storybook": "8.2.8",
115
+ "string-width": "7.2.0",
116
+ "ts-jest": "29.2.4",
115
117
  "ts-node": "10.9.2",
116
- "tsc-alias": "1.8.8",
118
+ "tsc-alias": "1.8.10",
117
119
  "tsconfig-paths-webpack-plugin": "4.1.0",
118
- "typescript": "5.3.3"
120
+ "typescript": "5.5.4"
119
121
  },
120
122
  "files": [
121
123
  "lib"
122
- ]
124
+ ],
125
+ "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
123
126
  }