@gridui/select 1.6.0 → 2.0.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.
- package/README.md +10 -3
- package/dist/autocomplete/autocomplete.d.ts +2 -0
- package/dist/autocomplete-suggestions/autocomplete-suggestions.d.ts +2 -0
- package/dist/combobox/combobox.d.ts +3 -1
- package/dist/index.js +56 -36
- package/dist/index.js.map +2 -2
- package/dist/select/style.d.ts +2 -1
- package/dist/shared/popup/selection-popup.d.ts +2 -0
- package/dist/shared/style.d.ts +2 -1
- package/dist/shared/types.d.ts +3 -1
- package/dist/styles.css +108 -84
- package/dist/styles.local.css +3 -3
- package/docs/catalog.json +12 -12
- package/docs/reference/autocomplete-suggestions.md +7 -1
- package/docs/reference/autocomplete.md +14 -4
- package/docs/reference/combobox.md +20 -8
- package/docs/reference/multi-select.md +16 -2
- package/docs/reference/select.md +16 -8
- package/package.json +8 -8
package/dist/shared/style.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @namespace Shared
|
|
5
5
|
* @description Style
|
|
6
6
|
*/
|
|
7
|
+
import type { Density } from "@gridui/theme";
|
|
7
8
|
export declare const selectIconStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
9
|
export declare const selectOptionContentStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
10
|
export declare const selectOptionDescriptionStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -11,4 +12,4 @@ export declare const selectListStyles: (props?: import("class-variance-authority
|
|
|
11
12
|
export declare const selectEmptyStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
12
13
|
export declare const selectActionsStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
13
14
|
export declare const selectActionStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
|
-
export declare const comboboxContentStyles: (
|
|
15
|
+
export declare const comboboxContentStyles: (density: Density) => string;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @namespace Shared
|
|
5
5
|
* @description Types
|
|
6
6
|
*/
|
|
7
|
+
import type { Size, Density } from "@gridui/theme";
|
|
7
8
|
import type { overlayListItemStyles } from "@gridui/overlay";
|
|
8
9
|
import type { VariantProps } from "class-variance-authority";
|
|
9
10
|
import type { ReactNode } from "react";
|
|
@@ -46,6 +47,8 @@ export type SelectionAppearanceOptions = {
|
|
|
46
47
|
readonly selectionAppearance?: NonNullable<VariantProps<typeof overlayListItemStyles>["selectionAppearance"]> | undefined;
|
|
47
48
|
};
|
|
48
49
|
export interface SelectionControlOptions extends SelectionOptionSource, SelectionAppearanceOptions {
|
|
50
|
+
readonly size?: Size | undefined;
|
|
51
|
+
readonly density?: Density | undefined;
|
|
49
52
|
readonly clearLabel?: string;
|
|
50
53
|
readonly portalContainer?: HTMLElement | null;
|
|
51
54
|
readonly required?: boolean;
|
|
@@ -56,7 +59,6 @@ export interface SelectionSearchLabels {
|
|
|
56
59
|
}
|
|
57
60
|
export interface SelectionProps extends SelectionValueProps, SelectionControlOptions {
|
|
58
61
|
readonly actions?: readonly SelectAction[];
|
|
59
|
-
readonly controlSize?: "standard" | "small";
|
|
60
62
|
readonly name?: string;
|
|
61
63
|
readonly form?: string;
|
|
62
64
|
readonly disabled?: boolean;
|
package/dist/styles.css
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
|
-
@layer theme {
|
|
5
|
-
:root, :host {
|
|
6
|
-
--spacing: 0.25rem;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
4
|
@layer utilities {
|
|
10
5
|
.gridui-u-overlay--z-\(--gridui-z-popover\) {
|
|
11
6
|
z-index: var(--gridui-z-popover);
|
|
@@ -20,9 +15,6 @@
|
|
|
20
15
|
width: var(--gridui-space-16);
|
|
21
16
|
height: var(--gridui-space-16);
|
|
22
17
|
}
|
|
23
|
-
.gridui-u-overlay--min-h-10 {
|
|
24
|
-
min-height: calc(var(--spacing) * 10);
|
|
25
|
-
}
|
|
26
18
|
.gridui-u-overlay--min-w-0 {
|
|
27
19
|
min-width: 0px;
|
|
28
20
|
}
|
|
@@ -61,15 +53,9 @@
|
|
|
61
53
|
.gridui-u-overlay--p-0 {
|
|
62
54
|
padding: 0px;
|
|
63
55
|
}
|
|
64
|
-
.gridui-u-overlay--p-gridui-8 {
|
|
65
|
-
padding: var(--gridui-space-8);
|
|
66
|
-
}
|
|
67
56
|
.gridui-u-overlay--px-gridui-8 {
|
|
68
57
|
padding-inline: var(--gridui-space-8);
|
|
69
58
|
}
|
|
70
|
-
.gridui-u-overlay--py-gridui-8 {
|
|
71
|
-
padding-block: var(--gridui-space-8);
|
|
72
|
-
}
|
|
73
59
|
.gridui-u-overlay--type-data {
|
|
74
60
|
font: var(--gridui-type-data);
|
|
75
61
|
font-family: var(--gridui-font-body);
|
|
@@ -176,6 +162,25 @@
|
|
|
176
162
|
animation: none;
|
|
177
163
|
}
|
|
178
164
|
}
|
|
165
|
+
.gridui-overlay-list {
|
|
166
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-medium);
|
|
167
|
+
--gridui-overlay-row-padding: var(--gridui-space-8);
|
|
168
|
+
}
|
|
169
|
+
.gridui-overlay-density-compact {
|
|
170
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-small);
|
|
171
|
+
--gridui-overlay-row-padding: var(--gridui-space-4);
|
|
172
|
+
}
|
|
173
|
+
.gridui-overlay-density-comfortable {
|
|
174
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-medium);
|
|
175
|
+
--gridui-overlay-row-padding: var(--gridui-space-8);
|
|
176
|
+
}
|
|
177
|
+
.gridui-overlay-list-item {
|
|
178
|
+
min-block-size: max(var(--gridui-overlay-row-min, var(--gridui-control-min-height-medium)), var(--gridui-target-min-size));
|
|
179
|
+
padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
|
|
180
|
+
}
|
|
181
|
+
.gridui-overlay-list-label {
|
|
182
|
+
padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
|
|
183
|
+
}
|
|
179
184
|
}
|
|
180
185
|
@property --tw-border-style {
|
|
181
186
|
syntax: "*";
|
|
@@ -295,11 +300,6 @@
|
|
|
295
300
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
296
301
|
@layer properties;
|
|
297
302
|
@layer theme, base, components, utilities;
|
|
298
|
-
@layer theme {
|
|
299
|
-
:root, :host {
|
|
300
|
-
--spacing: 0.25rem;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
303
|
@layer utilities {
|
|
304
304
|
.gridui-u-button--pointer-events-none {
|
|
305
305
|
pointer-events: none;
|
|
@@ -307,24 +307,13 @@
|
|
|
307
307
|
.gridui-u-button--inline-flex {
|
|
308
308
|
display: inline-flex;
|
|
309
309
|
}
|
|
310
|
+
.gridui-u-button--size-\(--_gridui-button-min\) {
|
|
311
|
+
width: var(--_gridui-button-min);
|
|
312
|
+
height: var(--_gridui-button-min);
|
|
313
|
+
}
|
|
310
314
|
.gridui-u-button--h-full {
|
|
311
315
|
height: 100%;
|
|
312
316
|
}
|
|
313
|
-
.gridui-u-button--h-gridui-control {
|
|
314
|
-
height: var(--gridui-control-min-height);
|
|
315
|
-
}
|
|
316
|
-
.gridui-u-button--min-h-18 {
|
|
317
|
-
min-height: calc(var(--spacing) * 18);
|
|
318
|
-
}
|
|
319
|
-
.gridui-u-button--min-h-gridui-control {
|
|
320
|
-
min-height: var(--gridui-control-min-height);
|
|
321
|
-
}
|
|
322
|
-
.gridui-u-button--min-h-gridui-control-large {
|
|
323
|
-
min-height: var(--gridui-control-min-height-large);
|
|
324
|
-
}
|
|
325
|
-
.gridui-u-button--min-h-gridui-control-small {
|
|
326
|
-
min-height: var(--gridui-control-min-height-small);
|
|
327
|
-
}
|
|
328
317
|
.gridui-u-button--w-fit {
|
|
329
318
|
width: fit-content;
|
|
330
319
|
}
|
|
@@ -334,14 +323,14 @@
|
|
|
334
323
|
.gridui-u-button--w-gridui-64 {
|
|
335
324
|
width: var(--gridui-space-64);
|
|
336
325
|
}
|
|
337
|
-
.gridui-u-button--w-gridui-control {
|
|
338
|
-
width: var(--gridui-control-min-height);
|
|
339
|
-
}
|
|
340
326
|
.gridui-u-button--w-gridui-control-large {
|
|
341
|
-
width: var(--gridui-control-min-height-large);
|
|
327
|
+
width: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
328
|
+
}
|
|
329
|
+
.gridui-u-button--w-gridui-control-medium {
|
|
330
|
+
width: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
342
331
|
}
|
|
343
332
|
.gridui-u-button--w-gridui-control-small {
|
|
344
|
-
width: var(--gridui-control-min-height-small);
|
|
333
|
+
width: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
345
334
|
}
|
|
346
335
|
.gridui-u-button--max-w-full {
|
|
347
336
|
max-width: 100%;
|
|
@@ -547,35 +536,10 @@
|
|
|
547
536
|
.gridui-u-button--\[\&_svg\]\:shrink-0 svg {
|
|
548
537
|
flex-shrink: 0;
|
|
549
538
|
}
|
|
550
|
-
.gridui-u-button--\[\&\.gridui-button-extra-large\]\:h-18.gridui-button-extra-large {
|
|
551
|
-
height: calc(var(--spacing) * 18);
|
|
552
|
-
}
|
|
553
|
-
.gridui-u-button--\[\&\.gridui-button-extra-large\]\:w-18.gridui-button-extra-large {
|
|
554
|
-
width: calc(var(--spacing) * 18);
|
|
555
|
-
}
|
|
556
|
-
.gridui-u-button--\[\&\.gridui-button-large\]\:h-gridui-control-large.gridui-button-large {
|
|
557
|
-
height: var(--gridui-control-min-height-large);
|
|
558
|
-
}
|
|
559
|
-
.gridui-u-button--\[\&\.gridui-button-large\]\:w-gridui-control-large.gridui-button-large {
|
|
560
|
-
width: var(--gridui-control-min-height-large);
|
|
561
|
-
}
|
|
562
|
-
.gridui-u-button--\[\&\.gridui-button-small\]\:h-gridui-control-small.gridui-button-small {
|
|
563
|
-
height: var(--gridui-control-min-height-small);
|
|
564
|
-
}
|
|
565
|
-
.gridui-u-button--\[\&\.gridui-button-small\]\:w-gridui-control-small.gridui-button-small {
|
|
566
|
-
width: var(--gridui-control-min-height-small);
|
|
567
|
-
}
|
|
568
|
-
@media (pointer: coarse) {
|
|
569
|
-
.gridui-u-button--pointer-coarse\:\[\&\.gridui-button-small\]\:h-gridui-control.gridui-button-small {
|
|
570
|
-
height: var(--gridui-control-min-height);
|
|
571
|
-
}
|
|
572
|
-
.gridui-u-button--pointer-coarse\:\[\&\.gridui-button-small\]\:w-gridui-control.gridui-button-small {
|
|
573
|
-
width: var(--gridui-control-min-height);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
539
|
}
|
|
577
540
|
@layer components {
|
|
578
541
|
.gridui-button {
|
|
542
|
+
min-height: var(--_gridui-button-min);
|
|
579
543
|
border: 1px solid transparent;
|
|
580
544
|
}
|
|
581
545
|
.gridui-button-cell {
|
|
@@ -621,8 +585,27 @@
|
|
|
621
585
|
transform: var(--gridui-motion-transform, translate(calc(-1 * var(--gridui-space-4)), calc(-1 * var(--gridui-space-4))));
|
|
622
586
|
}
|
|
623
587
|
}
|
|
588
|
+
.gridui-button-medium {
|
|
589
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
590
|
+
padding-block: var(--gridui-space-8);
|
|
591
|
+
padding-inline: var(--gridui-space-16);
|
|
592
|
+
}
|
|
593
|
+
.gridui-button-small {
|
|
594
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
595
|
+
padding-block: var(--gridui-space-4);
|
|
596
|
+
padding-inline: var(--gridui-space-8);
|
|
597
|
+
}
|
|
598
|
+
.gridui-button-large {
|
|
599
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
600
|
+
padding-block: var(--gridui-space-8);
|
|
601
|
+
padding-inline: var(--gridui-space-24);
|
|
602
|
+
}
|
|
603
|
+
.gridui-button-extra-large {
|
|
604
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-extra-large), var(--gridui-target-min-size));
|
|
605
|
+
padding-block: var(--gridui-space-16);
|
|
606
|
+
padding-inline: var(--gridui-space-24);
|
|
607
|
+
}
|
|
624
608
|
.gridui-button-group {
|
|
625
|
-
--gridui-button-group-padding-block: var(--gridui-space-24);
|
|
626
609
|
container: gridui-button-group / inline-size;
|
|
627
610
|
min-width: 0;
|
|
628
611
|
}
|
|
@@ -665,12 +648,19 @@
|
|
|
665
648
|
min-width: 0;
|
|
666
649
|
}
|
|
667
650
|
.gridui-button-group-items[data-layout="cells"] > [data-gridui-button-group-item] {
|
|
668
|
-
|
|
669
|
-
padding: var(--gridui-button-group-padding-block) var(--gridui-space-24);
|
|
651
|
+
padding-block: var(--gridui-button-group-padding-block, var(--_gridui-button-group-block, var(--gridui-space-8)));
|
|
670
652
|
border: 0;
|
|
671
653
|
border-radius: 0;
|
|
672
654
|
}
|
|
673
655
|
}
|
|
656
|
+
@layer components {
|
|
657
|
+
.gridui-button-group-items > [data-size="small"] {
|
|
658
|
+
--_gridui-button-group-block: var(--gridui-space-4);
|
|
659
|
+
}
|
|
660
|
+
.gridui-button-group-items > [data-size="extra-large"] {
|
|
661
|
+
--_gridui-button-group-block: var(--gridui-space-16);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
674
664
|
@property --tw-border-style {
|
|
675
665
|
syntax: "*";
|
|
676
666
|
inherits: false;
|
|
@@ -704,11 +694,14 @@
|
|
|
704
694
|
.gridui-u-input--inline-flex {
|
|
705
695
|
display: inline-flex;
|
|
706
696
|
}
|
|
707
|
-
.gridui-u-input--min-h-gridui-control {
|
|
708
|
-
min-height: var(--gridui-control-min-height);
|
|
697
|
+
.gridui-u-input--min-h-gridui-control-large {
|
|
698
|
+
min-height: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
699
|
+
}
|
|
700
|
+
.gridui-u-input--min-h-gridui-control-medium {
|
|
701
|
+
min-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
709
702
|
}
|
|
710
703
|
.gridui-u-input--min-h-gridui-control-small {
|
|
711
|
-
min-height: var(--gridui-control-min-height-small);
|
|
704
|
+
min-height: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
712
705
|
}
|
|
713
706
|
.gridui-u-input--w-0 {
|
|
714
707
|
width: 0px;
|
|
@@ -767,9 +760,15 @@
|
|
|
767
760
|
.gridui-u-input--px-gridui-8 {
|
|
768
761
|
padding-inline: var(--gridui-space-8);
|
|
769
762
|
}
|
|
763
|
+
.gridui-u-input--px-gridui-16 {
|
|
764
|
+
padding-inline: var(--gridui-space-16);
|
|
765
|
+
}
|
|
770
766
|
.gridui-u-input--py-gridui-4 {
|
|
771
767
|
padding-block: var(--gridui-space-4);
|
|
772
768
|
}
|
|
769
|
+
.gridui-u-input--py-gridui-8 {
|
|
770
|
+
padding-block: var(--gridui-space-8);
|
|
771
|
+
}
|
|
773
772
|
.gridui-u-input--type-input {
|
|
774
773
|
font: var(--gridui-type-input);
|
|
775
774
|
font-family: var(--gridui-font-body);
|
|
@@ -783,6 +782,21 @@
|
|
|
783
782
|
.gridui-u-input--text-foreground {
|
|
784
783
|
color: var(--gridui-foreground);
|
|
785
784
|
}
|
|
785
|
+
.gridui-u-input--\[--gridui-control-icon\:var\(--gridui-icon-size\)\] {
|
|
786
|
+
--gridui-control-icon: var(--gridui-icon-size);
|
|
787
|
+
}
|
|
788
|
+
.gridui-u-input--\[--gridui-control-icon\:var\(--gridui-icon-size-large\)\] {
|
|
789
|
+
--gridui-control-icon: var(--gridui-icon-size-large);
|
|
790
|
+
}
|
|
791
|
+
.gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-large\)\,var\(--gridui-target-min-size\)\)\] {
|
|
792
|
+
--gridui-control-size: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
793
|
+
}
|
|
794
|
+
.gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-medium\)\,var\(--gridui-target-min-size\)\)\] {
|
|
795
|
+
--gridui-control-size: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
796
|
+
}
|
|
797
|
+
.gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-small\)\,var\(--gridui-target-min-size\)\)\] {
|
|
798
|
+
--gridui-control-size: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
799
|
+
}
|
|
786
800
|
.gridui-u-input--disabled\:cursor-not-allowed:disabled {
|
|
787
801
|
cursor: not-allowed;
|
|
788
802
|
}
|
|
@@ -792,6 +806,10 @@
|
|
|
792
806
|
.gridui-u-input--aria-invalid\:border-status-danger-border[aria-invalid="true"] {
|
|
793
807
|
border-color: var(--gridui-status-danger-border);
|
|
794
808
|
}
|
|
809
|
+
.gridui-u-input--\[\&_svg\]\:size-\(--gridui-control-icon\) svg {
|
|
810
|
+
width: var(--gridui-control-icon);
|
|
811
|
+
height: var(--gridui-control-icon);
|
|
812
|
+
}
|
|
795
813
|
.gridui-u-input--\[\&\>svg\]\:size-gridui-16 > svg {
|
|
796
814
|
width: var(--gridui-space-16);
|
|
797
815
|
height: var(--gridui-space-16);
|
|
@@ -799,7 +817,7 @@
|
|
|
799
817
|
}
|
|
800
818
|
@layer components {
|
|
801
819
|
.gridui-input-group {
|
|
802
|
-
--_gridui-input-height: var(--gridui-control-min-height);
|
|
820
|
+
--_gridui-input-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
803
821
|
position: relative;
|
|
804
822
|
display: flex;
|
|
805
823
|
flex-wrap: wrap;
|
|
@@ -812,8 +830,8 @@
|
|
|
812
830
|
border-radius: var(--gridui-control-radius);
|
|
813
831
|
color: var(--gridui-foreground);
|
|
814
832
|
background: var(--gridui-background);
|
|
815
|
-
&[data-
|
|
816
|
-
--_gridui-input-height: var(--gridui-control-min-height-small);
|
|
833
|
+
&[data-size="small"] {
|
|
834
|
+
--_gridui-input-height: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
817
835
|
}
|
|
818
836
|
> .gridui-control {
|
|
819
837
|
flex: 1;
|
|
@@ -869,9 +887,12 @@
|
|
|
869
887
|
.gridui-input-group-button {
|
|
870
888
|
flex: none;
|
|
871
889
|
}
|
|
890
|
+
.gridui-input-group[data-size="large"] {
|
|
891
|
+
--_gridui-input-height: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
892
|
+
}
|
|
872
893
|
.gridui-textarea-frame {
|
|
873
894
|
--_gridui-textarea-padding: var(--gridui-space-8);
|
|
874
|
-
--_gridui-textarea-control-minimum: var(--gridui-control-min-height);
|
|
895
|
+
--_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
875
896
|
--_gridui-textarea-resize-height: 0px;
|
|
876
897
|
--_gridui-textarea-footer-height: 0px;
|
|
877
898
|
--_gridui-textarea-border: 2px;
|
|
@@ -882,9 +903,9 @@
|
|
|
882
903
|
flex-direction: column;
|
|
883
904
|
min-height: calc(var(--_gridui-textarea-min-body) + var(--_gridui-textarea-chrome));
|
|
884
905
|
padding: 0;
|
|
885
|
-
&[data-
|
|
906
|
+
&[data-size="small"] {
|
|
886
907
|
--_gridui-textarea-padding: var(--gridui-space-4);
|
|
887
|
-
--_gridui-textarea-control-minimum: var(--gridui-control-min-height-small);
|
|
908
|
+
--_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
888
909
|
}
|
|
889
910
|
&[data-grouped] {
|
|
890
911
|
--_gridui-textarea-border: 0px;
|
|
@@ -896,7 +917,7 @@
|
|
|
896
917
|
--_gridui-textarea-resize-height: var(--gridui-space-32);
|
|
897
918
|
}
|
|
898
919
|
&:is([data-resize-handle="footer"], [data-footer]) {
|
|
899
|
-
--_gridui-textarea-footer-height: var(--gridui-control-min-height);
|
|
920
|
+
--_gridui-textarea-footer-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
900
921
|
}
|
|
901
922
|
&[data-max-rows] {
|
|
902
923
|
max-height: calc(var(--_gridui-textarea-max-rows) * 1lh + 2 * var(--_gridui-textarea-padding) + var(--_gridui-textarea-chrome));
|
|
@@ -952,7 +973,7 @@
|
|
|
952
973
|
display: flex;
|
|
953
974
|
flex: none;
|
|
954
975
|
align-items: stretch;
|
|
955
|
-
min-height: var(--gridui-control-min-height);
|
|
976
|
+
min-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
956
977
|
border-top: 1px solid;
|
|
957
978
|
border-color: inherit;
|
|
958
979
|
background: var(--gridui-surface);
|
|
@@ -972,7 +993,7 @@
|
|
|
972
993
|
flex: none;
|
|
973
994
|
align-items: center;
|
|
974
995
|
justify-content: center;
|
|
975
|
-
width: var(--gridui-control-min-height);
|
|
996
|
+
width: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
976
997
|
margin: 0;
|
|
977
998
|
padding: 0;
|
|
978
999
|
border: 0;
|
|
@@ -1011,9 +1032,12 @@
|
|
|
1011
1032
|
}
|
|
1012
1033
|
@media (pointer: coarse) {
|
|
1013
1034
|
.gridui-textarea-frame:is([data-resize-handle="corner"], [data-resize-handle="edge"]) {
|
|
1014
|
-
--_gridui-textarea-resize-height: var(--gridui-control-min-height);
|
|
1035
|
+
--_gridui-textarea-resize-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
1015
1036
|
}
|
|
1016
1037
|
}
|
|
1038
|
+
.gridui-textarea-frame[data-size="large"] {
|
|
1039
|
+
--_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
1040
|
+
}
|
|
1017
1041
|
.gridui-input-group > input[type="search"]::-webkit-search-cancel-button {
|
|
1018
1042
|
appearance: none;
|
|
1019
1043
|
}
|
|
@@ -1117,12 +1141,12 @@
|
|
|
1117
1141
|
.gridui-u-select--max-w-\(--available-width\) {
|
|
1118
1142
|
max-width: var(--available-width);
|
|
1119
1143
|
}
|
|
1144
|
+
.gridui-u-select--min-w-\(--gridui-control-size\) {
|
|
1145
|
+
min-width: var(--gridui-control-size);
|
|
1146
|
+
}
|
|
1120
1147
|
.gridui-u-select--min-w-0 {
|
|
1121
1148
|
min-width: 0px;
|
|
1122
1149
|
}
|
|
1123
|
-
.gridui-u-select--min-w-11 {
|
|
1124
|
-
min-width: calc(var(--spacing) * 11);
|
|
1125
|
-
}
|
|
1126
1150
|
.gridui-u-select--flex-1 {
|
|
1127
1151
|
flex: 1;
|
|
1128
1152
|
}
|
package/dist/styles.local.css
CHANGED
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
.gridui-u-select--max-w-\(--available-width\) {
|
|
85
85
|
max-width: var(--available-width);
|
|
86
86
|
}
|
|
87
|
+
.gridui-u-select--min-w-\(--gridui-control-size\) {
|
|
88
|
+
min-width: var(--gridui-control-size);
|
|
89
|
+
}
|
|
87
90
|
.gridui-u-select--min-w-0 {
|
|
88
91
|
min-width: 0px;
|
|
89
92
|
}
|
|
90
|
-
.gridui-u-select--min-w-11 {
|
|
91
|
-
min-width: calc(var(--spacing) * 11);
|
|
92
|
-
}
|
|
93
93
|
.gridui-u-select--flex-1 {
|
|
94
94
|
flex: 1;
|
|
95
95
|
}
|
package/docs/catalog.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/select",
|
|
4
|
-
"version": "
|
|
5
|
-
"category": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"category": "controls",
|
|
6
6
|
"description": "GridUI React select",
|
|
7
7
|
"usage": "Input supplies control styles. Overlay supplies popup surfaces, motion, option rows, group labels, and trailing check slots. Form hides MultiSelect’s native multiple-value bridge. Applications own routes, labels, state persistence, and branding.",
|
|
8
8
|
"documentation": [
|
|
@@ -121,15 +121,15 @@
|
|
|
121
121
|
],
|
|
122
122
|
"styledImport": "@gridui/select/styled",
|
|
123
123
|
"examples": [
|
|
124
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
125
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
126
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
127
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
128
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
129
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
130
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
131
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
132
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
133
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
124
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/free-text.mdx",
|
|
125
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/getting-started.mdx",
|
|
126
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/multiple-options.mdx",
|
|
127
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/remote-options.mdx",
|
|
128
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/search-options.mdx",
|
|
129
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/single-option.mdx",
|
|
130
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/autocomplete.stories.tsx",
|
|
131
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/combobox.stories.tsx",
|
|
132
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/multi-select.stories.tsx",
|
|
133
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/select.stories.tsx"
|
|
134
134
|
]
|
|
135
135
|
}
|
|
@@ -11,7 +11,7 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/select/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
16
|
## API
|
|
17
17
|
|
|
@@ -43,6 +43,12 @@ The public Props type is the source of these signatures. Defaults below are expl
|
|
|
43
43
|
|
|
44
44
|
Controlled value. Pair with the corresponding change callback.
|
|
45
45
|
|
|
46
|
+
### density
|
|
47
|
+
|
|
48
|
+
``Density | undefined`` · Optional
|
|
49
|
+
|
|
50
|
+
Default: ``"comfortable"``
|
|
51
|
+
|
|
46
52
|
### options
|
|
47
53
|
|
|
48
54
|
``readonly (SelectOption | SelectGroup)[]`` · Required
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/select/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/autocomplete.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -25,6 +25,12 @@ The public Props type is the source of these signatures. Defaults below are expl
|
|
|
25
25
|
|
|
26
26
|
Content rendered inside the component.
|
|
27
27
|
|
|
28
|
+
### size
|
|
29
|
+
|
|
30
|
+
``Size | undefined`` · Optional
|
|
31
|
+
|
|
32
|
+
Component size preset.
|
|
33
|
+
|
|
28
34
|
### onFocus
|
|
29
35
|
|
|
30
36
|
``(event: FocusEvent<HTMLInputElement, Element>): void`` · Optional
|
|
@@ -61,9 +67,9 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
61
67
|
|
|
62
68
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
63
69
|
|
|
64
|
-
###
|
|
70
|
+
### htmlSize
|
|
65
71
|
|
|
66
|
-
``
|
|
72
|
+
``number | undefined`` · Optional
|
|
67
73
|
|
|
68
74
|
### loading
|
|
69
75
|
|
|
@@ -119,6 +125,10 @@ Initial uncontrolled value. Reset the story after changing it.
|
|
|
119
125
|
|
|
120
126
|
``string | undefined`` · Optional
|
|
121
127
|
|
|
128
|
+
### density
|
|
129
|
+
|
|
130
|
+
``Density | undefined`` · Optional
|
|
131
|
+
|
|
122
132
|
### onOptionSelect
|
|
123
133
|
|
|
124
134
|
``(option: SelectOption): void`` · Optional
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/select/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/combobox.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -71,12 +71,6 @@ Participates in required form validation.
|
|
|
71
71
|
|
|
72
72
|
Default: ``[]``
|
|
73
73
|
|
|
74
|
-
### controlSize
|
|
75
|
-
|
|
76
|
-
``"small" | "standard" | undefined`` · Optional
|
|
77
|
-
|
|
78
|
-
Default: ``"standard"``
|
|
79
|
-
|
|
80
74
|
### value
|
|
81
75
|
|
|
82
76
|
``string | undefined`` · Optional
|
|
@@ -97,6 +91,20 @@ Initial uncontrolled value. Reset the story after changing it.
|
|
|
97
91
|
|
|
98
92
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
99
93
|
|
|
94
|
+
### size
|
|
95
|
+
|
|
96
|
+
``Size | undefined`` · Optional
|
|
97
|
+
|
|
98
|
+
Default: ``"medium"``
|
|
99
|
+
|
|
100
|
+
Component size preset.
|
|
101
|
+
|
|
102
|
+
### density
|
|
103
|
+
|
|
104
|
+
``Density | undefined`` · Optional
|
|
105
|
+
|
|
106
|
+
Default: ``"comfortable"``
|
|
107
|
+
|
|
100
108
|
### clearLabel
|
|
101
109
|
|
|
102
110
|
``string | undefined`` · Optional
|
|
@@ -155,3 +163,7 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
155
163
|
|
|
156
164
|
``string`` · Required
|
|
157
165
|
|
|
166
|
+
### htmlSize
|
|
167
|
+
|
|
168
|
+
``number | undefined`` · Optional
|
|
169
|
+
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/select/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/multi-select.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -77,6 +77,20 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
77
77
|
|
|
78
78
|
Allows reading without changing the value.
|
|
79
79
|
|
|
80
|
+
### size
|
|
81
|
+
|
|
82
|
+
``Size | undefined`` · Optional
|
|
83
|
+
|
|
84
|
+
Default: ``"medium"``
|
|
85
|
+
|
|
86
|
+
Component size preset.
|
|
87
|
+
|
|
88
|
+
### density
|
|
89
|
+
|
|
90
|
+
``Density | undefined`` · Optional
|
|
91
|
+
|
|
92
|
+
Default: ``"comfortable"``
|
|
93
|
+
|
|
80
94
|
### clearLabel
|
|
81
95
|
|
|
82
96
|
``string | undefined`` · Optional
|
package/docs/reference/select.md
CHANGED
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/select/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/select/stories/select.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -65,12 +65,6 @@ Native form field name.
|
|
|
65
65
|
|
|
66
66
|
Default: ``[]``
|
|
67
67
|
|
|
68
|
-
### controlSize
|
|
69
|
-
|
|
70
|
-
``"small" | "standard" | undefined`` · Optional
|
|
71
|
-
|
|
72
|
-
Default: ``"standard"``
|
|
73
|
-
|
|
74
68
|
### value
|
|
75
69
|
|
|
76
70
|
``string | undefined`` · Optional
|
|
@@ -91,6 +85,20 @@ Initial uncontrolled value. Reset the story after changing it.
|
|
|
91
85
|
|
|
92
86
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
93
87
|
|
|
88
|
+
### size
|
|
89
|
+
|
|
90
|
+
``Size | undefined`` · Optional
|
|
91
|
+
|
|
92
|
+
Default: ``"medium"``
|
|
93
|
+
|
|
94
|
+
Component size preset.
|
|
95
|
+
|
|
96
|
+
### density
|
|
97
|
+
|
|
98
|
+
``Density | undefined`` · Optional
|
|
99
|
+
|
|
100
|
+
Default: ``"comfortable"``
|
|
101
|
+
|
|
94
102
|
### clearLabel
|
|
95
103
|
|
|
96
104
|
``string | undefined`` · Optional
|