@mittwald/flow-react-components 0.2.0-alpha.483 → 0.2.0-alpha.484
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/CHANGELOG.md +6 -0
- package/dist/assets/doc-properties.json +128 -128
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs +2 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs +3 -15
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/inherit/types.mjs +4 -1
- package/dist/js/components/src/lib/propsContext/inherit/types.mjs.map +1 -1
- package/dist/js/components/src/lib/react/getPropsMerger.mjs +19 -2
- package/dist/js/components/src/lib/react/getPropsMerger.mjs.map +1 -1
- package/dist/js/flr-universal.mjs +1 -1
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts.map +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
- package/dist/types/lib/react/getPropsMerger.d.ts +1 -0
- package/dist/types/lib/react/getPropsMerger.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.484](https://github.com/mittwald/flow/compare/0.2.0-alpha.483...0.2.0-alpha.484) (2025-09-24)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **PropsContext:** fixes props context not correctly merged ([#2003](https://github.com/mittwald/flow/issues/2003)) ([4d2a103](https://github.com/mittwald/flow/commit/4d2a1036937c7ca03589f54b3752f3904ed3e4bb))
|
|
11
|
+
|
|
6
12
|
# [0.2.0-alpha.483](https://github.com/mittwald/flow/compare/0.2.0-alpha.482...0.2.0-alpha.483) (2025-09-23)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
@@ -179718,9 +179718,9 @@
|
|
|
179718
179718
|
"tags": {
|
|
179719
179719
|
"flr-generate": "all"
|
|
179720
179720
|
},
|
|
179721
|
-
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/
|
|
179721
|
+
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/DateRangePicker/DateRangePicker.tsx",
|
|
179722
179722
|
"description": "",
|
|
179723
|
-
"displayName": "
|
|
179723
|
+
"displayName": "DateRangePicker",
|
|
179724
179724
|
"methods": [],
|
|
179725
179725
|
"props": {
|
|
179726
179726
|
"errorMessage": {
|
|
@@ -179728,13 +179728,13 @@
|
|
|
179728
179728
|
"description": "The error message that is displayed below the input.",
|
|
179729
179729
|
"name": "errorMessage",
|
|
179730
179730
|
"parent": {
|
|
179731
|
-
"fileName": "components/src/components/
|
|
179732
|
-
"name": "
|
|
179731
|
+
"fileName": "components/src/components/DateRangePicker/DateRangePicker.tsx",
|
|
179732
|
+
"name": "DateRangePickerProps"
|
|
179733
179733
|
},
|
|
179734
179734
|
"declarations": [
|
|
179735
179735
|
{
|
|
179736
|
-
"fileName": "components/src/components/
|
|
179737
|
-
"name": "
|
|
179736
|
+
"fileName": "components/src/components/DateRangePicker/DateRangePicker.tsx",
|
|
179737
|
+
"name": "DateRangePickerProps"
|
|
179738
179738
|
}
|
|
179739
179739
|
],
|
|
179740
179740
|
"required": false,
|
|
@@ -181722,25 +181722,6 @@
|
|
|
181722
181722
|
"name": "string | null"
|
|
181723
181723
|
}
|
|
181724
181724
|
},
|
|
181725
|
-
"autoComplete": {
|
|
181726
|
-
"defaultValue": null,
|
|
181727
|
-
"description": "Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).",
|
|
181728
|
-
"name": "autoComplete",
|
|
181729
|
-
"parent": {
|
|
181730
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181731
|
-
"name": "AriaDatePickerProps"
|
|
181732
|
-
},
|
|
181733
|
-
"declarations": [
|
|
181734
|
-
{
|
|
181735
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181736
|
-
"name": "AriaDatePickerProps"
|
|
181737
|
-
}
|
|
181738
|
-
],
|
|
181739
|
-
"required": false,
|
|
181740
|
-
"type": {
|
|
181741
|
-
"name": "string"
|
|
181742
|
-
}
|
|
181743
|
-
},
|
|
181744
181725
|
"pageBehavior": {
|
|
181745
181726
|
"defaultValue": {
|
|
181746
181727
|
"value": "visible"
|
|
@@ -181800,6 +181781,63 @@
|
|
|
181800
181781
|
"name": "((date: DateValue) => boolean)"
|
|
181801
181782
|
}
|
|
181802
181783
|
},
|
|
181784
|
+
"allowsNonContiguousRanges": {
|
|
181785
|
+
"defaultValue": null,
|
|
181786
|
+
"description": "When combined with `isDateUnavailable`, determines whether non-contiguous ranges,\ni.e. ranges containing unavailable dates, may be selected.",
|
|
181787
|
+
"name": "allowsNonContiguousRanges",
|
|
181788
|
+
"parent": {
|
|
181789
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181790
|
+
"name": "DateRangePickerProps"
|
|
181791
|
+
},
|
|
181792
|
+
"declarations": [
|
|
181793
|
+
{
|
|
181794
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181795
|
+
"name": "DateRangePickerProps"
|
|
181796
|
+
}
|
|
181797
|
+
],
|
|
181798
|
+
"required": false,
|
|
181799
|
+
"type": {
|
|
181800
|
+
"name": "boolean"
|
|
181801
|
+
}
|
|
181802
|
+
},
|
|
181803
|
+
"startName": {
|
|
181804
|
+
"defaultValue": null,
|
|
181805
|
+
"description": "The name of the start date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).",
|
|
181806
|
+
"name": "startName",
|
|
181807
|
+
"parent": {
|
|
181808
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181809
|
+
"name": "DateRangePickerProps"
|
|
181810
|
+
},
|
|
181811
|
+
"declarations": [
|
|
181812
|
+
{
|
|
181813
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181814
|
+
"name": "DateRangePickerProps"
|
|
181815
|
+
}
|
|
181816
|
+
],
|
|
181817
|
+
"required": false,
|
|
181818
|
+
"type": {
|
|
181819
|
+
"name": "string"
|
|
181820
|
+
}
|
|
181821
|
+
},
|
|
181822
|
+
"endName": {
|
|
181823
|
+
"defaultValue": null,
|
|
181824
|
+
"description": "The name of the end date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).",
|
|
181825
|
+
"name": "endName",
|
|
181826
|
+
"parent": {
|
|
181827
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181828
|
+
"name": "DateRangePickerProps"
|
|
181829
|
+
},
|
|
181830
|
+
"declarations": [
|
|
181831
|
+
{
|
|
181832
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
181833
|
+
"name": "DateRangePickerProps"
|
|
181834
|
+
}
|
|
181835
|
+
],
|
|
181836
|
+
"required": false,
|
|
181837
|
+
"type": {
|
|
181838
|
+
"name": "string"
|
|
181839
|
+
}
|
|
181840
|
+
},
|
|
181803
181841
|
"shouldCloseOnSelect": {
|
|
181804
181842
|
"defaultValue": {
|
|
181805
181843
|
"value": "true"
|
|
@@ -181808,12 +181846,12 @@
|
|
|
181808
181846
|
"name": "shouldCloseOnSelect",
|
|
181809
181847
|
"parent": {
|
|
181810
181848
|
"fileName": "flow/node_modules/.pnpm/@react-stately+datepicker@3.15.0_react@19.1.0/node_modules/@react-stately/datepicker/dist/types.d.ts",
|
|
181811
|
-
"name": "
|
|
181849
|
+
"name": "DateRangePickerStateOptions"
|
|
181812
181850
|
},
|
|
181813
181851
|
"declarations": [
|
|
181814
181852
|
{
|
|
181815
181853
|
"fileName": "flow/node_modules/.pnpm/@react-stately+datepicker@3.15.0_react@19.1.0/node_modules/@react-stately/datepicker/dist/types.d.ts",
|
|
181816
|
-
"name": "
|
|
181854
|
+
"name": "DateRangePickerStateOptions"
|
|
181817
181855
|
}
|
|
181818
181856
|
],
|
|
181819
181857
|
"required": false,
|
|
@@ -181918,9 +181956,9 @@
|
|
|
181918
181956
|
"tags": {
|
|
181919
181957
|
"flr-generate": "all"
|
|
181920
181958
|
},
|
|
181921
|
-
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/
|
|
181959
|
+
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/DatePicker/DatePicker.tsx",
|
|
181922
181960
|
"description": "",
|
|
181923
|
-
"displayName": "
|
|
181961
|
+
"displayName": "DatePicker",
|
|
181924
181962
|
"methods": [],
|
|
181925
181963
|
"props": {
|
|
181926
181964
|
"errorMessage": {
|
|
@@ -181928,13 +181966,13 @@
|
|
|
181928
181966
|
"description": "The error message that is displayed below the input.",
|
|
181929
181967
|
"name": "errorMessage",
|
|
181930
181968
|
"parent": {
|
|
181931
|
-
"fileName": "components/src/components/
|
|
181932
|
-
"name": "
|
|
181969
|
+
"fileName": "components/src/components/DatePicker/DatePicker.tsx",
|
|
181970
|
+
"name": "DatePickerProps"
|
|
181933
181971
|
},
|
|
181934
181972
|
"declarations": [
|
|
181935
181973
|
{
|
|
181936
|
-
"fileName": "components/src/components/
|
|
181937
|
-
"name": "
|
|
181974
|
+
"fileName": "components/src/components/DatePicker/DatePicker.tsx",
|
|
181975
|
+
"name": "DatePickerProps"
|
|
181938
181976
|
}
|
|
181939
181977
|
],
|
|
181940
181978
|
"required": false,
|
|
@@ -183922,6 +183960,25 @@
|
|
|
183922
183960
|
"name": "string | null"
|
|
183923
183961
|
}
|
|
183924
183962
|
},
|
|
183963
|
+
"autoComplete": {
|
|
183964
|
+
"defaultValue": null,
|
|
183965
|
+
"description": "Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).",
|
|
183966
|
+
"name": "autoComplete",
|
|
183967
|
+
"parent": {
|
|
183968
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
183969
|
+
"name": "AriaDatePickerProps"
|
|
183970
|
+
},
|
|
183971
|
+
"declarations": [
|
|
183972
|
+
{
|
|
183973
|
+
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
183974
|
+
"name": "AriaDatePickerProps"
|
|
183975
|
+
}
|
|
183976
|
+
],
|
|
183977
|
+
"required": false,
|
|
183978
|
+
"type": {
|
|
183979
|
+
"name": "string"
|
|
183980
|
+
}
|
|
183981
|
+
},
|
|
183925
183982
|
"pageBehavior": {
|
|
183926
183983
|
"defaultValue": {
|
|
183927
183984
|
"value": "visible"
|
|
@@ -183989,12 +184046,12 @@
|
|
|
183989
184046
|
"name": "shouldCloseOnSelect",
|
|
183990
184047
|
"parent": {
|
|
183991
184048
|
"fileName": "flow/node_modules/.pnpm/@react-stately+datepicker@3.15.0_react@19.1.0/node_modules/@react-stately/datepicker/dist/types.d.ts",
|
|
183992
|
-
"name": "
|
|
184049
|
+
"name": "DateRangePickerStateOptions"
|
|
183993
184050
|
},
|
|
183994
184051
|
"declarations": [
|
|
183995
184052
|
{
|
|
183996
184053
|
"fileName": "flow/node_modules/.pnpm/@react-stately+datepicker@3.15.0_react@19.1.0/node_modules/@react-stately/datepicker/dist/types.d.ts",
|
|
183997
|
-
"name": "
|
|
184054
|
+
"name": "DateRangePickerStateOptions"
|
|
183998
184055
|
}
|
|
183999
184056
|
],
|
|
184000
184057
|
"required": false,
|
|
@@ -184002,63 +184059,6 @@
|
|
|
184002
184059
|
"name": "boolean | (() => boolean)"
|
|
184003
184060
|
}
|
|
184004
184061
|
},
|
|
184005
|
-
"allowsNonContiguousRanges": {
|
|
184006
|
-
"defaultValue": null,
|
|
184007
|
-
"description": "When combined with `isDateUnavailable`, determines whether non-contiguous ranges,\ni.e. ranges containing unavailable dates, may be selected.",
|
|
184008
|
-
"name": "allowsNonContiguousRanges",
|
|
184009
|
-
"parent": {
|
|
184010
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
184011
|
-
"name": "DateRangePickerProps"
|
|
184012
|
-
},
|
|
184013
|
-
"declarations": [
|
|
184014
|
-
{
|
|
184015
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
184016
|
-
"name": "DateRangePickerProps"
|
|
184017
|
-
}
|
|
184018
|
-
],
|
|
184019
|
-
"required": false,
|
|
184020
|
-
"type": {
|
|
184021
|
-
"name": "boolean"
|
|
184022
|
-
}
|
|
184023
|
-
},
|
|
184024
|
-
"startName": {
|
|
184025
|
-
"defaultValue": null,
|
|
184026
|
-
"description": "The name of the start date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).",
|
|
184027
|
-
"name": "startName",
|
|
184028
|
-
"parent": {
|
|
184029
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
184030
|
-
"name": "DateRangePickerProps"
|
|
184031
|
-
},
|
|
184032
|
-
"declarations": [
|
|
184033
|
-
{
|
|
184034
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
184035
|
-
"name": "DateRangePickerProps"
|
|
184036
|
-
}
|
|
184037
|
-
],
|
|
184038
|
-
"required": false,
|
|
184039
|
-
"type": {
|
|
184040
|
-
"name": "string"
|
|
184041
|
-
}
|
|
184042
|
-
},
|
|
184043
|
-
"endName": {
|
|
184044
|
-
"defaultValue": null,
|
|
184045
|
-
"description": "The name of the end date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).",
|
|
184046
|
-
"name": "endName",
|
|
184047
|
-
"parent": {
|
|
184048
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
184049
|
-
"name": "DateRangePickerProps"
|
|
184050
|
-
},
|
|
184051
|
-
"declarations": [
|
|
184052
|
-
{
|
|
184053
|
-
"fileName": "flow/node_modules/.pnpm/@react-types+datepicker@3.13.0_react@19.1.0/node_modules/@react-types/datepicker/src/index.d.ts",
|
|
184054
|
-
"name": "DateRangePickerProps"
|
|
184055
|
-
}
|
|
184056
|
-
],
|
|
184057
|
-
"required": false,
|
|
184058
|
-
"type": {
|
|
184059
|
-
"name": "string"
|
|
184060
|
-
}
|
|
184061
|
-
},
|
|
184062
184062
|
"children": {
|
|
184063
184063
|
"defaultValue": null,
|
|
184064
184064
|
"description": "",
|
|
@@ -291066,6 +291066,34 @@
|
|
|
291066
291066
|
}
|
|
291067
291067
|
}
|
|
291068
291068
|
},
|
|
291069
|
+
{
|
|
291070
|
+
"tags": {},
|
|
291071
|
+
"filePath": "src/components/Popover/components/PopoverTip/PopoverTip.tsx",
|
|
291072
|
+
"description": "",
|
|
291073
|
+
"displayName": "PopoverTip",
|
|
291074
|
+
"methods": [],
|
|
291075
|
+
"props": {
|
|
291076
|
+
"className": {
|
|
291077
|
+
"defaultValue": null,
|
|
291078
|
+
"description": "The elements class name.",
|
|
291079
|
+
"name": "className",
|
|
291080
|
+
"parent": {
|
|
291081
|
+
"fileName": "components/src/lib/types/props.ts",
|
|
291082
|
+
"name": "PropsWithClassName"
|
|
291083
|
+
},
|
|
291084
|
+
"declarations": [
|
|
291085
|
+
{
|
|
291086
|
+
"fileName": "components/src/lib/types/props.ts",
|
|
291087
|
+
"name": "PropsWithClassName"
|
|
291088
|
+
}
|
|
291089
|
+
],
|
|
291090
|
+
"required": false,
|
|
291091
|
+
"type": {
|
|
291092
|
+
"name": "string"
|
|
291093
|
+
}
|
|
291094
|
+
}
|
|
291095
|
+
}
|
|
291096
|
+
},
|
|
291069
291097
|
{
|
|
291070
291098
|
"tags": {
|
|
291071
291099
|
"flr-generate": "all"
|
|
@@ -291244,34 +291272,6 @@
|
|
|
291244
291272
|
}
|
|
291245
291273
|
}
|
|
291246
291274
|
},
|
|
291247
|
-
{
|
|
291248
|
-
"tags": {},
|
|
291249
|
-
"filePath": "src/components/Popover/components/PopoverTip/PopoverTip.tsx",
|
|
291250
|
-
"description": "",
|
|
291251
|
-
"displayName": "PopoverTip",
|
|
291252
|
-
"methods": [],
|
|
291253
|
-
"props": {
|
|
291254
|
-
"className": {
|
|
291255
|
-
"defaultValue": null,
|
|
291256
|
-
"description": "The elements class name.",
|
|
291257
|
-
"name": "className",
|
|
291258
|
-
"parent": {
|
|
291259
|
-
"fileName": "components/src/lib/types/props.ts",
|
|
291260
|
-
"name": "PropsWithClassName"
|
|
291261
|
-
},
|
|
291262
|
-
"declarations": [
|
|
291263
|
-
{
|
|
291264
|
-
"fileName": "components/src/lib/types/props.ts",
|
|
291265
|
-
"name": "PropsWithClassName"
|
|
291266
|
-
}
|
|
291267
|
-
],
|
|
291268
|
-
"required": false,
|
|
291269
|
-
"type": {
|
|
291270
|
-
"name": "string"
|
|
291271
|
-
}
|
|
291272
|
-
}
|
|
291273
|
-
}
|
|
291274
|
-
},
|
|
291275
291275
|
{
|
|
291276
291276
|
"tags": {
|
|
291277
291277
|
"internal": ""
|
|
@@ -300431,9 +300431,9 @@
|
|
|
300431
300431
|
},
|
|
300432
300432
|
{
|
|
300433
300433
|
"tags": {},
|
|
300434
|
-
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/
|
|
300434
|
+
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx",
|
|
300435
300435
|
"description": "",
|
|
300436
|
-
"displayName": "
|
|
300436
|
+
"displayName": "DateRangeInput",
|
|
300437
300437
|
"methods": [],
|
|
300438
300438
|
"props": {
|
|
300439
300439
|
"isDisabled": {
|
|
@@ -300441,12 +300441,12 @@
|
|
|
300441
300441
|
"description": "",
|
|
300442
300442
|
"name": "isDisabled",
|
|
300443
300443
|
"parent": {
|
|
300444
|
-
"fileName": "components/src/components/
|
|
300444
|
+
"fileName": "components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx",
|
|
300445
300445
|
"name": "DateInputProps"
|
|
300446
300446
|
},
|
|
300447
300447
|
"declarations": [
|
|
300448
300448
|
{
|
|
300449
|
-
"fileName": "components/src/components/
|
|
300449
|
+
"fileName": "components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx",
|
|
300450
300450
|
"name": "DateInputProps"
|
|
300451
300451
|
}
|
|
300452
300452
|
],
|
|
@@ -300459,9 +300459,9 @@
|
|
|
300459
300459
|
},
|
|
300460
300460
|
{
|
|
300461
300461
|
"tags": {},
|
|
300462
|
-
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/
|
|
300462
|
+
"filePath": "/home/runner/work/flow/flow/packages/components/src/components/DatePicker/components/DateInput/DateInput.tsx",
|
|
300463
300463
|
"description": "",
|
|
300464
|
-
"displayName": "
|
|
300464
|
+
"displayName": "DateInput",
|
|
300465
300465
|
"methods": [],
|
|
300466
300466
|
"props": {
|
|
300467
300467
|
"isDisabled": {
|
|
@@ -300469,12 +300469,12 @@
|
|
|
300469
300469
|
"description": "",
|
|
300470
300470
|
"name": "isDisabled",
|
|
300471
300471
|
"parent": {
|
|
300472
|
-
"fileName": "components/src/components/
|
|
300472
|
+
"fileName": "components/src/components/DatePicker/components/DateInput/DateInput.tsx",
|
|
300473
300473
|
"name": "DateInputProps"
|
|
300474
300474
|
},
|
|
300475
300475
|
"declarations": [
|
|
300476
300476
|
{
|
|
300477
|
-
"fileName": "components/src/components/
|
|
300477
|
+
"fileName": "components/src/components/DatePicker/components/DateInput/DateInput.tsx",
|
|
300478
300478
|
"name": "DateInputProps"
|
|
300479
300479
|
}
|
|
300480
300480
|
],
|
|
@@ -9,6 +9,7 @@ import { useController } from 'react-hook-form';
|
|
|
9
9
|
import FieldErrorView from '../../../../views/FieldErrorView.mjs';
|
|
10
10
|
import { useLocalizedStringFormatter } from 'react-aria';
|
|
11
11
|
import locales from '../../../../../../_virtual/_.locale.json@72ba2ce40f190df671686fec50c04ddf.mjs';
|
|
12
|
+
import { inheritProps } from '../../../../lib/propsContext/inherit/types.mjs';
|
|
12
13
|
|
|
13
14
|
function Field(props) {
|
|
14
15
|
const { children, name, defaultValue, ...rest } = props;
|
|
@@ -34,7 +35,7 @@ function Field(props) {
|
|
|
34
35
|
const formContext = useFormContext();
|
|
35
36
|
const value = formContext.form.watch(name) ?? controller.field.value;
|
|
36
37
|
const fieldProps = {
|
|
37
|
-
|
|
38
|
+
...inheritProps,
|
|
38
39
|
...controller.field,
|
|
39
40
|
value,
|
|
40
41
|
name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n} from \"react-hook-form\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value = formContext.form.watch(name) ?? controller.field.value;\n\n const fieldProps = {\n
|
|
1
|
+
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n} from \"react-hook-form\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { inheritProps } from \"@/lib/propsContext/inherit/types\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value = formContext.form.watch(name) ?? controller.field.value;\n\n const fieldProps = {\n ...inheritProps,\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: controller.fieldState.invalid,\n children: dynamic((p) => {\n if (controller.fieldState.invalid) {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }\n\n return p.children;\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: fieldProps,\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[controller.fieldState, controller.field, value]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;;AAmBO,SAAS,MAA6B,KAAsB,EAAA;AACjE,EAAA,MAAM,EAAE,QAAU,EAAA,IAAA,EAAM,YAAc,EAAA,GAAG,MAAS,GAAA,KAAA;AAElD,EAAM,MAAA,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAE3D,EAAA,MAAM,aAAa,aAAc,CAAA;AAAA,IAC/B,GAAG,KAAA;AAAA,IACH,KAAO,EAAA;AAAA,MACL,GAAG,KAAM,CAAA,KAAA;AAAA,MACT,SACE,EAAA,OAAO,IAAK,CAAA,KAAA,EAAO,cAAc,QAC7B,GAAA;AAAA,QACE,KAAA,EAAO,KAAK,KAAM,CAAA,SAAA;AAAA,QAClB,OAAA,EAAS,eAAgB,CAAA,MAAA,CAAO,WAAa,EAAA;AAAA,UAC3C,MAAA,EAAQ,KAAK,KAAM,CAAA;AAAA,SACp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unnel';
|
|
6
6
|
import { SlotContextProvider } from '../slotContext/SlotContextProvider.mjs';
|
|
7
7
|
import { useProps } from '../hooks/useProps.mjs';
|
|
8
|
-
import { mergeRefs } from '@react-aria/utils';
|
|
9
8
|
import { useComponentPropsContext } from '../propsContext/propsContext.mjs';
|
|
10
9
|
import { increaseNestingLevel } from '../propsContext/nestedPropsContext/lib.mjs';
|
|
11
10
|
import ComponentPropsContextProviderView from '../../views/ComponentPropsContextProviderView.mjs';
|
|
@@ -14,27 +13,16 @@ import { ComponentPropsContextProvider } from '../propsContext/components/Compon
|
|
|
14
13
|
function flowComponent(componentName, ImplementationComponentType, options = {}) {
|
|
15
14
|
const { type = "ui", isRemoteComponent = false } = options;
|
|
16
15
|
const propsContextLevelMode = type === "ui" ? "increment" : "keep";
|
|
17
|
-
function Component(
|
|
18
|
-
const {
|
|
19
|
-
const {
|
|
20
|
-
ref: refFromContext = null,
|
|
21
|
-
tunnelId,
|
|
22
|
-
wrapWith,
|
|
23
|
-
...propsWithContext
|
|
24
|
-
} = useProps(
|
|
16
|
+
function Component(props) {
|
|
17
|
+
const { tunnelId, wrapWith, ...propsWithContext } = useProps(
|
|
25
18
|
componentName,
|
|
26
19
|
props
|
|
27
20
|
);
|
|
28
21
|
const implementationTypeProps = propsWithContext;
|
|
29
22
|
const componentProps = useComponentPropsContext(componentName) ?? {};
|
|
30
23
|
increaseNestingLevel(componentProps);
|
|
31
|
-
const mergedRef = mergeRefs(refFromProps, refFromContext);
|
|
32
|
-
const propsWithRef = {
|
|
33
|
-
...implementationTypeProps,
|
|
34
|
-
ref: mergedRef
|
|
35
|
-
};
|
|
36
24
|
ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;
|
|
37
|
-
let element = /* @__PURE__ */ jsx(ImplementationComponentType, { ...
|
|
25
|
+
let element = /* @__PURE__ */ jsx(ImplementationComponentType, { ...implementationTypeProps });
|
|
38
26
|
if (isRemoteComponent) {
|
|
39
27
|
element = /* @__PURE__ */ jsx(
|
|
40
28
|
ComponentPropsContextProvider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowComponent.mjs","sources":["../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n ReactElement,\n ReactNode,\n RefAttributes,\n FunctionComponent,\n} from \"react\";\nimport { cloneElement } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport { TunnelEntry } from \"@mittwald/react-tunnel\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport {
|
|
1
|
+
{"version":3,"file":"flowComponent.mjs","sources":["../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n ReactElement,\n ReactNode,\n RefAttributes,\n FunctionComponent,\n} from \"react\";\nimport { cloneElement } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport { TunnelEntry } from \"@mittwald/react-tunnel\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { increaseNestingLevel } from \"@/lib/propsContext/nestedPropsContext/lib\";\nimport ComponentPropsContextProviderView from \"@/views/ComponentPropsContextProviderView\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport type { PropsContextLevelMode } from \"@/lib/propsContext/inherit/types\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel,\n RefAttributes<R> {\n wrapWith?: ReactElement;\n}\n\ntype FlowComponentImplementationProps<C extends FlowComponentName> = Omit<\n FlowComponentPropsOfName<C>,\n keyof FlowComponentProps\n> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\ntype FlowComponentImplementationType<C extends FlowComponentName> =\n ComponentType<FlowComponentImplementationProps<C>>;\n\ntype FlowComponentType<C extends FlowComponentName> = FunctionComponent<\n FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>\n>;\n\ntype FlowComponentProvisionType = \"provider\" | \"ui\";\n\ninterface Options {\n type?: FlowComponentProvisionType;\n isRemoteComponent?: boolean;\n}\n\nexport function flowComponent<C extends FlowComponentName>(\n componentName: C,\n ImplementationComponentType: FlowComponentImplementationType<C>,\n options: Options = {},\n): FlowComponentType<C> {\n type Props = FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\n const { type = \"ui\", isRemoteComponent = false } = options;\n\n const propsContextLevelMode: PropsContextLevelMode =\n type === \"ui\" ? \"increment\" : \"keep\";\n\n function Component(props: Props) {\n const { tunnelId, wrapWith, ...propsWithContext } = useProps(\n componentName,\n props as FlowComponentPropsOfName<C>,\n ) as FlowComponentProps<RefType<FlowComponentPropsOfName<C>>>;\n\n const implementationTypeProps = propsWithContext as ComponentProps<\n typeof ImplementationComponentType\n >;\n\n const componentProps = useComponentPropsContext(componentName) ?? {};\n increaseNestingLevel(componentProps);\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = (\n <ImplementationComponentType {...implementationTypeProps} />\n );\n\n if (isRemoteComponent) {\n element = (\n <ComponentPropsContextProvider\n componentProps={componentProps}\n levelModel={propsContextLevelMode}\n >\n {element}\n </ComponentPropsContextProvider>\n );\n } else {\n /**\n * In case of a Flow component that does not have a remote counterpart\n * (like the List component), the ComponentPropsContext must be applied on\n * the host side, so that nesting and inheritance is working correctly.\n */\n element = (\n <ComponentPropsContextProviderView\n componentProps={componentProps}\n levelModel={propsContextLevelMode}\n >\n {element}\n </ComponentPropsContextProviderView>\n );\n }\n\n if (\"slot\" in props && !!props.slot && typeof props.slot === \"string\") {\n element = (\n <SlotContextProvider slot={props.slot} component={componentName}>\n {element}\n </SlotContextProvider>\n );\n }\n\n if (wrapWith) {\n element = cloneElement(wrapWith, undefined, element);\n }\n\n if (tunnelId) {\n element = <TunnelEntry id={tunnelId}>{element}</TunnelEntry>;\n }\n\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return Component;\n}\n"],"names":[],"mappings":";;;;;;;;;;AAoDO,SAAS,aACd,CAAA,aAAA,EACA,2BACA,EAAA,OAAA,GAAmB,EACG,EAAA;AAItB,EAAA,MAAM,EAAE,IAAA,GAAO,IAAM,EAAA,iBAAA,GAAoB,OAAU,GAAA,OAAA;AAEnD,EAAM,MAAA,qBAAA,GACJ,IAAS,KAAA,IAAA,GAAO,WAAc,GAAA,MAAA;AAEhC,EAAA,SAAS,UAAU,KAAc,EAAA;AAC/B,IAAA,MAAM,EAAE,QAAA,EAAU,QAAU,EAAA,GAAG,kBAAqB,GAAA,QAAA;AAAA,MAClD,aAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,uBAA0B,GAAA,gBAAA;AAIhC,IAAA,MAAM,cAAiB,GAAA,wBAAA,CAAyB,aAAa,CAAA,IAAK,EAAC;AACnE,IAAA,oBAAA,CAAqB,cAAc,CAAA;AAEnC,IAA4B,2BAAA,CAAA,WAAA,GAAc,qBAAqB,aAAa,CAAA,CAAA,CAAA;AAE5E,IAAA,IAAI,OACF,mBAAA,GAAA,CAAC,2BAA6B,EAAA,EAAA,GAAG,uBAAyB,EAAA,CAAA;AAG5D,IAAA,IAAI,iBAAmB,EAAA;AACrB,MACE,OAAA,mBAAA,GAAA;AAAA,QAAC,6BAAA;AAAA,QAAA;AAAA,UACC,cAAA;AAAA,UACA,UAAY,EAAA,qBAAA;AAAA,UAEX,QAAA,EAAA;AAAA;AAAA,OACH;AAAA,KAEG,MAAA;AAML,MACE,OAAA,mBAAA,GAAA;AAAA,QAAC,iCAAA;AAAA,QAAA;AAAA,UACC,cAAA;AAAA,UACA,UAAY,EAAA,qBAAA;AAAA,UAEX,QAAA,EAAA;AAAA;AAAA,OACH;AAAA;AAIJ,IAAI,IAAA,MAAA,IAAU,SAAS,CAAC,CAAC,MAAM,IAAQ,IAAA,OAAO,KAAM,CAAA,IAAA,KAAS,QAAU,EAAA;AACrE,MAAA,OAAA,uBACG,mBAAoB,EAAA,EAAA,IAAA,EAAM,MAAM,IAAM,EAAA,SAAA,EAAW,eAC/C,QACH,EAAA,OAAA,EAAA,CAAA;AAAA;AAIJ,IAAA,IAAI,QAAU,EAAA;AACZ,MAAU,OAAA,GAAA,YAAA,CAAa,QAAU,EAAA,MAAA,EAAW,OAAO,CAAA;AAAA;AAGrD,IAAA,IAAI,QAAU,EAAA;AACZ,MAAA,OAAA,mBAAW,GAAA,CAAA,WAAA,EAAA,EAAY,EAAI,EAAA,QAAA,EAAW,QAAQ,EAAA,OAAA,EAAA,CAAA;AAAA;AAGhD,IAAO,OAAA,OAAA;AAAA;AAGT,EAAU,SAAA,CAAA,WAAA,GAAc,iBAAiB,aAAa,CAAA,CAAA,CAAA;AACtD,EAAO,OAAA,SAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../../../src/lib/propsContext/inherit/types.ts"],"sourcesContent":["/** @internal */\nexport const inheritPropsContextKey = \"___inherit\" as const;\n\n/** @internal */\nexport type InheritPropsContextKey = typeof inheritPropsContextKey;\n\nexport interface InheritPropsContextSettings {\n [inheritPropsContextKey]?: boolean;\n}\n\nexport const inheritProps: InheritPropsContextSettings = {\n [inheritPropsContextKey]: true,\n};\n\nexport type PropsContextLevelMode =\n | \"reset\"\n | \"increment\"\n | \"decrement\"\n | \"keep\";\n"],"names":[],"mappings":"AACO,MAAM,sBAAyB,GAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"types.mjs","sources":["../../../../../../../src/lib/propsContext/inherit/types.ts"],"sourcesContent":["/** @internal */\nexport const inheritPropsContextKey = \"___inherit\" as const;\n\n/** @internal */\nexport type InheritPropsContextKey = typeof inheritPropsContextKey;\n\nexport interface InheritPropsContextSettings {\n [inheritPropsContextKey]?: boolean;\n}\n\nexport const inheritProps: InheritPropsContextSettings = {\n [inheritPropsContextKey]: true,\n};\n\nexport type PropsContextLevelMode =\n | \"reset\"\n | \"increment\"\n | \"decrement\"\n | \"keep\";\n"],"names":[],"mappings":"AACO,MAAM,sBAAyB,GAAA;AAS/B,MAAM,YAA4C,GAAA;AAAA,EACvD,CAAC,sBAAsB,GAAG;AAC5B;;;;"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { mergeProps } from '@react-aria/utils';
|
|
3
|
+
import { mergeProps, mergeRefs } from '@react-aria/utils';
|
|
4
4
|
import { isObjectType } from 'remeda';
|
|
5
5
|
import { setProperty } from 'dot-prop';
|
|
6
6
|
|
|
7
7
|
const getPropsMerger = (options = {}) => (...propsList) => {
|
|
8
|
-
const {
|
|
8
|
+
const {
|
|
9
|
+
mergeClassNames = true,
|
|
10
|
+
mergeEventHandler = true,
|
|
11
|
+
mergeRefs: mergeRefs$1 = true
|
|
12
|
+
} = options;
|
|
9
13
|
const mergedProps = mergeProps(...propsList);
|
|
10
14
|
if (isObjectType(mergedProps)) {
|
|
11
15
|
if (!mergeClassNames) {
|
|
@@ -27,6 +31,19 @@ const getPropsMerger = (options = {}) => (...propsList) => {
|
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
}
|
|
34
|
+
if (mergeRefs$1) {
|
|
35
|
+
const refProps = Object.keys(mergedProps).filter(
|
|
36
|
+
(p) => p === "ref" || p.endsWith("Ref")
|
|
37
|
+
);
|
|
38
|
+
for (const refProp of refProps) {
|
|
39
|
+
const collectedRefObjects = propsList.map((p) => isObjectType(p) && refProp in p ? p[refProp] : null).filter((r) => r !== null);
|
|
40
|
+
setProperty(
|
|
41
|
+
mergedProps,
|
|
42
|
+
refProp,
|
|
43
|
+
mergeRefs(...collectedRefObjects)
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
30
47
|
}
|
|
31
48
|
return mergedProps;
|
|
32
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPropsMerger.mjs","sources":["../../../../../../src/lib/react/getPropsMerger.ts"],"sourcesContent":["import { mergeProps as ariaMergeProps } from \"@react-aria/utils\";\nimport { isObjectType } from \"remeda\";\nimport { setProperty } from \"dot-prop\";\n\ninterface MergePropsOptions {\n mergeClassNames?: boolean;\n mergeEventHandler?: boolean;\n}\n\nexport const getPropsMerger =\n (options: MergePropsOptions = {}): typeof ariaMergeProps =>\n (...propsList) => {\n const {
|
|
1
|
+
{"version":3,"file":"getPropsMerger.mjs","sources":["../../../../../../src/lib/react/getPropsMerger.ts"],"sourcesContent":["import { mergeRefs as mergeRefsFn } from \"@react-aria/utils\";\nimport { mergeProps as ariaMergeProps } from \"@react-aria/utils\";\nimport { isObjectType } from \"remeda\";\nimport { setProperty } from \"dot-prop\";\nimport type { Ref } from \"react\";\n\ninterface MergePropsOptions {\n mergeClassNames?: boolean;\n mergeEventHandler?: boolean;\n mergeRefs?: boolean;\n}\n\nexport const getPropsMerger =\n (options: MergePropsOptions = {}): typeof ariaMergeProps =>\n (...propsList) => {\n const {\n mergeClassNames = true,\n mergeEventHandler = true,\n mergeRefs = true,\n } = options;\n const mergedProps = ariaMergeProps(...propsList);\n\n if (isObjectType(mergedProps)) {\n if (!mergeClassNames) {\n // \"Unmerge\" className\n for (const props of propsList) {\n if (\n isObjectType(props) &&\n \"className\" in mergedProps &&\n \"className\" in props\n ) {\n mergedProps.className = props.className;\n }\n }\n }\n\n if (!mergeEventHandler) {\n // \"Unmerge\" eventHandler\n for (const props of propsList) {\n if (isObjectType(props)) {\n for (const [propName, propValue] of Object.entries(props)) {\n const isEventHandlerProp = /^on[A-Z]/.test(propName);\n if (isEventHandlerProp) {\n setProperty(mergedProps, propName, propValue);\n }\n }\n }\n }\n }\n\n if (mergeRefs) {\n const refProps = Object.keys(mergedProps).filter(\n (p) => p === \"ref\" || p.endsWith(\"Ref\"),\n );\n\n for (const refProp of refProps) {\n const collectedRefObjects = propsList\n .map((p) => (isObjectType(p) && refProp in p ? p[refProp] : null))\n .filter((r): r is Ref<unknown> => r !== null);\n\n setProperty(\n mergedProps,\n refProp,\n mergeRefsFn(...collectedRefObjects),\n );\n }\n }\n }\n\n return mergedProps;\n };\n"],"names":["mergeRefs","ariaMergeProps","mergeRefsFn"],"mappings":";;;;AAYO,MAAM,iBACX,CAAC,OAAA,GAA6B,EAAC,KAC/B,IAAI,SAAc,KAAA;AAChB,EAAM,MAAA;AAAA,IACJ,eAAkB,GAAA,IAAA;AAAA,IAClB,iBAAoB,GAAA,IAAA;AAAA,eACpBA,WAAY,GAAA;AAAA,GACV,GAAA,OAAA;AACJ,EAAM,MAAA,WAAA,GAAcC,UAAe,CAAA,GAAG,SAAS,CAAA;AAE/C,EAAI,IAAA,YAAA,CAAa,WAAW,CAAG,EAAA;AAC7B,IAAA,IAAI,CAAC,eAAiB,EAAA;AAEpB,MAAA,KAAA,MAAW,SAAS,SAAW,EAAA;AAC7B,QAAA,IACE,aAAa,KAAK,CAAA,IAClB,WAAe,IAAA,WAAA,IACf,eAAe,KACf,EAAA;AACA,UAAA,WAAA,CAAY,YAAY,KAAM,CAAA,SAAA;AAAA;AAChC;AACF;AAGF,IAAA,IAAI,CAAC,iBAAmB,EAAA;AAEtB,MAAA,KAAA,MAAW,SAAS,SAAW,EAAA;AAC7B,QAAI,IAAA,YAAA,CAAa,KAAK,CAAG,EAAA;AACvB,UAAA,KAAA,MAAW,CAAC,QAAU,EAAA,SAAS,KAAK,MAAO,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA;AACzD,YAAM,MAAA,kBAAA,GAAqB,UAAW,CAAA,IAAA,CAAK,QAAQ,CAAA;AACnD,YAAA,IAAI,kBAAoB,EAAA;AACtB,cAAY,WAAA,CAAA,WAAA,EAAa,UAAU,SAAS,CAAA;AAAA;AAC9C;AACF;AACF;AACF;AAGF,IAAA,IAAID,WAAW,EAAA;AACb,MAAA,MAAM,QAAW,GAAA,MAAA,CAAO,IAAK,CAAA,WAAW,CAAE,CAAA,MAAA;AAAA,QACxC,CAAC,CAAM,KAAA,CAAA,KAAM,KAAS,IAAA,CAAA,CAAE,SAAS,KAAK;AAAA,OACxC;AAEA,MAAA,KAAA,MAAW,WAAW,QAAU,EAAA;AAC9B,QAAA,MAAM,sBAAsB,SACzB,CAAA,GAAA,CAAI,CAAC,CAAO,KAAA,YAAA,CAAa,CAAC,CAAK,IAAA,OAAA,IAAW,IAAI,CAAE,CAAA,OAAO,IAAI,IAAK,CAAA,CAChE,OAAO,CAAC,CAAA,KAAyB,MAAM,IAAI,CAAA;AAE9C,QAAA,WAAA;AAAA,UACE,WAAA;AAAA,UACA,OAAA;AAAA,UACAE,SAAA,CAAY,GAAG,mBAAmB;AAAA,SACpC;AAAA;AACF;AACF;AAGF,EAAO,OAAA,WAAA;AACT;;;;"}
|
|
@@ -124,8 +124,8 @@ import './components/src/lib/propsContext/inherit/propsContextLevel.mjs';
|
|
|
124
124
|
import '@mittwald/react-tunnel';
|
|
125
125
|
import './components/src/lib/slotContext/slotContext.mjs';
|
|
126
126
|
export { useProps } from './components/src/lib/hooks/useProps.mjs';
|
|
127
|
-
import '@react-aria/utils';
|
|
128
127
|
import './components/src/lib/viewComponentContext/viewComponentContext.mjs';
|
|
128
|
+
import '@react-aria/utils';
|
|
129
129
|
import 'remeda';
|
|
130
130
|
import 'dot-prop';
|
|
131
131
|
import './components/src/components/Button/Button.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAMzB,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,CAC/C,SAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACxC,iBAAiB;CAAG;AAExB,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,2CAqHhE;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,EAC9C,aAAa,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAC1D,OAAO,KAAK,CAAC,CAAC,CAAU,CAAC;AAE5B,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowComponent.d.ts","sourceRoot":"","sources":["../../../../src/lib/componentFactory/flowComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,IAAI,wBAAwB,EAC/C,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAEV,aAAa,EACb,YAAY,EAEZ,aAAa,EACb,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowComponent.d.ts","sourceRoot":"","sources":["../../../../src/lib/componentFactory/flowComponent.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CAAC,CAAC,CAAC,EAC/D,OAAO,GAAE,OAAY,GACpB,iBAAiB,CAAC,CAAC,CAAC,CA0EtB"}
|
|
@@ -2,6 +2,7 @@ import { mergeProps as ariaMergeProps } from '@react-aria/utils';
|
|
|
2
2
|
interface MergePropsOptions {
|
|
3
3
|
mergeClassNames?: boolean;
|
|
4
4
|
mergeEventHandler?: boolean;
|
|
5
|
+
mergeRefs?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const getPropsMerger: (options?: MergePropsOptions) => typeof ariaMergeProps;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPropsMerger.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/getPropsMerger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getPropsMerger.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/getPropsMerger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKjE,UAAU,iBAAiB;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,GACxB,UAAS,iBAAsB,KAAG,OAAO,cAyDzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.484",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
60
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
61
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.484",
|
|
62
62
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
63
63
|
"@react-aria/form": "^3.1.0",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@faker-js/faker": "^9.9.0",
|
|
102
102
|
"@internationalized/date": "^3.8.2",
|
|
103
103
|
"@mittwald/flow-core": "",
|
|
104
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
104
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.484",
|
|
105
105
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
106
106
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.3",
|
|
107
107
|
"@mittwald/typescript-config": "",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"optional": true
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "f312c4667117190295fe590c7bc828c07cb046dd"
|
|
178
178
|
}
|