@ensi-platform/admin-ui 0.5.0 → 0.7.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/Component-CBWeJZfB.js +92 -0
- package/dist/Component-CBWeJZfB.js.map +1 -0
- package/dist/Component-DFwWbzFS.js +128 -0
- package/dist/Component-DFwWbzFS.js.map +1 -0
- package/dist/{Component-Bk0VFhAQ.js → Component-DhhrZEMr.js} +2 -2
- package/dist/{Component-Bk0VFhAQ.js.map → Component-DhhrZEMr.js.map} +1 -1
- package/dist/Component-Dkvzqo0L.js +155 -0
- package/dist/Component-Dkvzqo0L.js.map +1 -0
- package/dist/{Component-CwYbdJhI.js → Component-gOj-4jKv.js} +2 -2
- package/dist/{Component-CwYbdJhI.js.map → Component-gOj-4jKv.js.map} +1 -1
- package/dist/action-popup/index.js +1 -1
- package/dist/active-filters/index.js +1 -1
- package/dist/arrangement-settings/index.js +1 -1
- package/dist/assets/Component16.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/index15.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/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 -1
- package/dist/assets/index28.css +1 -0
- package/dist/assets/index29.css +1 -0
- package/dist/autocomplete/index.js +1 -1
- package/dist/autocomplete-async/index.js +1 -1
- package/dist/bottom-sheet/index.js +1 -1
- package/dist/button/Component.d.ts +1 -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/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox-group/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/data-table/index.js +2 -2
- package/dist/date-picker/index.js +2 -2
- package/dist/date-range-picker/index.js +2 -2
- package/dist/filters/index.js +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 +15 -2
- 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/grid/Component.d.ts +9 -0
- package/dist/grid/Component.d.ts.map +1 -0
- package/dist/grid/components/Item/index.d.ts +5 -0
- package/dist/grid/components/Item/index.d.ts.map +1 -0
- package/dist/grid/index.d.ts +3 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/index.js +85 -0
- package/dist/grid/index.js.map +1 -0
- package/dist/grid/types.d.ts +44 -0
- package/dist/grid/types.d.ts.map +1 -0
- package/dist/grid/utils.d.ts +6 -0
- package/dist/grid/utils.d.ts.map +1 -0
- package/dist/{index-CVEaKh8K.js → index-B0l1op71.js} +2 -2
- package/dist/{index-CVEaKh8K.js.map → index-B0l1op71.js.map} +1 -1
- package/dist/{index-B-dHfeT9.js → index-yKOPreNy.js} +2 -2
- package/dist/{index-B-dHfeT9.js.map → index-yKOPreNy.js.map} +1 -1
- package/dist/input/Component.d.ts +1 -1
- 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 +27 -25
- package/dist/input/index.js.map +1 -1
- package/dist/input/types.d.ts +5 -1
- package/dist/input/types.d.ts.map +1 -1
- package/dist/multi-autocomplete/index.js +2 -2
- package/dist/multi-autocomplete-async/index.js +2 -2
- package/dist/multi-select/index.js +3 -3
- package/dist/number-input/Component.d.ts +1 -1
- 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 +41 -39
- package/dist/number-input/index.js.map +1 -1
- package/dist/number-input/types.d.ts +5 -1
- package/dist/number-input/types.d.ts.map +1 -1
- package/dist/number-range/index.js +2 -2
- package/dist/select/index.js +1 -1
- package/dist/slider/index.js +2 -2
- package/dist/suggest-checklist/index.js +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/textarea/Component.d.ts +1 -1
- 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 +91 -86
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/types.d.ts +5 -1
- package/dist/textarea/types.d.ts.map +1 -1
- package/dist/time-field/index.js +1 -1
- package/dist/toast/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/vertical-tabs/Component.d.ts +18 -0
- package/dist/vertical-tabs/Component.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Indicator/index.d.ts +6 -0
- package/dist/vertical-tabs/components/Indicator/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Item/index.d.ts +5 -0
- package/dist/vertical-tabs/components/Item/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Item/theme.d.ts +5 -0
- package/dist/vertical-tabs/components/Item/theme.d.ts.map +1 -0
- package/dist/vertical-tabs/components/List/index.d.ts +5 -0
- package/dist/vertical-tabs/components/List/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/List/theme.d.ts +5 -0
- package/dist/vertical-tabs/components/List/theme.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Panel/index.d.ts +5 -0
- package/dist/vertical-tabs/components/Panel/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Panels/index.d.ts +5 -0
- package/dist/vertical-tabs/components/Panels/index.d.ts.map +1 -0
- package/dist/vertical-tabs/context.d.ts +4 -0
- package/dist/vertical-tabs/context.d.ts.map +1 -0
- package/dist/vertical-tabs/index.d.ts +4 -0
- package/dist/vertical-tabs/index.d.ts.map +1 -0
- package/dist/vertical-tabs/index.js +193 -0
- package/dist/vertical-tabs/index.js.map +1 -0
- package/dist/vertical-tabs/theme.d.ts +5 -0
- package/dist/vertical-tabs/theme.d.ts.map +1 -0
- package/dist/vertical-tabs/types.d.ts +84 -0
- package/dist/vertical-tabs/types.d.ts.map +1 -0
- package/docs/README.md +3 -4
- package/docs/ai.md +42 -28
- package/docs/architecture.md +23 -23
- package/docs/design-language.md +104 -0
- package/docs/skills/SKILL.md +66 -25
- package/package.json +18 -6
- package/scripts/sync-agents-consumer.ts +2 -1
- 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/grid/docs/Description.md +26 -0
- package/src/grid/docs/Example.md +16 -0
- package/src/grid/docs/cssVariables.ts +13 -0
- package/src/grid/types.ts +53 -0
- 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/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/src/vertical-tabs/docs/Description.md +32 -0
- package/src/vertical-tabs/docs/Example.md +19 -0
- package/src/vertical-tabs/docs/cssVariables.ts +25 -0
- package/src/vertical-tabs/types.ts +110 -0
- package/dist/Component-BBFBVrTt.js +0 -152
- package/dist/Component-BBFBVrTt.js.map +0 -1
- package/dist/Component-C4pVS7OW.js +0 -125
- package/dist/Component-C4pVS7OW.js.map +0 -1
- package/dist/Component-VS3iDpxE.js +0 -85
- package/dist/Component-VS3iDpxE.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/slider/docs/Description.ru.md +0 -45
- package/src/slider/docs/Example.ru.md +0 -17
- 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/{Description.en.md → Description.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/provider/docs/{Description.en.md → Description.md} +0 -0
- /package/src/provider/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/slider/docs/{Description.en.md → Description.md} +0 -0
- /package/src/slider/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/{Description.en.md → Description.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
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { jsx as l, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as L, createContext as C, useMemo as j } from "react";
|
|
3
|
+
import y from "classnames";
|
|
4
|
+
import { SelectionIndicator as w, Tab as D, TabList as K, TabPanel as M, TabPanels as R, Tabs as E } from "react-aria-components";
|
|
5
|
+
import { s as _ } from "../index-h8z54aFR.js";
|
|
6
|
+
import { typographyStyles as b } from "../typography/index.js";
|
|
7
|
+
import { cva as p } from "class-variance-authority";
|
|
8
|
+
import '../assets/index26.css';const V = C(void 0), g = () => {
|
|
9
|
+
const t = L(V);
|
|
10
|
+
if (!t)
|
|
11
|
+
throw new Error("This component must be used within a <VerticalTabs> component");
|
|
12
|
+
return t;
|
|
13
|
+
}, O = "aub_styles-module_root_26f01", X = {
|
|
14
|
+
root: O
|
|
15
|
+
}, f = () => /* @__PURE__ */ l(w, { className: X.root });
|
|
16
|
+
f.displayName = "VerticalTabs.Indicator";
|
|
17
|
+
const q = "aub_styles-module_root_c1dd3", A = "aub_styles-module_sm_45083", B = "aub_styles-module_md_73cc2", F = "aub_styles-module_lg_324ca", G = "aub_styles-module_primary_93d71", H = "aub_styles-module_content_e271a", n = {
|
|
18
|
+
root: q,
|
|
19
|
+
sm: A,
|
|
20
|
+
md: B,
|
|
21
|
+
lg: F,
|
|
22
|
+
primary: G,
|
|
23
|
+
content: H
|
|
24
|
+
}, J = p(n.root, {
|
|
25
|
+
variants: {
|
|
26
|
+
size: {
|
|
27
|
+
sm: n.sm,
|
|
28
|
+
md: n.md,
|
|
29
|
+
lg: n.lg
|
|
30
|
+
},
|
|
31
|
+
variant: {
|
|
32
|
+
primary: n.primary
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: "md",
|
|
37
|
+
variant: "primary"
|
|
38
|
+
}
|
|
39
|
+
}), Q = {
|
|
40
|
+
sm: b.bodyXs,
|
|
41
|
+
md: b.bodyS,
|
|
42
|
+
lg: b.bodyM
|
|
43
|
+
}, v = _(
|
|
44
|
+
({ ref: t, id: a, children: e, disabled: o = !1, className: r, dataTestId: s, ...m }) => {
|
|
45
|
+
const { size: i, variant: u } = g();
|
|
46
|
+
return /* @__PURE__ */ S(
|
|
47
|
+
D,
|
|
48
|
+
{
|
|
49
|
+
...m,
|
|
50
|
+
ref: t,
|
|
51
|
+
id: a,
|
|
52
|
+
isDisabled: o,
|
|
53
|
+
className: y(J({ size: i, variant: u }), Q[i], r),
|
|
54
|
+
"data-size": i,
|
|
55
|
+
"data-test-id": s,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ l("span", { className: n.content, children: e }),
|
|
58
|
+
/* @__PURE__ */ l(f, {})
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
v.displayName = "VerticalTabs.Item";
|
|
65
|
+
const U = "aub_styles-module_root_a0cc6", W = "aub_styles-module_sm_dbe74", Y = "aub_styles-module_md_18737", Z = "aub_styles-module_lg_bf571", k = "aub_styles-module_primary_a0e94", c = {
|
|
66
|
+
root: U,
|
|
67
|
+
sm: W,
|
|
68
|
+
md: Y,
|
|
69
|
+
lg: Z,
|
|
70
|
+
primary: k
|
|
71
|
+
}, tt = p(c.root, {
|
|
72
|
+
variants: {
|
|
73
|
+
size: {
|
|
74
|
+
sm: c.sm,
|
|
75
|
+
md: c.md,
|
|
76
|
+
lg: c.lg
|
|
77
|
+
},
|
|
78
|
+
variant: {
|
|
79
|
+
primary: c.primary
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
size: "md",
|
|
84
|
+
variant: "primary"
|
|
85
|
+
}
|
|
86
|
+
}), $ = _(
|
|
87
|
+
({ ref: t, children: a, className: e, dataTestId: o, ...r }) => {
|
|
88
|
+
const { size: s, variant: m } = g();
|
|
89
|
+
return /* @__PURE__ */ l(
|
|
90
|
+
K,
|
|
91
|
+
{
|
|
92
|
+
...r,
|
|
93
|
+
ref: t,
|
|
94
|
+
className: y(tt({ size: s, variant: m }), e),
|
|
95
|
+
"data-size": s,
|
|
96
|
+
"data-test-id": o,
|
|
97
|
+
children: a
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
$.displayName = "VerticalTabs.List";
|
|
103
|
+
const st = "aub_styles-module_root_4df33", at = {
|
|
104
|
+
root: st
|
|
105
|
+
}, N = _(
|
|
106
|
+
({ ref: t, id: a, children: e, className: o, dataTestId: r, ...s }) => /* @__PURE__ */ l(M, { ...s, ref: t, id: a, className: y(at.root, o), "data-test-id": r, children: e })
|
|
107
|
+
);
|
|
108
|
+
N.displayName = "VerticalTabs.Panel";
|
|
109
|
+
const et = "aub_styles-module_root_55889", ot = {
|
|
110
|
+
root: et
|
|
111
|
+
}, h = _(
|
|
112
|
+
({ ref: t, children: a, className: e, dataTestId: o, ...r }) => /* @__PURE__ */ l(
|
|
113
|
+
R,
|
|
114
|
+
{
|
|
115
|
+
...r,
|
|
116
|
+
ref: t,
|
|
117
|
+
className: y(ot.root, e),
|
|
118
|
+
"data-slot": "panels",
|
|
119
|
+
"data-test-id": o,
|
|
120
|
+
children: a
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
);
|
|
124
|
+
h.displayName = "VerticalTabs.Panels";
|
|
125
|
+
const rt = "aub_styles-module_root_54ce7", lt = "aub_styles-module_sm_d5a1d", mt = "aub_styles-module_md_8e375", it = "aub_styles-module_lg_2f9d4", nt = "aub_styles-module_primary_ac06a", d = {
|
|
126
|
+
root: rt,
|
|
127
|
+
sm: lt,
|
|
128
|
+
md: mt,
|
|
129
|
+
lg: it,
|
|
130
|
+
primary: nt
|
|
131
|
+
}, ct = p(d.root, {
|
|
132
|
+
variants: {
|
|
133
|
+
size: {
|
|
134
|
+
sm: d.sm,
|
|
135
|
+
md: d.md,
|
|
136
|
+
lg: d.lg
|
|
137
|
+
},
|
|
138
|
+
variant: {
|
|
139
|
+
primary: d.primary
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
defaultVariants: {
|
|
143
|
+
size: "md",
|
|
144
|
+
variant: "primary"
|
|
145
|
+
}
|
|
146
|
+
}), P = _(
|
|
147
|
+
({
|
|
148
|
+
ref: t,
|
|
149
|
+
children: a,
|
|
150
|
+
value: e,
|
|
151
|
+
defaultValue: o,
|
|
152
|
+
onChange: r,
|
|
153
|
+
size: s = "md",
|
|
154
|
+
variant: m = "primary",
|
|
155
|
+
disabled: i = !1,
|
|
156
|
+
className: u,
|
|
157
|
+
dataTestId: x,
|
|
158
|
+
...z
|
|
159
|
+
}) => {
|
|
160
|
+
const I = j(() => ({ size: s, variant: m }), [s, m]);
|
|
161
|
+
return /* @__PURE__ */ l(V.Provider, { value: I, children: /* @__PURE__ */ l(
|
|
162
|
+
E,
|
|
163
|
+
{
|
|
164
|
+
...z,
|
|
165
|
+
ref: t,
|
|
166
|
+
orientation: "vertical",
|
|
167
|
+
selectedKey: e,
|
|
168
|
+
defaultSelectedKey: o,
|
|
169
|
+
onSelectionChange: (T) => {
|
|
170
|
+
T != null && r?.(String(T));
|
|
171
|
+
},
|
|
172
|
+
isDisabled: i,
|
|
173
|
+
className: y(ct({ size: s, variant: m }), u),
|
|
174
|
+
"data-size": s,
|
|
175
|
+
"data-disabled": i || void 0,
|
|
176
|
+
"data-test-id": x,
|
|
177
|
+
children: a
|
|
178
|
+
}
|
|
179
|
+
) });
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
P.displayName = "VerticalTabs";
|
|
183
|
+
const Vt = Object.assign(P, {
|
|
184
|
+
List: $,
|
|
185
|
+
Item: v,
|
|
186
|
+
Panels: h,
|
|
187
|
+
Panel: N
|
|
188
|
+
});
|
|
189
|
+
export {
|
|
190
|
+
Vt as VerticalTabs,
|
|
191
|
+
g as useVerticalTabs
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/vertical-tabs/context.ts","../../src/vertical-tabs/components/Indicator/index.tsx","../../src/vertical-tabs/components/Item/theme.ts","../../src/vertical-tabs/components/Item/index.tsx","../../src/vertical-tabs/components/List/theme.ts","../../src/vertical-tabs/components/List/index.tsx","../../src/vertical-tabs/components/Panel/index.tsx","../../src/vertical-tabs/components/Panels/index.tsx","../../src/vertical-tabs/theme.ts","../../src/vertical-tabs/Component.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nimport { type IVerticalTabsContextValue } from './types';\n\nexport const VerticalTabsContext = createContext<IVerticalTabsContextValue | undefined>(undefined);\n\nexport const useVerticalTabs = (): IVerticalTabsContextValue => {\n const context = useContext(VerticalTabsContext);\n\n if (!context) {\n throw new Error('This component must be used within a <VerticalTabs> component');\n }\n\n return context;\n};\n","import { SelectionIndicator as RacSelectionIndicator } from 'react-aria-components';\n\nimport styles from './styles.module.css';\n\n/** Sliding fill for the selected item (RAC SelectionIndicator). */\nexport const VerticalTabsIndicator = () => <RacSelectionIndicator className={styles.root} />;\n\nVerticalTabsIndicator.displayName = 'VerticalTabs.Indicator';\n","import { cva } from 'class-variance-authority';\n\nimport styles from './styles.module.css';\n\nexport const verticalTabsItemVariants = cva(styles.root, {\n variants: {\n size: {\n sm: styles.sm,\n md: styles.md,\n lg: styles.lg,\n },\n variant: {\n primary: styles.primary,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n },\n});\n","import cn from 'classnames';\nimport { Tab as RacTab } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\nimport { typographyStyles } from '@ds/typography';\n\nimport { useVerticalTabs } from '../../context';\nimport { type IVerticalTabsItemProps } from '../../types';\nimport { VerticalTabsIndicator } from '../Indicator';\n\nimport { verticalTabsItemVariants } from './theme';\n\nimport styles from './styles.module.css';\n\nconst itemTypography = {\n sm: typographyStyles.bodyXs,\n md: typographyStyles.bodyS,\n lg: typographyStyles.bodyM,\n} as const;\n\nexport const VerticalTabsItem = supportRef(\n ({ ref, id, children, disabled = false, className, dataTestId, ...props }: IVerticalTabsItemProps) => {\n const { size, variant } = useVerticalTabs();\n\n return (\n <RacTab\n {...props}\n ref={ref}\n id={id}\n isDisabled={disabled}\n className={cn(verticalTabsItemVariants({ size, variant }), itemTypography[size], className)}\n data-size={size}\n data-test-id={dataTestId}\n >\n <span className={styles.content}>{children}</span>\n <VerticalTabsIndicator />\n </RacTab>\n );\n }\n);\n\nVerticalTabsItem.displayName = 'VerticalTabs.Item';\n","import { cva } from 'class-variance-authority';\n\nimport styles from './styles.module.css';\n\nexport const verticalTabsListVariants = cva(styles.root, {\n variants: {\n size: {\n sm: styles.sm,\n md: styles.md,\n lg: styles.lg,\n },\n variant: {\n primary: styles.primary,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n },\n});\n","import cn from 'classnames';\nimport { TabList as RacTabList } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { useVerticalTabs } from '../../context';\nimport { type IVerticalTabsListProps } from '../../types';\n\nimport { verticalTabsListVariants } from './theme';\n\nexport const VerticalTabsList = supportRef(\n ({ ref, children, className, dataTestId, ...props }: IVerticalTabsListProps) => {\n const { size, variant } = useVerticalTabs();\n\n return (\n <RacTabList\n {...props}\n ref={ref}\n className={cn(verticalTabsListVariants({ size, variant }), className)}\n data-size={size}\n data-test-id={dataTestId}\n >\n {children}\n </RacTabList>\n );\n }\n);\n\nVerticalTabsList.displayName = 'VerticalTabs.List';\n","import cn from 'classnames';\nimport { TabPanel as RacTabPanel } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { type IVerticalTabsPanelProps } from '../../types';\n\nimport styles from './styles.module.css';\n\nexport const VerticalTabsPanel = supportRef(\n ({ ref, id, children, className, dataTestId, ...props }: IVerticalTabsPanelProps) => (\n <RacTabPanel {...props} ref={ref} id={id} className={cn(styles.root, className)} data-test-id={dataTestId}>\n {children}\n </RacTabPanel>\n )\n);\n\nVerticalTabsPanel.displayName = 'VerticalTabs.Panel';\n","import cn from 'classnames';\nimport { TabPanels as RacTabPanels } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { type IVerticalTabsPanelsProps } from '../../types';\n\nimport styles from './styles.module.css';\n\nexport const VerticalTabsPanels = supportRef(\n ({ ref, children, className, dataTestId, ...props }: IVerticalTabsPanelsProps) => (\n <RacTabPanels\n {...props}\n ref={ref}\n className={cn(styles.root, className)}\n data-slot=\"panels\"\n data-test-id={dataTestId}\n >\n {children}\n </RacTabPanels>\n )\n);\n\nVerticalTabsPanels.displayName = 'VerticalTabs.Panels';\n","import { cva } from 'class-variance-authority';\n\nimport styles from './styles.module.css';\n\nexport const verticalTabsShellVariants = cva(styles.root, {\n variants: {\n size: {\n sm: styles.sm,\n md: styles.md,\n lg: styles.lg,\n },\n variant: {\n primary: styles.primary,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n },\n});\n","import { useMemo } from 'react';\n\nimport cn from 'classnames';\nimport { type Key, Tabs as RacTabs } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { VerticalTabsItem } from './components/Item';\nimport { VerticalTabsList } from './components/List';\nimport { VerticalTabsPanel } from './components/Panel';\nimport { VerticalTabsPanels } from './components/Panels';\nimport { VerticalTabsContext } from './context';\nimport { verticalTabsShellVariants } from './theme';\nimport { type IVerticalTabsProps } from './types';\n\nconst VerticalTabsRoot = supportRef(\n ({\n ref,\n children,\n value,\n defaultValue,\n onChange,\n size = 'md',\n variant = 'primary',\n disabled = false,\n className,\n dataTestId,\n ...props\n }: IVerticalTabsProps) => {\n const contextValue = useMemo(() => ({ size, variant }), [size, variant]);\n\n return (\n <VerticalTabsContext.Provider value={contextValue}>\n <RacTabs\n {...props}\n ref={ref}\n orientation=\"vertical\"\n selectedKey={value}\n defaultSelectedKey={defaultValue}\n onSelectionChange={(key: Key | null) => {\n if (key == null) {\n return;\n }\n\n onChange?.(String(key));\n }}\n isDisabled={disabled}\n className={cn(verticalTabsShellVariants({ size, variant }), className)}\n data-size={size}\n data-disabled={disabled || undefined}\n data-test-id={dataTestId}\n >\n {children}\n </RacTabs>\n </VerticalTabsContext.Provider>\n );\n }\n);\n\nVerticalTabsRoot.displayName = 'VerticalTabs';\n\nexport const VerticalTabs = Object.assign(VerticalTabsRoot, {\n List: VerticalTabsList,\n Item: VerticalTabsItem,\n Panels: VerticalTabsPanels,\n Panel: VerticalTabsPanel,\n});\n"],"names":["VerticalTabsContext","createContext","useVerticalTabs","context","useContext","VerticalTabsIndicator","jsx","RacSelectionIndicator","styles","verticalTabsItemVariants","cva","itemTypography","typographyStyles","VerticalTabsItem","supportRef","ref","id","children","disabled","className","dataTestId","props","size","variant","jsxs","RacTab","cn","verticalTabsListVariants","VerticalTabsList","RacTabList","VerticalTabsPanel","RacTabPanel","VerticalTabsPanels","RacTabPanels","verticalTabsShellVariants","VerticalTabsRoot","value","defaultValue","onChange","contextValue","useMemo","RacTabs","key","VerticalTabs"],"mappings":";;;;;;;AAIO,MAAMA,IAAsBC,EAAqD,MAAS,GAEpFC,IAAkB,MAAiC;AAC5D,QAAMC,IAAUC,EAAWJ,CAAmB;AAE9C,MAAI,CAACG;AACD,UAAM,IAAI,MAAM,+DAA+D;AAGnF,SAAOA;AACX;;GCTaE,IAAwB,MAAM,gBAAAC,EAACC,GAAA,EAAsB,WAAWC,EAAO,MAAM;AAE1FH,EAAsB,cAAc;;;;;;;;GCHvBI,IAA2BC,EAAIF,EAAO,MAAM;AAAA,EACrD,UAAU;AAAA,IACN,MAAM;AAAA,MACF,IAAIA,EAAO;AAAA,MACX,IAAIA,EAAO;AAAA,MACX,IAAIA,EAAO;AAAA,IAAA;AAAA,IAEf,SAAS;AAAA,MACL,SAASA,EAAO;AAAA,IAAA;AAAA,EACpB;AAAA,EAEJ,iBAAiB;AAAA,IACb,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEjB,CAAC,GCLKG,IAAiB;AAAA,EACnB,IAAIC,EAAiB;AAAA,EACrB,IAAIA,EAAiB;AAAA,EACrB,IAAIA,EAAiB;AACzB,GAEaC,IAAmBC;AAAA,EAC5B,CAAC,EAAE,KAAAC,GAAK,IAAAC,GAAI,UAAAC,GAAU,UAAAC,IAAW,IAAO,WAAAC,GAAW,YAAAC,GAAY,GAAGC,QAAoC;AAClG,UAAM,EAAE,MAAAC,GAAM,SAAAC,EAAA,IAAYrB,EAAA;AAE1B,WACI,gBAAAsB;AAAA,MAACC;AAAAA,MAAA;AAAA,QACI,GAAGJ;AAAA,QACJ,KAAAN;AAAA,QACA,IAAAC;AAAA,QACA,YAAYE;AAAA,QACZ,WAAWQ,EAAGjB,EAAyB,EAAE,MAAAa,GAAM,SAAAC,EAAA,CAAS,GAAGZ,EAAeW,CAAI,GAAG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AA,QACJ,KAAAN;AAAA,QACA,aAAY;AAAA,QACZ,aAAaqB;AAAA,QACb,oBAAoBC;AAAA,QACpB,mBAAmB,CAACK,MAAoB;AACpC,UAAIA,KAAO,QAIXJ,IAAW,OAAOI,CAAG,CAAC;AAAA,QAC1B;AAAA,QACA,YAAYxB;AAAA,QACZ,WAAWQ,EAAGQ,GAA0B,EAAE,MAAAZ,GAAM,SAAAC,EAAA,CAAS,GAAGJ,CAAS;AAAA,QACrE,aAAWG;AAAA,QACX,iBAAeJ,KAAY;AAAA,QAC3B,gBAAcE;AAAA,QAEb,UAAAH;AAAA,MAAA;AAAA,IAAA,GAET;AAAA,EAER;AACJ;AAEAkB,EAAiB,cAAc;AAExB,MAAMQ,KAAe,OAAO,OAAOR,GAAkB;AAAA,EACxD,MAAMP;AAAA,EACN,MAAMf;AAAA,EACN,QAAQmB;AAAA,EACR,OAAOF;AACX,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/vertical-tabs/theme.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB;;;8EAepC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import { TabListProps as RacTabListProps, TabPanelProps as RacTabPanelProps, TabPanelsProps as RacTabPanelsProps, TabProps as RacTabProps, TabsProps as RacTabsProps } from 'react-aria-components';
|
|
3
|
+
import { IDataTestIdProps } from '../ds/common/index.js';
|
|
4
|
+
/** Vertical tabs size. */
|
|
5
|
+
export type TVerticalTabsSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
/** Visual variant. */
|
|
7
|
+
export type TVerticalTabsVariant = 'primary';
|
|
8
|
+
/** Theme inputs. */
|
|
9
|
+
export interface IVerticalTabsThemeProps {
|
|
10
|
+
/** Vertical tabs size. */
|
|
11
|
+
size?: TVerticalTabsSize;
|
|
12
|
+
/** Visual variant. */
|
|
13
|
+
variant?: TVerticalTabsVariant;
|
|
14
|
+
}
|
|
15
|
+
/** Control state (our names, not RAC). */
|
|
16
|
+
export interface IVerticalTabsControlProps {
|
|
17
|
+
/** Controlled selected item id. */
|
|
18
|
+
value?: string;
|
|
19
|
+
/** Uncontrolled initial selected item id. */
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
/** Selection change handler. */
|
|
22
|
+
onChange?: (value: string) => void;
|
|
23
|
+
}
|
|
24
|
+
/** Own / chrome props (not from RAC). */
|
|
25
|
+
export interface IVerticalTabsOwnProps extends IDataTestIdProps {
|
|
26
|
+
/** List and panels. */
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
/** Ref to the tabs root (React 19 prop). */
|
|
29
|
+
ref?: Ref<HTMLDivElement>;
|
|
30
|
+
/** Disables every item. */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface IVerticalTabsBaseProps extends IVerticalTabsThemeProps, IVerticalTabsControlProps, IVerticalTabsOwnProps {
|
|
34
|
+
}
|
|
35
|
+
/** RAC keys omitted because names differ from ours. */
|
|
36
|
+
export type TVerticalTabsRacOmit = 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'isDisabled' | 'orientation';
|
|
37
|
+
export interface IVerticalTabsProps extends IVerticalTabsBaseProps, Omit<RacTabsProps, keyof IVerticalTabsBaseProps | TVerticalTabsRacOmit> {
|
|
38
|
+
}
|
|
39
|
+
/** Vertical tabs context value. */
|
|
40
|
+
export interface IVerticalTabsContextValue {
|
|
41
|
+
size: TVerticalTabsSize;
|
|
42
|
+
variant: TVerticalTabsVariant;
|
|
43
|
+
}
|
|
44
|
+
/** Own props for VerticalTabs.List. */
|
|
45
|
+
export interface IVerticalTabsListOwnProps extends IDataTestIdProps {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
/** Ref to the list (React 19 prop). */
|
|
48
|
+
ref?: Ref<HTMLDivElement>;
|
|
49
|
+
}
|
|
50
|
+
export interface IVerticalTabsListProps extends IVerticalTabsListOwnProps, Omit<RacTabListProps<object>, keyof IVerticalTabsListOwnProps | 'items'> {
|
|
51
|
+
}
|
|
52
|
+
/** Own props for VerticalTabs.Item. */
|
|
53
|
+
export interface IVerticalTabsItemOwnProps extends IDataTestIdProps {
|
|
54
|
+
/** Unique item id (matches Panel id). */
|
|
55
|
+
id: string;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
/** Disables this item. */
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
/** Ref to the item (React 19 prop). */
|
|
60
|
+
ref?: Ref<HTMLDivElement>;
|
|
61
|
+
}
|
|
62
|
+
/** RAC keys omitted because names differ from ours. */
|
|
63
|
+
export type TVerticalTabsItemRacOmit = 'isDisabled';
|
|
64
|
+
export interface IVerticalTabsItemProps extends IVerticalTabsItemOwnProps, Omit<RacTabProps, keyof IVerticalTabsItemOwnProps | TVerticalTabsItemRacOmit> {
|
|
65
|
+
}
|
|
66
|
+
/** Own props for VerticalTabs.Panel. */
|
|
67
|
+
export interface IVerticalTabsPanelOwnProps extends IDataTestIdProps {
|
|
68
|
+
/** Unique panel id (matches Item id). */
|
|
69
|
+
id: string;
|
|
70
|
+
children?: ReactNode;
|
|
71
|
+
/** Ref to the panel (React 19 prop). */
|
|
72
|
+
ref?: Ref<HTMLDivElement>;
|
|
73
|
+
}
|
|
74
|
+
export interface IVerticalTabsPanelProps extends IVerticalTabsPanelOwnProps, Omit<RacTabPanelProps, keyof IVerticalTabsPanelOwnProps> {
|
|
75
|
+
}
|
|
76
|
+
/** Own props for VerticalTabs.Panels. */
|
|
77
|
+
export interface IVerticalTabsPanelsOwnProps extends IDataTestIdProps {
|
|
78
|
+
children: ReactNode;
|
|
79
|
+
/** Ref to the panels container (React 19 prop). */
|
|
80
|
+
ref?: Ref<HTMLDivElement>;
|
|
81
|
+
}
|
|
82
|
+
export interface IVerticalTabsPanelsProps extends IVerticalTabsPanelsOwnProps, Omit<RacTabPanelsProps<object>, keyof IVerticalTabsPanelsOwnProps | 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EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,wCAAwC;IACxC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,uBACb,SAAQ,0BAA0B,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;CAAG;AAEnG,yCAAyC;AACzC,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACjE,QAAQ,EAAE,SAAS,CAAC;IACpB,mDAAmD;IACnD,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,wBACb,SAAQ,2BAA2B,EAAE,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,2BAA2B,GAAG,OAAO,CAAC;CAAG"}
|
package/docs/README.md
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
# Документация пакета
|
|
2
2
|
|
|
3
|
-
Карта каналов. API примитивов сюда **не** пишем — source of truth
|
|
3
|
+
Карта каналов. API примитивов сюда **не** пишем — source of truth в репо: `src/<name>/docs/Description.ru.md` / `Description.en.md` и `types.ts`. В npm для агента английский файл называется `Description.md`.
|
|
4
4
|
|
|
5
5
|
| Канал | Где | Для кого |
|
|
6
6
|
| --- | --- | --- |
|
|
7
7
|
| Онбординг / API примитивов | Storybook + `src/<name>/docs/` | люди + агенты |
|
|
8
8
|
| Пакет (этот каталог) | `docs/*.md`, `docs/skills/` | контрибьюторы, АП |
|
|
9
|
-
| Визуал АП | [`design-language.md`](./design-language.md)
|
|
9
|
+
| Визуал АП (текст) | [`design-language.md`](./design-language.md) | продукт / дизайн (в npm публикуется) |
|
|
10
10
|
|
|
11
11
|
## В этом каталоге
|
|
12
12
|
|
|
13
13
|
- [architecture.md](./architecture.md) — стек, токены, Form, exports
|
|
14
14
|
- [ai.md](./ai.md) — канал для АП / skills
|
|
15
|
-
- [design-language.md](./design-language.md) — визуальный канон (слои, CascadeMenu WIP, list/detail);
|
|
15
|
+
- [design-language.md](./design-language.md) — визуальный канон (слои, CascadeMenu WIP, list/detail); в npm уходит [design-language.en.md](./design-language.en.md)
|
|
16
16
|
- [skills/](./skills/) — skill `admin-ui` (публикуется с пакетом; автосинк в `.cursor/skills`, `.claude/skills` и маркер-блок в `AGENTS.md` через postinstall, см. [ai.md](./ai.md))
|
|
17
|
-
- [concepts/](./concepts/) — скриншоты-референсы интерфейса АП (индекс: [concepts/README.md](./concepts/README.md))
|
|
18
17
|
|
|
19
18
|
## Storybook
|
|
20
19
|
|
package/docs/ai.md
CHANGED
|
@@ -1,46 +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
|
|
12
23
|
|
|
13
|
-
|
|
24
|
+
Thin router for **consuming** the UI kit (pick a primitive, then read its Description). Authoring Description / stories — separate skill `write-component-docs`.
|
|
14
25
|
|
|
15
|
-
|
|
26
|
+
Location in the package: `docs/skills/` (`SKILL.md`).
|
|
16
27
|
|
|
17
|
-
|
|
28
|
+
In a consumer app:
|
|
18
29
|
|
|
19
|
-
|
|
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)
|
|
20
32
|
|
|
21
|
-
- skill:
|
|
22
|
-
- контракт: `node_modules/@ensi-platform/admin-ui/src/<name>/docs/`, `…/types.ts`
|
|
33
|
+
`postinstall` (`scripts/sync-consumer.ts`) copies the skill and writes a pointer. No manual path setup:
|
|
23
34
|
|
|
24
|
-
|
|
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)
|
|
25
38
|
|
|
26
|
-
|
|
27
|
-
- короткая таблица выбора примитива (Button vs Badge vs Tag, …)
|
|
28
|
-
- указание: читай Description / types / Example — без копипасты длинных текстов
|
|
39
|
+
Limits:
|
|
29
40
|
|
|
30
|
-
|
|
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`
|
|
31
45
|
|
|
32
|
-
|
|
46
|
+
Updating a Description does not require editing the skill.
|
|
33
47
|
|
|
34
|
-
|
|
35
|
-
- `.claude/skills/admin-ui/SKILL.md` — Claude Code (тот же контент, тот же frontmatter-формат Agent Skills);
|
|
36
|
-
- маркер-блок `<!-- @ensi-platform/admin-ui:start -->…:end` в `AGENTS.md` в корне consumer-репо — для агентов без концепции skills (Codex CLI, Copilot coding agent и др.), которые читают только `AGENTS.md` целиком. Блок создаётся/обновляется идемпотентно; остальной `AGENTS.md` не трогается.
|
|
48
|
+
## Rules for agents
|
|
37
49
|
|
|
38
|
-
|
|
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**.
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
- **pnpm ≥ 9** по умолчанию блокирует lifecycle-скрипты зависимостей («ignored build scripts»). Если синк не сработал сам — один раз выполнить `pnpm approve-builds @ensi-platform/admin-ui` (или добавить пакет в `pnpm.onlyBuiltDependencies` в корневом `package.json` consumer-репо), затем `pnpm install` ещё раз;
|
|
42
|
-
- ручной запуск без переустановки: `node node_modules/@ensi-platform/admin-ui/scripts/sync-consumer.ts`;
|
|
43
|
-
- опт-аут (отключает все три канала сразу): `ADMIN_UI_SKIP_CONSUMER_SYNC=1`;
|
|
44
|
-
- в самом репозитории admin-ui `.cursor/skills/admin-ui`, `.claude/skills/admin-ui` и корневой `AGENTS.md` не трогаем — скрипт детектит dev-режим и ничего не пишет.
|
|
56
|
+
## Next
|
|
45
57
|
|
|
46
|
-
|
|
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,104 @@
|
|
|
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`, `VerticalTabs`, `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 inside one tab — `VerticalTabs` (column on the left, panel on the right)
|
|
75
|
+
- sections: H2 + gap; fields on `page` in `Grid` — **no** card per section
|
|
76
|
+
- one alert (bg+border) is the only heavy nested block
|
|
77
|
+
- tags inside a field — tint, with no second stroke on top of `Field`
|
|
78
|
+
|
|
79
|
+
## Theme (from `src/ds/tokens`)
|
|
80
|
+
|
|
81
|
+
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`).
|
|
82
|
+
|
|
83
|
+
| Role | Light | Dark |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| page bg | `#ffffff` | `#1b1d22` (`black-900`) |
|
|
86
|
+
| page fg | `#0a0a0a` (`neutral-900`) | `#f1f5f9` (`grey-100`) |
|
|
87
|
+
| fg muted | `#737373` (`neutral-500`) | `#8b929e` (`grey-400`) |
|
|
88
|
+
| link | = page fg (underline); hover `neutral-800` | = page fg; hover white |
|
|
89
|
+
| sidebar | `#fafafa` (`neutral-50`) | = page |
|
|
90
|
+
| surface muted (secondary btn / tag) | `#f5f5f5` (`neutral-100`) | `#3f4651` (`grey-600`) |
|
|
91
|
+
| surface primary (input fill) | `#ffffff` | `#212328` (`black-800`) |
|
|
92
|
+
| table fill | = page (flush) | = page (flush) |
|
|
93
|
+
| surface border | `#e5e5e5` (`neutral-200`) | `#3f4651` (`grey-600`) |
|
|
94
|
+
| primary button | bg `#171717` (`neutral-800`), fg `#fafafa` | bg `#f1f5f9`, fg `#1b1d22` |
|
|
95
|
+
| focus | `#a1a1a1` (`neutral-400`) | grey-100 |
|
|
96
|
+
| badge success/warning/danger | soft `*-50` bg + `*-700` fg | `color-mix(*-500 22%, surface)` + `*-500` fg |
|
|
97
|
+
| badge info | = neutral | = neutral |
|
|
98
|
+
| control radius | `8px` (`radius-8`) | same |
|
|
99
|
+
|
|
100
|
+
Light accent = neutral (`neutral-800` / `#171717`). Dark accent = a light grey fill. Status = red/green/yellow only (info = neutral).
|
|
101
|
+
|
|
102
|
+
## Related
|
|
103
|
+
|
|
104
|
+
- consumer skill: [`skills/`](./skills/) — which primitive to pick; screen visuals — this file
|