@process.co/ui 0.0.16 → 0.0.18

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 CHANGED
@@ -1059,6 +1059,9 @@
1059
1059
  .uii\:flex {
1060
1060
  display: flex;
1061
1061
  }
1062
+ .uii\:inline-block {
1063
+ display: inline-block;
1064
+ }
1062
1065
  .uii\:inline-flex {
1063
1066
  display: inline-flex;
1064
1067
  }
@@ -1091,6 +1094,9 @@
1091
1094
  .uii\:h-10 {
1092
1095
  height: calc(var(--uii-spacing) * 10);
1093
1096
  }
1097
+ .uii\:h-\[56px\] {
1098
+ height: 56px;
1099
+ }
1094
1100
  .uii\:h-\[var\(--radix-select-trigger-height\)\] {
1095
1101
  height: var(--radix-select-trigger-height);
1096
1102
  }
@@ -1112,6 +1118,12 @@
1112
1118
  .uii\:max-h-\[min\(20rem\,80vh\)\] {
1113
1119
  max-height: min(20rem, 80vh);
1114
1120
  }
1121
+ .uii\:min-h-\[56px\] {
1122
+ min-height: 56px;
1123
+ }
1124
+ .uii\:w-\[28px\] {
1125
+ width: 28px;
1126
+ }
1115
1127
  .uii\:w-full {
1116
1128
  width: 100%;
1117
1129
  }
@@ -1124,6 +1136,9 @@
1124
1136
  .uii\:min-w-\[8rem\] {
1125
1137
  min-width: 8rem;
1126
1138
  }
1139
+ .uii\:min-w-\[28px\] {
1140
+ min-width: 28px;
1141
+ }
1127
1142
  .uii\:min-w-\[150px\] {
1128
1143
  min-width: 150px;
1129
1144
  }
@@ -1139,6 +1154,9 @@
1139
1154
  .uii\:shrink-0 {
1140
1155
  flex-shrink: 0;
1141
1156
  }
1157
+ .uii\:\[transform\:rotate\(-90deg\)\] {
1158
+ transform: rotate(-90deg);
1159
+ }
1142
1160
  .uii\:cursor-default {
1143
1161
  cursor: default;
1144
1162
  }
@@ -1231,6 +1249,9 @@
1231
1249
  --tw-border-style: none;
1232
1250
  border-style: none;
1233
1251
  }
1252
+ .uii\:border-\[\#e5e7eb\] {
1253
+ border-color: #e5e7eb;
1254
+ }
1234
1255
  .uii\:border-amber-500\/30 {
1235
1256
  border-color: color-mix(in oklab, oklch(76.9% 0.188 70.08) 30%, transparent);
1236
1257
  }
@@ -1240,6 +1261,9 @@
1240
1261
  .uii\:border-input {
1241
1262
  border-color: var(--input);
1242
1263
  }
1264
+ .uii\:border-primary {
1265
+ border-color: var(--primary);
1266
+ }
1243
1267
  .uii\:border-purple-200 {
1244
1268
  border-color: oklch(90.2% 0.063 306.703);
1245
1269
  }
@@ -1508,6 +1532,11 @@
1508
1532
  transition-timing-function: var(--tw-ease, var(--uii-default-transition-timing-function));
1509
1533
  transition-duration: var(--tw-duration, var(--uii-default-transition-duration));
1510
1534
  }
1535
+ .uii\:transition-colors {
1536
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
1537
+ transition-timing-function: var(--tw-ease, var(--uii-default-transition-timing-function));
1538
+ transition-duration: var(--tw-duration, var(--uii-default-transition-duration));
1539
+ }
1511
1540
  .uii\:outline-none {
1512
1541
  --tw-outline-style: none;
1513
1542
  outline-style: none;
@@ -1647,12 +1676,23 @@
1647
1676
  border-color: var(--ring);
1648
1677
  }
1649
1678
  }
1679
+ .uii\:focus-visible\:ring-2 {
1680
+ &:focus-visible {
1681
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
1682
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1683
+ }
1684
+ }
1650
1685
  .uii\:focus-visible\:ring-\[3px\] {
1651
1686
  &:focus-visible {
1652
1687
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
1653
1688
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1654
1689
  }
1655
1690
  }
1691
+ .uii\:focus-visible\:ring-\[\#3b82f6\]\/40 {
1692
+ &:focus-visible {
1693
+ --tw-ring-color: color-mix(in oklab, #3b82f6 40%, transparent);
1694
+ }
1695
+ }
1656
1696
  .uii\:focus-visible\:ring-destructive\/20 {
1657
1697
  &:focus-visible {
1658
1698
  --tw-ring-color: var(--destructive);
@@ -1669,6 +1709,12 @@
1669
1709
  }
1670
1710
  }
1671
1711
  }
1712
+ .uii\:focus-visible\:ring-offset-1 {
1713
+ &:focus-visible {
1714
+ --tw-ring-offset-width: 1px;
1715
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1716
+ }
1717
+ }
1672
1718
  .uii\:disabled\:pointer-events-none {
1673
1719
  &:disabled {
1674
1720
  pointer-events: none;
@@ -1879,11 +1925,30 @@
1879
1925
  border-color: transparent;
1880
1926
  }
1881
1927
  }
1928
+ .uii\:data-\[state\=off\]\:bg-\[\#f3f4f6\] {
1929
+ &[data-state="off"] {
1930
+ background-color: #f3f4f6;
1931
+ }
1932
+ }
1882
1933
  .uii\:data-\[state\=off\]\:bg-background {
1883
1934
  &[data-state="off"] {
1884
1935
  background-color: var(--background);
1885
1936
  }
1886
1937
  }
1938
+ .uii\:data-\[state\=off\]\:text-\[\#374151\] {
1939
+ &[data-state="off"] {
1940
+ color: #374151;
1941
+ }
1942
+ }
1943
+ .uii\:data-\[state\=off\]\:hover\:bg-\[\#e5e7eb\] {
1944
+ &[data-state="off"] {
1945
+ &:hover {
1946
+ @media (hover: hover) {
1947
+ background-color: #e5e7eb;
1948
+ }
1949
+ }
1950
+ }
1951
+ }
1887
1952
  .uii\:data-\[state\=off\]\:hover\:bg-accent {
1888
1953
  &[data-state="off"] {
1889
1954
  &:hover {
@@ -1923,6 +1988,11 @@
1923
1988
  }
1924
1989
  }
1925
1990
  }
1991
+ .uii\:data-\[state\=on\]\:border-\[\#3b82f6\] {
1992
+ &[data-state="on"] {
1993
+ border-color: #3b82f6;
1994
+ }
1995
+ }
1926
1996
  .uii\:data-\[state\=on\]\:border-input {
1927
1997
  &[data-state="on"] {
1928
1998
  border-color: var(--input);
@@ -1938,6 +2008,11 @@
1938
2008
  border-color: transparent;
1939
2009
  }
1940
2010
  }
2011
+ .uii\:data-\[state\=on\]\:bg-\[\#3b82f6\] {
2012
+ &[data-state="on"] {
2013
+ background-color: #3b82f6;
2014
+ }
2015
+ }
1941
2016
  .uii\:data-\[state\=on\]\:bg-accent {
1942
2017
  &[data-state="on"] {
1943
2018
  background-color: var(--accent);
@@ -1968,6 +2043,11 @@
1968
2043
  color: var(--secondary-foreground);
1969
2044
  }
1970
2045
  }
2046
+ .uii\:data-\[state\=on\]\:text-white {
2047
+ &[data-state="on"] {
2048
+ color: #fff;
2049
+ }
2050
+ }
1971
2051
  .uii\:data-\[state\=open\]\:bg-accent {
1972
2052
  &[data-state="open"] {
1973
2053
  background-color: var(--accent);
@@ -3101,7 +3101,10 @@ function Input({
3101
3101
  required = false,
3102
3102
  hasRequiredError = false,
3103
3103
  className,
3104
- editorClassName
3104
+ editorClassName,
3105
+ showCaseSensitivity = false,
3106
+ caseSensitive = false,
3107
+ onCaseSensitiveChange
3105
3108
  }) {
3106
3109
  const devCtx = React33.useContext(DevContext);
3107
3110
  const resolvedExpectedType = useResolvedExpectedType(expectedType, devCtx);
@@ -3145,7 +3148,19 @@ function Input({
3145
3148
  title: resolvedExpectedType
3146
3149
  },
3147
3150
  resolvedExpectedType
3148
- ), showError && /* @__PURE__ */ React33__namespace.createElement("span", { className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-red-100 uii:text-red-600 uii:rounded-sm uii:text-[10px] uii:font-medium" }, "Required")), /* @__PURE__ */ React33__namespace.createElement("div", { className: "uii:mt-0.5" }, /* @__PURE__ */ React33__namespace.createElement(
3151
+ ), showError && /* @__PURE__ */ React33__namespace.createElement("span", { className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-red-100 uii:text-red-600 uii:rounded-sm uii:text-[10px] uii:font-medium" }, "Required"), showCaseSensitivity && onCaseSensitiveChange && /* @__PURE__ */ React33__namespace.createElement(
3152
+ "button",
3153
+ {
3154
+ type: "button",
3155
+ title: caseSensitive ? "Case sensitive (click to ignore case)" : "Ignore case (click for case sensitive)",
3156
+ onClick: () => onCaseSensitiveChange(!caseSensitive),
3157
+ className: cn(
3158
+ "uii:-mt-2 uii:inline-flex uii:items-center uii:justify-center uii:rounded-sm uii:border uii:px-1 uii:py-0.5 uii:text-[10px] uii:font-medium uii:transition-colors uii:outline-none focus:uii:ring-2 focus:uii:ring-ring focus:uii:ring-offset-1",
3159
+ caseSensitive ? "uii:bg-primary uii:text-primary-foreground uii:border-primary" : "uii:bg-gray-200 uii:text-muted-foreground uii:border-input hover:uii:bg-gray-300"
3160
+ )
3161
+ },
3162
+ "Aa"
3163
+ )), /* @__PURE__ */ React33__namespace.createElement("div", { className: "uii:mt-0.5" }, /* @__PURE__ */ React33__namespace.createElement(
3149
3164
  "input",
3150
3165
  {
3151
3166
  id: fieldName,
@@ -8822,6 +8837,23 @@ function ToggleButton({ className, variant, size: size4, ...props }) {
8822
8837
  }
8823
8838
  );
8824
8839
  }
8840
+ var logicToggleButtonStyles = [
8841
+ "uii:inline-flex uii:items-center uii:justify-center uii:rounded-md uii:border uii:border-[#e5e7eb] uii:min-w-[28px] uii:w-[28px] uii:min-h-[56px] uii:h-[56px] uii:text-xs uii:font-bold uii:outline-none uii:focus-visible:ring-2 uii:focus-visible:ring-[#3b82f6]/40 uii:focus-visible:ring-offset-1 uii:disabled:pointer-events-none uii:disabled:opacity-50 uii:cursor-pointer uii:transition-colors uii:select-none",
8842
+ "uii:data-[state=on]:bg-[#3b82f6] uii:data-[state=on]:text-white uii:data-[state=on]:border-[#3b82f6]",
8843
+ "uii:data-[state=off]:bg-[#f3f4f6] uii:data-[state=off]:text-[#374151] uii:data-[state=off]:hover:bg-[#e5e7eb]"
8844
+ ].join(" ");
8845
+ var logicToggleButtonLabelStyles = "uii:inline-block uii:whitespace-nowrap uii:[transform:rotate(-90deg)]";
8846
+ function LogicToggleButton({ className, children, ...props }) {
8847
+ return /* @__PURE__ */ React33__namespace.createElement(
8848
+ Root3,
8849
+ {
8850
+ "data-slot": "logic-toggle-button",
8851
+ className: cn(logicToggleButtonStyles, className),
8852
+ ...props
8853
+ },
8854
+ children != null ? /* @__PURE__ */ React33__namespace.createElement("span", { className: logicToggleButtonLabelStyles }, children) : null
8855
+ );
8856
+ }
8825
8857
 
8826
8858
  // src/components/fields/types.ts
8827
8859
  function parseInferredTypes(typeStr) {
@@ -9246,6 +9278,7 @@ exports.Button = Button;
9246
9278
  exports.InferredTypesContext = InferredTypesContext;
9247
9279
  exports.InferredTypesProvider = InferredTypesProvider;
9248
9280
  exports.Input = Input;
9281
+ exports.LogicToggleButton = LogicToggleButton;
9249
9282
  exports.NestedFieldProvider = NestedFieldProvider;
9250
9283
  exports.NodePropertyProvider = NodePropertyProvider;
9251
9284
  exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
@@ -9259,6 +9292,7 @@ exports.getNumberConstants = getNumberConstants;
9259
9292
  exports.getOperatorsForType = getOperatorsForType;
9260
9293
  exports.getStringConstants = getStringConstants;
9261
9294
  exports.intersectTypes = intersectTypes;
9295
+ exports.logicToggleButtonStyles = logicToggleButtonStyles;
9262
9296
  exports.normalizeFieldValue = normalizeFieldValue;
9263
9297
  exports.parseInferSyntax = parseInferSyntax;
9264
9298
  exports.parseInferredTypes = parseInferredTypes;