@ensi-platform/admin-ui 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Calendar-CK0U0CT7.js → Calendar-CMg4K4oF.js} +11 -10
- package/dist/Calendar-CMg4K4oF.js.map +1 -0
- package/dist/{Check-C17w3R0y.js → Check-deng4Zns.js} +9 -8
- package/dist/Check-deng4Zns.js.map +1 -0
- package/dist/{ChevronDown-DLasRilY.js → ChevronDown-Dzp7mD66.js} +4 -3
- package/dist/ChevronDown-Dzp7mD66.js.map +1 -0
- package/dist/{ChevronRight-BPYZpUqS.js → ChevronRight-BsaiJImC.js} +6 -5
- package/dist/ChevronRight-BsaiJImC.js.map +1 -0
- package/dist/{Clear-ZjbAACid.js → Clear-DcxADxz6.js} +8 -7
- package/dist/Clear-DcxADxz6.js.map +1 -0
- package/dist/Component-7vxv_s32.js +178 -0
- package/dist/Component-7vxv_s32.js.map +1 -0
- package/dist/Component-B1piMJHv.js +176 -0
- package/dist/Component-B1piMJHv.js.map +1 -0
- package/dist/Component-B2_pbcdj.js +87 -0
- package/dist/Component-B2_pbcdj.js.map +1 -0
- package/dist/{Component-CGUzCfdj.js → Component-BPN5FgKq.js} +74 -71
- package/dist/Component-BPN5FgKq.js.map +1 -0
- package/dist/Component-BiiaP51W.js +231 -0
- package/dist/Component-BiiaP51W.js.map +1 -0
- package/dist/Component-CBWeJZfB.js +92 -0
- package/dist/Component-CBWeJZfB.js.map +1 -0
- package/dist/Component-CRVPfwqm.js +116 -0
- package/dist/Component-CRVPfwqm.js.map +1 -0
- package/dist/Component-CwYbdJhI.js +123 -0
- package/dist/Component-CwYbdJhI.js.map +1 -0
- package/dist/Component-DFwWbzFS.js +128 -0
- package/dist/Component-DFwWbzFS.js.map +1 -0
- package/dist/Component-DGze6SVb.js +37 -0
- package/dist/Component-DGze6SVb.js.map +1 -0
- package/dist/Component-DhhrZEMr.js +713 -0
- package/dist/Component-DhhrZEMr.js.map +1 -0
- package/dist/Component-Dkvzqo0L.js +155 -0
- package/dist/Component-Dkvzqo0L.js.map +1 -0
- package/dist/Component-Dq7pvkWP.js +72 -0
- package/dist/Component-Dq7pvkWP.js.map +1 -0
- package/dist/Component-KNlwEG00.js +151 -0
- package/dist/Component-KNlwEG00.js.map +1 -0
- package/dist/Component-u6K-ylDb.js +85 -0
- package/dist/Component-u6K-ylDb.js.map +1 -0
- package/dist/Component-uHkw3SDR.js +69 -0
- package/dist/Component-uHkw3SDR.js.map +1 -0
- package/dist/{GripVertical-CEK1r2W6.js → GripVertical-MvZ-qpV9.js} +6 -5
- package/dist/GripVertical-MvZ-qpV9.js.map +1 -0
- package/dist/{Search-DkWXPgLE.js → Search-CS1rsu-f.js} +33 -32
- package/dist/Search-CS1rsu-f.js.map +1 -0
- package/dist/{SortDescending-rA5aO0qC.js → SortDescending-DziKhSYN.js} +22 -21
- package/dist/SortDescending-DziKhSYN.js.map +1 -0
- package/dist/action-popup/index.js +3 -3
- package/dist/active-filters/Component.d.ts +6 -9
- package/dist/active-filters/Component.d.ts.map +1 -1
- package/dist/active-filters/components/Group/index.d.ts +2 -3
- package/dist/active-filters/components/Group/index.d.ts.map +1 -1
- package/dist/active-filters/components/Item/index.d.ts +2 -3
- package/dist/active-filters/components/Item/index.d.ts.map +1 -1
- package/dist/active-filters/index.js +115 -116
- package/dist/active-filters/index.js.map +1 -1
- package/dist/arrangement-settings/Component.d.ts.map +1 -1
- package/dist/arrangement-settings/components/List/index.d.ts.map +1 -1
- package/dist/arrangement-settings/index.js +117 -110
- package/dist/arrangement-settings/index.js.map +1 -1
- package/dist/arrangement-settings/types.d.ts +1 -1
- package/dist/assets/Component15.css +1 -1
- package/dist/assets/Component16.css +1 -1
- package/dist/assets/Component2.css +1 -1
- package/dist/assets/Component5.css +1 -1
- package/dist/assets/Component7.css +1 -1
- package/dist/assets/Component9.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -0
- package/dist/autocomplete/Component.d.ts +2 -3
- package/dist/autocomplete/Component.d.ts.map +1 -1
- package/dist/autocomplete/index.js +3 -3
- package/dist/autocomplete/types.d.ts +3 -3
- package/dist/autocomplete/utils.d.ts +1 -1
- package/dist/autocomplete-async/Component.d.ts +2 -3
- package/dist/autocomplete-async/Component.d.ts.map +1 -1
- package/dist/autocomplete-async/hooks/useAsyncSuggest.d.ts +1 -1
- package/dist/autocomplete-async/index.js +74 -71
- package/dist/autocomplete-async/index.js.map +1 -1
- package/dist/autocomplete-async/types.d.ts +4 -4
- package/dist/autocomplete-async/utils.d.ts +1 -1
- package/dist/avatar/Component.d.ts +2 -3
- package/dist/avatar/Component.d.ts.map +1 -1
- package/dist/avatar/index.js +40 -37
- package/dist/avatar/index.js.map +1 -1
- package/dist/badge/Component.d.ts +2 -3
- package/dist/badge/Component.d.ts.map +1 -1
- package/dist/badge/index.js +27 -23
- package/dist/badge/index.js.map +1 -1
- package/dist/bottom-sheet/Component.d.ts +2 -3
- package/dist/bottom-sheet/Component.d.ts.map +1 -1
- package/dist/bottom-sheet/index.js +143 -140
- package/dist/bottom-sheet/index.js.map +1 -1
- package/dist/button/Component.d.ts +3 -1
- package/dist/button/Component.d.ts.map +1 -1
- package/dist/button/index.js +1 -1
- package/dist/button/theme.d.ts +1 -0
- package/dist/button/theme.d.ts.map +1 -1
- package/dist/button/types.d.ts +2 -0
- package/dist/button/types.d.ts.map +1 -1
- package/dist/cascade-menu/Component.d.ts +2 -3
- package/dist/cascade-menu/Component.d.ts.map +1 -1
- package/dist/cascade-menu/components/ItemContextMenu/index.d.ts +1 -1
- package/dist/cascade-menu/components/Submenus/index.d.ts +1 -1
- package/dist/cascade-menu/index.js +366 -363
- package/dist/cascade-menu/index.js.map +1 -1
- package/dist/cascade-menu/types.d.ts +1 -1
- package/dist/checkbox/Component.d.ts +2 -3
- package/dist/checkbox/Component.d.ts.map +1 -1
- package/dist/checkbox/FormCheckbox.d.ts.map +1 -1
- package/dist/checkbox/index.js +11 -10
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/types.d.ts +2 -2
- package/dist/checkbox-group/Component.d.ts +2 -3
- package/dist/checkbox-group/Component.d.ts.map +1 -1
- package/dist/checkbox-group/FormCheckboxGroup.d.ts.map +1 -1
- package/dist/checkbox-group/index.js +65 -62
- package/dist/checkbox-group/index.js.map +1 -1
- package/dist/checkbox-group/types.d.ts +2 -2
- package/dist/combobox/index.js +4 -4
- package/dist/context-menu/Component.d.ts +6 -9
- package/dist/context-menu/Component.d.ts.map +1 -1
- package/dist/context-menu/components/Item/index.d.ts +2 -3
- package/dist/context-menu/components/Item/index.d.ts.map +1 -1
- package/dist/context-menu/components/Separator/index.d.ts +2 -3
- package/dist/context-menu/components/Separator/index.d.ts.map +1 -1
- package/dist/context-menu/index.js +1 -1
- package/dist/data-table/Component.d.ts +14 -21
- package/dist/data-table/Component.d.ts.map +1 -1
- package/dist/data-table/index.js +35 -33
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/date-picker/Component.d.ts +2 -3
- package/dist/date-picker/Component.d.ts.map +1 -1
- package/dist/date-picker/FormDatePicker.d.ts.map +1 -1
- package/dist/date-picker/index.js +156 -153
- package/dist/date-picker/index.js.map +1 -1
- package/dist/date-picker/types.d.ts +2 -2
- package/dist/date-range-picker/Component.d.ts +2 -3
- package/dist/date-range-picker/Component.d.ts.map +1 -1
- package/dist/date-range-picker/FormDateRangePicker.d.ts.map +1 -1
- package/dist/date-range-picker/index.js +168 -163
- package/dist/date-range-picker/index.js.map +1 -1
- package/dist/date-range-picker/types.d.ts +2 -2
- package/dist/drawer/Component.d.ts +2 -3
- package/dist/drawer/Component.d.ts.map +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/ds/common/support-ref/index.d.ts +15 -0
- package/dist/ds/common/support-ref/index.d.ts.map +1 -0
- package/dist/ds/common/utils.d.ts.map +1 -1
- package/dist/field/Component.d.ts +2 -3
- package/dist/field/Component.d.ts.map +1 -1
- package/dist/field/index.js +1 -1
- package/dist/field-clear-button/types.d.ts +1 -1
- package/dist/filters/Component.d.ts +8 -12
- package/dist/filters/Component.d.ts.map +1 -1
- package/dist/filters/components/Cell/index.d.ts +2 -3
- package/dist/filters/components/Cell/index.d.ts.map +1 -1
- package/dist/filters/components/Footer/index.d.ts +2 -3
- package/dist/filters/components/Footer/index.d.ts.map +1 -1
- package/dist/filters/components/Grid/index.d.ts +2 -3
- package/dist/filters/components/Grid/index.d.ts.map +1 -1
- package/dist/filters/index.js +59 -53
- package/dist/filters/index.js.map +1 -1
- package/dist/form/Component.d.ts +1 -1
- package/dist/form/Component.d.ts.map +1 -1
- package/dist/form/context.d.ts +3 -1
- package/dist/form/context.d.ts.map +1 -1
- package/dist/form/hooks/useFieldHook.d.ts +2 -1
- package/dist/form/hooks/useFieldHook.d.ts.map +1 -1
- package/dist/form/index.js +84 -74
- package/dist/form/index.js.map +1 -1
- package/dist/form/types.d.ts +16 -3
- package/dist/form/types.d.ts.map +1 -1
- package/dist/form/utils.d.ts +3 -0
- package/dist/form/utils.d.ts.map +1 -1
- package/dist/hooks-BAkrGC45.js +50 -0
- package/dist/hooks-BAkrGC45.js.map +1 -0
- package/dist/icons/Award.d.ts +4 -5
- package/dist/icons/Award.d.ts.map +1 -1
- package/dist/icons/Bell.d.ts +4 -5
- package/dist/icons/Bell.d.ts.map +1 -1
- package/dist/icons/Birka.d.ts +4 -5
- package/dist/icons/Birka.d.ts.map +1 -1
- package/dist/icons/Book.d.ts +4 -5
- package/dist/icons/Book.d.ts.map +1 -1
- package/dist/icons/Calculator.d.ts +4 -5
- package/dist/icons/Calculator.d.ts.map +1 -1
- package/dist/icons/Calendar.d.ts +4 -5
- package/dist/icons/Calendar.d.ts.map +1 -1
- package/dist/icons/Cart.d.ts +4 -5
- package/dist/icons/Cart.d.ts.map +1 -1
- package/dist/icons/Chart.d.ts +4 -5
- package/dist/icons/Chart.d.ts.map +1 -1
- package/dist/icons/Check.d.ts +4 -5
- package/dist/icons/Check.d.ts.map +1 -1
- package/dist/icons/ChevronDown.d.ts +4 -5
- package/dist/icons/ChevronDown.d.ts.map +1 -1
- package/dist/icons/ChevronLeft.d.ts +4 -5
- package/dist/icons/ChevronLeft.d.ts.map +1 -1
- package/dist/icons/ChevronRight.d.ts +4 -5
- package/dist/icons/ChevronRight.d.ts.map +1 -1
- package/dist/icons/Clear.d.ts +4 -5
- package/dist/icons/Clear.d.ts.map +1 -1
- package/dist/icons/Copy.d.ts +4 -5
- package/dist/icons/Copy.d.ts.map +1 -1
- package/dist/icons/Download.d.ts +4 -5
- package/dist/icons/Download.d.ts.map +1 -1
- package/dist/icons/ExternalLink.d.ts +4 -5
- package/dist/icons/ExternalLink.d.ts.map +1 -1
- package/dist/icons/Funnel.d.ts +4 -5
- package/dist/icons/Funnel.d.ts.map +1 -1
- package/dist/icons/Globe.d.ts +4 -5
- package/dist/icons/Globe.d.ts.map +1 -1
- package/dist/icons/GripVertical.d.ts +4 -5
- package/dist/icons/GripVertical.d.ts.map +1 -1
- package/dist/icons/House.d.ts +4 -5
- package/dist/icons/House.d.ts.map +1 -1
- package/dist/icons/Image.d.ts +4 -5
- package/dist/icons/Image.d.ts.map +1 -1
- package/dist/icons/Info.d.ts +4 -5
- package/dist/icons/Info.d.ts.map +1 -1
- package/dist/icons/LogoEnsi.d.ts +4 -5
- package/dist/icons/LogoEnsi.d.ts.map +1 -1
- package/dist/icons/LogoEnsiMark.d.ts +4 -5
- package/dist/icons/LogoEnsiMark.d.ts.map +1 -1
- package/dist/icons/Message.d.ts +4 -5
- package/dist/icons/Message.d.ts.map +1 -1
- package/dist/icons/MoreVertical.d.ts +4 -5
- package/dist/icons/MoreVertical.d.ts.map +1 -1
- package/dist/icons/Package.d.ts +4 -5
- package/dist/icons/Package.d.ts.map +1 -1
- package/dist/icons/PanelLeft.d.ts +4 -5
- package/dist/icons/PanelLeft.d.ts.map +1 -1
- package/dist/icons/PanelLeftClose.d.ts +4 -5
- package/dist/icons/PanelLeftClose.d.ts.map +1 -1
- package/dist/icons/Pencil.d.ts +4 -5
- package/dist/icons/Pencil.d.ts.map +1 -1
- package/dist/icons/Pin.d.ts +4 -5
- package/dist/icons/Pin.d.ts.map +1 -1
- package/dist/icons/PinOff.d.ts +4 -5
- package/dist/icons/PinOff.d.ts.map +1 -1
- package/dist/icons/Plus.d.ts +4 -5
- package/dist/icons/Plus.d.ts.map +1 -1
- package/dist/icons/Search.d.ts +4 -5
- package/dist/icons/Search.d.ts.map +1 -1
- package/dist/icons/Settings.d.ts +4 -5
- package/dist/icons/Settings.d.ts.map +1 -1
- package/dist/icons/SortAscending.d.ts +4 -5
- package/dist/icons/SortAscending.d.ts.map +1 -1
- package/dist/icons/SortDescending.d.ts +4 -5
- package/dist/icons/SortDescending.d.ts.map +1 -1
- package/dist/icons/Trash.d.ts +4 -5
- package/dist/icons/Trash.d.ts.map +1 -1
- package/dist/icons/Trello.d.ts +4 -5
- package/dist/icons/Trello.d.ts.map +1 -1
- package/dist/icons/Truck.d.ts +4 -5
- package/dist/icons/Truck.d.ts.map +1 -1
- package/dist/icons/Upload.d.ts +4 -5
- package/dist/icons/Upload.d.ts.map +1 -1
- package/dist/icons/Users.d.ts +4 -5
- package/dist/icons/Users.d.ts.map +1 -1
- package/dist/icons/Warehouse.d.ts +4 -5
- package/dist/icons/Warehouse.d.ts.map +1 -1
- package/dist/icons/Warning.d.ts +4 -5
- package/dist/icons/Warning.d.ts.map +1 -1
- package/dist/icons/index.js +136 -135
- package/dist/icons/index.js.map +1 -1
- package/dist/{index-BcEMu4rE.js → index-B-dHfeT9.js} +3 -3
- package/dist/{index-BcEMu4rE.js.map → index-B-dHfeT9.js.map} +1 -1
- package/dist/{index-7AD20mEl.js → index-CVEaKh8K.js} +6 -6
- package/dist/{index-7AD20mEl.js.map → index-CVEaKh8K.js.map} +1 -1
- package/dist/{index-067zSYtu.js → index-bdpk2nvt.js} +3 -3
- package/dist/{index-067zSYtu.js.map → index-bdpk2nvt.js.map} +1 -1
- package/dist/index-h8z54aFR.js +10 -0
- package/dist/index-h8z54aFR.js.map +1 -0
- package/dist/input/Component.d.ts +2 -3
- package/dist/input/Component.d.ts.map +1 -1
- package/dist/input/FormInput.d.ts +1 -1
- package/dist/input/FormInput.d.ts.map +1 -1
- package/dist/input/index.js +30 -27
- package/dist/input/index.js.map +1 -1
- package/dist/input/types.d.ts +7 -3
- package/dist/input/types.d.ts.map +1 -1
- package/dist/link/Component.d.ts +3 -1
- package/dist/link/Component.d.ts.map +1 -1
- package/dist/link/index.js +1 -1
- package/dist/link/types.d.ts +1 -1
- package/dist/loader/Component.d.ts +2 -3
- package/dist/loader/Component.d.ts.map +1 -1
- package/dist/loader/index.js +32 -37
- package/dist/loader/index.js.map +1 -1
- package/dist/menu-list/Component.d.ts +6 -9
- package/dist/menu-list/Component.d.ts.map +1 -1
- package/dist/menu-list/components/Group/index.d.ts +2 -3
- package/dist/menu-list/components/Group/index.d.ts.map +1 -1
- package/dist/menu-list/components/Item/index.d.ts +2 -3
- package/dist/menu-list/components/Item/index.d.ts.map +1 -1
- package/dist/menu-list/index.js +1 -1
- package/dist/{metrics-DRxpVElh.js → metrics-C8FBvbwl.js} +2 -2
- package/dist/{metrics-DRxpVElh.js.map → metrics-C8FBvbwl.js.map} +1 -1
- package/dist/modal/Component.d.ts +2 -3
- package/dist/modal/Component.d.ts.map +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/multi-autocomplete/Component.d.ts +2 -3
- package/dist/multi-autocomplete/Component.d.ts.map +1 -1
- package/dist/multi-autocomplete/index.js +3 -3
- package/dist/multi-autocomplete/types.d.ts +3 -3
- package/dist/multi-autocomplete/utils.d.ts +2 -2
- package/dist/multi-autocomplete-async/Component.d.ts +2 -3
- package/dist/multi-autocomplete-async/Component.d.ts.map +1 -1
- package/dist/multi-autocomplete-async/index.js +54 -57
- package/dist/multi-autocomplete-async/index.js.map +1 -1
- package/dist/multi-autocomplete-async/types.d.ts +4 -4
- package/dist/multi-select/Component.d.ts +2 -3
- package/dist/multi-select/Component.d.ts.map +1 -1
- package/dist/multi-select/index.js +86 -83
- package/dist/multi-select/index.js.map +1 -1
- package/dist/multi-select/types.d.ts +3 -3
- package/dist/multi-select/utils.d.ts +1 -1
- package/dist/number-input/Component.d.ts +2 -3
- package/dist/number-input/Component.d.ts.map +1 -1
- package/dist/number-input/FormNumberInput.d.ts +1 -1
- package/dist/number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/number-input/index.js +44 -39
- package/dist/number-input/index.js.map +1 -1
- package/dist/number-input/types.d.ts +7 -3
- package/dist/number-input/types.d.ts.map +1 -1
- package/dist/number-range/Component.d.ts +2 -3
- package/dist/number-range/Component.d.ts.map +1 -1
- package/dist/number-range/FormNumberRange.d.ts.map +1 -1
- package/dist/number-range/index.js +116 -109
- package/dist/number-range/index.js.map +1 -1
- package/dist/number-range/types.d.ts +2 -2
- package/dist/popover/Component.d.ts +4 -6
- package/dist/popover/Component.d.ts.map +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/provider/Component.d.ts +3 -1
- package/dist/provider/Component.d.ts.map +1 -1
- package/dist/provider/context.d.ts.map +1 -1
- package/dist/provider/index.js +69 -64
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/types.d.ts +2 -0
- package/dist/provider/types.d.ts.map +1 -1
- package/dist/select/Component.d.ts +2 -3
- package/dist/select/Component.d.ts.map +1 -1
- package/dist/select/index.js +3 -3
- package/dist/select/types.d.ts +3 -3
- package/dist/slider/Component.d.ts +5 -0
- package/dist/slider/Component.d.ts.map +1 -0
- package/dist/slider/FormSlider.d.ts +6 -0
- package/dist/slider/FormSlider.d.ts.map +1 -0
- package/dist/slider/index.d.ts +4 -0
- package/dist/slider/index.d.ts.map +1 -0
- package/dist/slider/index.js +209 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slider/theme.d.ts +6 -0
- package/dist/slider/theme.d.ts.map +1 -0
- package/dist/slider/types.d.ts +62 -0
- package/dist/slider/types.d.ts.map +1 -0
- package/dist/slider/utils.d.ts +5 -0
- package/dist/slider/utils.d.ts.map +1 -0
- package/dist/suggest-checklist/index.js +4 -4
- package/dist/suggest-checklist/types.d.ts +2 -2
- package/dist/switch/Component.d.ts +2 -3
- package/dist/switch/Component.d.ts.map +1 -1
- package/dist/switch/FormSwitch.d.ts.map +1 -1
- package/dist/switch/index.js +82 -79
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/types.d.ts +2 -2
- package/dist/table/Component.d.ts +22 -33
- package/dist/table/Component.d.ts.map +1 -1
- package/dist/table/components/ActionBar/index.d.ts.map +1 -1
- package/dist/table/components/ActionBar/types.d.ts +1 -1
- package/dist/table/components/Body/index.d.ts +2 -3
- package/dist/table/components/Body/index.d.ts.map +1 -1
- package/dist/table/components/Cell/index.d.ts +2 -3
- package/dist/table/components/Cell/index.d.ts.map +1 -1
- package/dist/table/components/Footer/index.d.ts +2 -3
- package/dist/table/components/Footer/index.d.ts.map +1 -1
- package/dist/table/components/Header/context.d.ts +7 -0
- package/dist/table/components/Header/context.d.ts.map +1 -0
- package/dist/table/components/Header/index.d.ts +2 -3
- package/dist/table/components/Header/index.d.ts.map +1 -1
- package/dist/table/components/HeaderCell/index.d.ts +2 -3
- package/dist/table/components/HeaderCell/index.d.ts.map +1 -1
- package/dist/table/components/HeaderCell/theme.d.ts +1 -0
- package/dist/table/components/HeaderCell/theme.d.ts.map +1 -1
- package/dist/table/components/HeaderCell/types.d.ts +2 -0
- package/dist/table/components/HeaderCell/types.d.ts.map +1 -1
- package/dist/table/components/PageSize/index.d.ts +2 -3
- package/dist/table/components/PageSize/index.d.ts.map +1 -1
- package/dist/table/components/Pagination/index.d.ts +2 -3
- package/dist/table/components/Pagination/index.d.ts.map +1 -1
- package/dist/table/components/Row/index.d.ts +2 -3
- package/dist/table/components/Row/index.d.ts.map +1 -1
- package/dist/table/components/Scroll/index.d.ts +2 -3
- package/dist/table/components/Scroll/index.d.ts.map +1 -1
- package/dist/table/components/TableElement/index.d.ts +2 -3
- package/dist/table/components/TableElement/index.d.ts.map +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/utils.d.ts +10 -0
- package/dist/table/utils.d.ts.map +1 -1
- package/dist/tabs/Component.d.ts +8 -12
- package/dist/tabs/Component.d.ts.map +1 -1
- package/dist/tabs/components/List/index.d.ts +2 -3
- package/dist/tabs/components/List/index.d.ts.map +1 -1
- package/dist/tabs/components/Panel/index.d.ts +2 -3
- package/dist/tabs/components/Panel/index.d.ts.map +1 -1
- package/dist/tabs/components/Tab/index.d.ts +2 -3
- package/dist/tabs/components/Tab/index.d.ts.map +1 -1
- package/dist/tabs/index.js +107 -102
- package/dist/tabs/index.js.map +1 -1
- package/dist/tag/Component.d.ts +2 -3
- package/dist/tag/Component.d.ts.map +1 -1
- package/dist/tag/index.js +37 -34
- package/dist/tag/index.js.map +1 -1
- package/dist/textarea/Component.d.ts +2 -3
- package/dist/textarea/Component.d.ts.map +1 -1
- package/dist/textarea/FormTextArea.d.ts +1 -1
- package/dist/textarea/FormTextArea.d.ts.map +1 -1
- package/dist/textarea/index.js +119 -111
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/types.d.ts +7 -3
- package/dist/textarea/types.d.ts.map +1 -1
- package/dist/time-field/Component.d.ts +2 -3
- package/dist/time-field/Component.d.ts.map +1 -1
- package/dist/time-field/FormTimeField.d.ts.map +1 -1
- package/dist/time-field/index.js +94 -91
- package/dist/time-field/index.js.map +1 -1
- package/dist/time-field/types.d.ts +2 -2
- package/dist/toast/index.js +3 -3
- package/dist/tooltip/Component.d.ts +4 -6
- package/dist/tooltip/Component.d.ts.map +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/typography/index.js +1 -1
- package/dist/useFieldHook-Bt9nST7g.js +52 -0
- package/dist/useFieldHook-Bt9nST7g.js.map +1 -0
- package/dist/{utils-WAp1S9c9.js → utils-DUOIRqE-.js} +5 -5
- package/dist/{utils-WAp1S9c9.js.map → utils-DUOIRqE-.js.map} +1 -1
- package/docs/README.md +4 -5
- package/docs/ai.md +44 -20
- package/docs/architecture.md +23 -23
- package/docs/design-language.md +103 -0
- package/docs/skills/SKILL.md +64 -25
- package/package.json +22 -7
- package/scripts/consumer-root.ts +66 -0
- package/scripts/sync-agents-consumer.ts +81 -0
- package/scripts/sync-consumer.ts +31 -0
- package/scripts/sync-skill-consumer.ts +57 -0
- package/src/arrangement-settings/docs/{Description.en.md → Description.md} +1 -1
- package/src/avatar/docs/cssVariables.ts +3 -3
- package/src/button/docs/{Description.en.md → Description.md} +1 -0
- package/src/button/types.ts +2 -0
- package/src/cascade-menu/docs/cssVariables.ts +2 -1
- package/src/combobox/docs/Description.md +27 -0
- package/src/combobox/docs/Example.md +11 -0
- package/src/docs/ai/Description.md +60 -0
- package/src/docs/getting-started/Description.md +81 -0
- package/src/ds/tokens/docs/Description.md +30 -0
- package/src/ds/typography/docs/{Description.en.md → Description.md} +3 -3
- package/src/form/docs/{Description.en.md → Description.md} +2 -1
- package/src/form/types.ts +18 -3
- package/src/hooks/docs/Description.md +30 -0
- package/src/hooks/docs/Example.md +9 -0
- package/src/icons/docs/Description.md +23 -0
- package/src/icons/docs/Example.md +5 -0
- package/src/input/docs/{Description.en.md → Description.md} +3 -1
- package/src/input/docs/cssVariables.ts +1 -0
- package/src/input/types.ts +5 -1
- package/src/link/docs/cssVariables.ts +1 -1
- package/src/number-input/docs/{Description.en.md → Description.md} +3 -1
- package/src/number-input/docs/cssVariables.ts +1 -0
- package/src/number-input/types.ts +5 -0
- package/src/provider/docs/{Description.en.md → Description.md} +1 -1
- package/src/provider/docs/{Example.en.md → Example.md} +1 -1
- package/src/provider/types.ts +2 -0
- package/src/slider/docs/Description.md +45 -0
- package/src/slider/docs/Example.md +17 -0
- package/src/slider/docs/cssVariables.ts +17 -0
- package/src/slider/types.ts +74 -0
- package/src/table/docs/{Description.en.md → Description.md} +2 -2
- package/src/table/docs/cssVariables.ts +3 -3
- package/src/tabs/docs/{Description.en.md → Description.md} +17 -0
- package/src/textarea/docs/{Description.en.md → Description.md} +3 -1
- package/src/textarea/docs/cssVariables.ts +1 -0
- package/src/textarea/types.ts +5 -1
- package/src/toast/docs/cssVariables.ts +1 -1
- package/src/tooltip/docs/cssVariables.ts +2 -2
- package/dist/Calendar-CK0U0CT7.js.map +0 -1
- package/dist/Check-C17w3R0y.js.map +0 -1
- package/dist/ChevronDown-DLasRilY.js.map +0 -1
- package/dist/ChevronRight-BPYZpUqS.js.map +0 -1
- package/dist/Clear-ZjbAACid.js.map +0 -1
- package/dist/Component-BNvBBzer.js +0 -175
- package/dist/Component-BNvBBzer.js.map +0 -1
- package/dist/Component-BYE9GDqL.js +0 -120
- package/dist/Component-BYE9GDqL.js.map +0 -1
- package/dist/Component-BbhBo5Cj.js +0 -82
- package/dist/Component-BbhBo5Cj.js.map +0 -1
- package/dist/Component-BuCRAJy3.js +0 -84
- package/dist/Component-BuCRAJy3.js.map +0 -1
- package/dist/Component-CGUzCfdj.js.map +0 -1
- package/dist/Component-CmVsjRe5.js +0 -148
- package/dist/Component-CmVsjRe5.js.map +0 -1
- package/dist/Component-CpNIBfYJ.js +0 -219
- package/dist/Component-CpNIBfYJ.js.map +0 -1
- package/dist/Component-CxBjkZJb.js +0 -171
- package/dist/Component-CxBjkZJb.js.map +0 -1
- package/dist/Component-DKhLMHFf.js +0 -66
- package/dist/Component-DKhLMHFf.js.map +0 -1
- package/dist/Component-DiXNGqlb.js +0 -82
- package/dist/Component-DiXNGqlb.js.map +0 -1
- package/dist/Component-Dj7V9ufh.js +0 -148
- package/dist/Component-Dj7V9ufh.js.map +0 -1
- package/dist/Component-FRc-jsSm.js +0 -69
- package/dist/Component-FRc-jsSm.js.map +0 -1
- package/dist/Component-HllYyb--.js +0 -661
- package/dist/Component-HllYyb--.js.map +0 -1
- package/dist/Component-LYfvas54.js +0 -122
- package/dist/Component-LYfvas54.js.map +0 -1
- package/dist/Component-jLWETE5Q.js +0 -113
- package/dist/Component-jLWETE5Q.js.map +0 -1
- package/dist/Component-nvBNoXyJ.js +0 -41
- package/dist/Component-nvBNoXyJ.js.map +0 -1
- package/dist/GripVertical-CEK1r2W6.js.map +0 -1
- package/dist/Search-DkWXPgLE.js.map +0 -1
- package/dist/SortDescending-rA5aO0qC.js.map +0 -1
- package/dist/hooks-DbKkEG65.js +0 -49
- package/dist/hooks-DbKkEG65.js.map +0 -1
- package/dist/utils-CizYZV2a.js +0 -50
- package/dist/utils-CizYZV2a.js.map +0 -1
- package/docs/skills/evals/evals.json +0 -23
- package/src/action-popup/docs/Description.ru.md +0 -40
- package/src/action-popup/docs/Example.ru.md +0 -14
- package/src/active-filters/docs/Description.ru.md +0 -49
- package/src/active-filters/docs/Example.ru.md +0 -15
- package/src/arrangement-settings/docs/Description.ru.md +0 -25
- package/src/arrangement-settings/docs/Example.ru.md +0 -15
- package/src/autocomplete/docs/Description.ru.md +0 -51
- package/src/autocomplete/docs/Example.ru.md +0 -17
- package/src/autocomplete-async/docs/Description.ru.md +0 -71
- package/src/autocomplete-async/docs/Example.ru.md +0 -19
- package/src/avatar/docs/Description.ru.md +0 -23
- package/src/avatar/docs/Example.ru.md +0 -7
- package/src/badge/docs/Description.ru.md +0 -22
- package/src/badge/docs/Example.ru.md +0 -8
- package/src/bottom-sheet/docs/Description.ru.md +0 -27
- package/src/bottom-sheet/docs/Example.ru.md +0 -14
- package/src/button/docs/Description.ru.md +0 -24
- package/src/button/docs/Example.ru.md +0 -11
- package/src/cascade-menu/docs/Description.ru.md +0 -43
- package/src/cascade-menu/docs/Example.ru.md +0 -107
- package/src/checkbox/docs/Description.ru.md +0 -42
- package/src/checkbox/docs/Example.ru.md +0 -13
- package/src/checkbox-group/docs/Description.ru.md +0 -39
- package/src/checkbox-group/docs/Example.ru.md +0 -17
- package/src/context-menu/docs/Description.ru.md +0 -44
- package/src/context-menu/docs/Example.ru.md +0 -22
- package/src/data-table/docs/Description.ru.md +0 -33
- package/src/data-table/docs/Example.ru.md +0 -82
- package/src/date-picker/docs/Description.ru.md +0 -43
- package/src/date-picker/docs/Example.ru.md +0 -15
- package/src/date-range-picker/docs/Description.ru.md +0 -39
- package/src/date-range-picker/docs/Example.ru.md +0 -19
- package/src/drawer/docs/Description.ru.md +0 -28
- package/src/drawer/docs/Example.ru.md +0 -14
- package/src/ds/typography/docs/Description.ru.md +0 -35
- package/src/field/docs/Description.ru.md +0 -28
- package/src/field/docs/Example.ru.md +0 -16
- package/src/filters/docs/Description.ru.md +0 -40
- package/src/filters/docs/Example.ru.md +0 -21
- package/src/form/docs/Description.ru.md +0 -33
- package/src/form/docs/Example.ru.md +0 -18
- package/src/input/docs/Description.ru.md +0 -41
- package/src/input/docs/Example.ru.md +0 -21
- package/src/link/docs/Description.ru.md +0 -21
- package/src/link/docs/Example.ru.md +0 -16
- package/src/loader/docs/Description.ru.md +0 -21
- package/src/loader/docs/Example.ru.md +0 -10
- package/src/menu-list/docs/Description.ru.md +0 -45
- package/src/menu-list/docs/Example.ru.md +0 -14
- package/src/modal/docs/Description.ru.md +0 -25
- package/src/modal/docs/Example.ru.md +0 -15
- package/src/modal-hub/docs/Description.ru.md +0 -35
- package/src/modal-hub/docs/Example.ru.md +0 -20
- package/src/multi-autocomplete/docs/Description.ru.md +0 -52
- package/src/multi-autocomplete/docs/Example.ru.md +0 -12
- package/src/multi-autocomplete-async/docs/Description.ru.md +0 -55
- package/src/multi-autocomplete-async/docs/Example.ru.md +0 -5
- package/src/multi-select/docs/Description.ru.md +0 -46
- package/src/multi-select/docs/Example.ru.md +0 -20
- package/src/number-input/docs/Description.ru.md +0 -46
- package/src/number-input/docs/Example.ru.md +0 -19
- package/src/number-range/docs/Description.ru.md +0 -49
- package/src/number-range/docs/Example.ru.md +0 -25
- package/src/popover/docs/Description.ru.md +0 -33
- package/src/popover/docs/Example.ru.md +0 -13
- package/src/provider/docs/Description.ru.md +0 -27
- package/src/provider/docs/Example.ru.md +0 -10
- package/src/select/docs/Description.ru.md +0 -46
- package/src/select/docs/Example.ru.md +0 -20
- package/src/suggest-checklist/docs/Description.ru.md +0 -26
- package/src/suggest-checklist/docs/Example.ru.md +0 -11
- package/src/switch/docs/Description.ru.md +0 -39
- package/src/switch/docs/Example.ru.md +0 -13
- package/src/table/docs/Description.ru.md +0 -32
- package/src/table/docs/Example.ru.md +0 -67
- package/src/tabs/docs/Description.ru.md +0 -24
- package/src/tabs/docs/Example.ru.md +0 -12
- package/src/tag/docs/Description.ru.md +0 -24
- package/src/tag/docs/Example.ru.md +0 -6
- package/src/textarea/docs/Description.ru.md +0 -40
- package/src/textarea/docs/Example.ru.md +0 -21
- package/src/time-field/docs/Description.ru.md +0 -41
- package/src/time-field/docs/Example.ru.md +0 -9
- package/src/toast/docs/Description.ru.md +0 -57
- package/src/toast/docs/Example.ru.md +0 -25
- package/src/tooltip/docs/Description.ru.md +0 -34
- package/src/tooltip/docs/Example.ru.md +0 -10
- /package/src/action-popup/docs/{Description.en.md → Description.md} +0 -0
- /package/src/action-popup/docs/{Example.en.md → Example.md} +0 -0
- /package/src/active-filters/docs/{Description.en.md → Description.md} +0 -0
- /package/src/active-filters/docs/{Example.en.md → Example.md} +0 -0
- /package/src/arrangement-settings/docs/{Example.en.md → Example.md} +0 -0
- /package/src/autocomplete/docs/{Description.en.md → Description.md} +0 -0
- /package/src/autocomplete/docs/{Example.en.md → Example.md} +0 -0
- /package/src/autocomplete-async/docs/{Description.en.md → Description.md} +0 -0
- /package/src/autocomplete-async/docs/{Example.en.md → Example.md} +0 -0
- /package/src/avatar/docs/{Description.en.md → Description.md} +0 -0
- /package/src/avatar/docs/{Example.en.md → Example.md} +0 -0
- /package/src/badge/docs/{Description.en.md → Description.md} +0 -0
- /package/src/badge/docs/{Example.en.md → Example.md} +0 -0
- /package/src/bottom-sheet/docs/{Description.en.md → Description.md} +0 -0
- /package/src/bottom-sheet/docs/{Example.en.md → Example.md} +0 -0
- /package/src/button/docs/{Example.en.md → Example.md} +0 -0
- /package/src/cascade-menu/docs/{Description.en.md → Description.md} +0 -0
- /package/src/cascade-menu/docs/{Example.en.md → Example.md} +0 -0
- /package/src/checkbox/docs/{Description.en.md → Description.md} +0 -0
- /package/src/checkbox/docs/{Example.en.md → Example.md} +0 -0
- /package/src/checkbox-group/docs/{Description.en.md → Description.md} +0 -0
- /package/src/checkbox-group/docs/{Example.en.md → Example.md} +0 -0
- /package/src/context-menu/docs/{Description.en.md → Description.md} +0 -0
- /package/src/context-menu/docs/{Example.en.md → Example.md} +0 -0
- /package/src/data-table/docs/{Description.en.md → Description.md} +0 -0
- /package/src/data-table/docs/{Example.en.md → Example.md} +0 -0
- /package/src/date-picker/docs/{Description.en.md → Description.md} +0 -0
- /package/src/date-picker/docs/{Example.en.md → Example.md} +0 -0
- /package/src/date-range-picker/docs/{Description.en.md → Description.md} +0 -0
- /package/src/date-range-picker/docs/{Example.en.md → Example.md} +0 -0
- /package/src/drawer/docs/{Description.en.md → Description.md} +0 -0
- /package/src/drawer/docs/{Example.en.md → Example.md} +0 -0
- /package/src/field/docs/{Description.en.md → Description.md} +0 -0
- /package/src/field/docs/{Example.en.md → Example.md} +0 -0
- /package/src/filters/docs/{Description.en.md → Description.md} +0 -0
- /package/src/filters/docs/{Example.en.md → Example.md} +0 -0
- /package/src/form/docs/{Example.en.md → Example.md} +0 -0
- /package/src/input/docs/{Example.en.md → Example.md} +0 -0
- /package/src/link/docs/{Description.en.md → Description.md} +0 -0
- /package/src/link/docs/{Example.en.md → Example.md} +0 -0
- /package/src/loader/docs/{Description.en.md → Description.md} +0 -0
- /package/src/loader/docs/{Example.en.md → Example.md} +0 -0
- /package/src/menu-list/docs/{Description.en.md → Description.md} +0 -0
- /package/src/menu-list/docs/{Example.en.md → Example.md} +0 -0
- /package/src/modal/docs/{Description.en.md → Description.md} +0 -0
- /package/src/modal/docs/{Example.en.md → Example.md} +0 -0
- /package/src/modal-hub/docs/{Description.en.md → Description.md} +0 -0
- /package/src/modal-hub/docs/{Example.en.md → Example.md} +0 -0
- /package/src/multi-autocomplete/docs/{Description.en.md → Description.md} +0 -0
- /package/src/multi-autocomplete/docs/{Example.en.md → Example.md} +0 -0
- /package/src/multi-autocomplete-async/docs/{Description.en.md → Description.md} +0 -0
- /package/src/multi-autocomplete-async/docs/{Example.en.md → Example.md} +0 -0
- /package/src/multi-select/docs/{Description.en.md → Description.md} +0 -0
- /package/src/multi-select/docs/{Example.en.md → Example.md} +0 -0
- /package/src/number-input/docs/{Example.en.md → Example.md} +0 -0
- /package/src/number-range/docs/{Description.en.md → Description.md} +0 -0
- /package/src/number-range/docs/{Example.en.md → Example.md} +0 -0
- /package/src/popover/docs/{Description.en.md → Description.md} +0 -0
- /package/src/popover/docs/{Example.en.md → Example.md} +0 -0
- /package/src/select/docs/{Description.en.md → Description.md} +0 -0
- /package/src/select/docs/{Example.en.md → Example.md} +0 -0
- /package/src/suggest-checklist/docs/{Description.en.md → Description.md} +0 -0
- /package/src/suggest-checklist/docs/{Example.en.md → Example.md} +0 -0
- /package/src/switch/docs/{Description.en.md → Description.md} +0 -0
- /package/src/switch/docs/{Example.en.md → Example.md} +0 -0
- /package/src/table/docs/{Example.en.md → Example.md} +0 -0
- /package/src/tabs/docs/{Example.en.md → Example.md} +0 -0
- /package/src/tag/docs/{Description.en.md → Description.md} +0 -0
- /package/src/tag/docs/{Example.en.md → Example.md} +0 -0
- /package/src/textarea/docs/{Example.en.md → Example.md} +0 -0
- /package/src/time-field/docs/{Description.en.md → Description.md} +0 -0
- /package/src/time-field/docs/{Example.en.md → Example.md} +0 -0
- /package/src/toast/docs/{Description.en.md → Description.md} +0 -0
- /package/src/toast/docs/{Example.en.md → Example.md} +0 -0
- /package/src/tooltip/docs/{Description.en.md → Description.md} +0 -0
- /package/src/tooltip/docs/{Example.en.md → Example.md} +0 -0
package/docs/ai.md
CHANGED
|
@@ -1,36 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Как агенты (Cursor и др.) опираются на `@ensi-platform/admin-ui`.
|
|
1
|
+
How agents (Cursor and others) use `@ensi-platform/admin-ui`.
|
|
4
2
|
|
|
5
3
|
## Source of truth
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Per primitive, the contract in this repo (Storybook) is:
|
|
8
6
|
|
|
9
7
|
- `src/<name>/docs/Description.ru.md` / `Description.en.md`
|
|
10
|
-
- `Example
|
|
11
|
-
- `types.ts`
|
|
8
|
+
- `Example.ru.md` / `Example.en.md`, and `cssVariables.ts` when needed
|
|
9
|
+
- `types.ts` when present
|
|
10
|
+
- screen visual canon — `docs/design-language.md`
|
|
11
|
+
|
|
12
|
+
Storybook Docs reads both languages. Do not duplicate component API under package `docs/`.
|
|
13
|
+
|
|
14
|
+
The npm package ships English only, renamed for agents:
|
|
15
|
+
|
|
16
|
+
- `Description.en.md` → `src/<name>/docs/Description.md`
|
|
17
|
+
- `Example.en.md` → `Example.md`
|
|
18
|
+
- getting started → `src/docs/getting-started/Description.md`
|
|
19
|
+
|
|
20
|
+
`*.ru.md` and stories stay in the repo. Read the published files from `node_modules/@ensi-platform/admin-ui/...`.
|
|
21
|
+
|
|
22
|
+
## Skill
|
|
23
|
+
|
|
24
|
+
Thin router for **consuming** the UI kit (pick a primitive, then read its Description). Authoring Description / stories — separate skill `write-component-docs`.
|
|
25
|
+
|
|
26
|
+
Location in the package: `docs/skills/` (`SKILL.md`).
|
|
12
27
|
|
|
13
|
-
|
|
28
|
+
In a consumer app:
|
|
14
29
|
|
|
15
|
-
|
|
30
|
+
- skill — `node_modules/@ensi-platform/admin-ui/docs/skills/`
|
|
31
|
+
- contract — `node_modules/@ensi-platform/admin-ui/src/<name>/docs/`, `…/types.ts` (`icons`, `hooks`, `combobox` included)
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
`postinstall` (`scripts/sync-consumer.ts`) copies the skill and writes a pointer. No manual path setup:
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
- `.cursor/skills/admin-ui/SKILL.md`
|
|
36
|
+
- `.claude/skills/admin-ui/SKILL.md` — same file
|
|
37
|
+
- marker `<!-- @ensi-platform/admin-ui:start -->` … `:end` in the consumer repo `AGENTS.md` (rest of the file stays)
|
|
20
38
|
|
|
21
|
-
|
|
22
|
-
- контракт: `node_modules/@ensi-platform/admin-ui/src/<name>/docs/`, `…/types.ts`
|
|
39
|
+
Limits:
|
|
23
40
|
|
|
24
|
-
|
|
41
|
+
- consumer root is the nearest `.git` from `INIT_CWD`; if none, the script does nothing
|
|
42
|
+
- **pnpm ≥ 9** ignores dependency lifecycle scripts until `pnpm approve-builds @ensi-platform/admin-ui` (or `pnpm.onlyBuiltDependencies`), then `pnpm install` again
|
|
43
|
+
- manual run: `node node_modules/@ensi-platform/admin-ui/scripts/sync-consumer.ts`
|
|
44
|
+
- opt out of all three: `ADMIN_UI_SKIP_CONSUMER_SYNC=1`
|
|
25
45
|
|
|
26
|
-
|
|
27
|
-
- короткая таблица выбора примитива (Button vs Badge vs Tag, …)
|
|
28
|
-
- указание: читай Description / types / Example — без копипасты длинных текстов
|
|
46
|
+
Updating a Description does not require editing the skill.
|
|
29
47
|
|
|
30
|
-
|
|
48
|
+
## Rules for agents
|
|
31
49
|
|
|
32
|
-
|
|
50
|
+
- do not invent API — read Description / types first;
|
|
51
|
+
- assemble screens (lists, filters, detail pages) from `docs/design-language.md`;
|
|
52
|
+
- app layout colours — `src/ds/tokens/docs/Description.md` (control chrome stays on the primitive);
|
|
53
|
+
- imports only via subpaths (`@ensi-platform/admin-ui/button`, …) — no package root barrel;
|
|
54
|
+
- setup (tokens, Provider, theme) — see **Getting started**.
|
|
33
55
|
|
|
34
|
-
|
|
56
|
+
## Next
|
|
35
57
|
|
|
36
|
-
|
|
58
|
+
- **Getting started** — install and first screen
|
|
59
|
+
- `Base/Button`, `Form/Input`, `Overlays/Modal` — primitives
|
|
60
|
+
- Package docs: `docs/ai.md`, `docs/architecture.md`
|
package/docs/architecture.md
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Architecture
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@ensi-platform/admin-ui` is the UI for the Ensi admin panel: controls, forms, overlays, table, tokens, typography.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Component layers
|
|
6
6
|
|
|
7
|
-
|
|
|
7
|
+
| Layer | Storybook | Examples | Role |
|
|
8
8
|
| --- | --- | --- | --- |
|
|
9
|
-
| Base | `Base/*` | `Button`, `MenuList`, `Avatar`, `Table`, … |
|
|
10
|
-
| App | `App/*` | `CascadeMenu` |
|
|
9
|
+
| Base | `Base/*` | `Button`, `MenuList`, `Avatar`, `Table`, … | primitives and their parts |
|
|
10
|
+
| App | `App/*` | `CascadeMenu` | ready-made admin chrome |
|
|
11
11
|
|
|
12
|
-
App
|
|
12
|
+
App is built from Base. The `sidebar | page` layout stays in the consumer app (there is no `AppShell`). List and detail page frames are application code; the package does not ship them. Screen visuals — `docs/design-language.md`.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Stack
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
16
|
+
- styles — `--aui-*` CSS variables (CSS Modules on primitives)
|
|
17
|
+
- behavior — [React Aria Components](https://react-aria.adobe.com) inside; the public API is ours (`size` / `variant` / `dataTestId`, …)
|
|
18
|
+
- not shadcn and not Tailwind recipes
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Setup
|
|
21
21
|
|
|
22
|
-
1.
|
|
23
|
-
2. `AdminUiProvider`
|
|
24
|
-
3.
|
|
22
|
+
1. Tokens **once** in the app entry: `import '@ensi-platform/admin-ui/tokens'`
|
|
23
|
+
2. `AdminUiProvider` at the UI root — locale, portals, built-in a11y strings, page substrate (`--aui-page-bg-primary` / `--aui-page-fg-primary`; content inset stays on the host)
|
|
24
|
+
3. Theme on `document.documentElement`: `data-theme="light"` | `"dark"`
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Components do not know the theme — they only read `--aui-*`. Light is `semantic.css`, dark is a remap in `semantic.dark.css`.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Import only via subpath: `@ensi-platform/admin-ui/button`, `@ensi-platform/admin-ui/provider`, … There is no package root barrel.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Onboarding with examples — Storybook **Getting started** and the root [README](../README.md).
|
|
31
31
|
|
|
32
32
|
## Form
|
|
33
33
|
|
|
34
|
-
- `Form` (RHF + zod) — state / submit / validation
|
|
35
|
-
- FormX (`FormInput`, `FormSelect`, …) —
|
|
36
|
-
- `FormControl
|
|
34
|
+
- `Form` (RHF + zod) — state / submit / validation live in the package
|
|
35
|
+
- FormX (`FormInput`, `FormSelect`, …) — next to the control, not a separate `FormFieldWrapper`
|
|
36
|
+
- no `FormControl`: label / hint / error belong to `Field` (+ RAC `Label` / `Text`)
|
|
37
37
|
|
|
38
|
-
Peers
|
|
38
|
+
Peers for Form*: `react-hook-form`, `@hookform/resolvers`, `zod`.
|
|
39
39
|
|
|
40
40
|
## Exports
|
|
41
41
|
|
|
42
|
-
`exports`
|
|
42
|
+
`exports` in the root `package.json` are **not** the source of truth: `pnpm build` / `prepublishOnly` runs `sync-package` and writes only subpath `exports` (`./button`, `./tokens`, …) from `src/*/index.ts` (plus nested `tokens` / `typography`). There is no `"."` key. Without a build, workspace subpath imports do not resolve.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Design language (admin UI)
|
|
2
|
+
|
|
3
|
+
Visual canon for Ensi admin screens. `--aui-*` tokens live in Storybook Design System / Tokens and in `src/ds/tokens/docs/Description.md`. This file is **layers, sidebar, and how to assemble screens**.
|
|
4
|
+
|
|
5
|
+
## Formula
|
|
6
|
+
|
|
7
|
+
A fill (bg) or a stroke (border) on its own is fine.
|
|
8
|
+
Many of them **together**, **and** inside nested boxes, is noise.
|
|
9
|
+
|
|
10
|
+
| Rule | |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| Zone container | **XOR**: either `surface-bg-*` or `surface-border-*`, not both |
|
|
13
|
+
| Nesting budget | ≤ **2** surface boxes from `page` to the deepest leaf |
|
|
14
|
+
| Chip / Tag / Badge | one signal: tint **or** outline, not both |
|
|
15
|
+
| Separating zones | gap / divider / bg contrast — not another card |
|
|
16
|
+
|
|
17
|
+
**Exceptions** (bg + border are allowed):
|
|
18
|
+
|
|
19
|
+
- an interactive control (`Input`, `Select`, …)
|
|
20
|
+
- focus ring
|
|
21
|
+
- semantic alert (danger/warning box)
|
|
22
|
+
|
|
23
|
+
Layer reference: Kontur.Diadoc (fills and strokes exist, stacked frames do not).
|
|
24
|
+
Anti-reference: Elba / old nested boxes (muted bar → bordered controls inside → another card outside).
|
|
25
|
+
|
|
26
|
+
## App chrome / CascadeMenu
|
|
27
|
+
|
|
28
|
+
Ready-made column: `@ensi-platform/admin-ui/cascade-menu` (`CascadeMenu`).
|
|
29
|
+
Parts: `MenuList` (`@ensi-platform/admin-ui/menu-list`), `Avatar` (`@ensi-platform/admin-ui/avatar`), logo `LogoEnsiMark` + the text `ensi-opensource`.
|
|
30
|
+
|
|
31
|
+
**Chrome source of truth:** Storybook `App/CascadeMenu` + this section (WIP).
|
|
32
|
+
|
|
33
|
+
| | Yes | No |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| Navigation | hover flyout on the arrow (aim-delay); L0 stays in the layout | flat dissolve; accordion; Back button |
|
|
36
|
+
| Logo | `LogoEnsiMark` + text `ensi-opensource`, `currentColor`; optional `title` under the brand; collapse → Mark only | full `LogoEnsi` wordmark in the opensource chrome; a hard-coded `#000` / `#fff` in the SVG; collapse only in the footer |
|
|
37
|
+
| L0 column | light: `neutral-50` `#fafafa` (page is white); dark: `--aui-black-900`; hover `--aui-surface-bg-muted` / `--aui-grey-700`; fg = page; resize; collapse → icon rail; in the rail a folder hover opens a flyout, a leaf opens a Tooltip | a column in another hue; collapse that disables the flyout |
|
|
38
|
+
| Flyout | full height = L0 height; flush left; same bg as L0; border-right divider; no shadow/radius; also works from the collapsed rail | floating card from the item; push layout; surface / light panel |
|
|
39
|
+
| Active | `data-open` only on the open flyout folder; current leaf has no pill (breadcrumbs) | a persistent path pill from `activePath`; a soft pill on the leaf; pill **and** left bar **and** border |
|
|
40
|
+
| Pins | one Pinned item on L0 → hover flyout with the list; hint about right-click when empty; RMB Pin/Unpin (not on L0) + Open in new tab; leaf+folder; divider; limit 8; LS keyed by `pinUserId` | N pins listed directly on L0; pin on L0; trailing pin button; a card around pins; DnD; sticky flyout |
|
|
41
|
+
| User | divider + `Avatar` → `Popover` | user inside a bordered card |
|
|
42
|
+
| Search | button next to collapse; dimmed backdrop + a small window above center (field and a list of `link` leaves + path); Escape / backdrop click closes; the rail does not expand | an in-place tree filter; counters |
|
|
43
|
+
|
|
44
|
+
CascadeMenu is layer 0 (app chrome). It does **not** count toward the content budget of tables and forms.
|
|
45
|
+
|
|
46
|
+
The `sidebar | page` layout belongs to the consumer (the flyout covers the page).
|
|
47
|
+
Z-order: L0+flyout (`--aui-z-chrome`) above a sticky table (`--aui-table-z-sticky`), below dropdown/modal (`--aui-z-dropdown` / `--aui-z-modal`).
|
|
48
|
+
|
|
49
|
+
## Screens (assembled from Base)
|
|
50
|
+
|
|
51
|
+
Primitives: `CascadeMenu` / `MenuList`, `Button`, `Tag`, `Badge`, `Table`, `Tabs`, `Field` + controls, and `Drawer` when needed.
|
|
52
|
+
|
|
53
|
+
### List — table
|
|
54
|
+
|
|
55
|
+
- title (`headingM`); `Button` secondary “Filters” + primary “+ New …”
|
|
56
|
+
- applied filters: `ActiveFilters` (`Tag` + a “Clear” link) — **no** bordered bar around the row
|
|
57
|
+
- `Table` flush on `page` — **no** outer rounded card
|
|
58
|
+
- status in a cell — `Badge` (tint only)
|
|
59
|
+
- pagination: active = fill; **no** border box on every page
|
|
60
|
+
- do not use a segmented “Table | Filters” (two outlined buttons)
|
|
61
|
+
|
|
62
|
+
### List — filters
|
|
63
|
+
|
|
64
|
+
- the same title / primary action
|
|
65
|
+
- a grid of `Field` + Select / DateRange / … on `page`
|
|
66
|
+
- **no** card wrapper and **no** muted bar around the controls
|
|
67
|
+
- a long form goes in a `Drawer`, not another nested box on the page
|
|
68
|
+
- no pill tabs as document-type filters
|
|
69
|
+
|
|
70
|
+
### Detail
|
|
71
|
+
|
|
72
|
+
- back link; title + `Badge`; `⋯` + primary “Save”
|
|
73
|
+
- page sections — underline `Tabs` (not a pill row with a border)
|
|
74
|
+
- sections: H2 + gap; fields on `page` — **no** card per section
|
|
75
|
+
- one alert (bg+border) is the only heavy nested block
|
|
76
|
+
- tags inside a field — tint, with no second stroke on top of `Field`
|
|
77
|
+
|
|
78
|
+
## Theme (from `src/ds/tokens`)
|
|
79
|
+
|
|
80
|
+
Light / dark are one contract, remapped (`data-theme`). Dark is not a different product look. Font: Inter. List / detail page title — `typographyStyles.headingM`. Space / radius / control height — rem (root 16px on `AdminUiProvider`).
|
|
81
|
+
|
|
82
|
+
| Role | Light | Dark |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| page bg | `#ffffff` | `#1b1d22` (`black-900`) |
|
|
85
|
+
| page fg | `#0a0a0a` (`neutral-900`) | `#f1f5f9` (`grey-100`) |
|
|
86
|
+
| fg muted | `#737373` (`neutral-500`) | `#8b929e` (`grey-400`) |
|
|
87
|
+
| link | = page fg (underline); hover `neutral-800` | = page fg; hover white |
|
|
88
|
+
| sidebar | `#fafafa` (`neutral-50`) | = page |
|
|
89
|
+
| surface muted (secondary btn / tag) | `#f5f5f5` (`neutral-100`) | `#3f4651` (`grey-600`) |
|
|
90
|
+
| surface primary (input fill) | `#ffffff` | `#212328` (`black-800`) |
|
|
91
|
+
| table fill | = page (flush) | = page (flush) |
|
|
92
|
+
| surface border | `#e5e5e5` (`neutral-200`) | `#3f4651` (`grey-600`) |
|
|
93
|
+
| primary button | bg `#171717` (`neutral-800`), fg `#fafafa` | bg `#f1f5f9`, fg `#1b1d22` |
|
|
94
|
+
| focus | `#a1a1a1` (`neutral-400`) | grey-100 |
|
|
95
|
+
| badge success/warning/danger | soft `*-50` bg + `*-700` fg | `color-mix(*-500 22%, surface)` + `*-500` fg |
|
|
96
|
+
| badge info | = neutral | = neutral |
|
|
97
|
+
| control radius | `8px` (`radius-8`) | same |
|
|
98
|
+
|
|
99
|
+
Light accent = neutral (`neutral-800` / `#171717`). Dark accent = a light grey fill. Status = red/green/yellow only (info = neutral).
|
|
100
|
+
|
|
101
|
+
## Related
|
|
102
|
+
|
|
103
|
+
- consumer skill: [`skills/`](./skills/) — which primitive to pick; screen visuals — this file
|
package/docs/skills/SKILL.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
name: admin-ui
|
|
3
3
|
description: >-
|
|
4
4
|
Build Ensi admin UI with @ensi-platform/admin-ui primitives (Button, Field,
|
|
5
|
-
Form*, Select, Modal, Table, tokens, Provider). Use whenever the user builds
|
|
6
|
-
or changes admin screens, forms, filters, overlays,
|
|
7
|
-
pick — even if they do not name the package.
|
|
5
|
+
Form*, Select, Modal, Table, icons, tokens, Provider). Use whenever the user builds
|
|
6
|
+
or changes admin screens, forms, filters, overlays, lists, detail pages, or
|
|
7
|
+
asks which control to pick — even if they do not name the package.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# admin-ui
|
|
@@ -14,40 +14,79 @@ Skill for **consuming** the package (assemble UI). Authoring Description / stori
|
|
|
14
14
|
## Before coding
|
|
15
15
|
|
|
16
16
|
1. Pick the primitive (table below).
|
|
17
|
-
2.
|
|
18
|
-
|
|
19
|
-
- `src/<name>/
|
|
20
|
-
-
|
|
21
|
-
|
|
17
|
+
2. If you build a whole screen (list, filters, detail page, page chrome), also read `node_modules/@ensi-platform/admin-ui/docs/design-language.md` first. It defines layer budget (container: bg XOR border, nesting <= 2), list/filters/detail layouts, theme colours.
|
|
18
|
+
3. Read — do not invent API:
|
|
19
|
+
- `node_modules/@ensi-platform/admin-ui/src/<name>/docs/Description.md`
|
|
20
|
+
- `node_modules/@ensi-platform/admin-ui/src/<name>/types.ts` (when present)
|
|
21
|
+
- if unsure: `Example.md` in the same folder
|
|
22
|
+
4. Prefer Description over guessing from neighbouring JSX.
|
|
22
23
|
|
|
23
|
-
Package channel overview:
|
|
24
|
+
Package channel overview: `node_modules/@ensi-platform/admin-ui/docs/ai.md`. Architecture: `node_modules/@ensi-platform/admin-ui/docs/architecture.md`.
|
|
24
25
|
|
|
25
26
|
## Setup (host app)
|
|
26
27
|
|
|
27
28
|
- tokens once: `import '@ensi-platform/admin-ui/tokens'`
|
|
29
|
+
- which `--aui-*` an app layout may use: `node_modules/@ensi-platform/admin-ui/src/ds/tokens/docs/Description.md`
|
|
28
30
|
- `AdminUiProvider` from `@ensi-platform/admin-ui/provider` at the UI root (locale, portals, built-in labels, page substrate; content inset on host `main`)
|
|
29
31
|
- theme: `data-theme` on `document.documentElement` (`light` | `dark`)
|
|
32
|
+
- Full provider example (`labels`) and router `Link` wrapper (`react-router` / `next/link`): `node_modules/@ensi-platform/admin-ui/src/docs/getting-started/Description.md`
|
|
30
33
|
|
|
31
34
|
## Choose
|
|
32
35
|
|
|
36
|
+
Import `@ensi-platform/admin-ui/<folder>` (`button`, `date-picker`, …). Inside `Form`, use the `Form*` exported next to that control (`FormInput`, `FormDatePicker`, …). Props stay in that primitive’s `Description.md`.
|
|
37
|
+
|
|
33
38
|
| Need | Use | Not |
|
|
34
39
|
| --- | --- | --- |
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
| action
|
|
39
|
-
| entity status (
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| single-line text | `Input` / `FormInput` | `
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
| date
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
40
|
+
| Persistent admin nav: nested section tree, hover flyout, pins, collapse. Tree in `items`; optional `allowedCodes` and current URL `activePath` | `CascadeMenu` | a second cascade, accordion, or card-nav. One column without logo / user / collapse — `MenuList` |
|
|
41
|
+
| Section list only: groups and leaf items, no nested accordion | `MenuList` | the full sidebar — `CascadeMenu` |
|
|
42
|
+
| User circle in the sidebar, header, or a list. Initials from `name` / `initials`, or a photo via `src` | `Avatar` | an ad-hoc initials span; a status — `Badge` |
|
|
43
|
+
| Primary, secondary, or danger action, or a form submit (`type="submit"`) | `Button` | a restyled `Link` |
|
|
44
|
+
| Read-only entity status (“Paid”, “In assembly”). No click and no remove | `Badge` | `Tag` |
|
|
45
|
+
| Removable chip: a `MultiSelect` value or one applied filter | `Tag` | `Badge` |
|
|
46
|
+
| Applied filters on a list: one chip per value, remove, and a clear link. Several values of one field collapse into a count chip | `ActiveFilters` | `Filters` (the form), `Badge` |
|
|
47
|
+
| Free single-line text: name, email, search | `Input` / `FormInput` | multiline — `TextArea`; a number — `NumberInput` |
|
|
48
|
+
| Free multiline text: comment, description, address | `TextArea` / `FormTextArea` | `Input` |
|
|
49
|
+
| One value from a dictionary or enum, no typing | `Select` / `FormSelect` | several values — `MultiSelect`; typing — `Autocomplete` |
|
|
50
|
+
| Several values from a dictionary or enum, no typing | `MultiSelect` / `FormMultiSelect` | `Select`; a status in a cell — `Badge` |
|
|
51
|
+
| One date, or a date with time (`granularity` on the same control) | `DatePicker` / `FormDatePicker` | a period — `DateRangePicker`; time only — `TimeField` |
|
|
52
|
+
| A date period: list filters, reports | `DateRangePicker` / `FormDateRangePicker` | one date — `DatePicker` |
|
|
53
|
+
| Time of day only | `TimeField` / `FormTimeField` | a date — `DatePicker` |
|
|
54
|
+
| Confirm (primary) or delete (danger). Custom tone and labels — `ActionPopup`. Open from a helper with `useModal({ Component, props })` | `ConfirmModal` / `DeleteModal` / `ActionPopup` from `action-popup` | raw `Modal`, unless the chrome itself is custom |
|
|
55
|
+
| Dialog shell over the page: custom body, not a confirm/delete preset | `Modal` | `ConfirmModal` / `DeleteModal` |
|
|
56
|
+
| Label, hint, and error around a control. Error text is passed in (including from RHF). `Field` has no `name` | `Field` | `FormControl`. Wiring a form field is `Form` + `Form*` |
|
|
57
|
+
| Short message after save, delete, or a failed request. Mount `ToastProvider` and `ToastRegion` yourself (they are not inside `AdminUiProvider`). Call `useToast()` → `appendToast` / `closeToast`. Default stack cap is 5 | `Toast` | `Loader`, which blocks the surface instead of messaging |
|
|
58
|
+
| Block clicks on a list, card, or form while data loads. On refetch the children stay mounted | `Loader` | `Toast` |
|
|
59
|
+
| Entity list whose sort and column filter live in the header, plus a row action menu | `DataTable` (+ `ContextMenu`) | bare `Table` |
|
|
60
|
+
| List chrome only: custom cells, pagination, `PageSize`. Row selection — `useTableRowSelection` | `Table` | `DataTable` when the header should sort or filter |
|
|
61
|
+
| Sections of one page or entity card. Underline, not a pill row | `Tabs` | bordered segment buttons |
|
|
62
|
+
| Filters or details at the side. Long content that must not cover the viewport the way `Modal` does | `Drawer` | a nested card on the page; on mobile — `BottomSheet` |
|
|
63
|
+
| The same panel on a narrow screen, dismissed with a swipe down | `BottomSheet` | a side `Drawer` |
|
|
64
|
+
| Filter form of a list page. Fields sit on the page: no card and no muted bar. A date or a range may span more columns than a short field | `Filters` | applied chips — `ActiveFilters`; which fields exist and their order — `ArrangementSettings` |
|
|
65
|
+
| The user chooses which filters or columns are visible and in which order. Values stay in `Filters`, columns stay in `Table` | `ArrangementSettings` | `Filters` for the values themselves |
|
|
66
|
+
| Create/edit page, or a filter submit, with a zod schema. RHF state lives in `Form`; each control is the matching `Form*` | `Form` + `FormInput` / `FormSelect` / … | hand-rolled RHF, React Aria `Form`, `FormControl` |
|
|
67
|
+
| One `boolean` | `Checkbox` / `FormCheckbox` | a settings on/off — `Switch`; several options — `CheckboxGroup` |
|
|
68
|
+
| Several options, more than one can be on (`string[]`) | `CheckboxGroup` / `FormCheckboxGroup` | one `Checkbox` |
|
|
69
|
+
| Settings flag, on/off, no checkmark | `Switch` / `FormSwitch` | `Checkbox` |
|
|
70
|
+
| Quantity, price, or weight. Money goes through `formatOptions`; store a `number` (there is no MoneyInput) | `NumberInput` / `FormNumberInput` | `Input` |
|
|
71
|
+
| From–to filter for an amount, quantity, or price | `NumberRange` / `FormNumberRange` | one number — `NumberInput`; a date period — `DateRangePicker` |
|
|
72
|
+
| A value on a track: scale, volume, ratio | `Slider` / `FormSlider` | an exact number from the keyboard — `NumberInput` |
|
|
73
|
+
| One value; the user types to filter a local list | `Autocomplete` / `FormAutocomplete` | no typing — `Select`; a request — `AutocompleteAsync` |
|
|
74
|
+
| One value; suggestions come from the app’s request (React Query / `fetch`) | `AutocompleteAsync` / `FormAutocompleteAsync` | a local list — `Autocomplete` |
|
|
75
|
+
| Several values; the user types to filter a local list | `MultiAutocomplete` / `FormMultiAutocomplete` | no typing — `MultiSelect`; a request — `MultiAutocompleteAsync` |
|
|
76
|
+
| Several values from backend suggestions | `MultiAutocompleteAsync` / `FormMultiAutocompleteAsync` | a local list — `MultiAutocomplete`; a checkbox list that is already open — `SuggestChecklist` |
|
|
77
|
+
| Several values inside a panel that is already open, such as a table header filter | `SuggestChecklist` | `MultiAutocompleteAsync`; never `Combobox` |
|
|
78
|
+
| Shared list chrome used inside Select and Autocomplete. No app-facing props | do not import | `Combobox`. The public controls are listed in `src/combobox/docs/Description.md` |
|
|
79
|
+
| Text navigation inside a table, form, or hint. Root is `<a>` until you pass the router link as `as` | `Link` | button look — `Button` with `as` |
|
|
80
|
+
| Navigation that should look like a button | `Button` with `as` and `href` | restyling `Link` |
|
|
81
|
+
| Short hint on an icon or a button with no visible text. Not shown on touch, so the control must work without it | `Tooltip` | a panel the user clicks — `Popover` |
|
|
82
|
+
| Click panel: filters, an action menu, a short form | `Popover` | plain text — `Tooltip`; right-click — `ContextMenu` |
|
|
83
|
+
| Right-click commands on a row, nav item, or cell (pin, open, delete) | `ContextMenu` | a menu opened from a button — `Popover` |
|
|
84
|
+
| Open a dialog from a helper, a menu, or an async chunk, with no local `useState` | `ModalProvider` + `useModal` from `modal-hub` | plumbing `open` through the tree |
|
|
85
|
+
| List or detail page title. Body copy is `bodyM` / `bodyS`; do not set `font-*` or `line-height` in your CSS | `typographyStyles.headingM` from `typography` (`headingL` when the title is larger) | a custom heading style |
|
|
86
|
+
| Icon-only button. `children` stays (it is the accessible name); `hidden` hides only that text; `aria-label` is required | `Button` with `icon` + `hidden` | empty `children` |
|
|
87
|
+
| An SVG from the kit. Color is `currentColor`. On a button pass it as `icon.Component`. Sidebar brand mark is `LogoEnsiMark`; `LogoEnsi` is the full wordmark. Names are in `src/icons/docs/Description.md` | a named export from `icons` (`Plus`, `Trash`, …) | an inline `<svg>` or another icon set |
|
|
88
|
+
| A value that must stay readable and selectable, but not editable. Only the text-like form fields honor this. `readOnly` may be a boolean or `{ [field name]: boolean }` | `Form` `readOnly` with `FormInput` / `FormTextArea` / `FormNumberInput` | `disabled` on those three (it drops focus and selection). Every other locked control uses `disabled` |
|
|
89
|
+
| The previous render’s value, or one callback after an overlay has fully closed (exit animation included, and if it unmounts mid-exit) | `usePrevious` / `useOverlayExitComplete` from `hooks` | a hand-rolled `useRef`. Debounce stays `usehooks-ts` (`useDebounceValue` / `useDebounceCallback`) |
|
|
51
90
|
|
|
52
91
|
When neighbours disagree, trust that primitive’s Description.
|
|
53
92
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ensi-platform/admin-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Admin UI for Ensi admin panel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -13,13 +13,21 @@
|
|
|
13
13
|
"docs/ai.md",
|
|
14
14
|
"docs/architecture.md",
|
|
15
15
|
"docs/README.md",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"docs/design-language.md",
|
|
17
|
+
"scripts/consumer-root.ts",
|
|
18
|
+
"scripts/sync-skill-consumer.ts",
|
|
19
|
+
"scripts/sync-agents-consumer.ts",
|
|
20
|
+
"scripts/sync-consumer.ts",
|
|
21
|
+
"src/*/docs/Description.md",
|
|
22
|
+
"src/*/docs/Example.md",
|
|
18
23
|
"src/*/docs/cssVariables.ts",
|
|
19
24
|
"src/*/types.ts",
|
|
20
|
-
"src/ds/
|
|
21
|
-
"src/ds/typography/docs/
|
|
22
|
-
"src/ds/typography/docs/
|
|
25
|
+
"src/ds/tokens/docs/Description.md",
|
|
26
|
+
"src/ds/typography/docs/Description.md",
|
|
27
|
+
"src/ds/typography/docs/Example.md",
|
|
28
|
+
"src/ds/typography/docs/cssVariables.ts",
|
|
29
|
+
"src/docs/getting-started/Description.md",
|
|
30
|
+
"src/docs/ai/Description.md"
|
|
23
31
|
],
|
|
24
32
|
"keywords": [
|
|
25
33
|
"ensi",
|
|
@@ -37,7 +45,7 @@
|
|
|
37
45
|
"@internationalized/date": "^3.10.0",
|
|
38
46
|
"class-variance-authority": "0.7.1",
|
|
39
47
|
"classnames": "2.5.1",
|
|
40
|
-
"react-aria": "3.
|
|
48
|
+
"react-aria": "3.50.0",
|
|
41
49
|
"react-aria-components": "^1.19.0",
|
|
42
50
|
"react-fast-compare": "^3.2.2",
|
|
43
51
|
"usehooks-ts": "^3.1.1"
|
|
@@ -201,6 +209,10 @@
|
|
|
201
209
|
"types": "./dist/select/index.d.ts",
|
|
202
210
|
"import": "./dist/select/index.js"
|
|
203
211
|
},
|
|
212
|
+
"./slider": {
|
|
213
|
+
"types": "./dist/slider/index.d.ts",
|
|
214
|
+
"import": "./dist/slider/index.js"
|
|
215
|
+
},
|
|
204
216
|
"./suggest-checklist": {
|
|
205
217
|
"types": "./dist/suggest-checklist/index.d.ts",
|
|
206
218
|
"import": "./dist/suggest-checklist/index.js"
|
|
@@ -245,5 +257,8 @@
|
|
|
245
257
|
"types": "./dist/typography/index.d.ts",
|
|
246
258
|
"import": "./dist/typography/index.js"
|
|
247
259
|
}
|
|
260
|
+
},
|
|
261
|
+
"scripts": {
|
|
262
|
+
"postinstall": "node --experimental-strip-types scripts/sync-consumer.ts || exit 0"
|
|
248
263
|
}
|
|
249
264
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
|
|
4
|
+
/** Env var to fully disable any consumer-repo sync (skills + AGENTS.md). */
|
|
5
|
+
export const SKIP_ENV_VAR = 'ADMIN_UI_SKIP_CONSUMER_SYNC';
|
|
6
|
+
|
|
7
|
+
/** Safety bound for walking up from `startDir` while looking for a `.git` root. */
|
|
8
|
+
const MAX_ANCESTOR_DEPTH = 20;
|
|
9
|
+
|
|
10
|
+
export type TRootStatus = 'skipped-env' | 'skipped-no-git-root' | 'skipped-dev-repo' | 'ok';
|
|
11
|
+
|
|
12
|
+
export interface IConsumerRootResult {
|
|
13
|
+
status: TRootStatus;
|
|
14
|
+
consumerRoot?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Walks up from `startDir` looking for the nearest ancestor that contains `.git`. */
|
|
18
|
+
const findGitRoot = (startDir: string, maxDepth = MAX_ANCESTOR_DEPTH): string | undefined => {
|
|
19
|
+
let dir = resolve(startDir);
|
|
20
|
+
|
|
21
|
+
for (let i = 0; i < maxDepth; i += 1) {
|
|
22
|
+
if (existsSync(join(dir, '.git'))) {
|
|
23
|
+
return dir;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const parent = dirname(dir);
|
|
27
|
+
if (parent === dir) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
dir = parent;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** True when `maybeChild` is `root` itself or nested inside it. */
|
|
38
|
+
const isInsideOrEqual = (root: string, maybeChild: string): boolean => {
|
|
39
|
+
const normalizedRoot = resolve(root);
|
|
40
|
+
const normalizedChild = resolve(maybeChild);
|
|
41
|
+
|
|
42
|
+
return normalizedChild === normalizedRoot || normalizedChild.startsWith(`${normalizedRoot}/`);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Resolves the consumer repo root (nearest `.git` ancestor of `startDir`), guarding
|
|
47
|
+
* against the package's own dev install and against a full opt-out env var.
|
|
48
|
+
* Shared by skill sync and AGENTS.md sync so both agree on the same root.
|
|
49
|
+
*/
|
|
50
|
+
export const resolveConsumerRoot = (packageRoot: string, startDir: string): IConsumerRootResult => {
|
|
51
|
+
if (process.env[SKIP_ENV_VAR]) {
|
|
52
|
+
return { status: 'skipped-env' };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const consumerRoot = findGitRoot(startDir);
|
|
56
|
+
if (!consumerRoot) {
|
|
57
|
+
return { status: 'skipped-no-git-root' };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Running inside the admin-ui repo itself (dev install) — do not self-mirror.
|
|
61
|
+
if (isInsideOrEqual(packageRoot, consumerRoot)) {
|
|
62
|
+
return { status: 'skipped-dev-repo' };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return { status: 'ok', consumerRoot };
|
|
66
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { resolveConsumerRoot } from './consumer-root.ts';
|
|
5
|
+
|
|
6
|
+
const AGENTS_TARGET_RELATIVE = 'AGENTS.md';
|
|
7
|
+
|
|
8
|
+
const BLOCK_START = '<!-- @ensi-platform/admin-ui:start -->';
|
|
9
|
+
const BLOCK_END = '<!-- @ensi-platform/admin-ui:end -->';
|
|
10
|
+
|
|
11
|
+
const BLOCK_BODY = [
|
|
12
|
+
'## @ensi-platform/admin-ui',
|
|
13
|
+
'',
|
|
14
|
+
'When building or changing Ensi admin screens, forms, filters, or overlays, use `@ensi-platform/admin-ui` primitives.',
|
|
15
|
+
'Before coding, read `node_modules/@ensi-platform/admin-ui/docs/ai.md` and the relevant',
|
|
16
|
+
'`src/<name>/docs/Description.md` / `types.ts` — do not invent the API.',
|
|
17
|
+
'For whole screens (lists, filters, detail pages) also follow `node_modules/@ensi-platform/admin-ui/docs/design-language.md`.',
|
|
18
|
+
].join('\n');
|
|
19
|
+
|
|
20
|
+
const buildBlock = (): string => `${BLOCK_START}\n${BLOCK_BODY}\n${BLOCK_END}`;
|
|
21
|
+
|
|
22
|
+
const resolveSeparator = (existing: string): string => {
|
|
23
|
+
if (existing.endsWith('\n\n')) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (existing.endsWith('\n')) {
|
|
28
|
+
return '\n';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return '\n\n';
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** Replaces the marked block if present, otherwise appends it; never touches the rest of the file. */
|
|
35
|
+
const upsertBlock = (existing: string | undefined, block: string): string => {
|
|
36
|
+
if (existing === undefined) {
|
|
37
|
+
return `${block}\n`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const startIndex = existing.indexOf(BLOCK_START);
|
|
41
|
+
const endIndex = existing.indexOf(BLOCK_END);
|
|
42
|
+
|
|
43
|
+
if (startIndex !== -1 && endIndex !== -1 && endIndex > startIndex) {
|
|
44
|
+
const before = existing.slice(0, startIndex);
|
|
45
|
+
const after = existing.slice(endIndex + BLOCK_END.length);
|
|
46
|
+
return `${before}${block}${after}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return `${existing}${resolveSeparator(existing)}${block}\n`;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type TAgentsSyncStatus = 'skipped-env' | 'skipped-no-git-root' | 'skipped-dev-repo' | 'written' | 'unchanged';
|
|
53
|
+
|
|
54
|
+
export interface IAgentsSyncResult {
|
|
55
|
+
status: TAgentsSyncStatus;
|
|
56
|
+
targetPath?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Upserts a marker-delimited block in the consumer repo's `AGENTS.md`, so agents
|
|
61
|
+
* without a Skills concept (Codex CLI, Copilot coding agent, …) still get a pointer
|
|
62
|
+
* to `docs/ai.md`. Never overwrites content outside the marker block.
|
|
63
|
+
*/
|
|
64
|
+
export const syncAgentsToConsumer = (packageRoot: string, startDir: string): IAgentsSyncResult => {
|
|
65
|
+
const root = resolveConsumerRoot(packageRoot, startDir);
|
|
66
|
+
if (root.status !== 'ok') {
|
|
67
|
+
return { status: root.status };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const targetPath = join(root.consumerRoot as string, AGENTS_TARGET_RELATIVE);
|
|
71
|
+
const existing = existsSync(targetPath) ? readFileSync(targetPath, 'utf8') : undefined;
|
|
72
|
+
const nextContent = upsertBlock(existing, buildBlock());
|
|
73
|
+
|
|
74
|
+
if (existing === nextContent) {
|
|
75
|
+
return { status: 'unchanged', targetPath };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
writeFileSync(targetPath, nextContent);
|
|
79
|
+
|
|
80
|
+
return { status: 'written', targetPath };
|
|
81
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { dirname, resolve } from 'node:path';
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
3
|
+
|
|
4
|
+
import { syncAgentsToConsumer } from './sync-agents-consumer.ts';
|
|
5
|
+
import { syncSkillToConsumer } from './sync-skill-consumer.ts';
|
|
6
|
+
|
|
7
|
+
const isCli = process.argv[1] !== undefined && pathToFileURL(resolve(process.argv[1])).href === import.meta.url;
|
|
8
|
+
|
|
9
|
+
if (isCli) {
|
|
10
|
+
try {
|
|
11
|
+
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
12
|
+
const startDir = process.env.INIT_CWD || process.cwd();
|
|
13
|
+
|
|
14
|
+
const skillResult = syncSkillToConsumer(packageRoot, startDir);
|
|
15
|
+
if (skillResult.status === 'done') {
|
|
16
|
+
skillResult.targets?.forEach(target => {
|
|
17
|
+
if (target.status === 'written') {
|
|
18
|
+
console.info(`[admin-ui] skill synced to ${target.targetPath}`);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const agentsResult = syncAgentsToConsumer(packageRoot, startDir);
|
|
24
|
+
if (agentsResult.status === 'written') {
|
|
25
|
+
console.info(`[admin-ui] AGENTS.md updated at ${agentsResult.targetPath}`);
|
|
26
|
+
}
|
|
27
|
+
} catch (error) {
|
|
28
|
+
// Never let a sync failure break `pnpm install` for the consumer.
|
|
29
|
+
console.warn('[admin-ui] consumer sync skipped:', error instanceof Error ? error.message : error);
|
|
30
|
+
}
|
|
31
|
+
}
|