@proteos/ui 0.52.0 → 0.54.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/dist/index.cjs +107 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +108 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/attribute-type-icon/attribute-type-icon.test.tsx +12 -0
- package/src/components/attribute-type-icon/attribute-type-icon.tsx +6 -0
- package/src/components/radio-group/radio-group.tsx +5 -1
- package/src/components/record-filter/operators.test.ts +20 -2
- package/src/components/record-filter/operators.ts +93 -11
- package/src/components/switch/switch.tsx +5 -1
package/dist/index.cjs
CHANGED
|
@@ -360,7 +360,8 @@ var AttributeType = {
|
|
|
360
360
|
Principal: "principal",
|
|
361
361
|
Currency: "currency",
|
|
362
362
|
KnowledgeText: "knowledge-text",
|
|
363
|
-
File: "file"
|
|
363
|
+
File: "file",
|
|
364
|
+
ContactAddress: "contact-address"
|
|
364
365
|
};
|
|
365
366
|
var ATTRIBUTE_TYPES = Object.values(AttributeType);
|
|
366
367
|
var ATTRIBUTE_TYPE_ICONS = {
|
|
@@ -377,7 +378,8 @@ var ATTRIBUTE_TYPE_ICONS = {
|
|
|
377
378
|
[AttributeType.Principal]: lucideReact.UsersRound,
|
|
378
379
|
[AttributeType.Currency]: lucideReact.Banknote,
|
|
379
380
|
[AttributeType.KnowledgeText]: lucideReact.BookText,
|
|
380
|
-
[AttributeType.File]: lucideReact.Paperclip
|
|
381
|
+
[AttributeType.File]: lucideReact.Paperclip,
|
|
382
|
+
[AttributeType.ContactAddress]: lucideReact.Contact
|
|
381
383
|
};
|
|
382
384
|
function useAttributeTypeIcon(type) {
|
|
383
385
|
return ATTRIBUTE_TYPE_ICONS[type];
|
|
@@ -5739,7 +5741,11 @@ function Radio({ children, className, ...props }) {
|
|
|
5739
5741
|
{
|
|
5740
5742
|
...props,
|
|
5741
5743
|
className: (renderProps) => chunkMWAXK66H_cjs.cn(
|
|
5742
|
-
|
|
5744
|
+
// `relative` for the same reason as Checkbox / Switch: RAC's
|
|
5745
|
+
// visually-hidden <input> is absolutely positioned and must resolve
|
|
5746
|
+
// against this radio, not a far-away shell, or focusing it scrolls
|
|
5747
|
+
// the clipped page.
|
|
5748
|
+
"group relative inline-flex items-center gap-2.5 cursor-pointer",
|
|
5743
5749
|
"font-sans text-[14px] text-ink-2 select-none",
|
|
5744
5750
|
"data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",
|
|
5745
5751
|
typeof className === "function" ? className(renderProps) : className
|
|
@@ -5824,44 +5830,126 @@ var OPERATORS = [
|
|
|
5824
5830
|
id: "eq",
|
|
5825
5831
|
label: "is",
|
|
5826
5832
|
arity: 1,
|
|
5827
|
-
types: [
|
|
5833
|
+
types: [
|
|
5834
|
+
"string",
|
|
5835
|
+
"number",
|
|
5836
|
+
"integer",
|
|
5837
|
+
"currency",
|
|
5838
|
+
"datetime",
|
|
5839
|
+
"enum",
|
|
5840
|
+
"boolean",
|
|
5841
|
+
"relation",
|
|
5842
|
+
"user",
|
|
5843
|
+
"principal",
|
|
5844
|
+
"contact-address"
|
|
5845
|
+
]
|
|
5828
5846
|
},
|
|
5829
5847
|
{
|
|
5830
5848
|
id: "ne",
|
|
5831
5849
|
label: "is not",
|
|
5832
5850
|
arity: 1,
|
|
5833
|
-
types: [
|
|
5851
|
+
types: [
|
|
5852
|
+
"string",
|
|
5853
|
+
"number",
|
|
5854
|
+
"integer",
|
|
5855
|
+
"currency",
|
|
5856
|
+
"datetime",
|
|
5857
|
+
"enum",
|
|
5858
|
+
"boolean",
|
|
5859
|
+
"relation",
|
|
5860
|
+
"user",
|
|
5861
|
+
"principal",
|
|
5862
|
+
"contact-address"
|
|
5863
|
+
]
|
|
5834
5864
|
},
|
|
5835
5865
|
{
|
|
5836
5866
|
id: "in",
|
|
5837
5867
|
label: "is any of",
|
|
5838
5868
|
arity: "n",
|
|
5839
|
-
types: [
|
|
5869
|
+
types: [
|
|
5870
|
+
"string",
|
|
5871
|
+
"number",
|
|
5872
|
+
"integer",
|
|
5873
|
+
"currency",
|
|
5874
|
+
"enum",
|
|
5875
|
+
"relation",
|
|
5876
|
+
"user",
|
|
5877
|
+
"principal",
|
|
5878
|
+
"contact-address"
|
|
5879
|
+
]
|
|
5840
5880
|
},
|
|
5841
5881
|
{
|
|
5842
5882
|
id: "not_in",
|
|
5843
5883
|
label: "is none of",
|
|
5844
5884
|
arity: "n",
|
|
5845
|
-
types: [
|
|
5885
|
+
types: [
|
|
5886
|
+
"string",
|
|
5887
|
+
"number",
|
|
5888
|
+
"integer",
|
|
5889
|
+
"currency",
|
|
5890
|
+
"enum",
|
|
5891
|
+
"relation",
|
|
5892
|
+
"user",
|
|
5893
|
+
"principal",
|
|
5894
|
+
"contact-address"
|
|
5895
|
+
]
|
|
5896
|
+
},
|
|
5897
|
+
{ id: "contains", label: "contains", arity: 1, types: ["string", "array", "contact-address"] },
|
|
5898
|
+
{ id: "starts_with", label: "starts with", arity: 1, types: ["string", "contact-address"] },
|
|
5899
|
+
{ id: "ends_with", label: "ends with", arity: 1, types: ["string", "contact-address"] },
|
|
5900
|
+
{
|
|
5901
|
+
id: "gt",
|
|
5902
|
+
label: "is greater than",
|
|
5903
|
+
arity: 1,
|
|
5904
|
+
types: ["number", "integer", "currency", "datetime"]
|
|
5846
5905
|
},
|
|
5847
|
-
{ id: "contains", label: "contains", arity: 1, types: ["string", "array"] },
|
|
5848
|
-
{ id: "starts_with", label: "starts with", arity: 1, types: ["string"] },
|
|
5849
|
-
{ id: "ends_with", label: "ends with", arity: 1, types: ["string"] },
|
|
5850
|
-
{ id: "gt", label: "is greater than", arity: 1, types: ["number", "integer", "currency", "datetime"] },
|
|
5851
5906
|
{ id: "gte", label: "is on or after", arity: 1, types: ["datetime"] },
|
|
5852
|
-
{
|
|
5907
|
+
{
|
|
5908
|
+
id: "lt",
|
|
5909
|
+
label: "is less than",
|
|
5910
|
+
arity: 1,
|
|
5911
|
+
types: ["number", "integer", "currency", "datetime"]
|
|
5912
|
+
},
|
|
5853
5913
|
{ id: "lte", label: "is on or before", arity: 1, types: ["datetime"] },
|
|
5854
5914
|
{
|
|
5855
5915
|
id: "empty",
|
|
5856
5916
|
label: "is empty",
|
|
5857
5917
|
arity: 0,
|
|
5858
|
-
types: [
|
|
5918
|
+
types: [
|
|
5919
|
+
"string",
|
|
5920
|
+
"number",
|
|
5921
|
+
"integer",
|
|
5922
|
+
"currency",
|
|
5923
|
+
"datetime",
|
|
5924
|
+
"enum",
|
|
5925
|
+
"boolean",
|
|
5926
|
+
"array",
|
|
5927
|
+
"relation",
|
|
5928
|
+
"user",
|
|
5929
|
+
"principal",
|
|
5930
|
+
"file",
|
|
5931
|
+
"contact-address"
|
|
5932
|
+
]
|
|
5859
5933
|
},
|
|
5860
5934
|
{
|
|
5861
5935
|
id: "not_empty",
|
|
5862
5936
|
label: "is not empty",
|
|
5863
5937
|
arity: 0,
|
|
5864
|
-
types: [
|
|
5938
|
+
types: [
|
|
5939
|
+
"string",
|
|
5940
|
+
"number",
|
|
5941
|
+
"integer",
|
|
5942
|
+
"currency",
|
|
5943
|
+
"datetime",
|
|
5944
|
+
"enum",
|
|
5945
|
+
"boolean",
|
|
5946
|
+
"array",
|
|
5947
|
+
"relation",
|
|
5948
|
+
"user",
|
|
5949
|
+
"principal",
|
|
5950
|
+
"file",
|
|
5951
|
+
"contact-address"
|
|
5952
|
+
]
|
|
5865
5953
|
}
|
|
5866
5954
|
];
|
|
5867
5955
|
var OP_LABEL_OVERRIDES = {
|
|
@@ -7794,7 +7882,11 @@ function Switch({ children, labelPlacement = "end", className, ...props }) {
|
|
|
7794
7882
|
{
|
|
7795
7883
|
...props,
|
|
7796
7884
|
className: (renderProps) => chunkMWAXK66H_cjs.cn(
|
|
7797
|
-
|
|
7885
|
+
// `relative`: RAC's visually-hidden <input> is absolutely positioned;
|
|
7886
|
+
// without a positioned label it escapes an overflow-auto ancestor and
|
|
7887
|
+
// its containing block becomes the page shell, so focusing it (any
|
|
7888
|
+
// press) scrolls the clipped shell and the whole tab goes blank.
|
|
7889
|
+
"group relative inline-flex items-center gap-3 cursor-pointer select-none",
|
|
7798
7890
|
"font-sans text-[14px] text-ink-2",
|
|
7799
7891
|
labelPlacement === "start" && "flex-row-reverse",
|
|
7800
7892
|
"data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",
|