@uni-design-system/uni-react 2.0.1 → 2.0.3
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/cjs/index.cjs +19769 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/index.js +19755 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/types/components/button/button.component.d.ts.map +1 -0
- package/dist/types/components/button/button.stories.d.ts.map +1 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/card/card.component.d.ts.map +1 -0
- package/dist/types/components/card/card.stories.d.ts.map +1 -0
- package/dist/types/components/card/index.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/DragHandle/dragHandle.component.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/DragHandle/index.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/SortableItem/index.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/SortableItem/sortableItem.component.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/SortableItem/sortableItem.context.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/SortableOverlay/index.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/SortableOverlay/sortableOverlay.component.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/components/index.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/index.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/mockData.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/sortableList.component.d.ts.map +1 -0
- package/dist/types/components/draggable/SortableList/sortableList.stories.d.ts.map +1 -0
- package/dist/types/components/draggable/index.d.ts.map +1 -0
- package/dist/types/components/draggable/utilities/createRange.d.ts.map +1 -0
- package/dist/types/components/draggable/utilities/index.d.ts.map +1 -0
- package/dist/types/components/forms/index.d.ts.map +1 -0
- package/dist/types/components/forms/text-input/index.d.ts.map +1 -0
- package/dist/types/components/forms/text-input/text-input.component.d.ts.map +1 -0
- package/dist/types/components/forms/utils/validations.d.ts.map +1 -0
- package/dist/types/components/grainy-gradient-background/grainy-gradient-background.component.d.ts.map +1 -0
- package/dist/types/components/grainy-gradient-background/grainy-gradient-background.component.stories.d.ts.map +1 -0
- package/dist/types/components/icon-text-row/icon-text-row.component.d.ts.map +1 -0
- package/dist/types/components/icon-text-row/icon-text-row.stories.d.ts.map +1 -0
- package/dist/types/components/icon-text-row/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/modal/index.d.ts.map +1 -0
- package/dist/types/components/modal/modal-close-button.component.d.ts.map +1 -0
- package/dist/types/components/modal/modal.component.d.ts.map +1 -0
- package/dist/types/components/modal/modal.stories.d.ts.map +1 -0
- package/dist/types/components/switch/index.d.ts.map +1 -0
- package/dist/types/components/switch/switch.component.d.ts.map +1 -0
- package/dist/types/components/switch/switch.config.d.ts.map +1 -0
- package/dist/types/components/switch/switch.stories.d.ts.map +1 -0
- package/dist/types/core/background/background.component.d.ts.map +1 -0
- package/dist/types/core/background/background.stories.d.ts.map +1 -0
- package/dist/types/core/background/index.d.ts.map +1 -0
- package/dist/types/core/border/border.style.d.ts.map +1 -0
- package/dist/types/core/border/index.d.ts.map +1 -0
- package/dist/types/core/container/container.component.d.ts.map +1 -0
- package/dist/types/core/container/index.d.ts.map +1 -0
- package/dist/types/core/filter/filter.argTypes.d.ts.map +1 -0
- package/dist/types/core/filter/filter.component.d.ts.map +1 -0
- package/dist/types/core/filter/filter.config.d.ts.map +1 -0
- package/dist/types/core/filter/filter.model.d.ts.map +1 -0
- package/dist/types/core/filter/filter.style.d.ts.map +1 -0
- package/dist/types/core/filter/filter.types.d.ts.map +1 -0
- package/dist/types/core/filter/index.d.ts.map +1 -0
- package/dist/types/core/flex/flex.component.d.ts.map +1 -0
- package/dist/types/core/flex/flex.style.d.ts.map +1 -0
- package/dist/types/core/flex/index.d.ts.map +1 -0
- package/dist/types/core/hooks/index.d.ts.map +1 -0
- package/dist/types/core/hooks/use-media.d.ts.map +1 -0
- package/dist/types/core/hooks/use-toggle.d.ts.map +1 -0
- package/dist/types/core/icon/icon.component.d.ts.map +1 -0
- package/dist/types/core/icon/icon.stories.d.ts.map +1 -0
- package/dist/types/core/icon/index.d.ts.map +1 -0
- package/dist/{core → types/core}/image/image.argTypes.d.ts.map +1 -1
- package/dist/types/core/image/image.component.d.ts.map +1 -0
- package/dist/types/core/image/image.model.d.ts.map +1 -0
- package/dist/types/core/image/image.stories.d.ts.map +1 -0
- package/dist/types/core/image/image.style.d.ts.map +1 -0
- package/dist/types/core/image/image.types.d.ts.map +1 -0
- package/dist/types/core/image/index.d.ts.map +1 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/layout/index.d.ts.map +1 -0
- package/dist/types/core/layout/layout.context.d.ts.map +1 -0
- package/dist/types/core/layout/layout.hook.d.ts.map +1 -0
- package/dist/types/core/layout/layout.provider.d.ts.map +1 -0
- package/dist/types/core/overlay/index.d.ts.map +1 -0
- package/dist/types/core/overlay/overlay.component.d.ts.map +1 -0
- package/dist/types/core/overlay/overlay.config.d.ts.map +1 -0
- package/dist/types/core/overlay/overlay.model.d.ts.map +1 -0
- package/dist/types/core/overlay/overlay.stories.d.ts.map +1 -0
- package/dist/types/core/padding/index.d.ts.map +1 -0
- package/dist/types/core/padding/padding.style.d.ts.map +1 -0
- package/dist/types/core/shadow/index.d.ts.map +1 -0
- package/dist/types/core/shadow/shadow.style.d.ts.map +1 -0
- package/dist/types/core/text/index.d.ts.map +1 -0
- package/dist/types/core/text/text.component.d.ts.map +1 -0
- package/dist/types/core/text/text.stories.d.ts.map +1 -0
- package/dist/types/core/theme/index.d.ts.map +1 -0
- package/dist/types/core/theme/theming.d.ts.map +1 -0
- package/dist/types/core/transition/collapse/collapse.component.d.ts.map +1 -0
- package/dist/types/core/transition/collapse/index.d.ts.map +1 -0
- package/dist/types/core/transition/fade/fade.argTypes.d.ts.map +1 -0
- package/dist/types/core/transition/fade/fade.component.d.ts.map +1 -0
- package/dist/types/core/transition/fade/fade.stories.d.ts.map +1 -0
- package/dist/types/core/transition/fade/index.d.ts.map +1 -0
- package/dist/types/core/transition/index.d.ts.map +1 -0
- package/dist/types/core/transition/slide/index.d.ts.map +1 -0
- package/dist/types/core/transition/slide/slide.component.d.ts.map +1 -0
- package/dist/types/core/transition/slide/slide.stories.d.ts.map +1 -0
- package/dist/types/core/transition/transition.argTypes.d.ts.map +1 -0
- package/dist/types/core/transition/transition.utils.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/layouts/parallax-hero/parallax-hero.component.d.ts.map +1 -0
- package/dist/types/layouts/parallax-hero/parallax-hero.model.d.ts.map +1 -0
- package/dist/types/stories/Button.d.ts.map +1 -0
- package/dist/types/stories/Button.stories.d.ts.map +1 -0
- package/dist/types/stories/Header.d.ts.map +1 -0
- package/dist/types/stories/Header.stories.d.ts.map +1 -0
- package/dist/types/stories/Page.d.ts.map +1 -0
- package/dist/types/stories/Page.stories.d.ts.map +1 -0
- package/dist/types/tools/color-picker/color-picker.component.d.ts.map +1 -0
- package/dist/types/tools/color-picker/color-picker.stories.d.ts.map +1 -0
- package/dist/types/tools/color-swatch/color-swatch.component.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/storage-manager.d.ts.map +1 -0
- package/package.json +18 -9
- package/.storybook/main.ts +0 -26
- package/.storybook/manager.ts +0 -13
- package/.storybook/preview.ts +0 -21
- package/.turbo/turbo-build.log +0 -12
- package/CHANGELOG.md +0 -32
- package/dist/components/button/button.component.d.ts.map +0 -1
- package/dist/components/button/button.stories.d.ts.map +0 -1
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/card/card.component.d.ts.map +0 -1
- package/dist/components/card/card.stories.d.ts.map +0 -1
- package/dist/components/card/index.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/DragHandle/dragHandle.component.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/DragHandle/index.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/SortableItem/index.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/SortableItem/sortableItem.component.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/SortableItem/sortableItem.context.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/SortableOverlay/index.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/SortableOverlay/sortableOverlay.component.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/components/index.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/index.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/mockData.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/sortableList.component.d.ts.map +0 -1
- package/dist/components/draggable/SortableList/sortableList.stories.d.ts.map +0 -1
- package/dist/components/draggable/index.d.ts.map +0 -1
- package/dist/components/draggable/utilities/createRange.d.ts.map +0 -1
- package/dist/components/draggable/utilities/index.d.ts.map +0 -1
- package/dist/components/forms/index.d.ts.map +0 -1
- package/dist/components/forms/text-input/index.d.ts.map +0 -1
- package/dist/components/forms/text-input/text-input.component.d.ts.map +0 -1
- package/dist/components/forms/utils/validations.d.ts.map +0 -1
- package/dist/components/grainy-gradient-background/grainy-gradient-background.component.d.ts.map +0 -1
- package/dist/components/grainy-gradient-background/grainy-gradient-background.component.stories.d.ts.map +0 -1
- package/dist/components/icon-text-row/icon-text-row.component.d.ts.map +0 -1
- package/dist/components/icon-text-row/icon-text-row.stories.d.ts.map +0 -1
- package/dist/components/icon-text-row/index.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/modal/index.d.ts.map +0 -1
- package/dist/components/modal/modal-close-button.component.d.ts.map +0 -1
- package/dist/components/modal/modal.component.d.ts.map +0 -1
- package/dist/components/modal/modal.stories.d.ts.map +0 -1
- package/dist/components/switch/index.d.ts.map +0 -1
- package/dist/components/switch/switch.component.d.ts.map +0 -1
- package/dist/components/switch/switch.config.d.ts.map +0 -1
- package/dist/components/switch/switch.stories.d.ts.map +0 -1
- package/dist/core/background/background.component.d.ts.map +0 -1
- package/dist/core/background/background.stories.d.ts.map +0 -1
- package/dist/core/background/index.d.ts.map +0 -1
- package/dist/core/border/border.style.d.ts.map +0 -1
- package/dist/core/border/index.d.ts.map +0 -1
- package/dist/core/container/container.component.d.ts.map +0 -1
- package/dist/core/container/index.d.ts.map +0 -1
- package/dist/core/filter/filter.argTypes.d.ts.map +0 -1
- package/dist/core/filter/filter.component.d.ts.map +0 -1
- package/dist/core/filter/filter.config.d.ts.map +0 -1
- package/dist/core/filter/filter.model.d.ts.map +0 -1
- package/dist/core/filter/filter.style.d.ts.map +0 -1
- package/dist/core/filter/filter.types.d.ts.map +0 -1
- package/dist/core/filter/index.d.ts.map +0 -1
- package/dist/core/flex/flex.component.d.ts.map +0 -1
- package/dist/core/flex/flex.style.d.ts.map +0 -1
- package/dist/core/flex/index.d.ts.map +0 -1
- package/dist/core/hooks/index.d.ts.map +0 -1
- package/dist/core/hooks/use-media.d.ts.map +0 -1
- package/dist/core/hooks/use-toggle.d.ts.map +0 -1
- package/dist/core/icon/icon.component.d.ts.map +0 -1
- package/dist/core/icon/icon.stories.d.ts.map +0 -1
- package/dist/core/icon/index.d.ts.map +0 -1
- package/dist/core/image/image.component.d.ts.map +0 -1
- package/dist/core/image/image.model.d.ts.map +0 -1
- package/dist/core/image/image.stories.d.ts.map +0 -1
- package/dist/core/image/image.style.d.ts.map +0 -1
- package/dist/core/image/image.types.d.ts.map +0 -1
- package/dist/core/image/index.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/layout/index.d.ts.map +0 -1
- package/dist/core/layout/layout.context.d.ts.map +0 -1
- package/dist/core/layout/layout.hook.d.ts.map +0 -1
- package/dist/core/layout/layout.provider.d.ts.map +0 -1
- package/dist/core/overlay/index.d.ts.map +0 -1
- package/dist/core/overlay/overlay.component.d.ts.map +0 -1
- package/dist/core/overlay/overlay.config.d.ts.map +0 -1
- package/dist/core/overlay/overlay.model.d.ts.map +0 -1
- package/dist/core/overlay/overlay.stories.d.ts.map +0 -1
- package/dist/core/padding/index.d.ts.map +0 -1
- package/dist/core/padding/padding.style.d.ts.map +0 -1
- package/dist/core/shadow/index.d.ts.map +0 -1
- package/dist/core/shadow/shadow.style.d.ts.map +0 -1
- package/dist/core/text/index.d.ts.map +0 -1
- package/dist/core/text/text.component.d.ts.map +0 -1
- package/dist/core/text/text.stories.d.ts.map +0 -1
- package/dist/core/theme/index.d.ts.map +0 -1
- package/dist/core/theme/theming.d.ts.map +0 -1
- package/dist/core/transition/collapse/collapse.component.d.ts.map +0 -1
- package/dist/core/transition/collapse/index.d.ts.map +0 -1
- package/dist/core/transition/fade/fade.argTypes.d.ts.map +0 -1
- package/dist/core/transition/fade/fade.component.d.ts.map +0 -1
- package/dist/core/transition/fade/fade.stories.d.ts.map +0 -1
- package/dist/core/transition/fade/index.d.ts.map +0 -1
- package/dist/core/transition/index.d.ts.map +0 -1
- package/dist/core/transition/slide/index.d.ts.map +0 -1
- package/dist/core/transition/slide/slide.component.d.ts.map +0 -1
- package/dist/core/transition/slide/slide.stories.d.ts.map +0 -1
- package/dist/core/transition/transition.argTypes.d.ts.map +0 -1
- package/dist/core/transition/transition.utils.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -13801
- package/dist/layouts/parallax-hero/parallax-hero.component.d.ts.map +0 -1
- package/dist/layouts/parallax-hero/parallax-hero.model.d.ts.map +0 -1
- package/dist/stories/Button.d.ts.map +0 -1
- package/dist/stories/Button.stories.d.ts.map +0 -1
- package/dist/stories/Header.d.ts.map +0 -1
- package/dist/stories/Header.stories.d.ts.map +0 -1
- package/dist/stories/Page.d.ts.map +0 -1
- package/dist/stories/Page.stories.d.ts.map +0 -1
- package/dist/tools/color-picker/color-picker.component.d.ts.map +0 -1
- package/dist/tools/color-picker/color-picker.stories.d.ts.map +0 -1
- package/dist/tools/color-swatch/color-swatch.component.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/storage-manager.d.ts.map +0 -1
- package/src/components/button/button.component.tsx +0 -138
- package/src/components/button/button.stories.tsx +0 -79
- package/src/components/button/index.ts +0 -1
- package/src/components/card/card.component.tsx +0 -61
- package/src/components/card/card.stories.tsx +0 -22
- package/src/components/card/index.ts +0 -1
- package/src/components/draggable/SortableList/components/DragHandle/dragHandle.component.tsx +0 -20
- package/src/components/draggable/SortableList/components/DragHandle/index.ts +0 -1
- package/src/components/draggable/SortableList/components/SortableItem/index.ts +0 -1
- package/src/components/draggable/SortableList/components/SortableItem/sortableItem.component.tsx +0 -54
- package/src/components/draggable/SortableList/components/SortableItem/sortableItem.context.ts +0 -14
- package/src/components/draggable/SortableList/components/SortableOverlay/index.ts +0 -1
- package/src/components/draggable/SortableList/components/SortableOverlay/sortableOverlay.component.tsx +0 -20
- package/src/components/draggable/SortableList/components/index.ts +0 -3
- package/src/components/draggable/SortableList/index.ts +0 -2
- package/src/components/draggable/SortableList/mockData.ts +0 -50
- package/src/components/draggable/SortableList/sortableList.component.tsx +0 -69
- package/src/components/draggable/SortableList/sortableList.stories.tsx +0 -71
- package/src/components/draggable/index.ts +0 -1
- package/src/components/draggable/utilities/createRange.ts +0 -8
- package/src/components/draggable/utilities/index.ts +0 -1
- package/src/components/forms/index.ts +0 -1
- package/src/components/forms/text-input/index.ts +0 -1
- package/src/components/forms/text-input/text-input.component.tsx +0 -14
- package/src/components/forms/utils/validations.ts +0 -62
- package/src/components/grainy-gradient-background/grainy-gradient-background.component.stories.tsx +0 -60
- package/src/components/grainy-gradient-background/grainy-gradient-background.component.tsx +0 -68
- package/src/components/icon-text-row/icon-text-row.component.tsx +0 -70
- package/src/components/icon-text-row/icon-text-row.stories.tsx +0 -18
- package/src/components/icon-text-row/index.ts +0 -1
- package/src/components/index.ts +0 -7
- package/src/components/modal/index.ts +0 -1
- package/src/components/modal/modal-close-button.component.tsx +0 -13
- package/src/components/modal/modal.component.tsx +0 -48
- package/src/components/modal/modal.stories.tsx +0 -25
- package/src/components/switch/index.ts +0 -1
- package/src/components/switch/switch.component.tsx +0 -59
- package/src/components/switch/switch.config.ts +0 -24
- package/src/components/switch/switch.stories.tsx +0 -12
- package/src/core/background/background.component.tsx +0 -47
- package/src/core/background/background.stories.tsx +0 -22
- package/src/core/background/index.ts +0 -1
- package/src/core/border/border.style.ts +0 -31
- package/src/core/border/index.ts +0 -1
- package/src/core/container/container.component.tsx +0 -20
- package/src/core/container/index.ts +0 -1
- package/src/core/filter/filter.argTypes.ts +0 -111
- package/src/core/filter/filter.component.tsx +0 -11
- package/src/core/filter/filter.config.ts +0 -68
- package/src/core/filter/filter.model.ts +0 -22
- package/src/core/filter/filter.style.ts +0 -22
- package/src/core/filter/filter.types.ts +0 -12
- package/src/core/filter/index.ts +0 -4
- package/src/core/flex/flex.component.tsx +0 -91
- package/src/core/flex/flex.style.ts +0 -106
- package/src/core/flex/index.ts +0 -2
- package/src/core/hooks/index.ts +0 -2
- package/src/core/hooks/use-media.ts +0 -29
- package/src/core/hooks/use-toggle.tsx +0 -23
- package/src/core/icon/icon.component.tsx +0 -19
- package/src/core/icon/icon.stories.tsx +0 -52
- package/src/core/icon/index.ts +0 -6
- package/src/core/image/image.argTypes.ts +0 -23
- package/src/core/image/image.component.tsx +0 -17
- package/src/core/image/image.model.ts +0 -10
- package/src/core/image/image.stories.tsx +0 -22
- package/src/core/image/image.style.ts +0 -19
- package/src/core/image/image.types.ts +0 -1
- package/src/core/image/index.ts +0 -2
- package/src/core/index.ts +0 -14
- package/src/core/layout/index.ts +0 -2
- package/src/core/layout/layout.context.tsx +0 -14
- package/src/core/layout/layout.hook.tsx +0 -11
- package/src/core/layout/layout.provider.tsx +0 -23
- package/src/core/overlay/index.ts +0 -2
- package/src/core/overlay/overlay.component.tsx +0 -27
- package/src/core/overlay/overlay.config.ts +0 -30
- package/src/core/overlay/overlay.model.ts +0 -13
- package/src/core/overlay/overlay.stories.tsx +0 -73
- package/src/core/padding/index.ts +0 -1
- package/src/core/padding/padding.style.ts +0 -35
- package/src/core/shadow/index.ts +0 -1
- package/src/core/shadow/shadow.style.ts +0 -5
- package/src/core/text/index.ts +0 -1
- package/src/core/text/text.component.tsx +0 -48
- package/src/core/text/text.stories.tsx +0 -66
- package/src/core/theme/index.ts +0 -1
- package/src/core/theme/theming.tsx +0 -30
- package/src/core/transition/collapse/collapse.component.tsx +0 -141
- package/src/core/transition/collapse/index.ts +0 -1
- package/src/core/transition/fade/fade.argTypes.ts +0 -5
- package/src/core/transition/fade/fade.component.tsx +0 -59
- package/src/core/transition/fade/fade.stories.tsx +0 -52
- package/src/core/transition/fade/index.ts +0 -1
- package/src/core/transition/index.ts +0 -3
- package/src/core/transition/slide/index.ts +0 -1
- package/src/core/transition/slide/slide.component.tsx +0 -111
- package/src/core/transition/slide/slide.stories.tsx +0 -38
- package/src/core/transition/transition.argTypes.ts +0 -10
- package/src/core/transition/transition.utils.ts +0 -165
- package/src/index.ts +0 -3
- package/src/layouts/parallax-hero/parallax-hero.component.tsx +0 -25
- package/src/layouts/parallax-hero/parallax-hero.model.ts +0 -12
- package/src/stories/Button.stories.ts +0 -54
- package/src/stories/Button.tsx +0 -37
- package/src/stories/Configure.mdx +0 -393
- package/src/stories/Header.stories.ts +0 -34
- package/src/stories/Header.tsx +0 -56
- package/src/stories/Page.stories.ts +0 -33
- package/src/stories/Page.tsx +0 -73
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -1
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -1
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -1
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -1
- package/src/stories/assets/youtube.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -68
- package/src/tools/color-picker/color-picker.component.tsx +0 -151
- package/src/tools/color-picker/color-picker.stories.tsx +0 -21
- package/src/tools/color-swatch/color-swatch.component.tsx +0 -68
- package/src/utils/index.ts +0 -1
- package/src/utils/storage-manager.ts +0 -51
- package/tsconfig.json +0 -13
- package/vite.config.ts +0 -29
- package/vitest.config.ts +0 -36
- package/vitest.shims.d.ts +0 -1
- /package/dist/{components → types/components}/button/button.component.d.ts +0 -0
- /package/dist/{components → types/components}/button/button.stories.d.ts +0 -0
- /package/dist/{components → types/components}/button/index.d.ts +0 -0
- /package/dist/{components → types/components}/card/card.component.d.ts +0 -0
- /package/dist/{components → types/components}/card/card.stories.d.ts +0 -0
- /package/dist/{components → types/components}/card/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/DragHandle/dragHandle.component.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/DragHandle/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/SortableItem/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/SortableItem/sortableItem.component.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/SortableItem/sortableItem.context.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/SortableOverlay/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/SortableOverlay/sortableOverlay.component.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/components/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/mockData.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/sortableList.component.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/SortableList/sortableList.stories.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/index.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/utilities/createRange.d.ts +0 -0
- /package/dist/{components → types/components}/draggable/utilities/index.d.ts +0 -0
- /package/dist/{components → types/components}/forms/index.d.ts +0 -0
- /package/dist/{components → types/components}/forms/text-input/index.d.ts +0 -0
- /package/dist/{components → types/components}/forms/text-input/text-input.component.d.ts +0 -0
- /package/dist/{components → types/components}/forms/utils/validations.d.ts +0 -0
- /package/dist/{components → types/components}/grainy-gradient-background/grainy-gradient-background.component.d.ts +0 -0
- /package/dist/{components → types/components}/grainy-gradient-background/grainy-gradient-background.component.stories.d.ts +0 -0
- /package/dist/{components → types/components}/icon-text-row/icon-text-row.component.d.ts +0 -0
- /package/dist/{components → types/components}/icon-text-row/icon-text-row.stories.d.ts +0 -0
- /package/dist/{components → types/components}/icon-text-row/index.d.ts +0 -0
- /package/dist/{components → types/components}/index.d.ts +0 -0
- /package/dist/{components → types/components}/modal/index.d.ts +0 -0
- /package/dist/{components → types/components}/modal/modal-close-button.component.d.ts +0 -0
- /package/dist/{components → types/components}/modal/modal.component.d.ts +0 -0
- /package/dist/{components → types/components}/modal/modal.stories.d.ts +0 -0
- /package/dist/{components → types/components}/switch/index.d.ts +0 -0
- /package/dist/{components → types/components}/switch/switch.component.d.ts +0 -0
- /package/dist/{components → types/components}/switch/switch.config.d.ts +0 -0
- /package/dist/{components → types/components}/switch/switch.stories.d.ts +0 -0
- /package/dist/{core → types/core}/background/background.component.d.ts +0 -0
- /package/dist/{core → types/core}/background/background.stories.d.ts +0 -0
- /package/dist/{core → types/core}/background/index.d.ts +0 -0
- /package/dist/{core → types/core}/border/border.style.d.ts +0 -0
- /package/dist/{core → types/core}/border/index.d.ts +0 -0
- /package/dist/{core → types/core}/container/container.component.d.ts +0 -0
- /package/dist/{core → types/core}/container/index.d.ts +0 -0
- /package/dist/{core → types/core}/filter/filter.argTypes.d.ts +0 -0
- /package/dist/{core → types/core}/filter/filter.component.d.ts +0 -0
- /package/dist/{core → types/core}/filter/filter.config.d.ts +0 -0
- /package/dist/{core → types/core}/filter/filter.model.d.ts +0 -0
- /package/dist/{core → types/core}/filter/filter.style.d.ts +0 -0
- /package/dist/{core → types/core}/filter/filter.types.d.ts +0 -0
- /package/dist/{core → types/core}/filter/index.d.ts +0 -0
- /package/dist/{core → types/core}/flex/flex.component.d.ts +0 -0
- /package/dist/{core → types/core}/flex/flex.style.d.ts +0 -0
- /package/dist/{core → types/core}/flex/index.d.ts +0 -0
- /package/dist/{core → types/core}/hooks/index.d.ts +0 -0
- /package/dist/{core → types/core}/hooks/use-media.d.ts +0 -0
- /package/dist/{core → types/core}/hooks/use-toggle.d.ts +0 -0
- /package/dist/{core → types/core}/icon/icon.component.d.ts +0 -0
- /package/dist/{core → types/core}/icon/icon.stories.d.ts +0 -0
- /package/dist/{core → types/core}/icon/index.d.ts +0 -0
- /package/dist/{core → types/core}/image/image.argTypes.d.ts +0 -0
- /package/dist/{core → types/core}/image/image.component.d.ts +0 -0
- /package/dist/{core → types/core}/image/image.model.d.ts +0 -0
- /package/dist/{core → types/core}/image/image.stories.d.ts +0 -0
- /package/dist/{core → types/core}/image/image.style.d.ts +0 -0
- /package/dist/{core → types/core}/image/image.types.d.ts +0 -0
- /package/dist/{core → types/core}/image/index.d.ts +0 -0
- /package/dist/{core → types/core}/index.d.ts +0 -0
- /package/dist/{core → types/core}/layout/index.d.ts +0 -0
- /package/dist/{core → types/core}/layout/layout.context.d.ts +0 -0
- /package/dist/{core → types/core}/layout/layout.hook.d.ts +0 -0
- /package/dist/{core → types/core}/layout/layout.provider.d.ts +0 -0
- /package/dist/{core → types/core}/overlay/index.d.ts +0 -0
- /package/dist/{core → types/core}/overlay/overlay.component.d.ts +0 -0
- /package/dist/{core → types/core}/overlay/overlay.config.d.ts +0 -0
- /package/dist/{core → types/core}/overlay/overlay.model.d.ts +0 -0
- /package/dist/{core → types/core}/overlay/overlay.stories.d.ts +0 -0
- /package/dist/{core → types/core}/padding/index.d.ts +0 -0
- /package/dist/{core → types/core}/padding/padding.style.d.ts +0 -0
- /package/dist/{core → types/core}/shadow/index.d.ts +0 -0
- /package/dist/{core → types/core}/shadow/shadow.style.d.ts +0 -0
- /package/dist/{core → types/core}/text/index.d.ts +0 -0
- /package/dist/{core → types/core}/text/text.component.d.ts +0 -0
- /package/dist/{core → types/core}/text/text.stories.d.ts +0 -0
- /package/dist/{core → types/core}/theme/index.d.ts +0 -0
- /package/dist/{core → types/core}/theme/theming.d.ts +0 -0
- /package/dist/{core → types/core}/transition/collapse/collapse.component.d.ts +0 -0
- /package/dist/{core → types/core}/transition/collapse/index.d.ts +0 -0
- /package/dist/{core → types/core}/transition/fade/fade.argTypes.d.ts +0 -0
- /package/dist/{core → types/core}/transition/fade/fade.component.d.ts +0 -0
- /package/dist/{core → types/core}/transition/fade/fade.stories.d.ts +0 -0
- /package/dist/{core → types/core}/transition/fade/index.d.ts +0 -0
- /package/dist/{core → types/core}/transition/index.d.ts +0 -0
- /package/dist/{core → types/core}/transition/slide/index.d.ts +0 -0
- /package/dist/{core → types/core}/transition/slide/slide.component.d.ts +0 -0
- /package/dist/{core → types/core}/transition/slide/slide.stories.d.ts +0 -0
- /package/dist/{core → types/core}/transition/transition.argTypes.d.ts +0 -0
- /package/dist/{core → types/core}/transition/transition.utils.d.ts +0 -0
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{layouts → types/layouts}/parallax-hero/parallax-hero.component.d.ts +0 -0
- /package/dist/{layouts → types/layouts}/parallax-hero/parallax-hero.model.d.ts +0 -0
- /package/dist/{stories → types/stories}/Button.d.ts +0 -0
- /package/dist/{stories → types/stories}/Button.stories.d.ts +0 -0
- /package/dist/{stories → types/stories}/Header.d.ts +0 -0
- /package/dist/{stories → types/stories}/Header.stories.d.ts +0 -0
- /package/dist/{stories → types/stories}/Page.d.ts +0 -0
- /package/dist/{stories → types/stories}/Page.stories.d.ts +0 -0
- /package/dist/{tools → types/tools}/color-picker/color-picker.component.d.ts +0 -0
- /package/dist/{tools → types/tools}/color-picker/color-picker.stories.d.ts +0 -0
- /package/dist/{tools → types/tools}/color-swatch/color-swatch.component.d.ts +0 -0
- /package/dist/{utils → types/utils}/index.d.ts +0 -0
- /package/dist/{utils → types/utils}/storage-manager.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parallax-hero.component.d.ts","sourceRoot":"","sources":["../../../src/layouts/parallax-hero/parallax-hero.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,eAAO,MAAM,YAAY,GAAI,sBAAsB,iBAAiB,KAAG,GAAG,CAAC,OAqB1E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parallax-hero.model.d.ts","sourceRoot":"","sources":["../../../src/layouts/parallax-hero/parallax-hero.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/stories/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,gDAAgD;AAChD,eAAO,MAAM,MAAM,GAAI,qDAMpB,WAAW,4CAYb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;CAeqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/stories/Header.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAC;AAEtB,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,MAAM,GAAI,8CAA8C,WAAW,4CAuC/E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Header.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAcqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../src/stories/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,YAAY,CAAC;AAMpB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EA+DxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Page.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,QAAA,MAAM,IAAI;;;;;;CAOmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC;AAGnC,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.component.d.ts","sourceRoot":"","sources":["../../../src/tools/color-picker/color-picker.component.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,oDAKzB,gBAAgB,KAAG,GAAG,CAAC,OAsIzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.stories.d.ts","sourceRoot":"","sources":["../../../src/tools/color-picker/color-picker.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;;;;;;;;AAEzE,wBAME;AAEF,eAAO,MAAM,qBAAqB;WAAU,gBAAgB;;CAA8B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-swatch.component.d.ts","sourceRoot":"","sources":["../../../src/tools/color-swatch/color-swatch.component.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAgB,GAAG,EAAY,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG3F,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,QAAqB,EACrB,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CA6ClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-manager.d.ts","sourceRoot":"","sources":["../../src/utils/storage-manager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,QAAQ,GAAG,cAAc,CAAC;IAChC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACrB;AAID,eAAO,MAAM,yBAAyB,GAAI,CAAC,EAAE,KAAK,MAAM,KAAG,cAAc,CAAC,CAAC,CAoBzE,CAAC;AASH,eAAO,MAAM,0BAA0B,GACrC,KAAK,MAAM,EACX,SAAS,MAAM,KACd,cAAc,CAAC,MAAM,CAUtB,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode, useEffect, useState } from 'react';
|
|
2
|
-
import { BoxShadow, Text, useLayout, useTheme } from '../../core';
|
|
3
|
-
import {
|
|
4
|
-
UniTheme,
|
|
5
|
-
ButtonType,
|
|
6
|
-
ColorToken,
|
|
7
|
-
Size,
|
|
8
|
-
ContentColorToken,
|
|
9
|
-
} from '@uni-design-system/uni-core';
|
|
10
|
-
import { IconTextRow } from '../icon-text-row';
|
|
11
|
-
import { IconName } from '../../core/icon';
|
|
12
|
-
import { useRipple } from 'use-ripple-hook';
|
|
13
|
-
|
|
14
|
-
export interface ButtonProps {
|
|
15
|
-
text?: string;
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
buttonType?: ButtonType;
|
|
18
|
-
active?: boolean;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
iconName?: IconName;
|
|
21
|
-
contentColor?: ContentColorToken;
|
|
22
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
23
|
-
disableRipple?: boolean;
|
|
24
|
-
style?: CSSProperties;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const Button = ({
|
|
28
|
-
text,
|
|
29
|
-
children,
|
|
30
|
-
buttonType = 'filled',
|
|
31
|
-
disabled = false,
|
|
32
|
-
iconName,
|
|
33
|
-
contentColor: overrideContentColor,
|
|
34
|
-
onClick,
|
|
35
|
-
disableRipple = false,
|
|
36
|
-
style: userStyle,
|
|
37
|
-
...rest
|
|
38
|
-
}: ButtonProps): JSX.Element => {
|
|
39
|
-
const { deviceSize } = useLayout();
|
|
40
|
-
const theme = useTheme();
|
|
41
|
-
const [ref, createRipple] = useRipple({ disabled: disableRipple || buttonType === 'elevated' });
|
|
42
|
-
const buttonProps = theme.buttons[buttonType];
|
|
43
|
-
|
|
44
|
-
const getOnColorToken = (color: ColorToken) => `on-${color}` as ContentColorToken;
|
|
45
|
-
const contentColor = overrideContentColor || getOnColorToken(buttonProps.color);
|
|
46
|
-
|
|
47
|
-
const [hover, setHover] = useState<boolean>(false);
|
|
48
|
-
const [click, setClick] = useState<boolean>(false);
|
|
49
|
-
|
|
50
|
-
const style = Style(theme, buttonType, deviceSize, hover, disabled, click);
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
setTimeout(() => {
|
|
54
|
-
setClick(false);
|
|
55
|
-
}, 250);
|
|
56
|
-
}, [click]);
|
|
57
|
-
|
|
58
|
-
const handleClick = (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
|
|
59
|
-
setClick(true);
|
|
60
|
-
onClick && onClick(event);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<button
|
|
65
|
-
onMouseDown={createRipple}
|
|
66
|
-
onMouseEnter={() => setHover(true)}
|
|
67
|
-
onMouseLeave={() => setHover(false)}
|
|
68
|
-
onClick={handleClick}
|
|
69
|
-
disabled={disabled}
|
|
70
|
-
style={{ ...style, ...userStyle }}
|
|
71
|
-
ref={ref}
|
|
72
|
-
{...rest}
|
|
73
|
-
>
|
|
74
|
-
{iconName ? (
|
|
75
|
-
<IconTextRow iconName={iconName} color={contentColor} textRole="button">
|
|
76
|
-
{text || children}
|
|
77
|
-
</IconTextRow>
|
|
78
|
-
) : (
|
|
79
|
-
<Text align="center" role="button" colorToken={contentColor}>
|
|
80
|
-
{text || children}
|
|
81
|
-
</Text>
|
|
82
|
-
)}
|
|
83
|
-
</button>
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
function Style(
|
|
88
|
-
theme: UniTheme,
|
|
89
|
-
buttonType: ButtonType,
|
|
90
|
-
size: Size = 'md',
|
|
91
|
-
hover: boolean,
|
|
92
|
-
disabled: boolean,
|
|
93
|
-
click: boolean
|
|
94
|
-
): CSSProperties {
|
|
95
|
-
const {
|
|
96
|
-
color,
|
|
97
|
-
horizontalPadding,
|
|
98
|
-
verticalPadding,
|
|
99
|
-
borderColor,
|
|
100
|
-
borderWidth,
|
|
101
|
-
borderRadius,
|
|
102
|
-
contentColor,
|
|
103
|
-
} = theme.buttons[buttonType];
|
|
104
|
-
|
|
105
|
-
const styles: CSSProperties = {
|
|
106
|
-
overflow: 'hidden',
|
|
107
|
-
transition: 'all 0.3s cubic-bezier(.25,.8,.25,1)',
|
|
108
|
-
cursor: 'pointer',
|
|
109
|
-
paddingTop: verticalPadding[size] + 'px',
|
|
110
|
-
paddingBottom: verticalPadding[size] + 'px',
|
|
111
|
-
paddingLeft: horizontalPadding[size] + 'px',
|
|
112
|
-
paddingRight: horizontalPadding[size] + 'px',
|
|
113
|
-
borderRadius: borderRadius + 'px',
|
|
114
|
-
backgroundColor: theme.colors[color],
|
|
115
|
-
borderColor: theme.colors[borderColor as ColorToken],
|
|
116
|
-
borderWidth: borderWidth + 'px',
|
|
117
|
-
borderStyle: buttonType === 'outlined' ? 'solid' : 'none',
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
if (buttonType === 'elevated' && !disabled) {
|
|
121
|
-
styles.boxShadow = BoxShadow(hover ? 'focussed' : 'raised');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (disabled && buttonType === 'elevated') {
|
|
125
|
-
styles.boxShadow = BoxShadow('pressed');
|
|
126
|
-
styles.color = theme.colors[contentColor];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (disabled) {
|
|
130
|
-
styles.cursor = 'not-allowed';
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (click && buttonType === 'elevated' && !disabled) {
|
|
134
|
-
styles.boxShadow = BoxShadow('pressed');
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return styles;
|
|
138
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button, ButtonProps } from './button.component';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/Buttons',
|
|
6
|
-
component: Button,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Filled = (args: ButtonProps) => <Button {...args} />;
|
|
10
|
-
|
|
11
|
-
Filled.args = {
|
|
12
|
-
disabled: false,
|
|
13
|
-
buttonType: 'filled',
|
|
14
|
-
text: 'Filled Button',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
Filled.story = {
|
|
18
|
-
name: 'Filled Button',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const FilledSecondary = (args: ButtonProps) => <Button {...args} />;
|
|
22
|
-
|
|
23
|
-
FilledSecondary.args = {
|
|
24
|
-
disabled: false,
|
|
25
|
-
buttonType: 'filled-secondary',
|
|
26
|
-
text: 'Secondary Button',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
FilledSecondary.story = {
|
|
30
|
-
name: 'Secondary Filled Button',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Elevated = (args: ButtonProps) => <Button {...args} />;
|
|
34
|
-
|
|
35
|
-
Elevated.args = {
|
|
36
|
-
disabled: false,
|
|
37
|
-
buttonType: 'elevated',
|
|
38
|
-
text: 'Elevated Button',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
Elevated.story = {
|
|
42
|
-
name: 'Elevated Button',
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const DisabledElevated = (args: ButtonProps) => <Button {...args} />;
|
|
46
|
-
|
|
47
|
-
DisabledElevated.args = {
|
|
48
|
-
disabled: true,
|
|
49
|
-
buttonType: 'elevated',
|
|
50
|
-
text: 'Elevated Button',
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
DisabledElevated.story = {
|
|
54
|
-
name: 'Disabled Elevated Button',
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const Outlined = (args: ButtonProps) => <Button {...args} />;
|
|
58
|
-
|
|
59
|
-
Outlined.args = {
|
|
60
|
-
disabled: false,
|
|
61
|
-
buttonType: 'outlined',
|
|
62
|
-
text: 'Outlined Button',
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
Outlined.story = {
|
|
66
|
-
name: 'Outlined Button',
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const DisabledOutlined = (args: ButtonProps) => <Button {...args} />;
|
|
70
|
-
|
|
71
|
-
DisabledOutlined.args = {
|
|
72
|
-
disabled: true,
|
|
73
|
-
buttonType: 'outlined',
|
|
74
|
-
text: 'Outlined Button',
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
DisabledOutlined.story = {
|
|
78
|
-
name: 'Disabled Outlined Button',
|
|
79
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './button.component';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
ColorToken,
|
|
4
|
-
ContainerColorToken,
|
|
5
|
-
ShadowElevation,
|
|
6
|
-
Size,
|
|
7
|
-
} from '@uni-design-system/uni-core';
|
|
8
|
-
import { BoxShadow, Padding, useTheme } from '../../core';
|
|
9
|
-
import { Property } from 'csstype';
|
|
10
|
-
import Container from '../../core/container/container.component';
|
|
11
|
-
|
|
12
|
-
export type CardType = 'elevated' | 'filled' | 'outlined';
|
|
13
|
-
|
|
14
|
-
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
cardType?: CardType;
|
|
17
|
-
colorToken?: ContainerColorToken;
|
|
18
|
-
elevation?: ShadowElevation;
|
|
19
|
-
width?: Property.Width<number | string>;
|
|
20
|
-
height?: Property.Height<number | string>;
|
|
21
|
-
borderRadius?: Size | 'none';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function Card({
|
|
25
|
-
children,
|
|
26
|
-
cardType,
|
|
27
|
-
elevation,
|
|
28
|
-
colorToken = 'surface',
|
|
29
|
-
width,
|
|
30
|
-
height,
|
|
31
|
-
borderRadius,
|
|
32
|
-
style,
|
|
33
|
-
...rest
|
|
34
|
-
}: CardProps) {
|
|
35
|
-
const { colors, containers } = useTheme();
|
|
36
|
-
|
|
37
|
-
const { borderRadii } = containers.card;
|
|
38
|
-
|
|
39
|
-
const styles: CSSProperties = {
|
|
40
|
-
height,
|
|
41
|
-
width,
|
|
42
|
-
backgroundColor: colors[colorToken || 'surface'],
|
|
43
|
-
color: colors[(`on-${colorToken}` as ColorToken) || 'on-surface'],
|
|
44
|
-
...Padding('md', 'all'),
|
|
45
|
-
...style,
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
if (cardType === 'elevated') {
|
|
49
|
-
styles.boxShadow = BoxShadow(elevation || 'raised');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (borderRadii && borderRadius !== 'none') {
|
|
53
|
-
styles.borderRadius = borderRadii[borderRadius || 'md'];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Container colorToken={colorToken} style={styles} {...rest}>
|
|
58
|
-
{children}
|
|
59
|
-
</Container>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Card, CardProps } from './card.component';
|
|
3
|
-
import { Text } from '../../core';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Cards',
|
|
7
|
-
component: Card,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const Elevated = (args: CardProps) => {
|
|
11
|
-
return (
|
|
12
|
-
<Card {...args}>
|
|
13
|
-
<Text role="title-large">Sample Content</Text>
|
|
14
|
-
</Card>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const ElevatedArgs: CardProps = {
|
|
19
|
-
cardType: 'elevated',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
Elevated.args = ElevatedArgs;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './card.component';
|
package/src/components/draggable/SortableList/components/DragHandle/dragHandle.component.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import { SortableItemContext } from '../SortableItem/sortableItem.context';
|
|
3
|
-
import { Button, ButtonProps } from '../../../../button';
|
|
4
|
-
import { useDndContext } from '@dnd-kit/core';
|
|
5
|
-
|
|
6
|
-
export const DragHandle = ({ ...rest }: ButtonProps): JSX.Element => {
|
|
7
|
-
const { attributes, listeners } = useContext(SortableItemContext);
|
|
8
|
-
const dndContext = useDndContext();
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<Button
|
|
12
|
-
style={{ cursor: dndContext.activatorEvent ? 'grabbing' : 'grab' }}
|
|
13
|
-
iconName="barsSolid"
|
|
14
|
-
buttonType="icon"
|
|
15
|
-
{...attributes}
|
|
16
|
-
{...listeners}
|
|
17
|
-
{...rest}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DragHandle } from './dragHandle.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SortableItem } from './sortableItem.component';
|
package/src/components/draggable/SortableList/components/SortableItem/sortableItem.component.tsx
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import type { CSSProperties, PropsWithChildren } from 'react';
|
|
3
|
-
import type { UniqueIdentifier } from '@dnd-kit/core';
|
|
4
|
-
import { useSortable } from '@dnd-kit/sortable';
|
|
5
|
-
import { CSS } from '@dnd-kit/utilities';
|
|
6
|
-
import { SortableItemContext } from './sortableItem.context';
|
|
7
|
-
|
|
8
|
-
export interface SortableItemProps {
|
|
9
|
-
id: UniqueIdentifier;
|
|
10
|
-
style?: CSSProperties;
|
|
11
|
-
onRemove?(id: UniqueIdentifier): void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const SortableItem = ({
|
|
15
|
-
children,
|
|
16
|
-
id,
|
|
17
|
-
style: userStyle,
|
|
18
|
-
onRemove,
|
|
19
|
-
}: PropsWithChildren<SortableItemProps>): JSX.Element => {
|
|
20
|
-
const {
|
|
21
|
-
attributes,
|
|
22
|
-
isDragging,
|
|
23
|
-
listeners,
|
|
24
|
-
setNodeRef,
|
|
25
|
-
setActivatorNodeRef,
|
|
26
|
-
transform,
|
|
27
|
-
transition,
|
|
28
|
-
} = useSortable({
|
|
29
|
-
id,
|
|
30
|
-
});
|
|
31
|
-
const context = useMemo(
|
|
32
|
-
() => ({
|
|
33
|
-
attributes,
|
|
34
|
-
listeners,
|
|
35
|
-
ref: setActivatorNodeRef,
|
|
36
|
-
}),
|
|
37
|
-
[attributes, listeners, setActivatorNodeRef]
|
|
38
|
-
);
|
|
39
|
-
const style: CSSProperties = {
|
|
40
|
-
opacity: isDragging ? 0.4 : undefined,
|
|
41
|
-
transform: CSS.Translate.toString(transform),
|
|
42
|
-
transition,
|
|
43
|
-
listStyle: 'none',
|
|
44
|
-
...userStyle,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<SortableItemContext.Provider value={context}>
|
|
49
|
-
<li className="SortableItem" ref={setNodeRef} style={style}>
|
|
50
|
-
{children}
|
|
51
|
-
</li>
|
|
52
|
-
</SortableItemContext.Provider>
|
|
53
|
-
);
|
|
54
|
-
};
|
package/src/components/draggable/SortableList/components/SortableItem/sortableItem.context.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
2
|
-
import { createContext } from 'react';
|
|
3
|
-
|
|
4
|
-
interface Context {
|
|
5
|
-
attributes: Record<string, any>;
|
|
6
|
-
listeners: DraggableSyntheticListeners;
|
|
7
|
-
ref(node: HTMLElement | null): void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const SortableItemContext = createContext<Context>({
|
|
11
|
-
attributes: {},
|
|
12
|
-
listeners: undefined,
|
|
13
|
-
ref() {},
|
|
14
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SortableOverlay } from './sortableOverlay.component';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PropsWithChildren } from 'react';
|
|
3
|
-
import { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';
|
|
4
|
-
import type { DropAnimation } from '@dnd-kit/core';
|
|
5
|
-
|
|
6
|
-
const dropAnimationConfig: DropAnimation = {
|
|
7
|
-
sideEffects: defaultDropAnimationSideEffects({
|
|
8
|
-
styles: {
|
|
9
|
-
active: {
|
|
10
|
-
opacity: '0.4',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
}),
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
interface Props {}
|
|
17
|
-
|
|
18
|
-
export const SortableOverlay = ({ children }: PropsWithChildren<Props>): JSX.Element => (
|
|
19
|
-
<DragOverlay dropAnimation={dropAnimationConfig}>{children}</DragOverlay>
|
|
20
|
-
);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export const findManyChannelStatus = [
|
|
2
|
-
{
|
|
3
|
-
id: 'ckj03ha63t2760708sl9i1wrt',
|
|
4
|
-
name: 'Open',
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
id: 'ckkis9tk41bjc07776r52w8vi',
|
|
8
|
-
name: 'Arrived',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
id: 'cl0myohr5153501vkyhdttc84',
|
|
12
|
-
name: 'Completed Workflow',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: 'ckziqok792091401wchnc8w0x6',
|
|
16
|
-
name: 'Confirmed',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: 'cl0hr30kt2157201za2zu4z22e',
|
|
20
|
-
name: 'Connect Request',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'cl8ow0o5q14155je153hnxnkep',
|
|
24
|
-
name: 'Service Reminder Response',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 'ckkisaejj1bkp0777q7tz03en',
|
|
28
|
-
name: 'Needs Consult',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 'cl0hqr4x91927701zaaqtpeq97',
|
|
32
|
-
name: 'Scheduled',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'clalb5upd6062601xqa9ww3zi4',
|
|
36
|
-
name: 'Incoming Triage',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 'clcnp56pq489001wka1zxwm0k',
|
|
40
|
-
name: 'Survey Sent',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: 'clcgj0vp75288301yy99juvg1f',
|
|
44
|
-
name: 'Closed w/comments',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: 'ckj03ha67t2780708l1lccn1a',
|
|
48
|
-
name: 'Archived',
|
|
49
|
-
},
|
|
50
|
-
];
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, useMemo, useState } from 'react';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import { DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
4
|
-
import type { Active, UniqueIdentifier } from '@dnd-kit/core';
|
|
5
|
-
import { SortableContext, arrayMove, sortableKeyboardCoordinates } from '@dnd-kit/sortable';
|
|
6
|
-
|
|
7
|
-
import { SortableOverlay } from './components';
|
|
8
|
-
|
|
9
|
-
export interface SortableItemProps {
|
|
10
|
-
id: UniqueIdentifier;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface SortableProps<T extends SortableItemProps> {
|
|
14
|
-
items: T[];
|
|
15
|
-
onChange(items: T[]): void;
|
|
16
|
-
renderItem(item: T, index?: number): ReactNode;
|
|
17
|
-
style?: CSSProperties;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const SortableList = <T extends SortableItemProps>({
|
|
21
|
-
items,
|
|
22
|
-
onChange,
|
|
23
|
-
renderItem,
|
|
24
|
-
style: userStyle,
|
|
25
|
-
}: SortableProps<T>): JSX.Element => {
|
|
26
|
-
const [active, setActive] = useState<Active | null>(null);
|
|
27
|
-
const activeItem = useMemo(() => items.find((item) => item.id === active?.id), [active, items]);
|
|
28
|
-
const sensors = useSensors(
|
|
29
|
-
useSensor(PointerSensor),
|
|
30
|
-
useSensor(KeyboardSensor, {
|
|
31
|
-
coordinateGetter: sortableKeyboardCoordinates,
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const style: CSSProperties = {
|
|
36
|
-
display: 'flex',
|
|
37
|
-
flexDirection: 'column',
|
|
38
|
-
padding: 0,
|
|
39
|
-
listStyle: 'none',
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<DndContext
|
|
44
|
-
sensors={sensors}
|
|
45
|
-
onDragStart={({ active }): void => {
|
|
46
|
-
setActive(active);
|
|
47
|
-
}}
|
|
48
|
-
onDragEnd={({ active, over }): void => {
|
|
49
|
-
if (over && active.id !== over?.id) {
|
|
50
|
-
const activeIndex = items.findIndex(({ id }) => id === active.id);
|
|
51
|
-
const overIndex = items.findIndex(({ id }) => id === over.id);
|
|
52
|
-
|
|
53
|
-
onChange(arrayMove(items, activeIndex, overIndex));
|
|
54
|
-
}
|
|
55
|
-
setActive(null);
|
|
56
|
-
}}
|
|
57
|
-
onDragCancel={(): void => setActive(null)}
|
|
58
|
-
>
|
|
59
|
-
<SortableContext items={items}>
|
|
60
|
-
<ul style={style}>
|
|
61
|
-
{items.map((item, index) => (
|
|
62
|
-
<React.Fragment key={item.id}>{renderItem(item, index)}</React.Fragment>
|
|
63
|
-
))}
|
|
64
|
-
</ul>
|
|
65
|
-
</SortableContext>
|
|
66
|
-
<SortableOverlay>{activeItem ? renderItem(activeItem) : null}</SortableOverlay>
|
|
67
|
-
</DndContext>
|
|
68
|
-
);
|
|
69
|
-
};
|