@process.co/ui 0.0.8 → 0.0.9
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/css/ui.css +142 -0
- package/dist/components/fields/index.cjs +257 -21
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.d.cts +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/fields/index.js +248 -22
- package/dist/components/fields/index.js.map +1 -1
- package/dist/{index-yubVl0hX.d.cts → index-nu_JyZnb.d.cts} +178 -17
- package/dist/{index-yubVl0hX.d.ts → index-nu_JyZnb.d.ts} +178 -17
- package/dist/index.cjs +288 -80
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +286 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/css/ui.css
CHANGED
|
@@ -203,6 +203,9 @@
|
|
|
203
203
|
.uii\:right-1\.5 {
|
|
204
204
|
right: calc(var(--uii-spacing) * 1.5);
|
|
205
205
|
}
|
|
206
|
+
.uii\:right-2 {
|
|
207
|
+
right: calc(var(--uii-spacing) * 2);
|
|
208
|
+
}
|
|
206
209
|
.uii\:left-2 {
|
|
207
210
|
left: calc(var(--uii-spacing) * 2);
|
|
208
211
|
}
|
|
@@ -1099,6 +1102,9 @@
|
|
|
1099
1102
|
.uii\:h-9 {
|
|
1100
1103
|
height: calc(var(--uii-spacing) * 9);
|
|
1101
1104
|
}
|
|
1105
|
+
.uii\:h-\[var\(--radix-select-trigger-height\)\] {
|
|
1106
|
+
height: var(--radix-select-trigger-height);
|
|
1107
|
+
}
|
|
1102
1108
|
.uii\:h-full {
|
|
1103
1109
|
height: 100%;
|
|
1104
1110
|
}
|
|
@@ -1108,6 +1114,9 @@
|
|
|
1108
1114
|
.uii\:max-h-64 {
|
|
1109
1115
|
max-height: calc(var(--uii-spacing) * 64);
|
|
1110
1116
|
}
|
|
1117
|
+
.uii\:max-h-96 {
|
|
1118
|
+
max-height: calc(var(--uii-spacing) * 96);
|
|
1119
|
+
}
|
|
1111
1120
|
.uii\:min-h-\[1\.5rem\] {
|
|
1112
1121
|
min-height: 1.5rem;
|
|
1113
1122
|
}
|
|
@@ -1123,6 +1132,9 @@
|
|
|
1123
1132
|
.uii\:min-w-\[8rem\] {
|
|
1124
1133
|
min-width: 8rem;
|
|
1125
1134
|
}
|
|
1135
|
+
.uii\:min-w-\[var\(--radix-select-trigger-width\)\] {
|
|
1136
|
+
min-width: var(--radix-select-trigger-width);
|
|
1137
|
+
}
|
|
1126
1138
|
.uii\:flex-1 {
|
|
1127
1139
|
flex: 1;
|
|
1128
1140
|
}
|
|
@@ -1138,6 +1150,9 @@
|
|
|
1138
1150
|
.uii\:cursor-pointer {
|
|
1139
1151
|
cursor: pointer;
|
|
1140
1152
|
}
|
|
1153
|
+
.uii\:scroll-my-1 {
|
|
1154
|
+
scroll-margin-block: calc(var(--uii-spacing) * 1);
|
|
1155
|
+
}
|
|
1141
1156
|
.uii\:flex-wrap {
|
|
1142
1157
|
flex-wrap: wrap;
|
|
1143
1158
|
}
|
|
@@ -1207,6 +1222,10 @@
|
|
|
1207
1222
|
border-style: var(--tw-border-style);
|
|
1208
1223
|
border-width: 1px;
|
|
1209
1224
|
}
|
|
1225
|
+
.uii\:border-t {
|
|
1226
|
+
border-top-style: var(--tw-border-style);
|
|
1227
|
+
border-top-width: 1px;
|
|
1228
|
+
}
|
|
1210
1229
|
.uii\:border-b {
|
|
1211
1230
|
border-bottom-style: var(--tw-border-style);
|
|
1212
1231
|
border-bottom-width: 1px;
|
|
@@ -1362,12 +1381,21 @@
|
|
|
1362
1381
|
.uii\:py-1\.5 {
|
|
1363
1382
|
padding-block: calc(var(--uii-spacing) * 1.5);
|
|
1364
1383
|
}
|
|
1384
|
+
.uii\:py-2 {
|
|
1385
|
+
padding-block: calc(var(--uii-spacing) * 2);
|
|
1386
|
+
}
|
|
1365
1387
|
.uii\:pr-2 {
|
|
1366
1388
|
padding-right: calc(var(--uii-spacing) * 2);
|
|
1367
1389
|
}
|
|
1390
|
+
.uii\:pr-8 {
|
|
1391
|
+
padding-right: calc(var(--uii-spacing) * 8);
|
|
1392
|
+
}
|
|
1368
1393
|
.uii\:pr-30 {
|
|
1369
1394
|
padding-right: calc(var(--uii-spacing) * 30);
|
|
1370
1395
|
}
|
|
1396
|
+
.uii\:pl-2 {
|
|
1397
|
+
padding-left: calc(var(--uii-spacing) * 2);
|
|
1398
|
+
}
|
|
1371
1399
|
.uii\:pl-8 {
|
|
1372
1400
|
padding-left: calc(var(--uii-spacing) * 8);
|
|
1373
1401
|
}
|
|
@@ -1420,6 +1448,9 @@
|
|
|
1420
1448
|
--tw-tracking: var(--uii-tracking-widest);
|
|
1421
1449
|
letter-spacing: var(--uii-tracking-widest);
|
|
1422
1450
|
}
|
|
1451
|
+
.uii\:whitespace-nowrap {
|
|
1452
|
+
white-space: nowrap;
|
|
1453
|
+
}
|
|
1423
1454
|
.uii\:text-amber-600 {
|
|
1424
1455
|
color: oklch(66.6% 0.179 58.318);
|
|
1425
1456
|
}
|
|
@@ -1552,6 +1583,12 @@
|
|
|
1552
1583
|
-webkit-user-select: none;
|
|
1553
1584
|
user-select: none;
|
|
1554
1585
|
}
|
|
1586
|
+
.uii\:slide-in-from-right-6 {
|
|
1587
|
+
--tw-enter-translate-x: m;
|
|
1588
|
+
}
|
|
1589
|
+
.uii\:slide-in-from-right-6 {
|
|
1590
|
+
--tw-enter-translate-x: m;
|
|
1591
|
+
}
|
|
1555
1592
|
.uii\:selection\:bg-primary {
|
|
1556
1593
|
& *::selection {
|
|
1557
1594
|
background-color: var(--primary);
|
|
@@ -1693,6 +1730,17 @@
|
|
|
1693
1730
|
padding-left: calc(var(--uii-spacing) * 8);
|
|
1694
1731
|
}
|
|
1695
1732
|
}
|
|
1733
|
+
.uii\:data-\[placeholder\]\:text-muted-foreground {
|
|
1734
|
+
&[data-placeholder] {
|
|
1735
|
+
color: var(--muted-foreground);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
.uii\:data-\[side\=bottom\]\:translate-y-1 {
|
|
1739
|
+
&[data-side="bottom"] {
|
|
1740
|
+
--tw-translate-y: calc(var(--uii-spacing) * 1);
|
|
1741
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1696
1744
|
.uii\:data-\[side\=bottom\]\:slide-in-from-top-2 {
|
|
1697
1745
|
&[data-side="bottom"] {
|
|
1698
1746
|
--tw-enter-translate-y: -2;
|
|
@@ -1703,6 +1751,12 @@
|
|
|
1703
1751
|
--tw-enter-translate-y: -2;
|
|
1704
1752
|
}
|
|
1705
1753
|
}
|
|
1754
|
+
.uii\:data-\[side\=left\]\:-translate-x-1 {
|
|
1755
|
+
&[data-side="left"] {
|
|
1756
|
+
--tw-translate-x: calc(var(--uii-spacing) * -1);
|
|
1757
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1706
1760
|
.uii\:data-\[side\=left\]\:slide-in-from-right-2 {
|
|
1707
1761
|
&[data-side="left"] {
|
|
1708
1762
|
--tw-enter-translate-x: 2;
|
|
@@ -1713,6 +1767,12 @@
|
|
|
1713
1767
|
--tw-enter-translate-x: 2;
|
|
1714
1768
|
}
|
|
1715
1769
|
}
|
|
1770
|
+
.uii\:data-\[side\=right\]\:translate-x-1 {
|
|
1771
|
+
&[data-side="right"] {
|
|
1772
|
+
--tw-translate-x: calc(var(--uii-spacing) * 1);
|
|
1773
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1716
1776
|
.uii\:data-\[side\=right\]\:slide-in-from-left-2 {
|
|
1717
1777
|
&[data-side="right"] {
|
|
1718
1778
|
--tw-enter-translate-x: -2;
|
|
@@ -1723,6 +1783,12 @@
|
|
|
1723
1783
|
--tw-enter-translate-x: -2;
|
|
1724
1784
|
}
|
|
1725
1785
|
}
|
|
1786
|
+
.uii\:data-\[side\=top\]\:-translate-y-1 {
|
|
1787
|
+
&[data-side="top"] {
|
|
1788
|
+
--tw-translate-y: calc(var(--uii-spacing) * -1);
|
|
1789
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1726
1792
|
.uii\:data-\[side\=top\]\:slide-in-from-bottom-2 {
|
|
1727
1793
|
&[data-side="top"] {
|
|
1728
1794
|
--tw-enter-translate-y: 2;
|
|
@@ -1733,6 +1799,37 @@
|
|
|
1733
1799
|
--tw-enter-translate-y: 2;
|
|
1734
1800
|
}
|
|
1735
1801
|
}
|
|
1802
|
+
.uii\:\*\:data-\[slot\=select-value\]\:line-clamp-1 {
|
|
1803
|
+
:is(& > *) {
|
|
1804
|
+
&[data-slot="select-value"] {
|
|
1805
|
+
overflow: hidden;
|
|
1806
|
+
display: -webkit-box;
|
|
1807
|
+
-webkit-box-orient: vertical;
|
|
1808
|
+
-webkit-line-clamp: 1;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
.uii\:\*\:data-\[slot\=select-value\]\:flex {
|
|
1813
|
+
:is(& > *) {
|
|
1814
|
+
&[data-slot="select-value"] {
|
|
1815
|
+
display: flex;
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
.uii\:\*\:data-\[slot\=select-value\]\:items-center {
|
|
1820
|
+
:is(& > *) {
|
|
1821
|
+
&[data-slot="select-value"] {
|
|
1822
|
+
align-items: center;
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
.uii\:\*\:data-\[slot\=select-value\]\:gap-2 {
|
|
1827
|
+
:is(& > *) {
|
|
1828
|
+
&[data-slot="select-value"] {
|
|
1829
|
+
gap: calc(var(--uii-spacing) * 2);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1736
1833
|
.uii\:data-\[state\=closed\]\:animate-out {
|
|
1737
1834
|
&[data-state="closed"] {
|
|
1738
1835
|
animation-name: exit;
|
|
@@ -1898,6 +1995,33 @@
|
|
|
1898
1995
|
color: var(--muted-foreground);
|
|
1899
1996
|
}
|
|
1900
1997
|
}
|
|
1998
|
+
.uii\:\*\:\[span\]\:last\:flex {
|
|
1999
|
+
:is(& > *) {
|
|
2000
|
+
&:is(span) {
|
|
2001
|
+
&:last-child {
|
|
2002
|
+
display: flex;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
.uii\:\*\:\[span\]\:last\:items-center {
|
|
2008
|
+
:is(& > *) {
|
|
2009
|
+
&:is(span) {
|
|
2010
|
+
&:last-child {
|
|
2011
|
+
align-items: center;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
.uii\:\*\:\[span\]\:last\:gap-2 {
|
|
2017
|
+
:is(& > *) {
|
|
2018
|
+
&:is(span) {
|
|
2019
|
+
&:last-child {
|
|
2020
|
+
gap: calc(var(--uii-spacing) * 2);
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
1901
2025
|
.uii\:data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive-foreground {
|
|
1902
2026
|
&[data-variant="destructive"] {
|
|
1903
2027
|
:is(& > *) {
|
|
@@ -2348,6 +2472,21 @@ body {
|
|
|
2348
2472
|
inherits: false;
|
|
2349
2473
|
initial-value: 0 0 #0000;
|
|
2350
2474
|
}
|
|
2475
|
+
@property --tw-translate-x {
|
|
2476
|
+
syntax: "*";
|
|
2477
|
+
inherits: false;
|
|
2478
|
+
initial-value: 0;
|
|
2479
|
+
}
|
|
2480
|
+
@property --tw-translate-y {
|
|
2481
|
+
syntax: "*";
|
|
2482
|
+
inherits: false;
|
|
2483
|
+
initial-value: 0;
|
|
2484
|
+
}
|
|
2485
|
+
@property --tw-translate-z {
|
|
2486
|
+
syntax: "*";
|
|
2487
|
+
inherits: false;
|
|
2488
|
+
initial-value: 0;
|
|
2489
|
+
}
|
|
2351
2490
|
@keyframes spin {
|
|
2352
2491
|
to {
|
|
2353
2492
|
transform: rotate(360deg);
|
|
@@ -2375,6 +2514,9 @@ body {
|
|
|
2375
2514
|
--tw-ring-offset-width: 0px;
|
|
2376
2515
|
--tw-ring-offset-color: #fff;
|
|
2377
2516
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
2517
|
+
--tw-translate-x: 0;
|
|
2518
|
+
--tw-translate-y: 0;
|
|
2519
|
+
--tw-translate-z: 0;
|
|
2378
2520
|
}
|
|
2379
2521
|
}
|
|
2380
2522
|
}
|
|
@@ -23,6 +23,20 @@ function _define_property(obj, key, value) {
|
|
|
23
23
|
}
|
|
24
24
|
return obj;
|
|
25
25
|
}
|
|
26
|
+
function _extends() {
|
|
27
|
+
_extends = Object.assign || function(target) {
|
|
28
|
+
for(var i = 1; i < arguments.length; i++){
|
|
29
|
+
var source = arguments[i];
|
|
30
|
+
for(var key in source){
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
+
target[key] = source[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
return _extends.apply(this, arguments);
|
|
39
|
+
}
|
|
26
40
|
function _iterable_to_array(iter) {
|
|
27
41
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
28
42
|
}
|
|
@@ -56,6 +70,10 @@ function _non_iterable_rest() {
|
|
|
56
70
|
function _non_iterable_spread() {
|
|
57
71
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
72
|
}
|
|
73
|
+
function _object_destructuring_empty(o) {
|
|
74
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
75
|
+
return o;
|
|
76
|
+
}
|
|
59
77
|
function _object_spread(target) {
|
|
60
78
|
for(var i = 1; i < arguments.length; i++){
|
|
61
79
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -71,6 +89,33 @@ function _object_spread(target) {
|
|
|
71
89
|
}
|
|
72
90
|
return target;
|
|
73
91
|
}
|
|
92
|
+
function _object_without_properties(source, excluded) {
|
|
93
|
+
if (source == null) return {};
|
|
94
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
95
|
+
var key, i;
|
|
96
|
+
if (Object.getOwnPropertySymbols) {
|
|
97
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
98
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
99
|
+
key = sourceSymbolKeys[i];
|
|
100
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
101
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
102
|
+
target[key] = source[key];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return target;
|
|
106
|
+
}
|
|
107
|
+
function _object_without_properties_loose(source, excluded) {
|
|
108
|
+
if (source == null) return {};
|
|
109
|
+
var target = {};
|
|
110
|
+
var sourceKeys = Object.keys(source);
|
|
111
|
+
var key, i;
|
|
112
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
113
|
+
key = sourceKeys[i];
|
|
114
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
115
|
+
target[key] = source[key];
|
|
116
|
+
}
|
|
117
|
+
return target;
|
|
118
|
+
}
|
|
74
119
|
function _sliced_to_array(arr, i) {
|
|
75
120
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
76
121
|
}
|
|
@@ -90,6 +135,8 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
90
135
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
91
136
|
}
|
|
92
137
|
var React3 = require('react');
|
|
138
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
139
|
+
var lucideReact = require('lucide-react');
|
|
93
140
|
function _interopNamespace(e) {
|
|
94
141
|
if (e && e.__esModule) return e;
|
|
95
142
|
var n = Object.create(null);
|
|
@@ -110,6 +157,7 @@ function _interopNamespace(e) {
|
|
|
110
157
|
return Object.freeze(n);
|
|
111
158
|
}
|
|
112
159
|
var React3__namespace = /*#__PURE__*/ _interopNamespace(React3);
|
|
160
|
+
var SelectPrimitive__namespace = /*#__PURE__*/ _interopNamespace(SelectPrimitive);
|
|
113
161
|
// src/components/fields/index.tsx
|
|
114
162
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
115
163
|
function r(e) {
|
|
@@ -4811,7 +4859,89 @@ function Input(param) {
|
|
|
4811
4859
|
className: cn("uii:w-full uii:h-9 uii:px-3 uii:rounded-sm uii:border uii:bg-background uii:text-sm", "uii:outline-none uii:transition-all", "focus:uii:border-ring focus:uii:ring-ring/50 focus:uii:ring-[3px]", showError ? "uii:border-red-500 hover:uii:border-red-600" : "uii:border-input hover:uii:border-ring/50", isExpression && "uii:font-mono uii:text-amber-600", disabled && "uii:opacity-50 uii:cursor-not-allowed", editorClassName)
|
|
4812
4860
|
})));
|
|
4813
4861
|
}
|
|
4814
|
-
function Select(
|
|
4862
|
+
function Select(_param) {
|
|
4863
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4864
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Root, _object_spread({
|
|
4865
|
+
"data-slot": "select"
|
|
4866
|
+
}, props));
|
|
4867
|
+
}
|
|
4868
|
+
function SelectValue(_param) {
|
|
4869
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4870
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Value, _object_spread({
|
|
4871
|
+
"data-slot": "select-value"
|
|
4872
|
+
}, props));
|
|
4873
|
+
}
|
|
4874
|
+
function SelectTrigger(_param) {
|
|
4875
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
4876
|
+
"className",
|
|
4877
|
+
"children"
|
|
4878
|
+
]);
|
|
4879
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Trigger, _object_spread({
|
|
4880
|
+
"data-slot": "select-trigger",
|
|
4881
|
+
className: cn("uii:border-input uii:data-[placeholder]:text-muted-foreground uii:[&_svg:not([class*=text-])]:text-muted-foreground uii:focus-visible:border-ring uii:focus-visible:ring-ring/50 uii:aria-invalid:ring-destructive/20 uii:dark:aria-invalid:ring-destructive/40 uii:aria-invalid:border-destructive uii:flex uii:h-9 uii:w-full uii:items-center uii:justify-between uii:gap-2 uii:rounded-md uii:border uii:bg-transparent uii:px-3 uii:py-2 uii:text-sm uii:whitespace-nowrap uii:shadow-xs uii:transition-[color,box-shadow] uii:outline-none uii:focus-visible:ring-[3px] uii:disabled:cursor-not-allowed uii:disabled:opacity-50 uii:*:data-[slot=select-value]:line-clamp-1 uii:*:data-[slot=select-value]:flex uii:*:data-[slot=select-value]:items-center uii:*:data-[slot=select-value]:gap-2 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4", className)
|
|
4882
|
+
}, props), children, /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Icon, {
|
|
4883
|
+
asChild: true
|
|
4884
|
+
}, /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronDownIcon, {
|
|
4885
|
+
className: "uii:size-4 uii:opacity-50"
|
|
4886
|
+
})));
|
|
4887
|
+
}
|
|
4888
|
+
function SelectContent(_param) {
|
|
4889
|
+
var className = _param.className, children = _param.children, _param_position = _param.position, position = _param_position === void 0 ? "popper" : _param_position, footer = _param.footer, _param_hideScrollUpButton = _param.hideScrollUpButton, hideScrollUpButton = _param_hideScrollUpButton === void 0 ? false : _param_hideScrollUpButton, _param_hideScrollDownButton = _param.hideScrollDownButton, hideScrollDownButton = _param_hideScrollDownButton === void 0 ? false : _param_hideScrollDownButton, props = _object_without_properties(_param, [
|
|
4890
|
+
"className",
|
|
4891
|
+
"children",
|
|
4892
|
+
"position",
|
|
4893
|
+
"footer",
|
|
4894
|
+
"hideScrollUpButton",
|
|
4895
|
+
"hideScrollDownButton"
|
|
4896
|
+
]);
|
|
4897
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Portal, null, /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Content, _object_spread({
|
|
4898
|
+
"data-slot": "select-content",
|
|
4899
|
+
className: cn("uii:bg-popover uii:text-popover-foreground uii:data-[state=open]:animate-in uii:data-[state=closed]:animate-out uii:data-[state=closed]:fade-out-0 uii:data-[state=open]:fade-in-0 uii:data-[state=closed]:zoom-out-95 uii:data-[state=open]:zoom-in-95 uii:data-[side=bottom]:slide-in-from-top-2 uii:data-[side=left]:slide-in-from-right-2 uii:data-[side=right]:slide-in-from-left-2 uii:data-[side=top]:slide-in-from-bottom-2 uii:relative uii:z-50 uii:max-h-96 uii:min-w-[8rem] uii:overflow-hidden uii:rounded-md uii:border uii:shadow-md", position === "popper" && "uii:data-[side=bottom]:translate-y-1 uii:data-[side=left]:-translate-x-1 uii:data-[side=right]:translate-x-1 uii:data-[side=top]:-translate-y-1", "uii:slide-in-from-right-6", className),
|
|
4900
|
+
position: position
|
|
4901
|
+
}, props), !hideScrollUpButton && /* @__PURE__ */ React3__namespace.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Viewport, {
|
|
4902
|
+
className: cn("uii:p-1", position === "popper" && "uii:h-[var(--radix-select-trigger-height)] uii:w-full uii:min-w-[var(--radix-select-trigger-width)] uii:scroll-my-1")
|
|
4903
|
+
}, children), footer ? /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4904
|
+
className: "uii:border-t uii:p-2 uii:bg-popover"
|
|
4905
|
+
}, footer) : null, !hideScrollDownButton && /* @__PURE__ */ React3__namespace.createElement(SelectScrollDownButton, null)));
|
|
4906
|
+
}
|
|
4907
|
+
function SelectItem(_param) {
|
|
4908
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
4909
|
+
"className",
|
|
4910
|
+
"children"
|
|
4911
|
+
]);
|
|
4912
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Item, _object_spread({
|
|
4913
|
+
"data-slot": "select-item",
|
|
4914
|
+
className: cn("uii:focus:bg-accent uii:focus:text-accent-foreground uii:[&_svg:not([class*=text-])]:text-muted-foreground uii:relative uii:flex uii:w-full uii:cursor-default uii:items-center uii:gap-2 uii:rounded-sm uii:py-1.5 uii:pr-8 uii:pl-2 uii:text-sm uii:outline-hidden uii:select-none uii:data-[disabled]:pointer-events-none uii:data-[disabled]:opacity-50 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4 uii:*:[span]:last:flex uii:*:[span]:last:items-center uii:*:[span]:last:gap-2", className)
|
|
4915
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
4916
|
+
className: "uii:absolute uii:right-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center"
|
|
4917
|
+
}, /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React3__namespace.createElement(lucideReact.CheckIcon, {
|
|
4918
|
+
className: "uii:size-4"
|
|
4919
|
+
}))), /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ItemText, null, children));
|
|
4920
|
+
}
|
|
4921
|
+
function SelectScrollUpButton(_param) {
|
|
4922
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
4923
|
+
"className"
|
|
4924
|
+
]);
|
|
4925
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ScrollUpButton, _object_spread({
|
|
4926
|
+
"data-slot": "select-scroll-up-button",
|
|
4927
|
+
className: cn("uii:flex uii:cursor-default uii:items-center uii:justify-center uii:py-1", className)
|
|
4928
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronUpIcon, {
|
|
4929
|
+
className: "uii:size-4"
|
|
4930
|
+
}));
|
|
4931
|
+
}
|
|
4932
|
+
function SelectScrollDownButton(_param) {
|
|
4933
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
4934
|
+
"className"
|
|
4935
|
+
]);
|
|
4936
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ScrollDownButton, _object_spread({
|
|
4937
|
+
"data-slot": "select-scroll-down-button",
|
|
4938
|
+
className: cn("uii:flex uii:cursor-default uii:items-center uii:justify-center uii:py-1", className)
|
|
4939
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronDownIcon, {
|
|
4940
|
+
className: "uii:size-4"
|
|
4941
|
+
}));
|
|
4942
|
+
}
|
|
4943
|
+
// src/components/fields/Select.tsx
|
|
4944
|
+
function Select2(param) {
|
|
4815
4945
|
var fieldName = param.fieldName, label = param.label, value = param.value, onChange = param.onChange, rawOptions = param.options, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, placeholder = param.placeholder, _param_expectedType = param.expectedType, expectedType = _param_expectedType === void 0 ? "string" : _param_expectedType, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_hasRequiredError = param.hasRequiredError, hasRequiredError = _param_hasRequiredError === void 0 ? false : _param_hasRequiredError, className = param.className, children = param.children;
|
|
4816
4946
|
var _React3__namespace_useState = _sliced_to_array(React3__namespace.useState(false), 2), isExpressionMode = _React3__namespace_useState[0], setIsExpressionMode = _React3__namespace_useState[1];
|
|
4817
4947
|
var _React3__namespace_useState1 = _sliced_to_array(React3__namespace.useState(""), 2), expressionValue = _React3__namespace_useState1[0], setExpressionValue = _React3__namespace_useState1[1];
|
|
@@ -4933,26 +5063,52 @@ function Select(param) {
|
|
|
4933
5063
|
className: "uii:flex uii:items-center uii:justify-center uii:h-full uii:px-2 uii:text-amber-600 hover:uii:text-red-600 uii:border-l uii:border-amber-500/30",
|
|
4934
5064
|
title: "Clear and return to value mode"
|
|
4935
5065
|
}, "\xD7")) : // Value mode - show select
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
5066
|
+
// <select
|
|
5067
|
+
// id={fieldName}
|
|
5068
|
+
// name={fieldName}
|
|
5069
|
+
// value={displayValue}
|
|
5070
|
+
// onChange={(e) => handleSelectChange(e.target.value)}
|
|
5071
|
+
// disabled={disabled}
|
|
5072
|
+
// className={cn(
|
|
5073
|
+
// 'uii:w-full uii:h-9 uii:px-3 uii:rounded-sm uii:border uii:bg-background uii:text-sm',
|
|
5074
|
+
// 'uii:outline-none uii:transition-all uii:cursor-pointer',
|
|
5075
|
+
// 'focus:uii:border-ring focus:uii:ring-ring/50 focus:uii:ring-[3px]',
|
|
5076
|
+
// showError
|
|
5077
|
+
// ? 'uii:border-red-500 hover:uii:border-red-600'
|
|
5078
|
+
// : 'uii:border-input hover:uii:border-ring/50',
|
|
5079
|
+
// disabled && 'uii:opacity-50 uii:cursor-not-allowed'
|
|
5080
|
+
// )}
|
|
5081
|
+
// >
|
|
5082
|
+
// {placeholder && (
|
|
5083
|
+
// <option value="" disabled>
|
|
5084
|
+
// {placeholder}
|
|
5085
|
+
// </option>
|
|
5086
|
+
// )}
|
|
5087
|
+
// {options.map(opt => (
|
|
5088
|
+
// <option key={opt.value} value={opt.value}>
|
|
5089
|
+
// {opt.label}
|
|
5090
|
+
// </option>
|
|
5091
|
+
// ))}
|
|
5092
|
+
// <option value="__expression__">
|
|
5093
|
+
// 📝 Custom Expression
|
|
5094
|
+
// </option>
|
|
5095
|
+
// </select>
|
|
5096
|
+
/* @__PURE__ */ React3__namespace.createElement(Select, {
|
|
4939
5097
|
value: displayValue,
|
|
4940
|
-
|
|
4941
|
-
return handleSelectChange(e
|
|
5098
|
+
onValueChange: function(e) {
|
|
5099
|
+
return handleSelectChange(e);
|
|
4942
5100
|
},
|
|
4943
|
-
disabled: disabled
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
},
|
|
4949
|
-
return /* @__PURE__ */ React3__namespace.createElement(
|
|
5101
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : disabled
|
|
5102
|
+
}, /* @__PURE__ */ React3__namespace.createElement(SelectTrigger, {
|
|
5103
|
+
className: "ui:w-full ui:h-9 ui:px-3 ui:border ui:border-input ui:rounded-sm ui:bg-background"
|
|
5104
|
+
}, /* @__PURE__ */ React3__namespace.createElement(SelectValue, {
|
|
5105
|
+
placeholder: placeholder
|
|
5106
|
+
})), /* @__PURE__ */ React3__namespace.createElement(SelectContent, null, options.map(function(opt) {
|
|
5107
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectItem, {
|
|
4950
5108
|
key: opt.value,
|
|
4951
5109
|
value: opt.value
|
|
4952
|
-
}, opt.label);
|
|
4953
|
-
})
|
|
4954
|
-
value: "__expression__"
|
|
4955
|
-
}, "\uD83D\uDCDD Custom Expression"))));
|
|
5110
|
+
}, opt.node ? opt.node : /* @__PURE__ */ React3__namespace.createElement(React3__namespace.Fragment, null, opt.label));
|
|
5111
|
+
})))));
|
|
4956
5112
|
}
|
|
4957
5113
|
// src/components/fields/index.tsx
|
|
4958
5114
|
function useTemplateFieldContext() {
|
|
@@ -4981,11 +5137,11 @@ function useFieldPath(fieldName) {
|
|
|
4981
5137
|
}
|
|
4982
5138
|
function TemplateFieldProvider(param) {
|
|
4983
5139
|
var children = param.children;
|
|
4984
|
-
return /* @__PURE__ */
|
|
5140
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
4985
5141
|
}
|
|
4986
5142
|
function NestedFieldProvider(param) {
|
|
4987
5143
|
var children = param.children;
|
|
4988
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
4989
5145
|
}
|
|
4990
5146
|
var InferredTypesContext = React3.createContext(null);
|
|
4991
5147
|
function useInferredTypes() {
|
|
@@ -4993,7 +5149,7 @@ function useInferredTypes() {
|
|
|
4993
5149
|
}
|
|
4994
5150
|
function InferredTypesProvider(param) {
|
|
4995
5151
|
var children = param.children;
|
|
4996
|
-
return /* @__PURE__ */
|
|
5152
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
4997
5153
|
}
|
|
4998
5154
|
function intersectTypes(types) {
|
|
4999
5155
|
var validTypes = types.filter(function(t) {
|
|
@@ -5114,18 +5270,98 @@ function getOperatorsForType(type) {
|
|
|
5114
5270
|
}
|
|
5115
5271
|
];
|
|
5116
5272
|
}
|
|
5273
|
+
function NodePropertyProvider(param) {
|
|
5274
|
+
var children = param.children;
|
|
5275
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
5276
|
+
}
|
|
5277
|
+
function useIsInNodePropertyProvider() {
|
|
5278
|
+
return false;
|
|
5279
|
+
}
|
|
5280
|
+
function useNodeProperty(key) {
|
|
5281
|
+
var noopSetter = React3.useCallback(function() {
|
|
5282
|
+
console.warn('[useNodeProperty] Mock mode - cannot set "'.concat(key, '"'));
|
|
5283
|
+
}, [
|
|
5284
|
+
key
|
|
5285
|
+
]);
|
|
5286
|
+
return [
|
|
5287
|
+
void 0,
|
|
5288
|
+
noopSetter
|
|
5289
|
+
];
|
|
5290
|
+
}
|
|
5291
|
+
function useNodeProperties() {
|
|
5292
|
+
var noopSetter = React3.useCallback(function() {
|
|
5293
|
+
console.warn("[useNodeProperties] Mock mode - cannot set properties");
|
|
5294
|
+
}, []);
|
|
5295
|
+
return [
|
|
5296
|
+
{},
|
|
5297
|
+
noopSetter
|
|
5298
|
+
];
|
|
5299
|
+
}
|
|
5300
|
+
function useInferredType(fieldName) {
|
|
5301
|
+
return void 0;
|
|
5302
|
+
}
|
|
5303
|
+
function useSetInferredType() {
|
|
5304
|
+
return React3.useCallback(function(fieldName, type) {
|
|
5305
|
+
console.warn('[useSetInferredType] Mock mode - cannot set "'.concat(fieldName, '" to "').concat(type, '"'));
|
|
5306
|
+
}, []);
|
|
5307
|
+
}
|
|
5308
|
+
function useAllInferredTypes() {
|
|
5309
|
+
return {};
|
|
5310
|
+
}
|
|
5311
|
+
function useSetProperty() {
|
|
5312
|
+
return React3.useCallback(function(key, value) {
|
|
5313
|
+
console.warn('[useSetProperty] Mock mode - cannot set "'.concat(key, '"'));
|
|
5314
|
+
}, []);
|
|
5315
|
+
}
|
|
5316
|
+
function useFieldValidation() {
|
|
5317
|
+
var setFieldRequired = React3.useCallback(function(fieldName, required) {
|
|
5318
|
+
console.warn('[useFieldValidation] Mock mode - cannot set required for "'.concat(fieldName, '"'));
|
|
5319
|
+
}, []);
|
|
5320
|
+
var setFieldRequiredIf = React3.useCallback(function(fieldName, requiredIf) {
|
|
5321
|
+
console.warn('[useFieldValidation] Mock mode - cannot set requiredIf for "'.concat(fieldName, '"'));
|
|
5322
|
+
}, []);
|
|
5323
|
+
var setFieldValidation = React3.useCallback(function(fieldName, customValidation) {
|
|
5324
|
+
console.warn('[useFieldValidation] Mock mode - cannot set validation for "'.concat(fieldName, '"'));
|
|
5325
|
+
}, []);
|
|
5326
|
+
var clearFieldValidation = React3.useCallback(function(fieldName) {
|
|
5327
|
+
console.warn('[useFieldValidation] Mock mode - cannot clear validation for "'.concat(fieldName, '"'));
|
|
5328
|
+
}, []);
|
|
5329
|
+
var isFieldRequired = React3.useCallback(function(fieldName) {
|
|
5330
|
+
return false;
|
|
5331
|
+
}, []);
|
|
5332
|
+
var validateField = React3.useCallback(function(fieldName) {
|
|
5333
|
+
return null;
|
|
5334
|
+
}, []);
|
|
5335
|
+
return {
|
|
5336
|
+
setFieldRequired: setFieldRequired,
|
|
5337
|
+
setFieldRequiredIf: setFieldRequiredIf,
|
|
5338
|
+
setFieldValidation: setFieldValidation,
|
|
5339
|
+
clearFieldValidation: clearFieldValidation,
|
|
5340
|
+
isFieldRequired: isFieldRequired,
|
|
5341
|
+
validateField: validateField
|
|
5342
|
+
};
|
|
5343
|
+
}
|
|
5117
5344
|
exports.InferredTypesContext = InferredTypesContext;
|
|
5118
5345
|
exports.InferredTypesProvider = InferredTypesProvider;
|
|
5119
5346
|
exports.Input = Input;
|
|
5120
5347
|
exports.NestedFieldProvider = NestedFieldProvider;
|
|
5348
|
+
exports.NodePropertyProvider = NodePropertyProvider;
|
|
5121
5349
|
exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
|
|
5122
|
-
exports.Select =
|
|
5350
|
+
exports.Select = Select2;
|
|
5123
5351
|
exports.TemplateFieldProvider = TemplateFieldProvider;
|
|
5124
5352
|
exports.getOperatorsForType = getOperatorsForType;
|
|
5125
5353
|
exports.intersectTypes = intersectTypes;
|
|
5126
5354
|
exports.parseInferSyntax = parseInferSyntax;
|
|
5355
|
+
exports.useAllInferredTypes = useAllInferredTypes;
|
|
5127
5356
|
exports.useFieldPath = useFieldPath;
|
|
5357
|
+
exports.useFieldValidation = useFieldValidation;
|
|
5358
|
+
exports.useInferredType = useInferredType;
|
|
5128
5359
|
exports.useInferredTypes = useInferredTypes;
|
|
5360
|
+
exports.useIsInNodePropertyProvider = useIsInNodePropertyProvider;
|
|
5129
5361
|
exports.useIsInTemplateFieldProvider = useIsInTemplateFieldProvider;
|
|
5362
|
+
exports.useNodeProperties = useNodeProperties;
|
|
5363
|
+
exports.useNodeProperty = useNodeProperty;
|
|
5364
|
+
exports.useSetInferredType = useSetInferredType;
|
|
5365
|
+
exports.useSetProperty = useSetProperty;
|
|
5130
5366
|
exports.useTemplateFieldContext = useTemplateFieldContext; //# sourceMappingURL=index.cjs.map
|
|
5131
5367
|
//# sourceMappingURL=index.cjs.map
|