@keenthemes/ktui 1.0.12 → 1.0.14
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/dist/ktui.js +738 -700
- package/dist/ktui.min.js +1 -1
- package/dist/ktui.min.js.map +1 -1
- package/dist/styles.css +5824 -0
- package/examples/select/avatar.html +47 -0
- package/examples/select/basic-usage.html +10 -14
- package/examples/select/{test.html → combobox-icons_.html} +13 -48
- package/examples/select/country.html +43 -0
- package/examples/select/description.html +25 -41
- package/examples/select/disable-option.html +10 -16
- package/examples/select/disable-select.html +7 -6
- package/examples/select/icon-multiple.html +23 -31
- package/examples/select/icon.html +20 -30
- package/examples/select/max-selection.html +8 -9
- package/examples/select/modal.html +16 -17
- package/examples/select/multiple.html +11 -13
- package/examples/select/placeholder.html +9 -12
- package/examples/select/search.html +30 -22
- package/examples/select/sizes.html +94 -0
- package/examples/select/template-customization.html +0 -3
- package/lib/cjs/components/component.js +1 -1
- package/lib/cjs/components/component.js.map +1 -1
- package/lib/cjs/components/datatable/datatable.js +14 -11
- package/lib/cjs/components/datatable/datatable.js.map +1 -1
- package/lib/cjs/components/select/combobox.js +96 -61
- package/lib/cjs/components/select/combobox.js.map +1 -1
- package/lib/cjs/components/select/config.js +13 -8
- package/lib/cjs/components/select/config.js.map +1 -1
- package/lib/cjs/components/select/dropdown.js +32 -96
- package/lib/cjs/components/select/dropdown.js.map +1 -1
- package/lib/cjs/components/select/option.js +53 -20
- package/lib/cjs/components/select/option.js.map +1 -1
- package/lib/cjs/components/select/search.js +146 -97
- package/lib/cjs/components/select/search.js.map +1 -1
- package/lib/cjs/components/select/select.js +219 -118
- package/lib/cjs/components/select/select.js.map +1 -1
- package/lib/cjs/components/select/tags.js +0 -26
- package/lib/cjs/components/select/tags.js.map +1 -1
- package/lib/cjs/components/select/templates.js +130 -105
- package/lib/cjs/components/select/templates.js.map +1 -1
- package/lib/cjs/components/select/utils.js +33 -132
- package/lib/cjs/components/select/utils.js.map +1 -1
- package/lib/cjs/helpers/dom.js +0 -24
- package/lib/cjs/helpers/dom.js.map +1 -1
- package/lib/esm/components/component.js +1 -1
- package/lib/esm/components/component.js.map +1 -1
- package/lib/esm/components/datatable/datatable.js +14 -11
- package/lib/esm/components/datatable/datatable.js.map +1 -1
- package/lib/esm/components/select/combobox.js +96 -61
- package/lib/esm/components/select/combobox.js.map +1 -1
- package/lib/esm/components/select/config.js +13 -8
- package/lib/esm/components/select/config.js.map +1 -1
- package/lib/esm/components/select/dropdown.js +32 -96
- package/lib/esm/components/select/dropdown.js.map +1 -1
- package/lib/esm/components/select/option.js +53 -20
- package/lib/esm/components/select/option.js.map +1 -1
- package/lib/esm/components/select/search.js +146 -97
- package/lib/esm/components/select/search.js.map +1 -1
- package/lib/esm/components/select/select.js +219 -118
- package/lib/esm/components/select/select.js.map +1 -1
- package/lib/esm/components/select/tags.js +0 -26
- package/lib/esm/components/select/tags.js.map +1 -1
- package/lib/esm/components/select/templates.js +130 -105
- package/lib/esm/components/select/templates.js.map +1 -1
- package/lib/esm/components/select/utils.js +32 -130
- package/lib/esm/components/select/utils.js.map +1 -1
- package/lib/esm/helpers/dom.js +0 -24
- package/lib/esm/helpers/dom.js.map +1 -1
- package/package.json +9 -6
- package/src/components/component.ts +0 -4
- package/src/components/datatable/datatable.ts +14 -11
- package/src/components/input/input.css +1 -1
- package/src/components/scrollable/scrollable.css +9 -5
- package/src/components/select/combobox.ts +98 -87
- package/src/components/select/config.ts +16 -13
- package/src/components/select/dropdown.ts +43 -108
- package/src/components/select/option.ts +44 -25
- package/src/components/select/search.ts +158 -117
- package/src/components/select/select.css +99 -27
- package/src/components/select/select.ts +236 -128
- package/src/components/select/tags.ts +1 -27
- package/src/components/select/templates.ts +191 -132
- package/src/components/select/utils.ts +30 -166
- package/src/components/toast/toast.css +1 -1
- package/src/helpers/dom.ts +0 -30
- package/webpack.config.js +6 -1
- package/examples/select/combobox-icons.html +0 -58
- package/examples/select/icon-description.html +0 -56
- /package/examples/select/{combobox.html → combobox_.html} +0 -0
- /package/examples/select/{remote-data.html → remote-data_.html} +0 -0
- /package/examples/select/{tags-icons.html → tags-icons_.html} +0 -0
- /package/examples/select/{tags-selected.html → tags-selected_.html} +0 -0
- /package/examples/select/{tags.html → tags_.html} +0 -0
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
/* Base Styles */
|
|
7
7
|
@layer components {
|
|
8
8
|
.kt-select {
|
|
9
|
-
@apply py-0 appearance-none flex items-center gap-2 w-full bg-background border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] transition-[color,box-shadow] text-foreground placeholder:text-muted-foreground/80;
|
|
9
|
+
@apply cursor-pointer py-0 appearance-none flex items-center gap-2 w-full bg-background border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] transition-[color,box-shadow] text-foreground placeholder:text-muted-foreground/80;
|
|
10
10
|
@apply focus-visible:ring-ring/30 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px];
|
|
11
|
-
@apply disabled:cursor-not-allowed disabled:opacity-
|
|
11
|
+
@apply disabled:cursor-not-allowed disabled:opacity-60;
|
|
12
|
+
@apply [&[readonly]]:opacity-70;
|
|
12
13
|
@apply aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10;
|
|
13
14
|
|
|
14
15
|
background-repeat: no-repeat;
|
|
15
|
-
background-position: right 0.65rem center;
|
|
16
16
|
background-size: 14px 11px;
|
|
17
17
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%239f9fa9' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
|
|
18
18
|
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
&:-moz-focusring {
|
|
30
30
|
color: transparent;
|
|
31
31
|
text-shadow: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[dir='rtl'] & {
|
|
35
|
-
background-position: left 0.5rem center;
|
|
36
|
-
}
|
|
32
|
+
}
|
|
37
33
|
|
|
38
34
|
&.active {
|
|
39
35
|
@apply ring-ring/30 border-ring outline-none ring-[3px];
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
&.disabled {
|
|
43
|
-
@apply cursor-not-allowed opacity-
|
|
39
|
+
@apply cursor-not-allowed opacity-60;
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
42
|
|
|
43
|
+
.kt-select-label {
|
|
44
|
+
@apply flex items-center truncate;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
47
|
.kt-select-arrow {
|
|
48
48
|
@apply ms-auto;
|
|
49
49
|
|
|
@@ -52,27 +52,52 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
.kt-select-search {
|
|
56
|
+
@apply px-4 py-1 border-b border-border;
|
|
57
|
+
|
|
58
|
+
.kt-input {
|
|
59
|
+
@apply text-sm;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
.kt-select-dropdown {
|
|
56
64
|
@apply rounded-md shadow-md shadow-[rgba(0,0,0,0.05)] border border-border bg-popover text-popover-foreground;
|
|
57
65
|
}
|
|
58
66
|
|
|
67
|
+
.kt-select-options {
|
|
68
|
+
@apply p-1 space-y-0.5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.kt-select-wrapper {
|
|
72
|
+
@apply w-full;
|
|
73
|
+
|
|
74
|
+
&.disabled {
|
|
75
|
+
@apply opacity-60 pointer-events-none;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
59
79
|
.kt-select-option {
|
|
60
|
-
@apply
|
|
80
|
+
@apply grow flex items-center gap-2.5 py-1.75 px-2.5 rounded-md text-sm text-start cursor-pointer;
|
|
61
81
|
@apply hover:bg-accent hover:text-accent-foreground;
|
|
62
82
|
|
|
83
|
+
&[aria-disabled=true],
|
|
63
84
|
&.disabled {
|
|
64
|
-
@apply opacity-
|
|
85
|
+
@apply opacity-60 pointer-events-none;
|
|
65
86
|
}
|
|
66
87
|
|
|
67
|
-
&.selected {
|
|
68
|
-
@apply bg-accent text-accent-foreground;
|
|
69
|
-
}
|
|
88
|
+
&.selected {}
|
|
70
89
|
|
|
90
|
+
&.focused,
|
|
91
|
+
&.hover,
|
|
71
92
|
&.highlighted {
|
|
72
93
|
@apply bg-accent text-accent-foreground;
|
|
73
94
|
}
|
|
74
95
|
}
|
|
75
96
|
|
|
97
|
+
.kt-select-option-text {
|
|
98
|
+
@apply overflow-ellipsis truncate;
|
|
99
|
+
}
|
|
100
|
+
|
|
76
101
|
.kt-select-group {
|
|
77
102
|
@apply py-1;
|
|
78
103
|
}
|
|
@@ -80,20 +105,75 @@
|
|
|
80
105
|
.kt-select-group-header {
|
|
81
106
|
@apply px-3 py-1 text-xs font-semibold text-muted-foreground uppercase;
|
|
82
107
|
}
|
|
108
|
+
|
|
109
|
+
.kt-select-placeholder {
|
|
110
|
+
@apply overflow-ellipsis truncate;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.kt-select-display:not([data-multiple=true]) {
|
|
114
|
+
@apply w-full overflow-ellipsis truncate;
|
|
115
|
+
}
|
|
83
116
|
}
|
|
84
117
|
|
|
85
118
|
/* Sizes */
|
|
86
119
|
@layer components {
|
|
87
120
|
.kt-select {
|
|
88
|
-
@apply h-8.5 gap-1
|
|
121
|
+
@apply h-8.5 gap-1 ps-3 pe-6 text-[0.8125rem] leading-(--text-sm--line-height) rounded-md;
|
|
122
|
+
background-position: right 0.5rem center;
|
|
123
|
+
|
|
124
|
+
&[data-multiple=true] {
|
|
125
|
+
@apply h-auto min-h-8.5 py-1.5 flex-wrap;
|
|
126
|
+
background-position: right 0.5rem top 0.675rem;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.kt-select-sm {
|
|
131
|
+
@apply h-7 gap-1 ps-2.5 pe-5 text-xs rounded-md;
|
|
132
|
+
background-position: right 0.5rem center;
|
|
133
|
+
|
|
134
|
+
&[data-multiple=true] {
|
|
135
|
+
@apply h-auto min-h-7;
|
|
136
|
+
background-position: right 0.5rem top 0.575rem;
|
|
137
|
+
}
|
|
89
138
|
}
|
|
90
139
|
|
|
91
140
|
.kt-select-lg {
|
|
92
|
-
@apply h-10 gap-1.5
|
|
141
|
+
@apply h-10 gap-1.5 ps-4 pe-8 py-1 text-sm rounded-md;
|
|
142
|
+
background-position: right 0.6rem center;
|
|
143
|
+
|
|
144
|
+
&[data-multiple=true] {
|
|
145
|
+
@apply h-auto min-h-10 py-2;
|
|
146
|
+
background-position: right 0.6rem top 0.85rem;
|
|
147
|
+
}
|
|
93
148
|
}
|
|
149
|
+
}
|
|
94
150
|
|
|
95
|
-
|
|
96
|
-
|
|
151
|
+
/* RTL */
|
|
152
|
+
@layer components {
|
|
153
|
+
[dir='rtl'] {
|
|
154
|
+
.kt-select {
|
|
155
|
+
background-position: left 0.5rem center;
|
|
156
|
+
|
|
157
|
+
&[data-multiple=true] {
|
|
158
|
+
background-position: left 0.5rem top 0.675rem;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.kt-select-sm {
|
|
163
|
+
background-position: left 0.5rem center;
|
|
164
|
+
|
|
165
|
+
&[data-multiple=true] {
|
|
166
|
+
background-position: left 0.5rem top 0.575rem;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.kt-select-lg {
|
|
171
|
+
background-position: left 0.75rem center;
|
|
172
|
+
|
|
173
|
+
&[data-multiple=true] {
|
|
174
|
+
background-position: left 0.75rem top 0.85rem;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
97
177
|
}
|
|
98
178
|
}
|
|
99
179
|
|
|
@@ -104,15 +184,7 @@
|
|
|
104
184
|
}
|
|
105
185
|
}
|
|
106
186
|
|
|
107
|
-
/*
|
|
108
|
-
.kt-select-option.focus {
|
|
109
|
-
@apply bg-accent text-accent-foreground;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.kt-select-option.hover {
|
|
113
|
-
@apply bg-accent text-accent-foreground;
|
|
114
|
-
}
|
|
115
|
-
|
|
187
|
+
/* Custom variants */
|
|
116
188
|
@custom-variant kt-select-option-selected {
|
|
117
189
|
[data-kt-select-option].selected {
|
|
118
190
|
@slot;
|