@choice-ui/react 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 (41) hide show
  1. package/dist/components/button/dist/index.d.ts +2 -9
  2. package/dist/components/button/dist/index.js +38 -19
  3. package/dist/components/button/src/button.d.ts +2 -9
  4. package/dist/components/button/src/button.js +22 -13
  5. package/dist/components/button/src/tv.d.ts +12 -0
  6. package/dist/components/button/src/tv.js +15 -5
  7. package/dist/components/comments/dist/index.d.ts +3 -0
  8. package/dist/components/comments/src/comment-input/comment-input.d.ts +3 -0
  9. package/dist/components/comments/src/comment-input/comment-input.js +8 -2
  10. package/dist/components/comments/src/comment-input/components/comment-input-footer.d.ts +3 -0
  11. package/dist/components/comments/src/comment-input/components/comment-input-footer.js +10 -9
  12. package/dist/components/comments/src/comment-input/components/comment-input-renderers.js +1 -1
  13. package/dist/components/comments/src/comment-item/tv.d.ts +3 -3
  14. package/dist/components/modal/dist/index.js +2 -2
  15. package/dist/components/modal/src/tv.d.ts +3 -3
  16. package/dist/components/modal/src/tv.js +2 -2
  17. package/dist/components/otp-input/src/otp-input.js +10 -31
  18. package/dist/components/otp-input/src/tv.d.ts +3 -3
  19. package/dist/components/otp-input/src/tv.js +1 -1
  20. package/dist/components/panel/dist/index.d.ts +16 -16
  21. package/dist/components/panel/src/components/panel-label.js +2 -1
  22. package/dist/components/panel/src/components/panel-previewer.js +2 -4
  23. package/dist/components/panel/src/components/panel-row-label.js +2 -4
  24. package/dist/components/panel/src/components/panel-row-many-icon.js +4 -5
  25. package/dist/components/panel/src/components/panel-row.d.ts +12 -12
  26. package/dist/components/panel/src/components/panel-row.js +3 -3
  27. package/dist/components/panel/src/components/panel-sortable-row.js +13 -12
  28. package/dist/components/panel/src/components/panel-sortable.d.ts +1 -1
  29. package/dist/components/panel/src/components/panel-sortable.js +21 -21
  30. package/dist/components/panel/src/components/panel-title.js +16 -19
  31. package/dist/components/panel/src/context/panel-context.d.ts +1 -2
  32. package/dist/components/panel/src/hooks/use-panel-drag-drop.js +7 -6
  33. package/dist/components/panel/src/panel.d.ts +2 -2
  34. package/dist/components/panel/src/panel.js +38 -37
  35. package/dist/components/panel/src/tv.d.ts +89 -0
  36. package/dist/components/panel/src/tv.js +38 -2
  37. package/dist/components/splitter/dist/index.d.ts +1 -1
  38. package/dist/components/splitter/src/splitter.d.ts +2 -2
  39. package/dist/styles/components.css +5 -18
  40. package/package.json +1 -1
  41. package/dist/components/splitter/src/tv.d.ts +0 -7
@@ -122,6 +122,9 @@ export declare const propertiesPanelRowTv: import('tailwind-variants').TVReturnT
122
122
  "two-input-two-icon": {
123
123
  container: string;
124
124
  };
125
+ "one-icon-one-input-one-icon": {
126
+ container: string;
127
+ };
125
128
  "one-icon-one-input-two-icon": {
126
129
  container: string;
127
130
  };
@@ -179,6 +182,9 @@ export declare const propertiesPanelRowTv: import('tailwind-variants').TVReturnT
179
182
  "two-input-two-icon": {
180
183
  container: string;
181
184
  };
185
+ "one-icon-one-input-one-icon": {
186
+ container: string;
187
+ };
182
188
  "one-icon-one-input-two-icon": {
183
189
  container: string;
184
190
  };
@@ -236,6 +242,9 @@ export declare const propertiesPanelRowTv: import('tailwind-variants').TVReturnT
236
242
  "two-input-two-icon": {
237
243
  container: string;
238
244
  };
245
+ "one-icon-one-input-one-icon": {
246
+ container: string;
247
+ };
239
248
  "one-icon-one-input-two-icon": {
240
249
  container: string;
241
250
  };
@@ -362,3 +371,83 @@ export declare const panelSortableRowTv: import('tailwind-variants').TVReturnTyp
362
371
  root: string;
363
372
  handle: string[];
364
373
  }, undefined, unknown, unknown, undefined>>;
374
+ export declare const panelLabelTv: import('tailwind-variants').TVReturnType<{
375
+ showLabels: {
376
+ true: string[];
377
+ false: string;
378
+ };
379
+ }, undefined, "[grid-area:label]", {
380
+ showLabels: {
381
+ true: string[];
382
+ false: string;
383
+ };
384
+ }, undefined, import('tailwind-variants').TVReturnType<{
385
+ showLabels: {
386
+ true: string[];
387
+ false: string;
388
+ };
389
+ }, undefined, "[grid-area:label]", unknown, unknown, undefined>>;
390
+ export declare const panelPreviewerTv: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "bg-secondary-background text-secondary-foreground relative mx-4 my-2 flex h-32 flex-col items-center justify-center rounded-xl", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "bg-secondary-background text-secondary-foreground relative mx-4 my-2 flex h-32 flex-col items-center justify-center rounded-xl", unknown, unknown, undefined>>;
391
+ export declare const panelRowLabelTv: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "text-secondary-foreground cursor-default truncate select-none [grid-area:label]", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "text-secondary-foreground cursor-default truncate select-none [grid-area:label]", unknown, unknown, undefined>>;
392
+ export declare const panelRowManyIconTv: import('tailwind-variants').TVReturnType<{
393
+ [key: string]: {
394
+ [key: string]: import('tailwind-merge').ClassNameValue | {
395
+ container?: import('tailwind-merge').ClassNameValue;
396
+ iconWrapper?: import('tailwind-merge').ClassNameValue;
397
+ };
398
+ };
399
+ } | {
400
+ [x: string]: {
401
+ [x: string]: import('tailwind-merge').ClassNameValue | {
402
+ container?: import('tailwind-merge').ClassNameValue;
403
+ iconWrapper?: import('tailwind-merge').ClassNameValue;
404
+ };
405
+ };
406
+ } | {}, {
407
+ container: string;
408
+ iconWrapper: string;
409
+ }, undefined, {
410
+ [key: string]: {
411
+ [key: string]: import('tailwind-merge').ClassNameValue | {
412
+ container?: import('tailwind-merge').ClassNameValue;
413
+ iconWrapper?: import('tailwind-merge').ClassNameValue;
414
+ };
415
+ };
416
+ } | {}, {
417
+ container: string;
418
+ iconWrapper: string;
419
+ }, import('tailwind-variants').TVReturnType<unknown, {
420
+ container: string;
421
+ iconWrapper: string;
422
+ }, undefined, unknown, unknown, undefined>>;
423
+ export declare const panelSortableContainerTv: import('tailwind-variants').TVReturnType<{
424
+ [key: string]: {
425
+ [key: string]: import('tailwind-merge').ClassNameValue | {
426
+ container?: import('tailwind-merge').ClassNameValue;
427
+ rowContainer?: import('tailwind-merge').ClassNameValue;
428
+ };
429
+ };
430
+ } | {
431
+ [x: string]: {
432
+ [x: string]: import('tailwind-merge').ClassNameValue | {
433
+ container?: import('tailwind-merge').ClassNameValue;
434
+ rowContainer?: import('tailwind-merge').ClassNameValue;
435
+ };
436
+ };
437
+ } | {}, {
438
+ container: string;
439
+ rowContainer: string;
440
+ }, undefined, {
441
+ [key: string]: {
442
+ [key: string]: import('tailwind-merge').ClassNameValue | {
443
+ container?: import('tailwind-merge').ClassNameValue;
444
+ rowContainer?: import('tailwind-merge').ClassNameValue;
445
+ };
446
+ };
447
+ } | {}, {
448
+ container: string;
449
+ rowContainer: string;
450
+ }, import('tailwind-variants').TVReturnType<unknown, {
451
+ container: string;
452
+ rowContainer: string;
453
+ }, undefined, unknown, unknown, undefined>>;
@@ -1,7 +1,7 @@
1
1
  import { tcv } from "../../../shared/utils/tcx/tcx.js";
2
2
  const propertiesPanelTv = tcv({
3
3
  slots: {
4
- container: "properties-panel",
4
+ container: "relative flex min-w-0 flex-col not-last:border-b",
5
5
  triggerRef: "pointer-events-none absolute inset-y-0 left-0"
6
6
  },
7
7
  variants: {
@@ -27,7 +27,7 @@ const propertiesPaneTitleTv = tcv({
27
27
  });
28
28
  const propertiesPanelRowTv = tcv({
29
29
  slots: {
30
- container: "group rows",
30
+ container: "group grid min-w-0 items-center pr-2 pl-4",
31
31
  triggerRef: "pointer-events-none absolute inset-y-0 left-0"
32
32
  },
33
33
  variants: {
@@ -42,6 +42,7 @@ const propertiesPanelRowTv = tcv({
42
42
  "one-input-two-icon": { container: "rows--one-input-two-icon" },
43
43
  "two-input-one-icon": { container: "rows--two-input-one-icon" },
44
44
  "two-input-two-icon": { container: "rows--two-input-two-icon" },
45
+ "one-icon-one-input-one-icon": { container: "rows--one-icon-one-input-one-icon" },
45
46
  "one-icon-one-input-two-icon": { container: "rows--one-icon-one-input-two-icon" },
46
47
  "two-input-one-icon-double-row": { container: "rows--two-input-one-icon-double-row" },
47
48
  "one-icon-one-input-two-icon-double-row": {
@@ -97,7 +98,42 @@ const panelSortableRowTv = tcv({
97
98
  singleItem: false
98
99
  }
99
100
  });
101
+ const panelLabelTv = tcv({
102
+ base: "[grid-area:label]",
103
+ variants: {
104
+ showLabels: {
105
+ true: ["text-secondary-foreground", "rows--label"],
106
+ false: "sr-only"
107
+ }
108
+ },
109
+ defaultVariants: {
110
+ showLabels: false
111
+ }
112
+ });
113
+ const panelPreviewerTv = tcv({
114
+ base: "bg-secondary-background text-secondary-foreground relative mx-4 my-2 flex h-32 flex-col items-center justify-center rounded-xl"
115
+ });
116
+ const panelRowLabelTv = tcv({
117
+ base: "text-secondary-foreground cursor-default truncate select-none [grid-area:label]"
118
+ });
119
+ const panelRowManyIconTv = tcv({
120
+ slots: {
121
+ container: "group text-body-medium flex h-8 min-w-0 items-center justify-between gap-x-2 pr-2 pl-4 select-none",
122
+ iconWrapper: "text-secondary-foreground group-hover:text-default-foreground flex h-6 min-w-6 flex-none gap-x-1"
123
+ }
124
+ });
125
+ const panelSortableContainerTv = tcv({
126
+ slots: {
127
+ container: "relative flex flex-col",
128
+ rowContainer: "panel-sortable-row group/sortable-row relative"
129
+ }
130
+ });
100
131
  export {
132
+ panelLabelTv,
133
+ panelPreviewerTv,
134
+ panelRowLabelTv,
135
+ panelRowManyIconTv,
136
+ panelSortableContainerTv,
101
137
  panelSortableRowTv,
102
138
  propertiesPaneTitleTv,
103
139
  propertiesPanelRowTv,
@@ -1 +1 @@
1
- export { AllotmentProps, Allotment as Splitter, AllotmentHandle as SplitterHandle } from 'allotment';
1
+ export { Allotment as Splitter, AllotmentHandle as SplitterHandle, AllotmentProps as SplitterProps } from 'allotment';
@@ -1,3 +1,3 @@
1
- import { Allotment as Splitter, AllotmentProps, AllotmentHandle as SplitterHandle } from 'allotment';
1
+ import { Allotment as Splitter, AllotmentProps as SplitterProps, AllotmentHandle as SplitterHandle } from 'allotment';
2
2
  export { Splitter };
3
- export type { SplitterHandle, AllotmentProps };
3
+ export type { SplitterHandle, SplitterProps };
@@ -26,7 +26,6 @@
26
26
  --animate-spinner-bounce-right: spinner-bounce-right 0.5s infinite alternate ease;
27
27
  --animate-indeterminate-bar: indeterminate-bar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395)
28
28
  infinite normal none running;
29
-
30
29
  }
31
30
 
32
31
  /* Base styles */
@@ -442,6 +441,11 @@
442
441
  grid-template-columns: 1fr 1fr 1.5rem;
443
442
  grid-template-areas: "label-1 label-2 label-2" "input-1 input-2 icon";
444
443
  }
444
+ .rows--one-icon-one-input-one-icon {
445
+ grid-template-rows: auto minmax(2rem, auto);
446
+ grid-template-columns: 1.5rem 0.5rem 1fr 0.5rem 1.5rem;
447
+ grid-template-areas: "label label label label label" "icon-1 . input . icon-2";
448
+ }
445
449
  .rows--one-icon-one-input-two-icon {
446
450
  grid-template-rows: auto minmax(2rem, auto);
447
451
  grid-template-columns: 1.5rem 0.5rem 1fr 0.5rem 1.5rem 0.25rem 1.5rem;
@@ -582,30 +586,14 @@
582
586
  @apply h-8;
583
587
  }
584
588
  }
585
-
586
- .input-search {
587
- @apply relative grid;
588
- grid-template-columns: 1.5rem 1fr auto;
589
- grid-template-areas: "icon input action";
590
- &::before {
591
- @apply pointer-events-none z-2 h-full rounded-md border border-transparent;
592
- grid-row: 1 / 2;
593
- grid-column: 1 / 4;
594
- }
595
- }
596
589
  }
597
590
 
598
591
  /* Modal styles */
599
592
  @layer components {
600
593
  .modal__header {
601
- @apply grid;
602
594
  grid-template-rows: minmax(2.5rem, auto);
603
595
  grid-template-areas: "title . close" "input input input";
604
596
  }
605
-
606
- .modal__header--action {
607
- grid-template-columns: auto 1fr 2.5rem;
608
- }
609
597
  }
610
598
 
611
599
  /* OTP Input styles */
@@ -626,4 +614,3 @@
626
614
  }
627
615
  }
628
616
  }
629
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choice-ui/react",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "A desktop-first React UI component library built for professional desktop applications with comprehensive documentation",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -1,7 +0,0 @@
1
- export declare const SplitterTv: import('tailwind-variants').TVReturnType<{}, {
2
- root: string;
3
- }, undefined, {}, {
4
- root: string;
5
- }, import('tailwind-variants').TVReturnType<{}, {
6
- root: string;
7
- }, undefined, unknown, unknown, undefined>>;