@mich8060/unified-design-system 0.1.10
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/LICENSE +21 -0
- package/README.lib.md +103 -0
- package/README.md +265 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +103 -0
- package/dist/package.json +49 -0
- package/dist/styles.css +20544 -0
- package/dist/uds-components.es.js +67031 -0
- package/dist/uds-components.es.js.map +1 -0
- package/dist/uds-components.umd.js +67048 -0
- package/dist/uds-components.umd.js.map +1 -0
- package/package.json +158 -0
- package/src/styles/_typography.scss +932 -0
- package/src/styles/_utilities.scss +3738 -0
- package/src/styles/_variables.scss +620 -0
- package/src/styles/prism-custom.css +204 -0
- package/src/styles/prism-custom.scss +205 -0
- package/src/styles/tokens.css +1463 -0
- package/src/styles/tokens.scss +1116 -0
- package/src/ui/Accordion/Accordion.ai.md +69 -0
- package/src/ui/Accordion/Accordion.scss +87 -0
- package/src/ui/Accordion/Accordion.spec.ts +25 -0
- package/src/ui/Accordion/Accordion.stories.tsx +46 -0
- package/src/ui/Accordion/Accordion.test.tsx +54 -0
- package/src/ui/Accordion/Accordion.tsx +73 -0
- package/src/ui/Accordion/Accordion.types.ts +15 -0
- package/src/ui/Accordion/index.js +1 -0
- package/src/ui/ActionMenu/ActionMenu.ai.md +106 -0
- package/src/ui/ActionMenu/ActionMenu.jsx +437 -0
- package/src/ui/ActionMenu/ActionMenu.scss +252 -0
- package/src/ui/ActionMenu/ActionMenu.spec.ts +12 -0
- package/src/ui/ActionMenu/ActionMenu.stories.jsx +14 -0
- package/src/ui/ActionMenu/ActionMenu.stories.tsx +124 -0
- package/src/ui/ActionMenu/ActionMenu.test.tsx +1 -0
- package/src/ui/ActionMenu/ActionMenu.tsx +6 -0
- package/src/ui/ActionMenu/ActionMenu.types.ts +3 -0
- package/src/ui/ActionMenu/index.js +1 -0
- package/src/ui/Avatar/Avatar.ai.md +54 -0
- package/src/ui/Avatar/Avatar.jsx +49 -0
- package/src/ui/Avatar/Avatar.scss +87 -0
- package/src/ui/Avatar/Avatar.spec.ts +12 -0
- package/src/ui/Avatar/Avatar.stories.jsx +14 -0
- package/src/ui/Avatar/Avatar.stories.tsx +14 -0
- package/src/ui/Avatar/Avatar.test.tsx +1 -0
- package/src/ui/Avatar/Avatar.tsx +6 -0
- package/src/ui/Avatar/Avatar.types.ts +3 -0
- package/src/ui/Avatar/index.js +1 -0
- package/src/ui/Badge/Badge.ai.md +37 -0
- package/src/ui/Badge/Badge.jsx +64 -0
- package/src/ui/Badge/Badge.scss +84 -0
- package/src/ui/Badge/Badge.spec.ts +12 -0
- package/src/ui/Badge/Badge.stories.jsx +14 -0
- package/src/ui/Badge/Badge.stories.tsx +14 -0
- package/src/ui/Badge/Badge.test.tsx +1 -0
- package/src/ui/Badge/Badge.tsx +6 -0
- package/src/ui/Badge/Badge.types.ts +3 -0
- package/src/ui/Badge/index.js +1 -0
- package/src/ui/Branding/Branding.ai.md +81 -0
- package/src/ui/Branding/Branding.jsx +127 -0
- package/src/ui/Branding/Branding.scss +57 -0
- package/src/ui/Branding/Branding.spec.ts +12 -0
- package/src/ui/Branding/Branding.stories.jsx +14 -0
- package/src/ui/Branding/Branding.stories.tsx +14 -0
- package/src/ui/Branding/Branding.test.tsx +1 -0
- package/src/ui/Branding/Branding.tsx +6 -0
- package/src/ui/Branding/Branding.types.ts +3 -0
- package/src/ui/Branding/index.js +1 -0
- package/src/ui/Breadcrumb/Breadcrumb.ai.md +50 -0
- package/src/ui/Breadcrumb/Breadcrumb.jsx +167 -0
- package/src/ui/Breadcrumb/Breadcrumb.scss +46 -0
- package/src/ui/Breadcrumb/Breadcrumb.spec.ts +12 -0
- package/src/ui/Breadcrumb/Breadcrumb.stories.jsx +26 -0
- package/src/ui/Breadcrumb/Breadcrumb.stories.tsx +14 -0
- package/src/ui/Breadcrumb/Breadcrumb.test.tsx +1 -0
- package/src/ui/Breadcrumb/Breadcrumb.tsx +6 -0
- package/src/ui/Breadcrumb/Breadcrumb.types.ts +3 -0
- package/src/ui/Breadcrumb/index.js +2 -0
- package/src/ui/Button/Button.ai.md +122 -0
- package/src/ui/Button/Button.figma.tsx +49 -0
- package/src/ui/Button/Button.scss +188 -0
- package/src/ui/Button/Button.spec.ts +52 -0
- package/src/ui/Button/Button.stories.tsx +199 -0
- package/src/ui/Button/Button.test.tsx +85 -0
- package/src/ui/Button/Button.tsx +131 -0
- package/src/ui/Button/Button.types.ts +32 -0
- package/src/ui/Button/index.js +1 -0
- package/src/ui/Calendar/Calendar.ai.md +151 -0
- package/src/ui/Calendar/Calendar.jsx +504 -0
- package/src/ui/Calendar/Calendar.scss +451 -0
- package/src/ui/Calendar/Calendar.spec.ts +12 -0
- package/src/ui/Calendar/Calendar.stories.jsx +14 -0
- package/src/ui/Calendar/Calendar.stories.tsx +14 -0
- package/src/ui/Calendar/Calendar.test.tsx +1 -0
- package/src/ui/Calendar/Calendar.tsx +6 -0
- package/src/ui/Calendar/Calendar.types.ts +3 -0
- package/src/ui/Calendar/index.js +1 -0
- package/src/ui/Card/Card.ai.md +41 -0
- package/src/ui/Card/Card.jsx +25 -0
- package/src/ui/Card/Card.scss +47 -0
- package/src/ui/Card/Card.spec.ts +12 -0
- package/src/ui/Card/Card.stories.jsx +28 -0
- package/src/ui/Card/Card.stories.tsx +14 -0
- package/src/ui/Card/Card.test.tsx +1 -0
- package/src/ui/Card/Card.tsx +6 -0
- package/src/ui/Card/Card.types.ts +3 -0
- package/src/ui/Card/index.js +1 -0
- package/src/ui/Checkbox/Checkbox.ai.md +50 -0
- package/src/ui/Checkbox/Checkbox.jsx +73 -0
- package/src/ui/Checkbox/Checkbox.scss +115 -0
- package/src/ui/Checkbox/Checkbox.spec.ts +12 -0
- package/src/ui/Checkbox/Checkbox.stories.jsx +14 -0
- package/src/ui/Checkbox/Checkbox.stories.tsx +14 -0
- package/src/ui/Checkbox/Checkbox.test.tsx +1 -0
- package/src/ui/Checkbox/Checkbox.tsx +6 -0
- package/src/ui/Checkbox/Checkbox.types.ts +3 -0
- package/src/ui/Checkbox/index.js +1 -0
- package/src/ui/Chip/Chip.ai.md +43 -0
- package/src/ui/Chip/Chip.jsx +102 -0
- package/src/ui/Chip/Chip.scss +118 -0
- package/src/ui/Chip/Chip.spec.ts +12 -0
- package/src/ui/Chip/Chip.stories.jsx +14 -0
- package/src/ui/Chip/Chip.stories.tsx +14 -0
- package/src/ui/Chip/Chip.test.tsx +1 -0
- package/src/ui/Chip/Chip.tsx +6 -0
- package/src/ui/Chip/Chip.types.ts +3 -0
- package/src/ui/Chip/index.js +1 -0
- package/src/ui/Datepicker/Datepicker.ai.md +45 -0
- package/src/ui/Datepicker/Datepicker.jsx +330 -0
- package/src/ui/Datepicker/Datepicker.scss +206 -0
- package/src/ui/Datepicker/Datepicker.spec.ts +12 -0
- package/src/ui/Datepicker/Datepicker.stories.jsx +14 -0
- package/src/ui/Datepicker/Datepicker.stories.tsx +14 -0
- package/src/ui/Datepicker/Datepicker.test.tsx +1 -0
- package/src/ui/Datepicker/Datepicker.tsx +6 -0
- package/src/ui/Datepicker/Datepicker.types.ts +3 -0
- package/src/ui/Datepicker/index.js +2 -0
- package/src/ui/Divider/Divider.ai.md +34 -0
- package/src/ui/Divider/Divider.jsx +89 -0
- package/src/ui/Divider/Divider.scss +116 -0
- package/src/ui/Divider/Divider.spec.ts +12 -0
- package/src/ui/Divider/Divider.stories.jsx +14 -0
- package/src/ui/Divider/Divider.stories.tsx +14 -0
- package/src/ui/Divider/Divider.test.tsx +1 -0
- package/src/ui/Divider/Divider.tsx +6 -0
- package/src/ui/Divider/Divider.types.ts +3 -0
- package/src/ui/Divider/index.js +1 -0
- package/src/ui/DotStatus/DotStatus.ai.md +36 -0
- package/src/ui/DotStatus/DotStatus.jsx +64 -0
- package/src/ui/DotStatus/DotStatus.scss +87 -0
- package/src/ui/DotStatus/DotStatus.spec.ts +12 -0
- package/src/ui/DotStatus/DotStatus.stories.jsx +14 -0
- package/src/ui/DotStatus/DotStatus.stories.tsx +14 -0
- package/src/ui/DotStatus/DotStatus.test.tsx +1 -0
- package/src/ui/DotStatus/DotStatus.tsx +6 -0
- package/src/ui/DotStatus/DotStatus.types.ts +3 -0
- package/src/ui/DotStatus/index.js +1 -0
- package/src/ui/Dropdown/Dropdown.ai.md +118 -0
- package/src/ui/Dropdown/Dropdown.scss +129 -0
- package/src/ui/Dropdown/Dropdown.spec.ts +54 -0
- package/src/ui/Dropdown/Dropdown.stories.tsx +59 -0
- package/src/ui/Dropdown/Dropdown.test.tsx +37 -0
- package/src/ui/Dropdown/Dropdown.tsx +119 -0
- package/src/ui/Dropdown/Dropdown.types.ts +25 -0
- package/src/ui/Dropdown/index.js +1 -0
- package/src/ui/EventCard/EventCard.ai.md +101 -0
- package/src/ui/EventCard/EventCard.jsx +92 -0
- package/src/ui/EventCard/EventCard.scss +186 -0
- package/src/ui/EventCard/EventCard.spec.ts +12 -0
- package/src/ui/EventCard/EventCard.stories.jsx +14 -0
- package/src/ui/EventCard/EventCard.stories.tsx +14 -0
- package/src/ui/EventCard/EventCard.test.tsx +1 -0
- package/src/ui/EventCard/EventCard.tsx +6 -0
- package/src/ui/EventCard/EventCard.types.ts +3 -0
- package/src/ui/EventCard/index.js +1 -0
- package/src/ui/Field/Field.ai.md +69 -0
- package/src/ui/Field/Field.jsx +89 -0
- package/src/ui/Field/Field.scss +76 -0
- package/src/ui/Field/Field.spec.ts +12 -0
- package/src/ui/Field/Field.stories.jsx +14 -0
- package/src/ui/Field/Field.stories.tsx +14 -0
- package/src/ui/Field/Field.test.tsx +1 -0
- package/src/ui/Field/Field.tsx +6 -0
- package/src/ui/Field/Field.types.ts +3 -0
- package/src/ui/Field/index.js +1 -0
- package/src/ui/FileUpload/FileUpload.ai.md +38 -0
- package/src/ui/FileUpload/FileUpload.figma.tsx +28 -0
- package/src/ui/FileUpload/FileUpload.jsx +153 -0
- package/src/ui/FileUpload/FileUpload.scss +78 -0
- package/src/ui/FileUpload/FileUpload.spec.ts +12 -0
- package/src/ui/FileUpload/FileUpload.stories.jsx +14 -0
- package/src/ui/FileUpload/FileUpload.stories.tsx +14 -0
- package/src/ui/FileUpload/FileUpload.test.tsx +1 -0
- package/src/ui/FileUpload/FileUpload.tsx +6 -0
- package/src/ui/FileUpload/FileUpload.types.ts +3 -0
- package/src/ui/FileUpload/index.js +2 -0
- package/src/ui/Flex/Flex.ai.md +130 -0
- package/src/ui/Flex/Flex.jsx +53 -0
- package/src/ui/Flex/Flex.scss +119 -0
- package/src/ui/Flex/Flex.spec.ts +12 -0
- package/src/ui/Flex/Flex.stories.jsx +14 -0
- package/src/ui/Flex/Flex.stories.tsx +14 -0
- package/src/ui/Flex/Flex.test.tsx +1 -0
- package/src/ui/Flex/Flex.tsx +6 -0
- package/src/ui/Flex/Flex.types.ts +3 -0
- package/src/ui/Flex/index.js +1 -0
- package/src/ui/Icon/Icon.ai.md +46 -0
- package/src/ui/Icon/Icon.figma.tsx +22 -0
- package/src/ui/Icon/Icon.jsx +47 -0
- package/src/ui/Icon/Icon.scss +1 -0
- package/src/ui/Icon/Icon.spec.ts +12 -0
- package/src/ui/Icon/Icon.stories.jsx +14 -0
- package/src/ui/Icon/Icon.stories.tsx +14 -0
- package/src/ui/Icon/Icon.test.tsx +1 -0
- package/src/ui/Icon/Icon.tsx +6 -0
- package/src/ui/Icon/Icon.types.ts +3 -0
- package/src/ui/Icon/index.js +1 -0
- package/src/ui/ImageAspect/ImageAspect.ai.md +37 -0
- package/src/ui/ImageAspect/ImageAspect.jsx +56 -0
- package/src/ui/ImageAspect/ImageAspect.scss +62 -0
- package/src/ui/ImageAspect/ImageAspect.spec.ts +12 -0
- package/src/ui/ImageAspect/ImageAspect.stories.jsx +14 -0
- package/src/ui/ImageAspect/ImageAspect.stories.tsx +14 -0
- package/src/ui/ImageAspect/ImageAspect.test.tsx +1 -0
- package/src/ui/ImageAspect/ImageAspect.tsx +6 -0
- package/src/ui/ImageAspect/ImageAspect.types.ts +3 -0
- package/src/ui/ImageAspect/index.js +1 -0
- package/src/ui/Input/Input.ai.md +89 -0
- package/src/ui/Input/Input.figma.tsx +35 -0
- package/src/ui/Input/Input.scss +126 -0
- package/src/ui/Input/Input.spec.ts +54 -0
- package/src/ui/Input/Input.stories.tsx +72 -0
- package/src/ui/Input/Input.test.tsx +70 -0
- package/src/ui/Input/Input.tsx +91 -0
- package/src/ui/Input/Input.types.ts +22 -0
- package/src/ui/Input/index.js +2 -0
- package/src/ui/Key/Key.ai.md +31 -0
- package/src/ui/Key/Key.jsx +37 -0
- package/src/ui/Key/Key.scss +31 -0
- package/src/ui/Key/Key.spec.ts +12 -0
- package/src/ui/Key/Key.stories.jsx +14 -0
- package/src/ui/Key/Key.stories.tsx +14 -0
- package/src/ui/Key/Key.test.tsx +1 -0
- package/src/ui/Key/Key.tsx +6 -0
- package/src/ui/Key/Key.types.ts +3 -0
- package/src/ui/Key/index.js +1 -0
- package/src/ui/Menu/Menu.jsx +232 -0
- package/src/ui/Menu/Menu.scss +370 -0
- package/src/ui/Menu/Menu.spec.ts +12 -0
- package/src/ui/Menu/Menu.stories.jsx +41 -0
- package/src/ui/Menu/Menu.stories.tsx +14 -0
- package/src/ui/Menu/Menu.test.tsx +1 -0
- package/src/ui/Menu/Menu.tsx +6 -0
- package/src/ui/Menu/Menu.types.ts +3 -0
- package/src/ui/Menu/index.js +1 -0
- package/src/ui/MicroCalendar/MicroCalendar.ai.md +35 -0
- package/src/ui/MicroCalendar/MicroCalendar.jsx +393 -0
- package/src/ui/MicroCalendar/MicroCalendar.scss +289 -0
- package/src/ui/MicroCalendar/MicroCalendar.spec.ts +12 -0
- package/src/ui/MicroCalendar/MicroCalendar.stories.jsx +14 -0
- package/src/ui/MicroCalendar/MicroCalendar.stories.tsx +14 -0
- package/src/ui/MicroCalendar/MicroCalendar.test.tsx +1 -0
- package/src/ui/MicroCalendar/MicroCalendar.tsx +6 -0
- package/src/ui/MicroCalendar/MicroCalendar.types.ts +3 -0
- package/src/ui/MicroCalendar/index.js +1 -0
- package/src/ui/Modal/Modal.ai.md +150 -0
- package/src/ui/Modal/Modal.jsx +173 -0
- package/src/ui/Modal/Modal.scss +179 -0
- package/src/ui/Modal/Modal.spec.ts +12 -0
- package/src/ui/Modal/Modal.stories.jsx +14 -0
- package/src/ui/Modal/Modal.stories.tsx +14 -0
- package/src/ui/Modal/Modal.test.tsx +1 -0
- package/src/ui/Modal/Modal.tsx +6 -0
- package/src/ui/Modal/Modal.types.ts +3 -0
- package/src/ui/Modal/index.js +1 -0
- package/src/ui/Pagination/Pagination.ai.md +30 -0
- package/src/ui/Pagination/Pagination.jsx +237 -0
- package/src/ui/Pagination/Pagination.scss +182 -0
- package/src/ui/Pagination/Pagination.spec.ts +12 -0
- package/src/ui/Pagination/Pagination.stories.jsx +14 -0
- package/src/ui/Pagination/Pagination.stories.tsx +14 -0
- package/src/ui/Pagination/Pagination.test.tsx +1 -0
- package/src/ui/Pagination/Pagination.tsx +6 -0
- package/src/ui/Pagination/Pagination.types.ts +3 -0
- package/src/ui/Pagination/index.js +1 -0
- package/src/ui/PillToggle/PillToggle.ai.md +44 -0
- package/src/ui/PillToggle/PillToggle.jsx +56 -0
- package/src/ui/PillToggle/PillToggle.scss +84 -0
- package/src/ui/PillToggle/PillToggle.spec.ts +12 -0
- package/src/ui/PillToggle/PillToggle.stories.jsx +14 -0
- package/src/ui/PillToggle/PillToggle.stories.tsx +14 -0
- package/src/ui/PillToggle/PillToggle.test.tsx +1 -0
- package/src/ui/PillToggle/PillToggle.tsx +6 -0
- package/src/ui/PillToggle/PillToggle.types.ts +3 -0
- package/src/ui/PillToggle/index.js +1 -0
- package/src/ui/Playground/Playground.ai.md +96 -0
- package/src/ui/Playground/Playground.jsx +524 -0
- package/src/ui/Playground/Playground.scss +310 -0
- package/src/ui/Playground/Playground.spec.ts +12 -0
- package/src/ui/Playground/Playground.stories.jsx +14 -0
- package/src/ui/Playground/Playground.stories.tsx +14 -0
- package/src/ui/Playground/Playground.test.tsx +1 -0
- package/src/ui/Playground/Playground.tsx +6 -0
- package/src/ui/Playground/Playground.types.ts +3 -0
- package/src/ui/Playground/index.js +2 -0
- package/src/ui/ProgressCircle/ProgressCircle.ai.md +36 -0
- package/src/ui/ProgressCircle/ProgressCircle.jsx +147 -0
- package/src/ui/ProgressCircle/ProgressCircle.scss +143 -0
- package/src/ui/ProgressCircle/ProgressCircle.spec.ts +12 -0
- package/src/ui/ProgressCircle/ProgressCircle.stories.jsx +14 -0
- package/src/ui/ProgressCircle/ProgressCircle.stories.tsx +14 -0
- package/src/ui/ProgressCircle/ProgressCircle.test.tsx +1 -0
- package/src/ui/ProgressCircle/ProgressCircle.tsx +6 -0
- package/src/ui/ProgressCircle/ProgressCircle.types.ts +3 -0
- package/src/ui/ProgressCircle/index.js +1 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.ai.md +27 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.jsx +92 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.scss +133 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.spec.ts +12 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.stories.jsx +14 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.stories.tsx +14 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.test.tsx +1 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.tsx +6 -0
- package/src/ui/ProgressIndicator/ProgressIndicator.types.ts +3 -0
- package/src/ui/ProgressIndicator/index.js +1 -0
- package/src/ui/Radio/Radio.ai.md +53 -0
- package/src/ui/Radio/Radio.jsx +57 -0
- package/src/ui/Radio/Radio.scss +89 -0
- package/src/ui/Radio/Radio.spec.ts +12 -0
- package/src/ui/Radio/Radio.stories.jsx +14 -0
- package/src/ui/Radio/Radio.stories.tsx +14 -0
- package/src/ui/Radio/Radio.test.tsx +1 -0
- package/src/ui/Radio/Radio.tsx +6 -0
- package/src/ui/Radio/Radio.types.ts +3 -0
- package/src/ui/Radio/index.js +1 -0
- package/src/ui/Slider/Slider.ai.md +33 -0
- package/src/ui/Slider/Slider.jsx +283 -0
- package/src/ui/Slider/Slider.scss +156 -0
- package/src/ui/Slider/Slider.spec.ts +12 -0
- package/src/ui/Slider/Slider.stories.jsx +14 -0
- package/src/ui/Slider/Slider.stories.tsx +14 -0
- package/src/ui/Slider/Slider.test.tsx +1 -0
- package/src/ui/Slider/Slider.tsx +6 -0
- package/src/ui/Slider/Slider.types.ts +3 -0
- package/src/ui/Slider/index.js +1 -0
- package/src/ui/Status/Status.ai.md +36 -0
- package/src/ui/Status/Status.jsx +66 -0
- package/src/ui/Status/Status.scss +90 -0
- package/src/ui/Status/Status.spec.ts +12 -0
- package/src/ui/Status/Status.stories.jsx +14 -0
- package/src/ui/Status/Status.stories.tsx +14 -0
- package/src/ui/Status/Status.test.tsx +1 -0
- package/src/ui/Status/Status.tsx +6 -0
- package/src/ui/Status/Status.types.ts +3 -0
- package/src/ui/Status/index.js +1 -0
- package/src/ui/Steps/Steps.ai.md +56 -0
- package/src/ui/Steps/Steps.jsx +201 -0
- package/src/ui/Steps/Steps.scss +240 -0
- package/src/ui/Steps/Steps.spec.ts +12 -0
- package/src/ui/Steps/Steps.stories.jsx +14 -0
- package/src/ui/Steps/Steps.stories.tsx +14 -0
- package/src/ui/Steps/Steps.test.tsx +1 -0
- package/src/ui/Steps/Steps.tsx +6 -0
- package/src/ui/Steps/Steps.types.ts +3 -0
- package/src/ui/Steps/index.js +1 -0
- package/src/ui/Table/Table.ai.md +108 -0
- package/src/ui/Table/Table.jsx +143 -0
- package/src/ui/Table/Table.scss +90 -0
- package/src/ui/Table/Table.spec.ts +12 -0
- package/src/ui/Table/Table.stories.jsx +14 -0
- package/src/ui/Table/Table.stories.tsx +14 -0
- package/src/ui/Table/Table.test.tsx +1 -0
- package/src/ui/Table/Table.tsx +6 -0
- package/src/ui/Table/Table.types.ts +3 -0
- package/src/ui/Table/index.js +1 -0
- package/src/ui/Tabs/TabItem.jsx +80 -0
- package/src/ui/Tabs/Tabs.ai.md +52 -0
- package/src/ui/Tabs/Tabs.figma.tsx +30 -0
- package/src/ui/Tabs/Tabs.jsx +318 -0
- package/src/ui/Tabs/Tabs.scss +164 -0
- package/src/ui/Tabs/Tabs.spec.ts +12 -0
- package/src/ui/Tabs/Tabs.stories.jsx +18 -0
- package/src/ui/Tabs/Tabs.stories.tsx +14 -0
- package/src/ui/Tabs/Tabs.test.tsx +1 -0
- package/src/ui/Tabs/Tabs.tsx +6 -0
- package/src/ui/Tabs/Tabs.types.ts +3 -0
- package/src/ui/Tabs/index.js +3 -0
- package/src/ui/Tag/Tag.ai.md +59 -0
- package/src/ui/Tag/Tag.figma.tsx +29 -0
- package/src/ui/Tag/Tag.jsx +93 -0
- package/src/ui/Tag/Tag.scss +258 -0
- package/src/ui/Tag/Tag.spec.ts +12 -0
- package/src/ui/Tag/Tag.stories.jsx +14 -0
- package/src/ui/Tag/Tag.stories.tsx +14 -0
- package/src/ui/Tag/Tag.test.tsx +1 -0
- package/src/ui/Tag/Tag.tsx +6 -0
- package/src/ui/Tag/Tag.types.ts +3 -0
- package/src/ui/Tag/index.js +2 -0
- package/src/ui/Textarea/Textarea.ai.md +40 -0
- package/src/ui/Textarea/Textarea.figma.tsx +35 -0
- package/src/ui/Textarea/Textarea.jsx +68 -0
- package/src/ui/Textarea/Textarea.scss +71 -0
- package/src/ui/Textarea/Textarea.spec.ts +12 -0
- package/src/ui/Textarea/Textarea.stories.jsx +14 -0
- package/src/ui/Textarea/Textarea.stories.tsx +14 -0
- package/src/ui/Textarea/Textarea.test.tsx +1 -0
- package/src/ui/Textarea/Textarea.tsx +6 -0
- package/src/ui/Textarea/Textarea.types.ts +3 -0
- package/src/ui/Textarea/index.js +2 -0
- package/src/ui/Toast/Toast.ai.md +47 -0
- package/src/ui/Toast/Toast.jsx +75 -0
- package/src/ui/Toast/Toast.scss +132 -0
- package/src/ui/Toast/Toast.spec.ts +12 -0
- package/src/ui/Toast/Toast.stories.jsx +14 -0
- package/src/ui/Toast/Toast.stories.tsx +14 -0
- package/src/ui/Toast/Toast.test.tsx +1 -0
- package/src/ui/Toast/Toast.tsx +6 -0
- package/src/ui/Toast/Toast.types.ts +3 -0
- package/src/ui/Toast/index.js +2 -0
- package/src/ui/Toggle/Toggle.ai.md +37 -0
- package/src/ui/Toggle/Toggle.jsx +73 -0
- package/src/ui/Toggle/Toggle.scss +139 -0
- package/src/ui/Toggle/Toggle.spec.ts +12 -0
- package/src/ui/Toggle/Toggle.stories.jsx +14 -0
- package/src/ui/Toggle/Toggle.stories.tsx +14 -0
- package/src/ui/Toggle/Toggle.test.tsx +1 -0
- package/src/ui/Toggle/Toggle.tsx +6 -0
- package/src/ui/Toggle/Toggle.types.ts +3 -0
- package/src/ui/Toggle/index.js +1 -0
- package/src/ui/Tooltip/Tooltip.ai.md +33 -0
- package/src/ui/Tooltip/Tooltip.figma.tsx +24 -0
- package/src/ui/Tooltip/Tooltip.jsx +125 -0
- package/src/ui/Tooltip/Tooltip.scss +80 -0
- package/src/ui/Tooltip/Tooltip.spec.ts +12 -0
- package/src/ui/Tooltip/Tooltip.stories.jsx +14 -0
- package/src/ui/Tooltip/Tooltip.stories.tsx +14 -0
- package/src/ui/Tooltip/Tooltip.test.tsx +1 -0
- package/src/ui/Tooltip/Tooltip.tsx +6 -0
- package/src/ui/Tooltip/Tooltip.types.ts +3 -0
- package/src/ui/Tooltip/index.js +2 -0
- package/src/ui/UDS/UDS.jsx +52 -0
- package/src/ui/UDS/UDS.scss +49 -0
- package/src/ui/UDS/UDS.spec.ts +12 -0
- package/src/ui/UDS/UDS.stories.jsx +22 -0
- package/src/ui/UDS/UDS.stories.tsx +14 -0
- package/src/ui/UDS/UDS.test.tsx +1 -0
- package/src/ui/UDS/UDS.tsx +6 -0
- package/src/ui/UDS/UDS.types.ts +3 -0
- package/src/ui/UDS/index.js +1 -0
- package/src/ui/_spec/createMetaFromSpec.ts +35 -0
- package/src/ui/_spec/createStoryArgsFromSpec.ts +8 -0
- package/src/ui/_spec/generated/spec-props-reference.md +55 -0
- package/src/ui/_spec/specStorySync.test.ts +73 -0
- package/src/ui/_spec/types.ts +21 -0
- package/src/ui/index.js +66 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { MouseEvent, ReactNode } from "react";
|
|
2
|
+
import "./Button.scss";
|
|
3
|
+
import Icon from "../Icon/Icon";
|
|
4
|
+
import {
|
|
5
|
+
BUTTON_BASE_CLASS,
|
|
6
|
+
BUTTON_CLASS_MAP,
|
|
7
|
+
BUTTON_DEFAULTS,
|
|
8
|
+
} from "./Button.spec";
|
|
9
|
+
import type { ButtonProps, ButtonTracking } from "./Button.types";
|
|
10
|
+
|
|
11
|
+
const IconComponent = Icon as any;
|
|
12
|
+
|
|
13
|
+
const isTrackingObject = (
|
|
14
|
+
value: ButtonTracking,
|
|
15
|
+
): value is Exclude<ButtonTracking, string> =>
|
|
16
|
+
typeof value === "object" && value !== null;
|
|
17
|
+
|
|
18
|
+
const toIconNode = (
|
|
19
|
+
icon: ButtonProps["icon"],
|
|
20
|
+
iconSize: ButtonProps["iconSize"],
|
|
21
|
+
): ReactNode | null => {
|
|
22
|
+
if (!icon) return null;
|
|
23
|
+
if (typeof icon === "string") {
|
|
24
|
+
return <IconComponent name={icon} size={iconSize} appearance="regular" />;
|
|
25
|
+
}
|
|
26
|
+
return icon;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default function Button({
|
|
30
|
+
label,
|
|
31
|
+
appearance = BUTTON_DEFAULTS.appearance,
|
|
32
|
+
layout = BUTTON_DEFAULTS.layout,
|
|
33
|
+
size = BUTTON_DEFAULTS.size,
|
|
34
|
+
icon,
|
|
35
|
+
iconSize,
|
|
36
|
+
icons,
|
|
37
|
+
children,
|
|
38
|
+
tracking,
|
|
39
|
+
"aria-label": ariaLabel,
|
|
40
|
+
className,
|
|
41
|
+
onClick,
|
|
42
|
+
...rest
|
|
43
|
+
}: ButtonProps) {
|
|
44
|
+
const classNames = [
|
|
45
|
+
BUTTON_BASE_CLASS,
|
|
46
|
+
appearance !== BUTTON_DEFAULTS.appearance &&
|
|
47
|
+
BUTTON_CLASS_MAP.appearance[appearance],
|
|
48
|
+
layout !== BUTTON_DEFAULTS.layout && BUTTON_CLASS_MAP.layout[layout],
|
|
49
|
+
size !== BUTTON_DEFAULTS.size && BUTTON_CLASS_MAP.size[size],
|
|
50
|
+
className,
|
|
51
|
+
]
|
|
52
|
+
.filter(Boolean)
|
|
53
|
+
.join(" ");
|
|
54
|
+
|
|
55
|
+
const isIconOnly = layout === "icon-only" || layout === "only";
|
|
56
|
+
const hasVisibleLabel = Boolean(label) && !isIconOnly;
|
|
57
|
+
|
|
58
|
+
const iconComponent = toIconNode(icon, iconSize);
|
|
59
|
+
const iconContent = iconComponent || icons || children;
|
|
60
|
+
|
|
61
|
+
const iconNode = iconContent ? (
|
|
62
|
+
<span
|
|
63
|
+
className={`${BUTTON_BASE_CLASS}__icon`}
|
|
64
|
+
aria-hidden={hasVisibleLabel ? "true" : undefined}
|
|
65
|
+
>
|
|
66
|
+
{iconContent}
|
|
67
|
+
</span>
|
|
68
|
+
) : null;
|
|
69
|
+
|
|
70
|
+
const labelNode = label ? (
|
|
71
|
+
<span className={`${BUTTON_BASE_CLASS}__label`}>{label}</span>
|
|
72
|
+
) : null;
|
|
73
|
+
|
|
74
|
+
const renderContent = (): ReactNode => {
|
|
75
|
+
switch (layout) {
|
|
76
|
+
case "icon-left":
|
|
77
|
+
return (
|
|
78
|
+
<>
|
|
79
|
+
{iconNode}
|
|
80
|
+
{labelNode}
|
|
81
|
+
</>
|
|
82
|
+
);
|
|
83
|
+
case "icon-right":
|
|
84
|
+
return (
|
|
85
|
+
<>
|
|
86
|
+
{labelNode}
|
|
87
|
+
{iconNode}
|
|
88
|
+
</>
|
|
89
|
+
);
|
|
90
|
+
case "icon-only":
|
|
91
|
+
case "only":
|
|
92
|
+
return iconNode || labelNode;
|
|
93
|
+
case "label-only":
|
|
94
|
+
default:
|
|
95
|
+
return labelNode || iconNode;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const isDisabled = appearance === "disabled" || rest.disabled;
|
|
100
|
+
|
|
101
|
+
const handleClick = (e: MouseEvent<HTMLButtonElement>) => {
|
|
102
|
+
if (tracking) {
|
|
103
|
+
const payload = {
|
|
104
|
+
component: "Button",
|
|
105
|
+
action: "click",
|
|
106
|
+
label,
|
|
107
|
+
...(isTrackingObject(tracking) ? tracking : { event: tracking }),
|
|
108
|
+
};
|
|
109
|
+
window.dispatchEvent(new CustomEvent("uds:track", { detail: payload }));
|
|
110
|
+
}
|
|
111
|
+
onClick?.(e);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const buttonAriaLabel =
|
|
115
|
+
ariaLabel ||
|
|
116
|
+
(isIconOnly && label ? label : undefined) ||
|
|
117
|
+
(isIconOnly && typeof icon === "string" ? `${icon} icon` : undefined);
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<button
|
|
121
|
+
type="button"
|
|
122
|
+
className={classNames}
|
|
123
|
+
disabled={isDisabled}
|
|
124
|
+
aria-label={buttonAriaLabel || undefined}
|
|
125
|
+
onClick={handleClick}
|
|
126
|
+
{...rest}
|
|
127
|
+
>
|
|
128
|
+
{renderContent()}
|
|
129
|
+
</button>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
BUTTON_APPEARANCES,
|
|
4
|
+
BUTTON_LAYOUTS,
|
|
5
|
+
BUTTON_SIZES,
|
|
6
|
+
} from "./Button.spec";
|
|
7
|
+
|
|
8
|
+
export type ButtonLayout = (typeof BUTTON_LAYOUTS)[number];
|
|
9
|
+
export type ButtonAppearance = (typeof BUTTON_APPEARANCES)[number];
|
|
10
|
+
export type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
11
|
+
|
|
12
|
+
export type ButtonTracking =
|
|
13
|
+
| string
|
|
14
|
+
| {
|
|
15
|
+
event?: string;
|
|
16
|
+
category?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export interface ButtonProps
|
|
21
|
+
extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
22
|
+
label?: string;
|
|
23
|
+
appearance?: ButtonAppearance;
|
|
24
|
+
layout?: ButtonLayout;
|
|
25
|
+
size?: ButtonSize;
|
|
26
|
+
icon?: string | ReactNode;
|
|
27
|
+
iconSize?: number;
|
|
28
|
+
icons?: ReactNode;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
tracking?: ButtonTracking;
|
|
31
|
+
"aria-label"?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Button";
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Calendar
|
|
2
|
+
|
|
3
|
+
A full-size calendar component for displaying events, scheduling, and date navigation. Supports multi-day spanning events that cross week and month boundaries. Events are rendered as lightweight inline bars within the calendar grid.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
- Displaying a full monthly or weekly calendar view
|
|
7
|
+
- Showing events that span multiple days, weeks, or months
|
|
8
|
+
- Building scheduling or booking interfaces
|
|
9
|
+
- Team calendar or project timeline views
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
| Prop | Type | Default | Values | Description |
|
|
14
|
+
|------|------|---------|--------|-------------|
|
|
15
|
+
| `view` | `string` | `"month"` | `"month"`, `"week"` | Display mode |
|
|
16
|
+
| `defaultDate` | `Date` | Today | Any Date | Initial date to display |
|
|
17
|
+
| `value` | `Date` | — | Any Date | Selected date (controlled) |
|
|
18
|
+
| `events` | `array` | `[]` | Event objects | Array of event objects |
|
|
19
|
+
| `onDateSelect` | `function` | — | `(date) => void` | Callback when date is clicked |
|
|
20
|
+
| `onEventClick` | `function` | — | `(event, e) => void` | Callback when event is clicked |
|
|
21
|
+
| `maxEventsPerDay` | `number` | `3` | Any number | Max event rows before "+N more" |
|
|
22
|
+
| `showWeekNumbers` | `boolean` | `false` | `true`, `false` | Show ISO week number column |
|
|
23
|
+
| `size` | `string` | `"default"` | `"default"`, `"compact"` | Size variant |
|
|
24
|
+
| `className` | `string` | `""` | Any CSS class | Additional CSS classes |
|
|
25
|
+
|
|
26
|
+
## Event Object Shape
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
{
|
|
30
|
+
id: "evt-1", // Unique identifier (string or number)
|
|
31
|
+
title: "Conference", // Display title (required)
|
|
32
|
+
startDate: "2025-03-10", // Start date — Date object or "YYYY-MM-DD" (required)
|
|
33
|
+
endDate: "2025-03-14", // End date — for multi-day events (optional)
|
|
34
|
+
type: "travel", // "travel" (blue) | "assignment" (orange) | "unassigned" (gray)
|
|
35
|
+
status: "active", // "active" (solid fill) | "past" (muted) | "pending" (striped)
|
|
36
|
+
startTime: "09:00", // Optional — prepended to title for timed events
|
|
37
|
+
endTime: "17:00", // Optional
|
|
38
|
+
allDay: true, // Optional — forces spanning rendering
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Backward compatible:** `date` works as an alias for `startDate`.
|
|
43
|
+
|
|
44
|
+
## Event Type × Status Color Matrix
|
|
45
|
+
|
|
46
|
+
| Type | Active | Past | Pending |
|
|
47
|
+
|------|--------|------|---------|
|
|
48
|
+
| `"travel"` | Primary blue fill, white text | Neutral gray fill | Cyan bg + diagonal stripe |
|
|
49
|
+
| `"assignment"` | Secondary fill, white text | Neutral gray fill | Aqua bg + diagonal stripe |
|
|
50
|
+
| `"unassigned"` | Neutral 500 fill, white text | Neutral 100 fill | Neutral bg + diagonal stripe |
|
|
51
|
+
|
|
52
|
+
## Code Examples
|
|
53
|
+
|
|
54
|
+
### Basic Calendar
|
|
55
|
+
```jsx
|
|
56
|
+
import { Calendar } from "@mich8060/chg-design-system";
|
|
57
|
+
|
|
58
|
+
<Calendar />
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Multi-Day Spanning Events
|
|
62
|
+
```jsx
|
|
63
|
+
import { Calendar } from "@mich8060/chg-design-system";
|
|
64
|
+
|
|
65
|
+
const events = [
|
|
66
|
+
{
|
|
67
|
+
id: "s1",
|
|
68
|
+
title: "Company Retreat",
|
|
69
|
+
startDate: new Date(2025, 2, 3),
|
|
70
|
+
endDate: new Date(2025, 2, 7),
|
|
71
|
+
type: "travel",
|
|
72
|
+
status: "active",
|
|
73
|
+
allDay: true,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "s2",
|
|
77
|
+
title: "Sprint 42",
|
|
78
|
+
startDate: new Date(2025, 2, 10),
|
|
79
|
+
endDate: new Date(2025, 2, 21),
|
|
80
|
+
type: "assignment",
|
|
81
|
+
status: "active",
|
|
82
|
+
allDay: true,
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
<Calendar events={events} />
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Mixed Events (Spanning + Timed)
|
|
90
|
+
```jsx
|
|
91
|
+
const events = [
|
|
92
|
+
// Multi-day (spanning bar)
|
|
93
|
+
{ id: "s1", title: "Conference", startDate: new Date(2025, 2, 10), endDate: new Date(2025, 2, 14), type: "travel", status: "active", allDay: true },
|
|
94
|
+
// Single-day (timed bar with time prefix)
|
|
95
|
+
{ id: "e1", title: "Standup", startDate: new Date(2025, 2, 10), type: "travel", status: "active", startTime: "09:00" },
|
|
96
|
+
{ id: "e2", title: "Review", startDate: new Date(2025, 2, 12), type: "assignment", status: "past", startTime: "14:00" },
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
<Calendar events={events} onEventClick={(evt) => console.log(evt)} />
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Week View
|
|
103
|
+
```jsx
|
|
104
|
+
<Calendar view="week" events={events} />
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Compact with Date Selection
|
|
108
|
+
```jsx
|
|
109
|
+
const [selected, setSelected] = useState(null);
|
|
110
|
+
|
|
111
|
+
<Calendar
|
|
112
|
+
size="compact"
|
|
113
|
+
value={selected}
|
|
114
|
+
onDateSelect={setSelected}
|
|
115
|
+
events={events}
|
|
116
|
+
/>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### With Week Numbers
|
|
120
|
+
```jsx
|
|
121
|
+
<Calendar showWeekNumbers events={events} />
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Key Behaviors
|
|
125
|
+
- **Inline event bars** — Calendar renders its own lightweight event bars (not EventCard). For standalone rich event display, use the `EventCard` component.
|
|
126
|
+
- **Multi-day events** render as horizontal bars spanning across day columns
|
|
127
|
+
- **Week-crossing events** automatically wrap to the next week row
|
|
128
|
+
- **Month-crossing events** show continuation from/to adjacent months
|
|
129
|
+
- **Lane assignment** stacks overlapping events vertically with no overlap
|
|
130
|
+
- **Overflow** shows "+N more" when events exceed `maxEventsPerDay`
|
|
131
|
+
- **Start/end caps** — Bars have rounded corners at span start, flat at continuation points
|
|
132
|
+
|
|
133
|
+
## Composition
|
|
134
|
+
- Renders its own inline event bars (no dependency on EventCard)
|
|
135
|
+
- Uses `Button` for navigation controls
|
|
136
|
+
- Combine with `PillToggle` for view switching
|
|
137
|
+
- For standalone event display in lists/dashboards, use `EventCard`
|
|
138
|
+
|
|
139
|
+
## Do's and Don'ts
|
|
140
|
+
- **Do** provide unique `id` values for each event
|
|
141
|
+
- **Do** use `startDate`/`endDate` for multi-day events
|
|
142
|
+
- **Do** set `type` and `status` for correct color styling
|
|
143
|
+
- **Don't** mix `date` and `startDate` on the same event
|
|
144
|
+
- **Do** use `allDay: true` for events that span entire days
|
|
145
|
+
- **Don't** set `maxEventsPerDay` too low — 2-4 is ideal
|
|
146
|
+
- **Don't** try to use `EventCard` inside Calendar — the calendar renders its own bars
|
|
147
|
+
|
|
148
|
+
## Accessibility
|
|
149
|
+
- Day cells are keyboard-navigable with `role="button"` and `tabIndex`
|
|
150
|
+
- Event bars are `<button>` elements when clickable
|
|
151
|
+
- ARIA labels include full date context
|