@mittwald/flow-react-components 0.2.0-alpha.675 → 0.2.0-alpha.676

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 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.676](https://github.com/mittwald/flow/compare/0.2.0-alpha.675...0.2.0-alpha.676) (2026-02-10)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **TextField:** fix cursor position ([#2312](https://github.com/mittwald/flow/issues/2312)) ([3d564d0](https://github.com/mittwald/flow/commit/3d564d0fc5a91222a9fc4e10e8ab99804ddec4d3))
11
+
6
12
  # [0.2.0-alpha.675](https://github.com/mittwald/flow/compare/0.2.0-alpha.674...0.2.0-alpha.675) (2026-02-10)
7
13
 
8
14
  ### Bug Fixes
@@ -239642,87 +239642,6 @@
239642
239642
  }
239643
239643
  }
239644
239644
  },
239645
- {
239646
- "tags": {},
239647
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Activity/Activity.tsx",
239648
- "description": "",
239649
- "displayName": "Activity",
239650
- "methods": [],
239651
- "props": {
239652
- "isActive": {
239653
- "defaultValue": null,
239654
- "description": "",
239655
- "name": "isActive",
239656
- "parent": {
239657
- "fileName": "components/src/components/Activity/Activity.tsx",
239658
- "name": "ActivityProps"
239659
- },
239660
- "declarations": [
239661
- {
239662
- "fileName": "components/src/components/Activity/Activity.tsx",
239663
- "name": "ActivityProps"
239664
- }
239665
- ],
239666
- "required": false,
239667
- "type": {
239668
- "name": "boolean"
239669
- }
239670
- },
239671
- "inactiveDelay": {
239672
- "defaultValue": null,
239673
- "description": "",
239674
- "name": "inactiveDelay",
239675
- "parent": {
239676
- "fileName": "components/src/components/Activity/Activity.tsx",
239677
- "name": "ActivityProps"
239678
- },
239679
- "declarations": [
239680
- {
239681
- "fileName": "components/src/components/Activity/Activity.tsx",
239682
- "name": "ActivityProps"
239683
- }
239684
- ],
239685
- "required": false,
239686
- "type": {
239687
- "name": "number"
239688
- }
239689
- },
239690
- "forceCustomActivity": {
239691
- "defaultValue": null,
239692
- "description": "@internal",
239693
- "name": "forceCustomActivity",
239694
- "parent": {
239695
- "fileName": "components/src/components/Activity/Activity.tsx",
239696
- "name": "ActivityProps"
239697
- },
239698
- "declarations": [
239699
- {
239700
- "fileName": "components/src/components/Activity/Activity.tsx",
239701
- "name": "ActivityProps"
239702
- }
239703
- ],
239704
- "required": false,
239705
- "type": {
239706
- "name": "boolean"
239707
- }
239708
- },
239709
- "children": {
239710
- "defaultValue": null,
239711
- "description": "",
239712
- "name": "children",
239713
- "declarations": [
239714
- {
239715
- "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
239716
- "name": "TypeLiteral"
239717
- }
239718
- ],
239719
- "required": false,
239720
- "type": {
239721
- "name": "ReactNode"
239722
- }
239723
- }
239724
- }
239725
- },
239726
239645
  {
239727
239646
  "tags": {
239728
239647
  "flr-generate": "all"
@@ -239865,6 +239784,87 @@
239865
239784
  }
239866
239785
  }
239867
239786
  },
239787
+ {
239788
+ "tags": {},
239789
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Activity/Activity.tsx",
239790
+ "description": "",
239791
+ "displayName": "Activity",
239792
+ "methods": [],
239793
+ "props": {
239794
+ "isActive": {
239795
+ "defaultValue": null,
239796
+ "description": "",
239797
+ "name": "isActive",
239798
+ "parent": {
239799
+ "fileName": "components/src/components/Activity/Activity.tsx",
239800
+ "name": "ActivityProps"
239801
+ },
239802
+ "declarations": [
239803
+ {
239804
+ "fileName": "components/src/components/Activity/Activity.tsx",
239805
+ "name": "ActivityProps"
239806
+ }
239807
+ ],
239808
+ "required": false,
239809
+ "type": {
239810
+ "name": "boolean"
239811
+ }
239812
+ },
239813
+ "inactiveDelay": {
239814
+ "defaultValue": null,
239815
+ "description": "",
239816
+ "name": "inactiveDelay",
239817
+ "parent": {
239818
+ "fileName": "components/src/components/Activity/Activity.tsx",
239819
+ "name": "ActivityProps"
239820
+ },
239821
+ "declarations": [
239822
+ {
239823
+ "fileName": "components/src/components/Activity/Activity.tsx",
239824
+ "name": "ActivityProps"
239825
+ }
239826
+ ],
239827
+ "required": false,
239828
+ "type": {
239829
+ "name": "number"
239830
+ }
239831
+ },
239832
+ "forceCustomActivity": {
239833
+ "defaultValue": null,
239834
+ "description": "@internal",
239835
+ "name": "forceCustomActivity",
239836
+ "parent": {
239837
+ "fileName": "components/src/components/Activity/Activity.tsx",
239838
+ "name": "ActivityProps"
239839
+ },
239840
+ "declarations": [
239841
+ {
239842
+ "fileName": "components/src/components/Activity/Activity.tsx",
239843
+ "name": "ActivityProps"
239844
+ }
239845
+ ],
239846
+ "required": false,
239847
+ "type": {
239848
+ "name": "boolean"
239849
+ }
239850
+ },
239851
+ "children": {
239852
+ "defaultValue": null,
239853
+ "description": "",
239854
+ "name": "children",
239855
+ "declarations": [
239856
+ {
239857
+ "fileName": "flow/node_modules/.pnpm/@types+react@19.2.10/node_modules/@types/react/index.d.ts",
239858
+ "name": "TypeLiteral"
239859
+ }
239860
+ ],
239861
+ "required": false,
239862
+ "type": {
239863
+ "name": "ReactNode"
239864
+ }
239865
+ }
239866
+ }
239867
+ },
239868
239868
  {
239869
239869
  "tags": {},
239870
239870
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Action/Action.tsx",
@@ -295812,9 +295812,9 @@
295812
295812
  "tags": {
295813
295813
  "flr-generate": "all"
295814
295814
  },
295815
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/RadioGroup/components/Radio/Radio.tsx",
295815
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.tsx",
295816
295816
  "description": "",
295817
- "displayName": "Radio",
295817
+ "displayName": "RadioButton",
295818
295818
  "methods": [],
295819
295819
  "props": {
295820
295820
  "className": {
@@ -297702,9 +297702,9 @@
297702
297702
  "tags": {
297703
297703
  "flr-generate": "all"
297704
297704
  },
297705
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.tsx",
297705
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/RadioGroup/components/Radio/Radio.tsx",
297706
297706
  "description": "",
297707
- "displayName": "RadioButton",
297707
+ "displayName": "Radio",
297708
297708
  "methods": [],
297709
297709
  "props": {
297710
297710
  "className": {
@@ -305948,6 +305948,14 @@
305948
305948
  }
305949
305949
  }
305950
305950
  },
305951
+ {
305952
+ "tags": {},
305953
+ "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.tsx",
305954
+ "description": "",
305955
+ "displayName": "OffCanvasSuspenseFallback",
305956
+ "methods": [],
305957
+ "props": {}
305958
+ },
305951
305959
  {
305952
305960
  "tags": {},
305953
305961
  "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Modal/components/ModalTrigger/ModalTrigger.tsx",
@@ -306086,14 +306094,6 @@
306086
306094
  }
306087
306095
  }
306088
306096
  },
306089
- {
306090
- "tags": {},
306091
- "filePath": "/home/runner/work/flow/flow/packages/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.tsx",
306092
- "description": "",
306093
- "displayName": "OffCanvasSuspenseFallback",
306094
- "methods": [],
306095
- "props": {}
306096
- },
306097
306097
  {
306098
306098
  "tags": {
306099
306099
  "flr-generate": "all"
@@ -311474,9 +311474,9 @@
311474
311474
  "tags": {
311475
311475
  "flr-generate": "all"
311476
311476
  },
311477
- "filePath": "src/components/CartesianChart/components/XAxis/XAxis.tsx",
311477
+ "filePath": "src/components/CartesianChart/components/YAxis/YAxis.tsx",
311478
311478
  "description": "",
311479
- "displayName": "XAxis",
311479
+ "displayName": "YAxis",
311480
311480
  "methods": [],
311481
311481
  "props": {
311482
311482
  "className": {
@@ -311557,16 +311557,16 @@
311557
311557
  },
311558
311558
  "scale": {
311559
311559
  "defaultValue": null,
311560
- "description": "Scale function determines how data values are mapped to visual values.\nIn other words, decided the mapping between data domain and coordinate range.\n\nIf undefined, or 'auto', the scale function is created internally according to the type of axis and data.\n\nYou can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.\n@defaultValue auto\n@example <XAxis scale=\"log\" />\n@example import { scaleLog } from 'd3-scale';\nconst scale = scaleLog().base(Math.E);\n<XAxis scale={scale} />",
311560
+ "description": "Scale function determines how data values are mapped to visual values.\nIn other words, decided the mapping between data domain and coordinate range.\n\nIf undefined, or 'auto', the scale function is created internally according to the type of axis and data.\n\nYou can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.\n@defaultValue auto\n@example <YAxis scale=\"log\" />\n@example import { scaleLog } from 'd3-scale';\nconst scale = scaleLog().base(Math.E);\n<YAxis scale={scale} />",
311561
311561
  "name": "scale",
311562
311562
  "parent": {
311563
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311564
- "name": "XAxisProps"
311563
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311564
+ "name": "YAxisProps"
311565
311565
  },
311566
311566
  "declarations": [
311567
311567
  {
311568
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311569
- "name": "XAxisProps"
311568
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311569
+ "name": "YAxisProps"
311570
311570
  }
311571
311571
  ],
311572
311572
  "required": false,
@@ -311612,37 +311612,18 @@
311612
311612
  "name": "boolean"
311613
311613
  }
311614
311614
  },
311615
- "allowDataOverflow": {
311616
- "defaultValue": null,
311617
- "description": "When domain of the axis is specified and the type of the axis is 'number',\nif allowDataOverflow is set to be false,\nthe domain will be adjusted when the minimum value of data is smaller than domain[0] or\nthe maximum value of data is greater than domain[1] so that the axis displays all data values.\nIf set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain.\n@defaultValue false",
311618
- "name": "allowDataOverflow",
311619
- "parent": {
311620
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/util/types.d.ts",
311621
- "name": "RenderableAxisProps"
311622
- },
311623
- "declarations": [
311624
- {
311625
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/util/types.d.ts",
311626
- "name": "RenderableAxisProps"
311627
- }
311628
- ],
311629
- "required": false,
311630
- "type": {
311631
- "name": "boolean"
311632
- }
311633
- },
311634
311615
  "interval": {
311635
311616
  "defaultValue": null,
311636
- "description": "If set 0, all the ticks will be shown. If set preserveStart\", \"preserveEnd\" or \"preserveStartEnd\", the ticks which is to be shown or hidden will be calculated automatically.\n@defaultValue preserveEnd",
311617
+ "description": "If set 0, all the ticks will be shown. If set \"preserveStart\", \"preserveEnd\" or \"preserveStartEnd\",\nthe ticks which is to be shown or hidden will be calculated automatically.\n@defaultValue preserveEnd",
311637
311618
  "name": "interval",
311638
311619
  "parent": {
311639
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311640
- "name": "XAxisProps"
311620
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311621
+ "name": "YAxisProps"
311641
311622
  },
311642
311623
  "declarations": [
311643
311624
  {
311644
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311645
- "name": "XAxisProps"
311625
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311626
+ "name": "YAxisProps"
311646
311627
  }
311647
311628
  ],
311648
311629
  "required": false,
@@ -311655,13 +311636,13 @@
311655
311636
  "description": "The minimum gap between two adjacent tick labels\n@defaultValue 5",
311656
311637
  "name": "minTickGap",
311657
311638
  "parent": {
311658
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311659
- "name": "XAxisProps"
311639
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311640
+ "name": "YAxisProps"
311660
311641
  },
311661
311642
  "declarations": [
311662
311643
  {
311663
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311664
- "name": "XAxisProps"
311644
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311645
+ "name": "YAxisProps"
311665
311646
  }
311666
311647
  ],
311667
311648
  "required": false,
@@ -311671,16 +311652,16 @@
311671
311652
  },
311672
311653
  "domain": {
311673
311654
  "defaultValue": null,
311674
- "description": "Specify the domain of axis when the axis is a number axis.\n\nIf undefined, then the domain is calculated based on the data and dataKeys.\n\nThe length of domain should be 2, and we will validate the values in domain.\n\nEach element in the array can be a number, 'auto', 'dataMin', 'dataMax', a string like 'dataMin - 20', 'dataMax + 100',\nor a function that accepts a single argument and returns a number.\n\nIf any element of domain is set to be 'auto', comprehensible scale ticks will be calculated, and the final domain of axis is generated by the ticks.\nIf a function, receives '[dataMin, dataMax]', and must return a computed domain as '[min, max]'.\n@example <XAxis type=\"number\" domain={['dataMin', 'dataMax']} />\n@example <XAxis type=\"number\" domain={[0, 'dataMax']} />\n@example <XAxis type=\"number\" domain={['auto', 'auto']} />\n@example <XAxis type=\"number\" domain={[0, 'dataMax + 1000']} />\n@example <XAxis type=\"number\" domain={['dataMin - 100', 'dataMax + 100']} />\n@example <XAxis type=\"number\" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />\n@example <XAxis type=\"number\" domain={([dataMin, dataMax]) => { const absMax = Math.max(Math.abs(dataMin), Math.abs(dataMax)); return [-absMax, absMax]; }} />\n@example <XAxis type=\"number\" domain={[0, 100]} allowDataOverflow />",
311655
+ "description": "Specify the domain of axis when the axis is a number axis.\n\nIf undefined, then the domain is calculated based on the data and dataKeys.\n\nThe length of domain should be 2, and we will validate the values in domain.\n\nEach element in the array can be a number, 'auto', 'dataMin', 'dataMax', a string like 'dataMin - 20', 'dataMax + 100',\nor a function that accepts a single argument and returns a number.\n\nIf any element of domain is set to be 'auto', comprehensible scale ticks will be calculated, and the final domain of axis is generated by the ticks.\nIf a function, receives '[dataMin, dataMax]', and must return a computed domain as '[min, max]'.\n@example <YAxis type=\"number\" domain={['dataMin', 'dataMax']} />\n@example <YAxis type=\"number\" domain={[0, 'dataMax']} />\n@example <YAxis type=\"number\" domain={['auto', 'auto']} />\n@example <YAxis type=\"number\" domain={[0, 'dataMax + 1000']} />\n@example <YAxis type=\"number\" domain={['dataMin - 100', 'dataMax + 100']} />\n@example <YAxis type=\"number\" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />\n@example <YAxis type=\"number\" domain={([dataMin, dataMax]) => { const absMax = Math.max(Math.abs(dataMin), Math.abs(dataMax)); return [-absMax, absMax]; }} />\n@example <YAxis type=\"number\" domain={[0, 100]} allowDataOverflow />",
311675
311656
  "name": "domain",
311676
311657
  "parent": {
311677
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311678
- "name": "XAxisProps"
311658
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311659
+ "name": "YAxisProps"
311679
311660
  },
311680
311661
  "declarations": [
311681
311662
  {
311682
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311683
- "name": "XAxisProps"
311663
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311664
+ "name": "YAxisProps"
311684
311665
  }
311685
311666
  ],
311686
311667
  "required": false,
@@ -311732,9 +311713,9 @@
311732
311713
  "tags": {
311733
311714
  "flr-generate": "all"
311734
311715
  },
311735
- "filePath": "src/components/CartesianChart/components/YAxis/YAxis.tsx",
311716
+ "filePath": "src/components/CartesianChart/components/XAxis/XAxis.tsx",
311736
311717
  "description": "",
311737
- "displayName": "YAxis",
311718
+ "displayName": "XAxis",
311738
311719
  "methods": [],
311739
311720
  "props": {
311740
311721
  "className": {
@@ -311815,16 +311796,16 @@
311815
311796
  },
311816
311797
  "scale": {
311817
311798
  "defaultValue": null,
311818
- "description": "Scale function determines how data values are mapped to visual values.\nIn other words, decided the mapping between data domain and coordinate range.\n\nIf undefined, or 'auto', the scale function is created internally according to the type of axis and data.\n\nYou can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.\n@defaultValue auto\n@example <YAxis scale=\"log\" />\n@example import { scaleLog } from 'd3-scale';\nconst scale = scaleLog().base(Math.E);\n<YAxis scale={scale} />",
311799
+ "description": "Scale function determines how data values are mapped to visual values.\nIn other words, decided the mapping between data domain and coordinate range.\n\nIf undefined, or 'auto', the scale function is created internally according to the type of axis and data.\n\nYou can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.\n@defaultValue auto\n@example <XAxis scale=\"log\" />\n@example import { scaleLog } from 'd3-scale';\nconst scale = scaleLog().base(Math.E);\n<XAxis scale={scale} />",
311819
311800
  "name": "scale",
311820
311801
  "parent": {
311821
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311822
- "name": "YAxisProps"
311802
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311803
+ "name": "XAxisProps"
311823
311804
  },
311824
311805
  "declarations": [
311825
311806
  {
311826
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311827
- "name": "YAxisProps"
311807
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311808
+ "name": "XAxisProps"
311828
311809
  }
311829
311810
  ],
311830
311811
  "required": false,
@@ -311872,16 +311853,16 @@
311872
311853
  },
311873
311854
  "interval": {
311874
311855
  "defaultValue": null,
311875
- "description": "If set 0, all the ticks will be shown. If set \"preserveStart\", \"preserveEnd\" or \"preserveStartEnd\",\nthe ticks which is to be shown or hidden will be calculated automatically.\n@defaultValue preserveEnd",
311856
+ "description": "If set 0, all the ticks will be shown. If set preserveStart\", \"preserveEnd\" or \"preserveStartEnd\", the ticks which is to be shown or hidden will be calculated automatically.\n@defaultValue preserveEnd",
311876
311857
  "name": "interval",
311877
311858
  "parent": {
311878
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311879
- "name": "YAxisProps"
311859
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311860
+ "name": "XAxisProps"
311880
311861
  },
311881
311862
  "declarations": [
311882
311863
  {
311883
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311884
- "name": "YAxisProps"
311864
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311865
+ "name": "XAxisProps"
311885
311866
  }
311886
311867
  ],
311887
311868
  "required": false,
@@ -311894,13 +311875,13 @@
311894
311875
  "description": "The minimum gap between two adjacent tick labels\n@defaultValue 5",
311895
311876
  "name": "minTickGap",
311896
311877
  "parent": {
311897
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311898
- "name": "YAxisProps"
311878
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311879
+ "name": "XAxisProps"
311899
311880
  },
311900
311881
  "declarations": [
311901
311882
  {
311902
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311903
- "name": "YAxisProps"
311883
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311884
+ "name": "XAxisProps"
311904
311885
  }
311905
311886
  ],
311906
311887
  "required": false,
@@ -311910,16 +311891,16 @@
311910
311891
  },
311911
311892
  "domain": {
311912
311893
  "defaultValue": null,
311913
- "description": "Specify the domain of axis when the axis is a number axis.\n\nIf undefined, then the domain is calculated based on the data and dataKeys.\n\nThe length of domain should be 2, and we will validate the values in domain.\n\nEach element in the array can be a number, 'auto', 'dataMin', 'dataMax', a string like 'dataMin - 20', 'dataMax + 100',\nor a function that accepts a single argument and returns a number.\n\nIf any element of domain is set to be 'auto', comprehensible scale ticks will be calculated, and the final domain of axis is generated by the ticks.\nIf a function, receives '[dataMin, dataMax]', and must return a computed domain as '[min, max]'.\n@example <YAxis type=\"number\" domain={['dataMin', 'dataMax']} />\n@example <YAxis type=\"number\" domain={[0, 'dataMax']} />\n@example <YAxis type=\"number\" domain={['auto', 'auto']} />\n@example <YAxis type=\"number\" domain={[0, 'dataMax + 1000']} />\n@example <YAxis type=\"number\" domain={['dataMin - 100', 'dataMax + 100']} />\n@example <YAxis type=\"number\" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />\n@example <YAxis type=\"number\" domain={([dataMin, dataMax]) => { const absMax = Math.max(Math.abs(dataMin), Math.abs(dataMax)); return [-absMax, absMax]; }} />\n@example <YAxis type=\"number\" domain={[0, 100]} allowDataOverflow />",
311894
+ "description": "Specify the domain of axis when the axis is a number axis.\n\nIf undefined, then the domain is calculated based on the data and dataKeys.\n\nThe length of domain should be 2, and we will validate the values in domain.\n\nEach element in the array can be a number, 'auto', 'dataMin', 'dataMax', a string like 'dataMin - 20', 'dataMax + 100',\nor a function that accepts a single argument and returns a number.\n\nIf any element of domain is set to be 'auto', comprehensible scale ticks will be calculated, and the final domain of axis is generated by the ticks.\nIf a function, receives '[dataMin, dataMax]', and must return a computed domain as '[min, max]'.\n@example <XAxis type=\"number\" domain={['dataMin', 'dataMax']} />\n@example <XAxis type=\"number\" domain={[0, 'dataMax']} />\n@example <XAxis type=\"number\" domain={['auto', 'auto']} />\n@example <XAxis type=\"number\" domain={[0, 'dataMax + 1000']} />\n@example <XAxis type=\"number\" domain={['dataMin - 100', 'dataMax + 100']} />\n@example <XAxis type=\"number\" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />\n@example <XAxis type=\"number\" domain={([dataMin, dataMax]) => { const absMax = Math.max(Math.abs(dataMin), Math.abs(dataMax)); return [-absMax, absMax]; }} />\n@example <XAxis type=\"number\" domain={[0, 100]} allowDataOverflow />",
311914
311895
  "name": "domain",
311915
311896
  "parent": {
311916
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311917
- "name": "YAxisProps"
311897
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311898
+ "name": "XAxisProps"
311918
311899
  },
311919
311900
  "declarations": [
311920
311901
  {
311921
- "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/YAxis.d.ts",
311922
- "name": "YAxisProps"
311902
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/cartesian/XAxis.d.ts",
311903
+ "name": "XAxisProps"
311923
311904
  }
311924
311905
  ],
311925
311906
  "required": false,
@@ -311964,6 +311945,25 @@
311964
311945
  "type": {
311965
311946
  "name": "((value: any, index: number) => string)"
311966
311947
  }
311948
+ },
311949
+ "allowDataOverflow": {
311950
+ "defaultValue": null,
311951
+ "description": "When domain of the axis is specified and the type of the axis is 'number',\nif allowDataOverflow is set to be false,\nthe domain will be adjusted when the minimum value of data is smaller than domain[0] or\nthe maximum value of data is greater than domain[1] so that the axis displays all data values.\nIf set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain.\n@defaultValue false",
311952
+ "name": "allowDataOverflow",
311953
+ "parent": {
311954
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/util/types.d.ts",
311955
+ "name": "RenderableAxisProps"
311956
+ },
311957
+ "declarations": [
311958
+ {
311959
+ "fileName": "flow/node_modules/.pnpm/recharts@3.7.0_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react-is@19.2.0_react@19.2.4_redux@5.0.1/node_modules/recharts/types/util/types.d.ts",
311960
+ "name": "RenderableAxisProps"
311961
+ }
311962
+ ],
311963
+ "required": false,
311964
+ "type": {
311965
+ "name": "boolean"
311966
+ }
311967
311967
  }
311968
311968
  }
311969
311969
  },
@@ -26,6 +26,7 @@ const TextArea = flowComponent("TextArea", (props) => {
26
26
  allowHorizontalResize,
27
27
  showCharacterCount,
28
28
  className,
29
+ onChange,
29
30
  ...rest
30
31
  } = useControlledHostValueProps(props);
31
32
  const [charactersCount, setCharactersCount] = useState(
@@ -53,8 +54,8 @@ const TextArea = flowComponent("TextArea", (props) => {
53
54
  if (showCharacterCount) {
54
55
  setCharactersCount(v.length);
55
56
  }
56
- if (props.onChange) {
57
- props.onChange(v);
57
+ if (onChange) {
58
+ onChange(v);
58
59
  }
59
60
  };
60
61
  const translation = useLocalizedStringFormatter(locales);
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (props.onChange) {\n props.onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales);\n\n const charactersCountDescription = translation.format(\"textArea.characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </P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CAAC,4BAA0B,QAAA,EAAS,CAAA;AAAA,wBACpC,GAAA;AAAA,UAAC,IAAA,CAAK,QAAA;AAAA,UAAL;AAAA,YACC,IAAA;AAAA,YACA,aAAA,EAAa,MAAM,aAAa,CAAA;AAAA,YAChC,WAAA;AAAA,YACA,SAAA,EAAW,cAAA;AAAA,YACX,GAAA,EAAK,QAAA;AAAA,YACL,QAAA,EAAU,YAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACL,SAAA,EAAW,UAAU,IAAI,CAAA;AAAA,cACzB,SAAA,EAAW,mBAAA,GACP,MAAA,GACA,SAAA,CAAU,iBAAiB;AAAA;AACjC;AAAA,SACF;AAAA,QACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B,CAAA;AAAA,4BAE/C,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"TextArea.mjs","sources":["../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales);\n\n const charactersCountDescription = translation.format(\"textArea.characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;;;;;;;;AAmCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,EAAA,MAAM;AAAA,IACJ,QAAA;A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A,EAAW,cAAA;AAAA,YACX,GAAA,EAAK,QAAA;AAAA,YACL,QAAA,EAAU,YAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACL,SAAA,EAAW,UAAU,IAAI,CAAA;AAAA,cACzB,SAAA,EAAW,mBAAA,GACP,MAAA,GACA,SAAA,CAAU,iBAAiB;AAAA;AACjC;AAAA,SACF;AAAA,QACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B,CAAA;AAAA,4BAE/C,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -30,6 +30,7 @@ const TextField = flowComponent("TextField", (props) => {
30
30
  ref,
31
31
  type: typeFromProps,
32
32
  children,
33
+ onChange,
33
34
  ...rest
34
35
  } = useControlledHostValueProps(props);
35
36
  const [charactersCount, setCharactersCount] = useState(
@@ -56,8 +57,8 @@ const TextField = flowComponent("TextField", (props) => {
56
57
  if (showCharacterCount) {
57
58
  setCharactersCount(v.length);
58
59
  }
59
- if (props.onChange) {
60
- props.onChange(v);
60
+ if (onChange) {
61
+ onChange(v);
61
62
  }
62
63
  };
63
64
  const translation = useLocalizedStringFormatter(locales);
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.mjs","sources":["../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnelId: \"button\",\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (props.onChange) {\n props.onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales);\n\n const charactersCountDescription = translation.format(\n \"textField.characters\",\n {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n },\n );\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <TunnelProvider>\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <TunnelExit id=\"button\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `textField.password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </TunnelProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,IAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA,EAAM,aAAA;AAAA,IACN,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,aAAa,CAAA;AAE9C,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,UAAA,CAAW,SAAA,EAAW,SAAS,CAAA;AAE1D,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,WAAW,MAAA,CAAO,MAAA;AAAA,MAClB,OAAA,EAAS,OAAA;AAAA,MACT,KAAA,EAAO,WAAA;AAAA,MACP,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,GAAG;AAAA,GACL;AAEA,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AA,cAAA;AAAA,gBACC,KAAA,EAAM,WAAA;AAAA,gBACN,OAAA,EAAQ,OAAA;AAAA,gBACR,WAAW,MAAA,CAAO,MAAA;AAAA,gBAClB,SAAS,MACP,OAAA,CAAQ,IAAA,KAAS,UAAA,GAAa,SAAS,UAAU,CAAA;AAAA,gBAEnD,cAAY,WAAA,CAAY,MAAA;AAAA,kBACtB,CAAA,mBAAA,EAAsB,IAAA,KAAS,UAAA,GAAa,MAAA,GAAS,MAAM,CAAA;AAAA,iBAC7D;AAAA,gBAEC,mBAAS,UAAA,mBAAa,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,uBAAM,QAAA,EAAA,EAAS;AAAA;AAAA;AAClD,WAAA,EAEJ,CAAA;AAAA,UACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B;AAAA,SAAA,EAElD,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB,CAAA,EACF;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"TextField.mjs","sources":["../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnelId: \"button\",\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales);\n\n const charactersCountDescription = translation.format(\n \"textField.characters\",\n {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n },\n );\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <TunnelProvider>\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <TunnelExit id=\"button\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `textField.password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </TunnelProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,IAAA;AAAA,IACA,WAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA,EAAM,aAAA;AAAA,IACN,QAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,aAAa,CAAA;AAE9C,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,UAAA,CAAW,SAAA,EAAW,SAAS,CAAA;AAE1D,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,WAAW,MAAA,CAAO,MAAA;AAAA,MAClB,OAAA,EAAS,OAAA;AAAA,MACT,KAAA,EAAO,WAAA;AAAA,MACP,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,YAAA,GAAe,CAAC,CAAA,KAAc;AAClC,IAAA,IAAI,kBAAA,EAAoB;AACtB,MAAA,kBAAA,CAAmB,EA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EAAE,OAAO,CAAC;IAChC,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,uGAsJnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM/E,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAMpE,MAAM,WAAW,aACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,GAAG,aAAa,CAAC,EAChE,kBAAkB,CAAC,mBAAmB,CAAC;IACzC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,UAAU,CAAC;IAClD,6CAA6C;IAC7C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,uGAuJnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAazD,MAAM,WAAW,cACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,qGAqGpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAazD,MAAM,WAAW,cACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,EACxD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,qGAsGpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.675",
3
+ "version": "0.2.0-alpha.676",
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.675",
61
+ "@mittwald/react-tunnel": "0.2.0-alpha.676",
62
62
  "@mittwald/react-use-promise": "^4.2.2",
63
63
  "@react-aria/form": "^3.1.3",
64
64
  "@react-aria/live-announcer": "^3.4.4",
@@ -104,7 +104,7 @@
104
104
  "@faker-js/faker": "^10.2.0",
105
105
  "@internationalized/date": "^3.10.1",
106
106
  "@mittwald/flow-core": "",
107
- "@mittwald/flow-design-tokens": "0.2.0-alpha.675",
107
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.676",
108
108
  "@mittwald/react-use-promise": "^4.2.2",
109
109
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
110
110
  "@mittwald/typescript-config": "",
@@ -172,5 +172,5 @@
172
172
  "optional": true
173
173
  }
174
174
  },
175
- "gitHead": "3d05327f32a6ca087b3755132f13e13c589bf74c"
175
+ "gitHead": "ddd02d9fa245a42b905defb07511d91d8e516afa"
176
176
  }