@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,330 @@
|
|
|
1
|
+
import React, { useState, useMemo } from "react";
|
|
2
|
+
import Button from "../Button/Button";
|
|
3
|
+
import "./Datepicker.scss";
|
|
4
|
+
|
|
5
|
+
const BASE_CLASS = "uds-datepicker";
|
|
6
|
+
|
|
7
|
+
const DAYS_OF_WEEK = ["S", "M", "T", "W", "T", "F", "S"];
|
|
8
|
+
const MONTHS = [
|
|
9
|
+
"January",
|
|
10
|
+
"February",
|
|
11
|
+
"March",
|
|
12
|
+
"April",
|
|
13
|
+
"May",
|
|
14
|
+
"June",
|
|
15
|
+
"July",
|
|
16
|
+
"August",
|
|
17
|
+
"September",
|
|
18
|
+
"October",
|
|
19
|
+
"November",
|
|
20
|
+
"December",
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Datepicker component - A calendar component for date selection with range support
|
|
25
|
+
* @param {Date} value - Selected date (optional)
|
|
26
|
+
* @param {Date} startDate - Start date for range selection (optional)
|
|
27
|
+
* @param {Date} endDate - End date for range selection (optional)
|
|
28
|
+
* @param {Date} month - Month to display (default: current month)
|
|
29
|
+
* @param {function} onDateSelect - Callback when a date is selected: (date: Date) => void
|
|
30
|
+
* @param {array} unavailableDates - Array of dates that are unavailable
|
|
31
|
+
* @param {object} dateData - Object mapping dates to data (travel, onAssignment)
|
|
32
|
+
* @param {string} size - Calendar size: 'desktop' or 'mobile' (default: 'desktop')
|
|
33
|
+
* @param {boolean} showWeekdays - Whether to show weekday header (default: true)
|
|
34
|
+
* @param {string} className - Additional CSS classes
|
|
35
|
+
* @param {object} props - Additional props
|
|
36
|
+
*/
|
|
37
|
+
export default function Datepicker({
|
|
38
|
+
value,
|
|
39
|
+
startDate,
|
|
40
|
+
endDate,
|
|
41
|
+
month,
|
|
42
|
+
onDateSelect,
|
|
43
|
+
unavailableDates = [],
|
|
44
|
+
dateData = {},
|
|
45
|
+
size = "desktop",
|
|
46
|
+
showWeekdays = true,
|
|
47
|
+
className = "",
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
const [currentMonth, setCurrentMonth] = useState(month || new Date());
|
|
51
|
+
const today = new Date();
|
|
52
|
+
today.setHours(0, 0, 0, 0);
|
|
53
|
+
|
|
54
|
+
const year = currentMonth.getFullYear();
|
|
55
|
+
const monthIndex = currentMonth.getMonth();
|
|
56
|
+
|
|
57
|
+
// Get first day of month and number of days
|
|
58
|
+
const firstDay = new Date(year, monthIndex, 1);
|
|
59
|
+
const lastDay = new Date(year, monthIndex + 1, 0);
|
|
60
|
+
const daysInMonth = lastDay.getDate();
|
|
61
|
+
const startingDayOfWeek = firstDay.getDay();
|
|
62
|
+
|
|
63
|
+
// Generate calendar days
|
|
64
|
+
const calendarDays = useMemo(() => {
|
|
65
|
+
const days = [];
|
|
66
|
+
|
|
67
|
+
// Add empty cells for days before month starts
|
|
68
|
+
for (let i = 0; i < startingDayOfWeek; i++) {
|
|
69
|
+
days.push(null);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Add days of the month
|
|
73
|
+
for (let day = 1; day <= daysInMonth; day++) {
|
|
74
|
+
const date = new Date(year, monthIndex, day);
|
|
75
|
+
date.setHours(0, 0, 0, 0);
|
|
76
|
+
days.push(date);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Add trailing empty cells to complete the last row
|
|
80
|
+
const remainder = days.length % 7;
|
|
81
|
+
if (remainder > 0) {
|
|
82
|
+
for (let i = 0; i < 7 - remainder; i++) {
|
|
83
|
+
days.push("trailing");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return days;
|
|
88
|
+
}, [year, monthIndex, startingDayOfWeek, daysInMonth]);
|
|
89
|
+
|
|
90
|
+
const isToday = (date) => {
|
|
91
|
+
if (!date) return false;
|
|
92
|
+
return date.getTime() === today.getTime();
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const isSelected = (date) => {
|
|
96
|
+
if (!date) return false;
|
|
97
|
+
if (value) {
|
|
98
|
+
const selectedDate = new Date(value);
|
|
99
|
+
selectedDate.setHours(0, 0, 0, 0);
|
|
100
|
+
return date.getTime() === selectedDate.getTime();
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const isInRange = (date) => {
|
|
106
|
+
if (!date || !startDate || !endDate) return false;
|
|
107
|
+
const checkDate = new Date(date);
|
|
108
|
+
checkDate.setHours(0, 0, 0, 0);
|
|
109
|
+
const start = new Date(startDate);
|
|
110
|
+
start.setHours(0, 0, 0, 0);
|
|
111
|
+
const end = new Date(endDate);
|
|
112
|
+
end.setHours(0, 0, 0, 0);
|
|
113
|
+
return checkDate >= start && checkDate <= end;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const isRangeStart = (date) => {
|
|
117
|
+
if (!date || !startDate) return false;
|
|
118
|
+
const checkDate = new Date(date);
|
|
119
|
+
checkDate.setHours(0, 0, 0, 0);
|
|
120
|
+
const start = new Date(startDate);
|
|
121
|
+
start.setHours(0, 0, 0, 0);
|
|
122
|
+
return checkDate.getTime() === start.getTime();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const isRangeEnd = (date) => {
|
|
126
|
+
if (!date || !endDate) return false;
|
|
127
|
+
const checkDate = new Date(date);
|
|
128
|
+
checkDate.setHours(0, 0, 0, 0);
|
|
129
|
+
const end = new Date(endDate);
|
|
130
|
+
end.setHours(0, 0, 0, 0);
|
|
131
|
+
return checkDate.getTime() === end.getTime();
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const isUnavailable = (date) => {
|
|
135
|
+
if (!date) return false;
|
|
136
|
+
return unavailableDates.some((unavail) => {
|
|
137
|
+
const unavailDate = new Date(unavail);
|
|
138
|
+
unavailDate.setHours(0, 0, 0, 0);
|
|
139
|
+
return date.getTime() === unavailDate.getTime();
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const getDateData = (date) => {
|
|
144
|
+
if (!date) return null;
|
|
145
|
+
const dateKey = date.toISOString().split("T")[0];
|
|
146
|
+
return dateData[dateKey] || null;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// Check if a date is the last day of a string of on-assignment days
|
|
150
|
+
const isLastOnAssignmentDay = (date, dateIndex) => {
|
|
151
|
+
if (!date || !getDateData(date)?.onAssignment) return false;
|
|
152
|
+
|
|
153
|
+
// Check next day in calendar
|
|
154
|
+
if (dateIndex < calendarDays.length - 1) {
|
|
155
|
+
const nextDate = calendarDays[dateIndex + 1];
|
|
156
|
+
if (nextDate && getDateData(nextDate)?.onAssignment) {
|
|
157
|
+
return false; // Next day also has onAssignment
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return true; // This is the last day
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const handleDateClick = (date) => {
|
|
164
|
+
if (date && !isUnavailable(date) && onDateSelect) {
|
|
165
|
+
onDateSelect(date);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const handlePrevMonth = () => {
|
|
170
|
+
setCurrentMonth(new Date(year, monthIndex - 1, 1));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const handleNextMonth = () => {
|
|
174
|
+
setCurrentMonth(new Date(year, monthIndex + 1, 1));
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const classNames = [
|
|
178
|
+
BASE_CLASS,
|
|
179
|
+
size === "mobile" && `${BASE_CLASS}--mobile`,
|
|
180
|
+
className,
|
|
181
|
+
]
|
|
182
|
+
.filter(Boolean)
|
|
183
|
+
.join(" ");
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<div className={classNames} {...props}>
|
|
187
|
+
{/* Header */}
|
|
188
|
+
<div className={`${BASE_CLASS}__header`}>
|
|
189
|
+
<Button icon="ArrowLeft" size="small" appearance="text" onClick={handlePrevMonth} aria-label="Previous month" />
|
|
190
|
+
<h3 className={`${BASE_CLASS}__title`}>
|
|
191
|
+
{MONTHS[monthIndex]} {year}
|
|
192
|
+
</h3>
|
|
193
|
+
<Button icon="ArrowRight" size="small" appearance="text" onClick={handleNextMonth} aria-label="Next month" />
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
{/* Weekday Header */}
|
|
197
|
+
{showWeekdays && (
|
|
198
|
+
<div className={`${BASE_CLASS}__weekdays`}>
|
|
199
|
+
{DAYS_OF_WEEK.map((day, index) => (
|
|
200
|
+
<div key={index} className={`${BASE_CLASS}__weekday`}>
|
|
201
|
+
{day}
|
|
202
|
+
</div>
|
|
203
|
+
))}
|
|
204
|
+
</div>
|
|
205
|
+
)}
|
|
206
|
+
|
|
207
|
+
{/* Calendar Grid */}
|
|
208
|
+
<div className={`${BASE_CLASS}__grid`}>
|
|
209
|
+
{calendarDays.map((date, index) => {
|
|
210
|
+
// Trailing empty cells (pad last row to 7)
|
|
211
|
+
if (date === "trailing") {
|
|
212
|
+
return (
|
|
213
|
+
<div
|
|
214
|
+
key={`trailing-${index}`}
|
|
215
|
+
className={`${BASE_CLASS}__day ${BASE_CLASS}__day--trailing-empty`}
|
|
216
|
+
/>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Leading empty cells (before first day of month)
|
|
221
|
+
if (!date) {
|
|
222
|
+
return (
|
|
223
|
+
<div
|
|
224
|
+
key={`empty-${index}`}
|
|
225
|
+
className={`${BASE_CLASS}__day ${BASE_CLASS}__day--empty`}
|
|
226
|
+
/>
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const dateInfo = getDateData(date);
|
|
231
|
+
const travel = dateInfo?.travel || false;
|
|
232
|
+
const onAssignment = dateInfo?.onAssignment || false;
|
|
233
|
+
const unavailable = isUnavailable(date);
|
|
234
|
+
const today = isToday(date);
|
|
235
|
+
const selected = isSelected(date);
|
|
236
|
+
const inRange = isInRange(date);
|
|
237
|
+
const rangeStart = isRangeStart(date);
|
|
238
|
+
const rangeEnd = isRangeEnd(date);
|
|
239
|
+
|
|
240
|
+
// Determine if this is first or last day of on-assignment string
|
|
241
|
+
const lastOnAssignment = isLastOnAssignmentDay(date, index);
|
|
242
|
+
|
|
243
|
+
// Determine icon order based on rules:
|
|
244
|
+
// - First day of on-assignment string with travel: travel comes first
|
|
245
|
+
// - Last day of on-assignment string with both: on-assignment comes first
|
|
246
|
+
// - Default: travel first, then on-assignment
|
|
247
|
+
const showAssignmentFirst = lastOnAssignment && travel && onAssignment;
|
|
248
|
+
|
|
249
|
+
let dayState = "available";
|
|
250
|
+
if (unavailable) {
|
|
251
|
+
dayState = "unavailable";
|
|
252
|
+
} else if (selected || rangeStart || rangeEnd) {
|
|
253
|
+
dayState = "selected";
|
|
254
|
+
} else if (inRange) {
|
|
255
|
+
dayState = "range";
|
|
256
|
+
} else if (onAssignment && !travel) {
|
|
257
|
+
dayState = "on-assignment";
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return (
|
|
261
|
+
<button
|
|
262
|
+
key={date.toISOString()}
|
|
263
|
+
type="button"
|
|
264
|
+
className={[
|
|
265
|
+
`${BASE_CLASS}__day`,
|
|
266
|
+
`${BASE_CLASS}__day--${dayState}`,
|
|
267
|
+
today && `${BASE_CLASS}__day--today`,
|
|
268
|
+
rangeStart && `${BASE_CLASS}__day--range-start`,
|
|
269
|
+
rangeEnd && `${BASE_CLASS}__day--range-end`,
|
|
270
|
+
]
|
|
271
|
+
.filter(Boolean)
|
|
272
|
+
.join(" ")}
|
|
273
|
+
onClick={() => handleDateClick(date)}
|
|
274
|
+
disabled={unavailable}
|
|
275
|
+
aria-label={`${date.getDate()} ${MONTHS[monthIndex]} ${year}`}
|
|
276
|
+
>
|
|
277
|
+
<span className={`${BASE_CLASS}__day-number`}>
|
|
278
|
+
{date.getDate()}
|
|
279
|
+
</span>
|
|
280
|
+
{unavailable && (
|
|
281
|
+
<span className={`${BASE_CLASS}__day-unavailable-line`} />
|
|
282
|
+
)}
|
|
283
|
+
{(travel || onAssignment) && (
|
|
284
|
+
<div className={`${BASE_CLASS}__icons`}>
|
|
285
|
+
{showAssignmentFirst ? (
|
|
286
|
+
// Last day: on-assignment first, then travel
|
|
287
|
+
<>
|
|
288
|
+
{onAssignment && (
|
|
289
|
+
<span className={`${BASE_CLASS}__icon ${BASE_CLASS}__icon--assignment`}>
|
|
290
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
291
|
+
<circle cx="8" cy="8" r="7.5" fill="#DBEAFF" stroke="#1D4ED7"/>
|
|
292
|
+
</svg>
|
|
293
|
+
</span>
|
|
294
|
+
)}
|
|
295
|
+
{travel && (
|
|
296
|
+
<span className={`${BASE_CLASS}__icon ${BASE_CLASS}__icon--travel`}>
|
|
297
|
+
<svg width="19" height="16" viewBox="0 0 19 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
298
|
+
<path d="M17.5791 15.4736H0.865265L9.22171 1L17.5791 15.4736Z" fill="#DCFCE7" stroke="#157F3D"/>
|
|
299
|
+
</svg>
|
|
300
|
+
</span>
|
|
301
|
+
)}
|
|
302
|
+
</>
|
|
303
|
+
) : (
|
|
304
|
+
// First day or default: travel first, then on-assignment
|
|
305
|
+
<>
|
|
306
|
+
{travel && (
|
|
307
|
+
<span className={`${BASE_CLASS}__icon ${BASE_CLASS}__icon--travel`}>
|
|
308
|
+
<svg width="19" height="16" viewBox="0 0 19 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
309
|
+
<path d="M17.5791 15.4736H0.865265L9.22171 1L17.5791 15.4736Z" fill="#DCFCE7" stroke="#157F3D"/>
|
|
310
|
+
</svg>
|
|
311
|
+
</span>
|
|
312
|
+
)}
|
|
313
|
+
{onAssignment && (
|
|
314
|
+
<span className={`${BASE_CLASS}__icon ${BASE_CLASS}__icon--assignment`}>
|
|
315
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
316
|
+
<circle cx="8" cy="8" r="7.5" fill="#DBEAFF" stroke="#1D4ED7"/>
|
|
317
|
+
</svg>
|
|
318
|
+
</span>
|
|
319
|
+
)}
|
|
320
|
+
</>
|
|
321
|
+
)}
|
|
322
|
+
</div>
|
|
323
|
+
)}
|
|
324
|
+
</button>
|
|
325
|
+
);
|
|
326
|
+
})}
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
);
|
|
330
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
@use "../../styles/typography" as *;
|
|
2
|
+
|
|
3
|
+
.uds-datepicker {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
width: fit-content;
|
|
7
|
+
min-width: 280px;
|
|
8
|
+
gap: 0px;
|
|
9
|
+
background: var(--uds-surface-primary);
|
|
10
|
+
border: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
11
|
+
border-radius: var(--uds-radius-8);
|
|
12
|
+
width: 450px;
|
|
13
|
+
|
|
14
|
+
&--mobile {
|
|
15
|
+
width: 375px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__header {
|
|
19
|
+
border-bottom: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
padding: var(--uds-spacing-12) var(--uds-spacing-16);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__title {
|
|
27
|
+
@include uds-body-16-semibold;
|
|
28
|
+
margin: 0;
|
|
29
|
+
color: var(--uds-text-primary);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__weekdays {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
padding: var(--uds-spacing-8) 0;
|
|
36
|
+
border-bottom: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__weekday {
|
|
40
|
+
@include uds-body-12-medium;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
flex: 1 1 0;
|
|
45
|
+
color: var(--uds-text-secondary);
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__grid {
|
|
50
|
+
background: var(--uds-surface-secondary);
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: row;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
border-bottom-left-radius: var(--uds-radius-8);
|
|
56
|
+
border-bottom-right-radius: var(--uds-radius-8);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__day {
|
|
60
|
+
all: unset;
|
|
61
|
+
@include uds-body-14;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
align-items: center;
|
|
66
|
+
position: relative;
|
|
67
|
+
flex: 1 1 calc(100% / 7);
|
|
68
|
+
aspect-ratio: 1;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
border-bottom: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
71
|
+
border-right: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
72
|
+
background: var(--uds-surface-primary);
|
|
73
|
+
color: var(--uds-text-primary);
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
padding: var(--uds-spacing-8);
|
|
76
|
+
transition: all var(--uds-animation-duration-200) var(--uds-animation-ease-standard);
|
|
77
|
+
max-width: calc(100% / 7);
|
|
78
|
+
gap: var(--uds-gap-8);
|
|
79
|
+
|
|
80
|
+
&:nth-child(7n) {
|
|
81
|
+
border-right: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Remove border-bottom from the last row (grid is always padded to full rows of 7)
|
|
85
|
+
&:nth-last-child(-n+7) {
|
|
86
|
+
border-bottom: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:hover:not(:disabled):not(&--selected):not(&--range):not(&--on-assignment) {
|
|
90
|
+
background: var(--uds-surface-secondary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:focus-visible {
|
|
94
|
+
outline: solid 2px var(--uds-border-focus);
|
|
95
|
+
outline-offset: 2px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--empty {
|
|
99
|
+
cursor: default;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
background: transparent;
|
|
102
|
+
border-right: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
103
|
+
border-bottom: var(--uds-border-width-1) solid var(--uds-border-primary);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&--trailing-empty {
|
|
107
|
+
cursor: default;
|
|
108
|
+
pointer-events: none;
|
|
109
|
+
background: transparent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&--selected {
|
|
113
|
+
background: var(--uds-system-action-primary);
|
|
114
|
+
color: var(--uds-text-inverse);
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--range {
|
|
119
|
+
background: var(--uds-color-primary-100);
|
|
120
|
+
color: var(--uds-text-primary);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&--range-start {
|
|
124
|
+
background: var(--uds-system-action-primary);
|
|
125
|
+
color: var(--uds-text-inverse);
|
|
126
|
+
font-weight: 600;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&--range-end {
|
|
130
|
+
background: var(--uds-system-action-primary);
|
|
131
|
+
color: var(--uds-text-inverse);
|
|
132
|
+
font-weight: 600;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&--today {
|
|
136
|
+
background: var(--uds-system-action-quaternary);
|
|
137
|
+
|
|
138
|
+
&.uds-datepicker__day--selected {
|
|
139
|
+
background: var(--uds-system-action-primary);
|
|
140
|
+
color: var(--uds-text-inverse);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&--unavailable {
|
|
145
|
+
background: var(--uds-system-destructive-quaternary);
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&--on-assignment {
|
|
150
|
+
background: var(--uds-color-primary-600);
|
|
151
|
+
color: var(--uds-text-inverse);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&__day-number {
|
|
156
|
+
@include uds-body-14;
|
|
157
|
+
color: inherit;
|
|
158
|
+
z-index: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&__day-unavailable-line {
|
|
162
|
+
position: absolute;
|
|
163
|
+
top: 50%;
|
|
164
|
+
left: 0;
|
|
165
|
+
right: 0;
|
|
166
|
+
height: 1px;
|
|
167
|
+
background: var(--uds-system-destructive-primary);
|
|
168
|
+
transform: translateY(-50%);
|
|
169
|
+
z-index: 2;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&__icons {
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
gap: var(--uds-spacing-2);
|
|
177
|
+
z-index: 1;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__icon {
|
|
181
|
+
&--travel {
|
|
182
|
+
svg {
|
|
183
|
+
width: 19px;
|
|
184
|
+
height: 16px;
|
|
185
|
+
display: block;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&--assignment {
|
|
190
|
+
svg {
|
|
191
|
+
width: 16px;
|
|
192
|
+
height: 16px;
|
|
193
|
+
display: block;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Mobile size adjustments
|
|
199
|
+
&--mobile {
|
|
200
|
+
width: 375px;
|
|
201
|
+
|
|
202
|
+
&__day {
|
|
203
|
+
min-height: 48px;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Divider
|
|
2
|
+
|
|
3
|
+
Visual separator for content sections with optional label and icon.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
- Separating content sections within a page or panel
|
|
7
|
+
- Visual break between groups of related items
|
|
8
|
+
- Section headers with divider lines
|
|
9
|
+
|
|
10
|
+
## Props
|
|
11
|
+
|
|
12
|
+
| Prop | Type | Default | Values | Description |
|
|
13
|
+
|------|------|---------|--------|-------------|
|
|
14
|
+
| `variant` | `string` | `"line"` | `"line"`, `"solid"` | Line divider or solid 8px block |
|
|
15
|
+
| `label` | `string` | — | — | Label text on the divider |
|
|
16
|
+
| `icon` | `string` | — | Phosphor icon name | Icon on the divider |
|
|
17
|
+
| `alignment` | `string` | `"center"` | `"left"`, `"center"`, `"right"` | Label/icon alignment (line variant only) |
|
|
18
|
+
| `labelWithIcon` | `boolean` | `false` | — | Show icon inline with label text |
|
|
19
|
+
| `className` | `string` | `""` | — | Additional CSS classes |
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
<Divider />
|
|
25
|
+
<Divider label="Or" />
|
|
26
|
+
<Divider label="Section Title" alignment="left" />
|
|
27
|
+
<Divider variant="solid" />
|
|
28
|
+
<Divider icon="Star" />
|
|
29
|
+
<Divider label="New Section" icon="Plus" labelWithIcon />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Note
|
|
33
|
+
- Has `role="separator"` for accessibility
|
|
34
|
+
- `solid` variant ignores label/icon props
|