@elaraai/east-ui 0.0.1-beta.5 → 0.0.1-beta.7
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/README.md +2 -2
- package/dist/src/buttons/button/index.d.ts +7 -5
- package/dist/src/buttons/button/index.d.ts.map +1 -1
- package/dist/src/buttons/button/index.js +9 -13
- package/dist/src/buttons/button/index.js.map +1 -1
- package/dist/src/buttons/button/types.d.ts +7 -1
- package/dist/src/buttons/button/types.d.ts.map +1 -1
- package/dist/src/buttons/button/types.js +3 -1
- package/dist/src/buttons/button/types.js.map +1 -1
- package/dist/src/buttons/icon-button/index.d.ts +13 -32
- package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/index.js +13 -33
- package/dist/src/buttons/icon-button/index.js.map +1 -1
- package/dist/src/buttons/icon-button/types.d.ts +45 -38
- package/dist/src/buttons/icon-button/types.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/types.js +5 -2
- package/dist/src/buttons/icon-button/types.js.map +1 -1
- package/dist/src/charts/area/index.d.ts +16 -31
- package/dist/src/charts/area/index.d.ts.map +1 -1
- package/dist/src/charts/area/index.js +16 -31
- package/dist/src/charts/area/index.js.map +1 -1
- package/dist/src/charts/area/types.d.ts +22 -1
- package/dist/src/charts/area/types.d.ts.map +1 -1
- package/dist/src/charts/bar/index.d.ts +12 -39
- package/dist/src/charts/bar/index.d.ts.map +1 -1
- package/dist/src/charts/bar/index.js +12 -39
- package/dist/src/charts/bar/index.js.map +1 -1
- package/dist/src/charts/bar/types.d.ts +23 -1
- package/dist/src/charts/bar/types.d.ts.map +1 -1
- package/dist/src/charts/bar-list/index.d.ts +11 -14
- package/dist/src/charts/bar-list/index.d.ts.map +1 -1
- package/dist/src/charts/bar-list/index.js +11 -14
- package/dist/src/charts/bar-list/index.js.map +1 -1
- package/dist/src/charts/bar-list/types.d.ts +9 -0
- package/dist/src/charts/bar-list/types.d.ts.map +1 -1
- package/dist/src/charts/bar-segment/index.d.ts +10 -13
- package/dist/src/charts/bar-segment/index.d.ts.map +1 -1
- package/dist/src/charts/bar-segment/index.js +10 -13
- package/dist/src/charts/bar-segment/index.js.map +1 -1
- package/dist/src/charts/bar-segment/types.d.ts +7 -0
- package/dist/src/charts/bar-segment/types.d.ts.map +1 -1
- package/dist/src/charts/line/index.d.ts +18 -17
- package/dist/src/charts/line/index.d.ts.map +1 -1
- package/dist/src/charts/line/index.js +18 -17
- package/dist/src/charts/line/index.js.map +1 -1
- package/dist/src/charts/line/types.d.ts +18 -1
- package/dist/src/charts/line/types.d.ts.map +1 -1
- package/dist/src/charts/pie/index.d.ts +11 -18
- package/dist/src/charts/pie/index.d.ts.map +1 -1
- package/dist/src/charts/pie/index.js +11 -18
- package/dist/src/charts/pie/index.js.map +1 -1
- package/dist/src/charts/pie/types.d.ts +10 -0
- package/dist/src/charts/pie/types.d.ts.map +1 -1
- package/dist/src/charts/radar/index.d.ts +15 -16
- package/dist/src/charts/radar/index.d.ts.map +1 -1
- package/dist/src/charts/radar/index.js +15 -16
- package/dist/src/charts/radar/index.js.map +1 -1
- package/dist/src/charts/radar/types.d.ts +15 -1
- package/dist/src/charts/radar/types.d.ts.map +1 -1
- package/dist/src/charts/scatter/index.d.ts +12 -13
- package/dist/src/charts/scatter/index.d.ts.map +1 -1
- package/dist/src/charts/scatter/index.js +12 -13
- package/dist/src/charts/scatter/index.js.map +1 -1
- package/dist/src/charts/scatter/types.d.ts +14 -1
- package/dist/src/charts/scatter/types.d.ts.map +1 -1
- package/dist/src/collections/data-list/index.d.ts +19 -40
- package/dist/src/collections/data-list/index.d.ts.map +1 -1
- package/dist/src/collections/data-list/index.js +19 -40
- package/dist/src/collections/data-list/index.js.map +1 -1
- package/dist/src/collections/data-list/types.d.ts +10 -6
- package/dist/src/collections/data-list/types.d.ts.map +1 -1
- package/dist/src/collections/data-list/types.js +10 -6
- package/dist/src/collections/data-list/types.js.map +1 -1
- package/dist/src/collections/gantt/index.d.ts +4668 -968
- package/dist/src/collections/gantt/index.d.ts.map +1 -1
- package/dist/src/collections/gantt/index.js +133 -81
- package/dist/src/collections/gantt/index.js.map +1 -1
- package/dist/src/collections/gantt/types.d.ts +336 -56
- package/dist/src/collections/gantt/types.d.ts.map +1 -1
- package/dist/src/collections/gantt/types.js +142 -2
- package/dist/src/collections/gantt/types.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +11350 -8517
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +64 -53
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/table/types.d.ts +155 -17
- package/dist/src/collections/table/types.d.ts.map +1 -1
- package/dist/src/collections/table/types.js +78 -14
- package/dist/src/collections/table/types.js.map +1 -1
- package/dist/src/collections/tree-view/index.d.ts +42 -70
- package/dist/src/collections/tree-view/index.d.ts.map +1 -1
- package/dist/src/collections/tree-view/index.js +40 -71
- package/dist/src/collections/tree-view/index.js.map +1 -1
- package/dist/src/collections/tree-view/types.d.ts +24 -1
- package/dist/src/collections/tree-view/types.d.ts.map +1 -1
- package/dist/src/collections/tree-view/types.js +7 -1
- package/dist/src/collections/tree-view/types.js.map +1 -1
- package/dist/src/component.d.ts +688 -21
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +15 -23
- package/dist/src/component.js.map +1 -1
- package/dist/src/container/card/index.d.ts +1387 -64
- package/dist/src/container/card/index.d.ts.map +1 -1
- package/dist/src/container/card/index.js +11 -20
- package/dist/src/container/card/index.js.map +1 -1
- package/dist/src/container/card/types.d.ts +3 -4
- package/dist/src/container/card/types.d.ts.map +1 -1
- package/dist/src/container/card/types.js +3 -4
- package/dist/src/container/card/types.js.map +1 -1
- package/dist/src/disclosure/accordion/index.d.ts +2923 -277
- package/dist/src/disclosure/accordion/index.d.ts.map +1 -1
- package/dist/src/disclosure/accordion/index.js +35 -65
- package/dist/src/disclosure/accordion/index.js.map +1 -1
- package/dist/src/disclosure/accordion/types.d.ts +6 -1
- package/dist/src/disclosure/accordion/types.d.ts.map +1 -1
- package/dist/src/disclosure/accordion/types.js +3 -1
- package/dist/src/disclosure/accordion/types.js.map +1 -1
- package/dist/src/disclosure/carousel/index.d.ts +1391 -89
- package/dist/src/disclosure/carousel/index.d.ts.map +1 -1
- package/dist/src/disclosure/carousel/index.js +15 -46
- package/dist/src/disclosure/carousel/index.js.map +1 -1
- package/dist/src/disclosure/carousel/types.d.ts +9 -3
- package/dist/src/disclosure/carousel/types.d.ts.map +1 -1
- package/dist/src/disclosure/carousel/types.js +4 -1
- package/dist/src/disclosure/carousel/types.js.map +1 -1
- package/dist/src/disclosure/tabs/index.d.ts +2911 -283
- package/dist/src/disclosure/tabs/index.d.ts.map +1 -1
- package/dist/src/disclosure/tabs/index.js +18 -56
- package/dist/src/disclosure/tabs/index.js.map +1 -1
- package/dist/src/disclosure/tabs/types.d.ts +6 -1
- package/dist/src/disclosure/tabs/types.d.ts.map +1 -1
- package/dist/src/disclosure/tabs/types.js +3 -1
- package/dist/src/disclosure/tabs/types.js.map +1 -1
- package/dist/src/display/avatar/index.d.ts +8 -33
- package/dist/src/display/avatar/index.d.ts.map +1 -1
- package/dist/src/display/avatar/index.js +8 -33
- package/dist/src/display/avatar/index.js.map +1 -1
- package/dist/src/display/badge/index.d.ts +7 -22
- package/dist/src/display/badge/index.d.ts.map +1 -1
- package/dist/src/display/badge/index.js +7 -22
- package/dist/src/display/badge/index.js.map +1 -1
- package/dist/src/display/icon/index.d.ts +4 -36
- package/dist/src/display/icon/index.d.ts.map +1 -1
- package/dist/src/display/icon/index.js +4 -36
- package/dist/src/display/icon/index.js.map +1 -1
- package/dist/src/display/icon/types.d.ts +1 -0
- package/dist/src/display/icon/types.d.ts.map +1 -1
- package/dist/src/display/icon/types.js +1 -0
- package/dist/src/display/icon/types.js.map +1 -1
- package/dist/src/display/stat/index.d.ts +18 -40
- package/dist/src/display/stat/index.d.ts.map +1 -1
- package/dist/src/display/stat/index.js +18 -40
- package/dist/src/display/stat/index.js.map +1 -1
- package/dist/src/display/stat/types.d.ts +10 -6
- package/dist/src/display/stat/types.d.ts.map +1 -1
- package/dist/src/display/stat/types.js +10 -6
- package/dist/src/display/stat/types.js.map +1 -1
- package/dist/src/display/tag/index.d.ts +10 -30
- package/dist/src/display/tag/index.d.ts.map +1 -1
- package/dist/src/display/tag/index.js +13 -38
- package/dist/src/display/tag/index.js.map +1 -1
- package/dist/src/display/tag/types.d.ts +6 -1
- package/dist/src/display/tag/types.d.ts.map +1 -1
- package/dist/src/display/tag/types.js +3 -1
- package/dist/src/display/tag/types.js.map +1 -1
- package/dist/src/feedback/alert/index.d.ts +7 -39
- package/dist/src/feedback/alert/index.d.ts.map +1 -1
- package/dist/src/feedback/alert/index.js +7 -39
- package/dist/src/feedback/alert/index.js.map +1 -1
- package/dist/src/feedback/alert/types.d.ts +24 -13
- package/dist/src/feedback/alert/types.d.ts.map +1 -1
- package/dist/src/feedback/alert/types.js +24 -13
- package/dist/src/feedback/alert/types.js.map +1 -1
- package/dist/src/feedback/progress/index.d.ts +8 -42
- package/dist/src/feedback/progress/index.d.ts.map +1 -1
- package/dist/src/feedback/progress/index.js +8 -42
- package/dist/src/feedback/progress/index.js.map +1 -1
- package/dist/src/feedback/progress/types.d.ts +10 -5
- package/dist/src/feedback/progress/types.d.ts.map +1 -1
- package/dist/src/feedback/progress/types.js +10 -5
- package/dist/src/feedback/progress/types.js.map +1 -1
- package/dist/src/forms/checkbox/index.d.ts +13 -23
- package/dist/src/forms/checkbox/index.d.ts.map +1 -1
- package/dist/src/forms/checkbox/index.js +21 -39
- package/dist/src/forms/checkbox/index.js.map +1 -1
- package/dist/src/forms/checkbox/types.d.ts +20 -15
- package/dist/src/forms/checkbox/types.d.ts.map +1 -1
- package/dist/src/forms/checkbox/types.js +3 -1
- package/dist/src/forms/checkbox/types.js.map +1 -1
- package/dist/src/forms/field/index.d.ts +688 -7140
- package/dist/src/forms/field/index.d.ts.map +1 -1
- package/dist/src/forms/field/index.js +531 -90
- package/dist/src/forms/field/index.js.map +1 -1
- package/dist/src/forms/field/types.d.ts +730 -4
- package/dist/src/forms/field/types.d.ts.map +1 -1
- package/dist/src/forms/field/types.js +83 -1
- package/dist/src/forms/field/types.js.map +1 -1
- package/dist/src/forms/file-upload/index.d.ts +22 -52
- package/dist/src/forms/file-upload/index.d.ts.map +1 -1
- package/dist/src/forms/file-upload/index.js +15 -54
- package/dist/src/forms/file-upload/index.js.map +1 -1
- package/dist/src/forms/file-upload/types.d.ts +52 -1
- package/dist/src/forms/file-upload/types.d.ts.map +1 -1
- package/dist/src/forms/file-upload/types.js +32 -1
- package/dist/src/forms/file-upload/types.js.map +1 -1
- package/dist/src/forms/index.d.ts +1 -2
- package/dist/src/forms/index.d.ts.map +1 -1
- package/dist/src/forms/index.js +1 -2
- package/dist/src/forms/index.js.map +1 -1
- package/dist/src/forms/input/index.d.ts +70 -8
- package/dist/src/forms/input/index.d.ts.map +1 -1
- package/dist/src/forms/input/index.js +94 -93
- package/dist/src/forms/input/index.js.map +1 -1
- package/dist/src/forms/input/types.d.ts +203 -99
- package/dist/src/forms/input/types.d.ts.map +1 -1
- package/dist/src/forms/input/types.js +49 -26
- package/dist/src/forms/input/types.js.map +1 -1
- package/dist/src/forms/select/index.d.ts +22 -15
- package/dist/src/forms/select/index.d.ts.map +1 -1
- package/dist/src/forms/select/index.js +33 -34
- package/dist/src/forms/select/index.js.map +1 -1
- package/dist/src/forms/select/types.d.ts +44 -5
- package/dist/src/forms/select/types.d.ts.map +1 -1
- package/dist/src/forms/select/types.js +7 -1
- package/dist/src/forms/select/types.js.map +1 -1
- package/dist/src/forms/slider/index.d.ts +15 -31
- package/dist/src/forms/slider/index.d.ts.map +1 -1
- package/dist/src/forms/slider/index.js +26 -50
- package/dist/src/forms/slider/index.js.map +1 -1
- package/dist/src/forms/slider/types.d.ts +19 -7
- package/dist/src/forms/slider/types.d.ts.map +1 -1
- package/dist/src/forms/slider/types.js +13 -7
- package/dist/src/forms/slider/types.js.map +1 -1
- package/dist/src/forms/switch/index.d.ts +26 -23
- package/dist/src/forms/switch/index.d.ts.map +1 -1
- package/dist/src/forms/switch/index.js +33 -38
- package/dist/src/forms/switch/index.js.map +1 -1
- package/dist/src/forms/switch/types.d.ts +20 -15
- package/dist/src/forms/switch/types.d.ts.map +1 -1
- package/dist/src/forms/switch/types.js +3 -1
- package/dist/src/forms/switch/types.js.map +1 -1
- package/dist/src/forms/tags-input/index.d.ts +20 -50
- package/dist/src/forms/tags-input/index.d.ts.map +1 -1
- package/dist/src/forms/tags-input/index.js +24 -52
- package/dist/src/forms/tags-input/index.js.map +1 -1
- package/dist/src/forms/tags-input/types.d.ts +19 -1
- package/dist/src/forms/tags-input/types.d.ts.map +1 -1
- package/dist/src/forms/tags-input/types.js +10 -1
- package/dist/src/forms/tags-input/types.js.map +1 -1
- package/dist/src/forms/textarea/index.d.ts +20 -47
- package/dist/src/forms/textarea/index.d.ts.map +1 -1
- package/dist/src/forms/textarea/index.js +24 -49
- package/dist/src/forms/textarea/index.js.map +1 -1
- package/dist/src/forms/textarea/types.d.ts +25 -4
- package/dist/src/forms/textarea/types.d.ts.map +1 -1
- package/dist/src/forms/textarea/types.js +13 -4
- package/dist/src/forms/textarea/types.js.map +1 -1
- package/dist/src/index.d.ts +7 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +0 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +0 -1
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/box/index.d.ts +1463 -71
- package/dist/src/layout/box/index.d.ts.map +1 -1
- package/dist/src/layout/box/index.js +48 -32
- package/dist/src/layout/box/index.js.map +1 -1
- package/dist/src/layout/box/types.d.ts +52 -2
- package/dist/src/layout/box/types.d.ts.map +1 -1
- package/dist/src/layout/box/types.js +15 -1
- package/dist/src/layout/box/types.js.map +1 -1
- package/dist/src/layout/flex/index.d.ts +8915 -0
- package/dist/src/layout/flex/index.d.ts.map +1 -0
- package/dist/src/layout/flex/index.js +291 -0
- package/dist/src/layout/flex/index.js.map +1 -0
- package/dist/src/layout/flex/types.d.ts +176 -0
- package/dist/src/layout/flex/types.d.ts.map +1 -0
- package/dist/src/layout/flex/types.js +56 -0
- package/dist/src/layout/flex/types.js.map +1 -0
- package/dist/src/layout/grid/index.d.ts +2907 -268
- package/dist/src/layout/grid/index.d.ts.map +1 -1
- package/dist/src/layout/grid/index.js +12 -37
- package/dist/src/layout/grid/index.js.map +1 -1
- package/dist/src/layout/grid/types.d.ts +11 -3
- package/dist/src/layout/grid/types.d.ts.map +1 -1
- package/dist/src/layout/grid/types.js +11 -3
- package/dist/src/layout/grid/types.js.map +1 -1
- package/dist/src/layout/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +1 -0
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/layout/separator/index.d.ts +7 -19
- package/dist/src/layout/separator/index.d.ts.map +1 -1
- package/dist/src/layout/separator/index.js +7 -19
- package/dist/src/layout/separator/index.js.map +1 -1
- package/dist/src/layout/splitter/index.d.ts +2948 -298
- package/dist/src/layout/splitter/index.d.ts.map +1 -1
- package/dist/src/layout/splitter/index.js +41 -74
- package/dist/src/layout/splitter/index.js.map +1 -1
- package/dist/src/layout/splitter/types.d.ts +31 -3
- package/dist/src/layout/splitter/types.d.ts.map +1 -1
- package/dist/src/layout/splitter/types.js +15 -1
- package/dist/src/layout/splitter/types.js.map +1 -1
- package/dist/src/layout/stack/index.d.ts +1469 -61
- package/dist/src/layout/stack/index.d.ts.map +1 -1
- package/dist/src/layout/stack/index.js +54 -22
- package/dist/src/layout/stack/index.js.map +1 -1
- package/dist/src/layout/stack/types.d.ts +52 -2
- package/dist/src/layout/stack/types.d.ts.map +1 -1
- package/dist/src/layout/stack/types.js +15 -1
- package/dist/src/layout/stack/types.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts +24 -43
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +19 -41
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/overlays/action-bar/types.d.ts +23 -2
- package/dist/src/overlays/action-bar/types.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/types.js +8 -2
- package/dist/src/overlays/action-bar/types.js.map +1 -1
- package/dist/src/overlays/dialog/index.d.ts +2769 -118
- package/dist/src/overlays/dialog/index.d.ts.map +1 -1
- package/dist/src/overlays/dialog/index.js +17 -35
- package/dist/src/overlays/dialog/index.js.map +1 -1
- package/dist/src/overlays/dialog/types.d.ts +42 -1
- package/dist/src/overlays/dialog/types.d.ts.map +1 -1
- package/dist/src/overlays/dialog/types.js +13 -1
- package/dist/src/overlays/dialog/types.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +2763 -117
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +14 -34
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/drawer/types.d.ts +25 -1
- package/dist/src/overlays/drawer/types.d.ts.map +1 -1
- package/dist/src/overlays/drawer/types.js +7 -1
- package/dist/src/overlays/drawer/types.js.map +1 -1
- package/dist/src/overlays/hover-card/index.d.ts +2763 -122
- package/dist/src/overlays/hover-card/index.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/index.js +16 -39
- package/dist/src/overlays/hover-card/index.js.map +1 -1
- package/dist/src/overlays/hover-card/types.d.ts +17 -1
- package/dist/src/overlays/hover-card/types.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/types.js +4 -1
- package/dist/src/overlays/hover-card/types.js.map +1 -1
- package/dist/src/overlays/menu/index.d.ts +1415 -86
- package/dist/src/overlays/menu/index.d.ts.map +1 -1
- package/dist/src/overlays/menu/index.js +39 -42
- package/dist/src/overlays/menu/index.js.map +1 -1
- package/dist/src/overlays/menu/types.d.ts +13 -1
- package/dist/src/overlays/menu/types.d.ts.map +1 -1
- package/dist/src/overlays/menu/types.js +7 -3
- package/dist/src/overlays/menu/types.js.map +1 -1
- package/dist/src/overlays/popover/index.d.ts +2760 -120
- package/dist/src/overlays/popover/index.d.ts.map +1 -1
- package/dist/src/overlays/popover/index.js +13 -37
- package/dist/src/overlays/popover/index.js.map +1 -1
- package/dist/src/overlays/popover/types.d.ts +22 -1
- package/dist/src/overlays/popover/types.d.ts.map +1 -1
- package/dist/src/overlays/popover/types.js +4 -1
- package/dist/src/overlays/popover/types.js.map +1 -1
- package/dist/src/overlays/toggle-tip/index.d.ts +1387 -72
- package/dist/src/overlays/toggle-tip/index.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/index.js +11 -29
- package/dist/src/overlays/toggle-tip/index.js.map +1 -1
- package/dist/src/overlays/toggle-tip/types.d.ts +26 -13
- package/dist/src/overlays/toggle-tip/types.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/types.js +4 -1
- package/dist/src/overlays/toggle-tip/types.js.map +1 -1
- package/dist/src/overlays/tooltip/index.d.ts +1384 -78
- package/dist/src/overlays/tooltip/index.d.ts.map +1 -1
- package/dist/src/overlays/tooltip/index.js +8 -34
- package/dist/src/overlays/tooltip/index.js.map +1 -1
- package/dist/src/overlays/tooltip/types.d.ts +12 -3
- package/dist/src/overlays/tooltip/types.d.ts.map +1 -1
- package/dist/src/overlays/tooltip/types.js +12 -3
- package/dist/src/overlays/tooltip/types.js.map +1 -1
- package/dist/src/platform/index.d.ts +217 -1
- package/dist/src/platform/index.d.ts.map +1 -1
- package/dist/src/platform/index.js +222 -1
- package/dist/src/platform/index.js.map +1 -1
- package/dist/src/platform/state.d.ts +170 -69
- package/dist/src/platform/state.d.ts.map +1 -1
- package/dist/src/platform/state.js +252 -67
- package/dist/src/platform/state.js.map +1 -1
- package/dist/src/platform/store.d.ts +172 -0
- package/dist/src/platform/store.d.ts.map +1 -0
- package/dist/src/platform/store.js +246 -0
- package/dist/src/platform/store.js.map +1 -0
- package/dist/src/reactive/index.d.ts +69 -0
- package/dist/src/reactive/index.d.ts.map +1 -0
- package/dist/src/reactive/index.js +93 -0
- package/dist/src/reactive/index.js.map +1 -0
- package/dist/src/typography/code-block/index.d.ts +2 -1
- package/dist/src/typography/code-block/index.d.ts.map +1 -1
- package/dist/src/typography/code-block/index.js +2 -1
- package/dist/src/typography/code-block/index.js.map +1 -1
- package/dist/src/typography/code-block/types.d.ts +4 -0
- package/dist/src/typography/code-block/types.d.ts.map +1 -1
- package/dist/src/typography/code-block/types.js +2 -0
- package/dist/src/typography/code-block/types.js.map +1 -1
- package/dist/src/typography/list/index.d.ts +2 -3
- package/dist/src/typography/list/index.d.ts.map +1 -1
- package/dist/src/typography/list/index.js +2 -3
- package/dist/src/typography/list/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/src/forms/fieldset/index.d.ts +0 -112
- package/dist/src/forms/fieldset/index.d.ts.map +0 -1
- package/dist/src/forms/fieldset/index.js +0 -131
- package/dist/src/forms/fieldset/index.js.map +0 -1
- package/dist/src/forms/fieldset/types.d.ts +0 -53
- package/dist/src/forms/fieldset/types.d.ts.map +0 -1
- package/dist/src/forms/fieldset/types.js +0 -22
- package/dist/src/forms/fieldset/types.js.map +0 -1
|
@@ -2,40 +2,19 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import { East,
|
|
5
|
+
import { East, StringType, BooleanType, variant, none, ArrayType, FloatType, DateTimeType, IntegerType, } from "@elaraai/east";
|
|
6
6
|
import { UIComponentType } from "../../component.js";
|
|
7
|
-
import {} from "./types.js";
|
|
7
|
+
import { ControlRootType, FieldOrientationType, FieldType } from "./types.js";
|
|
8
|
+
import { DateTimeInput_, FloatInput_, IntegerInput_, StringInput_ } from "../input/index.js";
|
|
9
|
+
import { createCheckbox_ } from "../checkbox/index.js";
|
|
10
|
+
import { createSwitch_ } from "../switch/index.js";
|
|
11
|
+
import { createFileUpload_ } from "../file-upload/index.js";
|
|
12
|
+
import { createSelectRoot_ } from "../select/index.js";
|
|
13
|
+
import { createSlider_ } from "../slider/index.js";
|
|
14
|
+
import { createTagsInput_ } from "../tags-input/index.js";
|
|
15
|
+
import { createTextarea_ } from "../textarea/index.js";
|
|
8
16
|
// Re-export types
|
|
9
|
-
export {} from "./types.js";
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// Field Type
|
|
12
|
-
// ============================================================================
|
|
13
|
-
/**
|
|
14
|
-
* The concrete East type for Field component data.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* Field wraps a form control (Input, Select, Checkbox, etc.) with
|
|
18
|
-
* a label and optional helper/error text for form field presentation.
|
|
19
|
-
*
|
|
20
|
-
* @property label - Label text for the field
|
|
21
|
-
* @property control - The form control component (Input, Select, etc.)
|
|
22
|
-
* @property helperText - Optional descriptive help text
|
|
23
|
-
* @property errorText - Optional validation error message
|
|
24
|
-
* @property required - Whether the field is required
|
|
25
|
-
* @property disabled - Whether the field is disabled
|
|
26
|
-
* @property invalid - Whether the field is in an invalid state
|
|
27
|
-
* @property readOnly - Whether the field is read-only
|
|
28
|
-
*/
|
|
29
|
-
export const FieldType = StructType({
|
|
30
|
-
label: StringType,
|
|
31
|
-
control: UIComponentType,
|
|
32
|
-
helperText: OptionType(StringType),
|
|
33
|
-
errorText: OptionType(StringType),
|
|
34
|
-
required: OptionType(BooleanType),
|
|
35
|
-
disabled: OptionType(BooleanType),
|
|
36
|
-
invalid: OptionType(BooleanType),
|
|
37
|
-
readOnly: OptionType(BooleanType),
|
|
38
|
-
});
|
|
17
|
+
export { FieldType, ControlRootType, FieldOrientationType } from "./types.js";
|
|
39
18
|
// ============================================================================
|
|
40
19
|
// Field Function
|
|
41
20
|
// ============================================================================
|
|
@@ -53,32 +32,16 @@ export const FieldType = StructType({
|
|
|
53
32
|
*
|
|
54
33
|
* @example
|
|
55
34
|
* ```ts
|
|
56
|
-
* import {
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* const
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* const passwordField = Field.Root(
|
|
67
|
-
* "Password",
|
|
68
|
-
* Input.String({ placeholder: "Enter password" }),
|
|
69
|
-
* {
|
|
70
|
-
* required: true,
|
|
71
|
-
* invalid: hasError,
|
|
72
|
-
* errorText: "Password is required",
|
|
73
|
-
* }
|
|
74
|
-
* );
|
|
75
|
-
*
|
|
76
|
-
* // Read-only field
|
|
77
|
-
* const readOnlyField = Field.Root(
|
|
78
|
-
* "Account ID",
|
|
79
|
-
* Input.String({ value: accountId }),
|
|
80
|
-
* { readOnly: true }
|
|
81
|
-
* );
|
|
35
|
+
* import { East } from "@elaraai/east";
|
|
36
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
37
|
+
*
|
|
38
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
39
|
+
* return Field.StringInput(
|
|
40
|
+
* "Email",
|
|
41
|
+
* "",
|
|
42
|
+
* { placeholder: "Enter email", helperText: "We'll never share your email" }
|
|
43
|
+
* );
|
|
44
|
+
* });
|
|
82
45
|
* ```
|
|
83
46
|
*/
|
|
84
47
|
function createField(label, control, style) {
|
|
@@ -92,6 +55,11 @@ function createField(label, control, style) {
|
|
|
92
55
|
return variant("none", null);
|
|
93
56
|
return variant("some", val);
|
|
94
57
|
};
|
|
58
|
+
const orientationValue = style?.orientation
|
|
59
|
+
? (typeof style.orientation === "string"
|
|
60
|
+
? East.value(variant(style.orientation, null), FieldOrientationType)
|
|
61
|
+
: style.orientation)
|
|
62
|
+
: undefined;
|
|
95
63
|
return East.value(variant("Field", {
|
|
96
64
|
label: label,
|
|
97
65
|
control: control,
|
|
@@ -101,61 +69,534 @@ function createField(label, control, style) {
|
|
|
101
69
|
disabled: toBoolOption(style?.disabled),
|
|
102
70
|
invalid: toBoolOption(style?.invalid),
|
|
103
71
|
readOnly: toBoolOption(style?.readOnly),
|
|
72
|
+
orientation: orientationValue ? variant("some", orientationValue) : none,
|
|
104
73
|
}), UIComponentType);
|
|
105
74
|
}
|
|
106
75
|
/**
|
|
107
|
-
*
|
|
76
|
+
* Creates a Field with a Checkbox control.
|
|
108
77
|
*
|
|
109
|
-
* @
|
|
110
|
-
*
|
|
111
|
-
*
|
|
78
|
+
* @param label - Label text for the field
|
|
79
|
+
* @param checked - Initial checked state
|
|
80
|
+
* @param style - Optional field and checkbox styling
|
|
81
|
+
* @returns An East expression representing the field component
|
|
112
82
|
*
|
|
113
83
|
* @example
|
|
114
84
|
* ```ts
|
|
115
|
-
* import {
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* const
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* const termsField = Field.Root(
|
|
126
|
-
* "Terms",
|
|
127
|
-
* Checkbox.Root(accepted, { label: "I accept the terms" })
|
|
128
|
-
* );
|
|
85
|
+
* import { East } from "@elaraai/east";
|
|
86
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
87
|
+
*
|
|
88
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
89
|
+
* return Field.Checkbox(
|
|
90
|
+
* "Accept terms",
|
|
91
|
+
* false,
|
|
92
|
+
* { helperText: "You must accept to continue" }
|
|
93
|
+
* );
|
|
94
|
+
* });
|
|
129
95
|
* ```
|
|
130
96
|
*/
|
|
97
|
+
function createCheckboxField(label, checked, style) {
|
|
98
|
+
const control = East.value(variant('Checkbox', createCheckbox_(checked, style)), ControlRootType);
|
|
99
|
+
return createField(label, control, style);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Creates a Field with a FileUpload control.
|
|
103
|
+
*
|
|
104
|
+
* @param label - Label text for the field
|
|
105
|
+
* @param style - Optional field and file upload styling
|
|
106
|
+
* @returns An East expression representing the field component
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* import { East } from "@elaraai/east";
|
|
111
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
112
|
+
*
|
|
113
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
114
|
+
* return Field.FileUpload("Documents", {
|
|
115
|
+
* accept: "application/pdf",
|
|
116
|
+
* helperText: "Upload PDF files only",
|
|
117
|
+
* });
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
function createFileUploadField(label, style) {
|
|
122
|
+
const control = East.value(variant('FileUpload', createFileUpload_(style)), ControlRootType);
|
|
123
|
+
return createField(label, control, style);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Creates a Field with a Select control.
|
|
127
|
+
*
|
|
128
|
+
* @param label - Label text for the field
|
|
129
|
+
* @param value - Currently selected value
|
|
130
|
+
* @param items - Array of select items
|
|
131
|
+
* @param style - Optional field and select styling
|
|
132
|
+
* @returns An East expression representing the field component
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```ts
|
|
136
|
+
* import { East } from "@elaraai/east";
|
|
137
|
+
* import { Field, Select, UIComponentType } from "@elaraai/east-ui";
|
|
138
|
+
*
|
|
139
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
140
|
+
* return Field.Select("Country", "", [
|
|
141
|
+
* Select.Item("us", "United States"),
|
|
142
|
+
* Select.Item("uk", "United Kingdom"),
|
|
143
|
+
* ], { helperText: "Select your country" });
|
|
144
|
+
* });
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
function createSelectField(label, value, items, style) {
|
|
148
|
+
const control = East.value(variant('Select', createSelectRoot_(value, items, style)), ControlRootType);
|
|
149
|
+
return createField(label, control, style);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Creates a Field with a StringInput control.
|
|
153
|
+
*
|
|
154
|
+
* @param label - Label text for the field
|
|
155
|
+
* @param value - Initial string value
|
|
156
|
+
* @param style - Optional field and input styling
|
|
157
|
+
* @returns An East expression representing the field component
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* import { East } from "@elaraai/east";
|
|
162
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
163
|
+
*
|
|
164
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
165
|
+
* return Field.StringInput("Email", "", {
|
|
166
|
+
* placeholder: "Enter email",
|
|
167
|
+
* helperText: "We'll never share your email",
|
|
168
|
+
* });
|
|
169
|
+
* });
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
function createStringInputField(label, value, style) {
|
|
173
|
+
const control = East.value(variant('StringInput', StringInput_(value, style)), ControlRootType);
|
|
174
|
+
return createField(label, control, style);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Creates a Field with a DateTimeInput control.
|
|
178
|
+
*
|
|
179
|
+
* @param label - Label text for the field
|
|
180
|
+
* @param value - Initial datetime value
|
|
181
|
+
* @param style - Optional field and datetime input styling
|
|
182
|
+
* @returns An East expression representing the field component
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* import { East } from "@elaraai/east";
|
|
187
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
188
|
+
*
|
|
189
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
190
|
+
* return Field.DateTimeInput("Birth Date", new Date(), {
|
|
191
|
+
* helperText: "Enter your date of birth",
|
|
192
|
+
* });
|
|
193
|
+
* });
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
function createDatetimeInputField(label, value, style) {
|
|
197
|
+
const control = East.value(variant('DateTimeInput', DateTimeInput_(value, style)), ControlRootType);
|
|
198
|
+
return createField(label, control, style);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Creates a Field with a FloatInput control.
|
|
202
|
+
*
|
|
203
|
+
* @param label - Label text for the field
|
|
204
|
+
* @param value - Initial float value
|
|
205
|
+
* @param style - Optional field and float input styling
|
|
206
|
+
* @returns An East expression representing the field component
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```ts
|
|
210
|
+
* import { East } from "@elaraai/east";
|
|
211
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
212
|
+
*
|
|
213
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
214
|
+
* return Field.FloatInput("Price", 0.0, {
|
|
215
|
+
* min: 0,
|
|
216
|
+
* helperText: "Enter price in dollars",
|
|
217
|
+
* });
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
function createFloatInputField(label, value, style) {
|
|
222
|
+
const control = East.value(variant('FloatInput', FloatInput_(value, style)), ControlRootType);
|
|
223
|
+
return createField(label, control, style);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Creates a Field with an IntegerInput control.
|
|
227
|
+
*
|
|
228
|
+
* @param label - Label text for the field
|
|
229
|
+
* @param value - Initial integer value
|
|
230
|
+
* @param style - Optional field and integer input styling
|
|
231
|
+
* @returns An East expression representing the field component
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```ts
|
|
235
|
+
* import { East } from "@elaraai/east";
|
|
236
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
237
|
+
*
|
|
238
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
239
|
+
* return Field.IntegerInput("Quantity", 1n, {
|
|
240
|
+
* min: 1n,
|
|
241
|
+
* max: 100n,
|
|
242
|
+
* helperText: "Enter quantity",
|
|
243
|
+
* });
|
|
244
|
+
* });
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
function createIntegerInputField(label, value, style) {
|
|
248
|
+
const control = East.value(variant('IntegerInput', IntegerInput_(value, style)), ControlRootType);
|
|
249
|
+
return createField(label, control, style);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Creates a Field with a Slider control.
|
|
253
|
+
*
|
|
254
|
+
* @param label - Label text for the field
|
|
255
|
+
* @param value - Initial slider value
|
|
256
|
+
* @param style - Optional field and slider styling
|
|
257
|
+
* @returns An East expression representing the field component
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* ```ts
|
|
261
|
+
* import { East } from "@elaraai/east";
|
|
262
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
263
|
+
*
|
|
264
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
265
|
+
* return Field.Slider("Volume", 50.0, {
|
|
266
|
+
* min: 0,
|
|
267
|
+
* max: 100,
|
|
268
|
+
* helperText: "Adjust volume level",
|
|
269
|
+
* });
|
|
270
|
+
* });
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
function createSliderField(label, value, style) {
|
|
274
|
+
const control = East.value(variant('Slider', createSlider_(value, style)), ControlRootType);
|
|
275
|
+
return createField(label, control, style);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Creates a Field with a Switch control.
|
|
279
|
+
*
|
|
280
|
+
* @param label - Label text for the field
|
|
281
|
+
* @param checked - Initial checked state
|
|
282
|
+
* @param style - Optional field and switch styling
|
|
283
|
+
* @returns An East expression representing the field component
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* ```ts
|
|
287
|
+
* import { East } from "@elaraai/east";
|
|
288
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
289
|
+
*
|
|
290
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
291
|
+
* return Field.Switch("Enable notifications", true, {
|
|
292
|
+
* helperText: "Toggle to enable or disable",
|
|
293
|
+
* });
|
|
294
|
+
* });
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
function createSwitchField(label, checked, style) {
|
|
298
|
+
const control = East.value(variant('Switch', createSwitch_(checked, style)), ControlRootType);
|
|
299
|
+
return createField(label, control, style);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Creates a Field with a TagsInput control.
|
|
303
|
+
*
|
|
304
|
+
* @param label - Label text for the field
|
|
305
|
+
* @param values - Initial array of tag values
|
|
306
|
+
* @param style - Optional field and tags input styling
|
|
307
|
+
* @returns An East expression representing the field component
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```ts
|
|
311
|
+
* import { East } from "@elaraai/east";
|
|
312
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
313
|
+
*
|
|
314
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
315
|
+
* return Field.TagsInput("Skills", ["TypeScript", "React"], {
|
|
316
|
+
* helperText: "Add your skills",
|
|
317
|
+
* });
|
|
318
|
+
* });
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
function createTags(label, values, style) {
|
|
322
|
+
const control = East.value(variant('TagsInput', createTagsInput_(values, style)), ControlRootType);
|
|
323
|
+
return createField(label, control, style);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Creates a Field with a Textarea control.
|
|
327
|
+
*
|
|
328
|
+
* @param label - Label text for the field
|
|
329
|
+
* @param value - Initial text value
|
|
330
|
+
* @param style - Optional field and textarea styling
|
|
331
|
+
* @returns An East expression representing the field component
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```ts
|
|
335
|
+
* import { East } from "@elaraai/east";
|
|
336
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
337
|
+
*
|
|
338
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
339
|
+
* return Field.Textarea("Description", "", {
|
|
340
|
+
* placeholder: "Enter description",
|
|
341
|
+
* rows: 4,
|
|
342
|
+
* helperText: "Maximum 500 characters",
|
|
343
|
+
* });
|
|
344
|
+
* });
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
function createTextareaField(label, value, style) {
|
|
348
|
+
const control = East.value(variant('Textarea', createTextarea_(value, style)), ControlRootType);
|
|
349
|
+
return createField(label, control, style);
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Field component for wrapping form controls with labels and messages.
|
|
353
|
+
*
|
|
354
|
+
* @remarks
|
|
355
|
+
* Use `Field.StringInput(label, value, style)`, `Field.Checkbox(label, checked, style)`,
|
|
356
|
+
* or other specialized methods to create fields with integrated controls.
|
|
357
|
+
*/
|
|
131
358
|
export const Field = {
|
|
132
359
|
/**
|
|
133
|
-
* Creates a Field
|
|
360
|
+
* Creates a Field with a Checkbox control.
|
|
134
361
|
*
|
|
135
362
|
* @param label - Label text for the field
|
|
136
|
-
* @param
|
|
137
|
-
* @param style - Optional
|
|
363
|
+
* @param checked - Initial checked state
|
|
364
|
+
* @param style - Optional field and checkbox styling
|
|
138
365
|
* @returns An East expression representing the field component
|
|
139
366
|
*
|
|
140
|
-
* @
|
|
141
|
-
*
|
|
142
|
-
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```ts
|
|
369
|
+
* import { East } from "@elaraai/east";
|
|
370
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
371
|
+
*
|
|
372
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
373
|
+
* return Field.Checkbox("Accept terms", false, {
|
|
374
|
+
* helperText: "You must accept to continue",
|
|
375
|
+
* });
|
|
376
|
+
* });
|
|
377
|
+
* ```
|
|
378
|
+
*/
|
|
379
|
+
Checkbox: createCheckboxField,
|
|
380
|
+
/**
|
|
381
|
+
* Creates a Field with a FileUpload control.
|
|
382
|
+
*
|
|
383
|
+
* @param label - Label text for the field
|
|
384
|
+
* @param style - Optional field and file upload styling
|
|
385
|
+
* @returns An East expression representing the field component
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```ts
|
|
389
|
+
* import { East } from "@elaraai/east";
|
|
390
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
391
|
+
*
|
|
392
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
393
|
+
* return Field.FileUpload("Documents", {
|
|
394
|
+
* accept: "application/pdf",
|
|
395
|
+
* helperText: "Upload PDF files only",
|
|
396
|
+
* });
|
|
397
|
+
* });
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
400
|
+
FileUpload: createFileUploadField,
|
|
401
|
+
/**
|
|
402
|
+
* Creates a Field with a Select control.
|
|
403
|
+
*
|
|
404
|
+
* @param label - Label text for the field
|
|
405
|
+
* @param value - Currently selected value
|
|
406
|
+
* @param items - Array of select items
|
|
407
|
+
* @param style - Optional field and select styling
|
|
408
|
+
* @returns An East expression representing the field component
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```ts
|
|
412
|
+
* import { East } from "@elaraai/east";
|
|
413
|
+
* import { Field, Select, UIComponentType } from "@elaraai/east-ui";
|
|
414
|
+
*
|
|
415
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
416
|
+
* return Field.Select("Country", "", [
|
|
417
|
+
* Select.Item("us", "United States"),
|
|
418
|
+
* Select.Item("uk", "United Kingdom"),
|
|
419
|
+
* ], { helperText: "Select your country" });
|
|
420
|
+
* });
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
Select: createSelectField,
|
|
424
|
+
/**
|
|
425
|
+
* Creates a Field with a Slider control.
|
|
426
|
+
*
|
|
427
|
+
* @param label - Label text for the field
|
|
428
|
+
* @param value - Initial slider value
|
|
429
|
+
* @param style - Optional field and slider styling
|
|
430
|
+
* @returns An East expression representing the field component
|
|
431
|
+
*
|
|
432
|
+
* @example
|
|
433
|
+
* ```ts
|
|
434
|
+
* import { East } from "@elaraai/east";
|
|
435
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
436
|
+
*
|
|
437
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
438
|
+
* return Field.Slider("Volume", 50.0, {
|
|
439
|
+
* min: 0,
|
|
440
|
+
* max: 100,
|
|
441
|
+
* helperText: "Adjust volume level",
|
|
442
|
+
* });
|
|
443
|
+
* });
|
|
444
|
+
* ```
|
|
445
|
+
*/
|
|
446
|
+
Slider: createSliderField,
|
|
447
|
+
/**
|
|
448
|
+
* Creates a Field with a StringInput control.
|
|
449
|
+
*
|
|
450
|
+
* @param label - Label text for the field
|
|
451
|
+
* @param value - Initial string value
|
|
452
|
+
* @param style - Optional field and input styling
|
|
453
|
+
* @returns An East expression representing the field component
|
|
454
|
+
*
|
|
455
|
+
* @example
|
|
456
|
+
* ```ts
|
|
457
|
+
* import { East } from "@elaraai/east";
|
|
458
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
459
|
+
*
|
|
460
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
461
|
+
* return Field.StringInput("Email", "", {
|
|
462
|
+
* placeholder: "Enter email",
|
|
463
|
+
* helperText: "We'll never share your email",
|
|
464
|
+
* });
|
|
465
|
+
* });
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
StringInput: createStringInputField,
|
|
469
|
+
/**
|
|
470
|
+
* Creates a Field with a DateTimeInput control.
|
|
471
|
+
*
|
|
472
|
+
* @param label - Label text for the field
|
|
473
|
+
* @param value - Initial datetime value
|
|
474
|
+
* @param style - Optional field and datetime input styling
|
|
475
|
+
* @returns An East expression representing the field component
|
|
476
|
+
*
|
|
477
|
+
* @example
|
|
478
|
+
* ```ts
|
|
479
|
+
* import { East } from "@elaraai/east";
|
|
480
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
481
|
+
*
|
|
482
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
483
|
+
* return Field.DateTimeInput("Birth Date", new Date(), {
|
|
484
|
+
* helperText: "Enter your date of birth",
|
|
485
|
+
* });
|
|
486
|
+
* });
|
|
487
|
+
* ```
|
|
488
|
+
*/
|
|
489
|
+
DateTimeInput: createDatetimeInputField,
|
|
490
|
+
/**
|
|
491
|
+
* Creates a Field with a FloatInput control.
|
|
492
|
+
*
|
|
493
|
+
* @param label - Label text for the field
|
|
494
|
+
* @param value - Initial float value
|
|
495
|
+
* @param style - Optional field and float input styling
|
|
496
|
+
* @returns An East expression representing the field component
|
|
497
|
+
*
|
|
498
|
+
* @example
|
|
499
|
+
* ```ts
|
|
500
|
+
* import { East } from "@elaraai/east";
|
|
501
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
502
|
+
*
|
|
503
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
504
|
+
* return Field.FloatInput("Price", 0.0, {
|
|
505
|
+
* min: 0,
|
|
506
|
+
* helperText: "Enter price in dollars",
|
|
507
|
+
* });
|
|
508
|
+
* });
|
|
509
|
+
* ```
|
|
510
|
+
*/
|
|
511
|
+
FloatInput: createFloatInputField,
|
|
512
|
+
/**
|
|
513
|
+
* Creates a Field with an IntegerInput control.
|
|
514
|
+
*
|
|
515
|
+
* @param label - Label text for the field
|
|
516
|
+
* @param value - Initial integer value
|
|
517
|
+
* @param style - Optional field and integer input styling
|
|
518
|
+
* @returns An East expression representing the field component
|
|
519
|
+
*
|
|
520
|
+
* @example
|
|
521
|
+
* ```ts
|
|
522
|
+
* import { East } from "@elaraai/east";
|
|
523
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
524
|
+
*
|
|
525
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
526
|
+
* return Field.IntegerInput("Quantity", 1n, {
|
|
527
|
+
* min: 1n,
|
|
528
|
+
* max: 100n,
|
|
529
|
+
* helperText: "Enter quantity",
|
|
530
|
+
* });
|
|
531
|
+
* });
|
|
532
|
+
* ```
|
|
533
|
+
*/
|
|
534
|
+
IntegerInput: createIntegerInputField,
|
|
535
|
+
/**
|
|
536
|
+
* Creates a Field with a Switch control.
|
|
537
|
+
*
|
|
538
|
+
* @param label - Label text for the field
|
|
539
|
+
* @param checked - Initial checked state
|
|
540
|
+
* @param style - Optional field and switch styling
|
|
541
|
+
* @returns An East expression representing the field component
|
|
542
|
+
*
|
|
543
|
+
* @example
|
|
544
|
+
* ```ts
|
|
545
|
+
* import { East } from "@elaraai/east";
|
|
546
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
547
|
+
*
|
|
548
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
549
|
+
* return Field.Switch("Enable notifications", true, {
|
|
550
|
+
* helperText: "Toggle to enable or disable",
|
|
551
|
+
* });
|
|
552
|
+
* });
|
|
553
|
+
* ```
|
|
554
|
+
*/
|
|
555
|
+
Switch: createSwitchField,
|
|
556
|
+
/**
|
|
557
|
+
* Creates a Field with a TagsInput control.
|
|
558
|
+
*
|
|
559
|
+
* @param label - Label text for the field
|
|
560
|
+
* @param values - Initial array of tag values
|
|
561
|
+
* @param style - Optional field and tags input styling
|
|
562
|
+
* @returns An East expression representing the field component
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* ```ts
|
|
566
|
+
* import { East } from "@elaraai/east";
|
|
567
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
568
|
+
*
|
|
569
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
570
|
+
* return Field.TagsInput("Skills", ["TypeScript", "React"], {
|
|
571
|
+
* helperText: "Add your skills",
|
|
572
|
+
* });
|
|
573
|
+
* });
|
|
574
|
+
* ```
|
|
575
|
+
*/
|
|
576
|
+
TagsInput: createTags,
|
|
577
|
+
/**
|
|
578
|
+
* Creates a Field with a Textarea control.
|
|
579
|
+
*
|
|
580
|
+
* @param label - Label text for the field
|
|
581
|
+
* @param value - Initial text value
|
|
582
|
+
* @param style - Optional field and textarea styling
|
|
583
|
+
* @returns An East expression representing the field component
|
|
143
584
|
*
|
|
144
585
|
* @example
|
|
145
586
|
* ```ts
|
|
146
587
|
* import { East } from "@elaraai/east";
|
|
147
|
-
* import { Field,
|
|
588
|
+
* import { Field, UIComponentType } from "@elaraai/east-ui";
|
|
148
589
|
*
|
|
149
590
|
* const example = East.function([], UIComponentType, $ => {
|
|
150
|
-
* return Field.
|
|
151
|
-
* "
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* );
|
|
591
|
+
* return Field.Textarea("Description", "", {
|
|
592
|
+
* placeholder: "Enter description",
|
|
593
|
+
* rows: 4,
|
|
594
|
+
* helperText: "Maximum 500 characters",
|
|
595
|
+
* });
|
|
155
596
|
* });
|
|
156
597
|
* ```
|
|
157
598
|
*/
|
|
158
|
-
|
|
599
|
+
Textarea: createTextareaField,
|
|
159
600
|
Types: {
|
|
160
601
|
/**
|
|
161
602
|
* The concrete East type for Field component data.
|
|
@@ -170,8 +611,8 @@ export const Field = {
|
|
|
170
611
|
* @property errorText - Optional validation error message
|
|
171
612
|
* @property required - Whether the field is required
|
|
172
613
|
* @property disabled - Whether the field is disabled
|
|
173
|
-
* @property invalid - Whether the field is in an invalid state
|
|
174
614
|
* @property readOnly - Whether the field is read-only
|
|
615
|
+
* @property orientation - Layout orientation of label and control
|
|
175
616
|
*/
|
|
176
617
|
Field: FieldType,
|
|
177
618
|
},
|