@dxos/react-ui 0.1.19 → 0.1.21
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/README.md +13 -137
- package/dist/lib/browser/index.mjs +158 -2022
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/IdentityListItem/IdentityListItem.d.ts +6 -0
- package/dist/types/src/components/IdentityListItem/IdentityListItem.d.ts.map +1 -0
- package/dist/types/src/components/IdentityListItem/IdentityListItem.stories.d.ts +20 -0
- package/dist/types/src/components/IdentityListItem/IdentityListItem.stories.d.ts.map +1 -0
- package/dist/types/src/composites/IdentityPopover/IdentityPopover.d.ts +9 -0
- package/dist/types/src/composites/IdentityPopover/IdentityPopover.d.ts.map +1 -0
- package/dist/types/src/composites/IdentityPopover/index.d.ts +2 -0
- package/dist/types/src/composites/IdentityPopover/index.d.ts.map +1 -0
- package/dist/types/src/composites/index.d.ts +2 -0
- package/dist/types/src/composites/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layouts/PanelPopover/PanelPopover.d.ts +11 -0
- package/dist/types/src/layouts/PanelPopover/PanelPopover.d.ts.map +1 -0
- package/dist/types/src/layouts/PanelPopover/index.d.ts +2 -0
- package/dist/types/src/layouts/PanelPopover/index.d.ts.map +1 -0
- package/dist/types/src/layouts/PanelSidebar/PanelSidebar.d.ts +19 -0
- package/dist/types/src/layouts/PanelSidebar/PanelSidebar.d.ts.map +1 -0
- package/dist/types/src/layouts/PanelSidebar/index.d.ts +2 -0
- package/dist/types/src/layouts/PanelSidebar/index.d.ts.map +1 -0
- package/dist/types/src/layouts/index.d.ts +3 -0
- package/dist/types/src/layouts/index.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +6 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/index.d.ts +2 -0
- package/dist/types/src/panels/IdentityPanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/index.d.ts +2 -0
- package/dist/types/src/panels/index.d.ts.map +1 -0
- package/dist/types/src/styles/index.d.ts +1 -11
- package/dist/types/src/styles/index.d.ts.map +1 -1
- package/dist/types/src/styles/panelStyles.d.ts +3 -0
- package/dist/types/src/styles/panelStyles.d.ts.map +1 -0
- package/dist/types/src/testing/ClientProvider.d.ts +3 -0
- package/dist/types/src/testing/ClientProvider.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/translations/index.d.ts +5 -0
- package/dist/types/src/translations/index.d.ts.map +1 -0
- package/dist/types/src/translations/locales/en-US.d.ts +6 -0
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -0
- package/package.json +16 -32
- package/src/components/IdentityListItem/IdentityListItem.stories.tsx +23 -0
- package/src/components/IdentityListItem/IdentityListItem.tsx +32 -0
- package/src/composites/IdentityPopover/IdentityPopover.tsx +54 -0
- package/src/composites/IdentityPopover/index.ts +5 -0
- package/src/composites/index.ts +4 -0
- package/src/index.ts +4 -4
- package/src/layouts/PanelPopover/PanelPopover.tsx +40 -0
- package/src/layouts/PanelPopover/index.ts +5 -0
- package/src/layouts/PanelSidebar/PanelSidebar.tsx +126 -0
- package/src/layouts/PanelSidebar/index.ts +5 -0
- package/src/layouts/index.ts +6 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +39 -0
- package/src/panels/IdentityPanel/index.ts +5 -0
- package/src/panels/index.ts +5 -0
- package/src/styles/index.ts +2 -12
- package/src/styles/panelStyles.ts +6 -0
- package/src/testing/ClientProvider.tsx +18 -0
- package/src/testing/index.ts +1 -1
- package/src/translations/index.ts +7 -0
- package/src/translations/locales/en-US.ts +9 -0
- package/dist/plugin/node/esbuild-plugin.cjs +0 -469
- package/dist/plugin/node/esbuild-plugin.cjs.map +0 -7
- package/dist/plugin/node/meta.json +0 -1
- package/dist/plugin/node/plugin.cjs +0 -460
- package/dist/plugin/node/plugin.cjs.map +0 -7
- package/dist/plugin/node/theme.css +0 -61
- package/dist/plugin/node/theme.css.map +0 -7
- package/dist/types/src/components/Alert/Alert.d.ts +0 -15
- package/dist/types/src/components/Alert/Alert.d.ts.map +0 -1
- package/dist/types/src/components/Alert/Alert.stories.d.ts +0 -9
- package/dist/types/src/components/Alert/Alert.stories.d.ts.map +0 -1
- package/dist/types/src/components/Alert/index.d.ts +0 -2
- package/dist/types/src/components/Alert/index.d.ts.map +0 -1
- package/dist/types/src/components/AlertDialog/AlertDialog.d.ts +0 -26
- package/dist/types/src/components/AlertDialog/AlertDialog.d.ts.map +0 -1
- package/dist/types/src/components/AlertDialog/AlertDialog.stories.d.ts +0 -9
- package/dist/types/src/components/AlertDialog/AlertDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/AlertDialog/index.d.ts +0 -2
- package/dist/types/src/components/AlertDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/Avatar/Avatar.d.ts +0 -22
- package/dist/types/src/components/Avatar/Avatar.d.ts.map +0 -1
- package/dist/types/src/components/Avatar/Avatar.stories.d.ts +0 -12
- package/dist/types/src/components/Avatar/Avatar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Avatar/index.d.ts +0 -2
- package/dist/types/src/components/Avatar/index.d.ts.map +0 -1
- package/dist/types/src/components/Button/Button.d.ts +0 -4
- package/dist/types/src/components/Button/Button.d.ts.map +0 -1
- package/dist/types/src/components/Button/Button.stories.d.ts +0 -13
- package/dist/types/src/components/Button/Button.stories.d.ts.map +0 -1
- package/dist/types/src/components/Button/ButtonGroup.d.ts +0 -6
- package/dist/types/src/components/Button/ButtonGroup.d.ts.map +0 -1
- package/dist/types/src/components/Button/ButtonProps.d.ts +0 -7
- package/dist/types/src/components/Button/ButtonProps.d.ts.map +0 -1
- package/dist/types/src/components/Button/buttonStyles.d.ts +0 -6
- package/dist/types/src/components/Button/buttonStyles.d.ts.map +0 -1
- package/dist/types/src/components/Button/index.d.ts +0 -5
- package/dist/types/src/components/Button/index.d.ts.map +0 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts +0 -10
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +0 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +0 -10
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +0 -1
- package/dist/types/src/components/CompoundButton/index.d.ts +0 -2
- package/dist/types/src/components/CompoundButton/index.d.ts.map +0 -1
- package/dist/types/src/components/Dialog/Dialog.d.ts +0 -26
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts +0 -9
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialog/index.d.ts +0 -2
- package/dist/types/src/components/Dialog/index.d.ts.map +0 -1
- package/dist/types/src/components/Group/Group.d.ts +0 -10
- package/dist/types/src/components/Group/Group.d.ts.map +0 -1
- package/dist/types/src/components/Group/Group.stories.d.ts +0 -9
- package/dist/types/src/components/Group/Group.stories.d.ts.map +0 -1
- package/dist/types/src/components/Group/index.d.ts +0 -2
- package/dist/types/src/components/Group/index.d.ts.map +0 -1
- package/dist/types/src/components/Heading/Heading.d.ts +0 -266
- package/dist/types/src/components/Heading/Heading.d.ts.map +0 -1
- package/dist/types/src/components/Heading/Heading.stories.d.ts +0 -274
- package/dist/types/src/components/Heading/Heading.stories.d.ts.map +0 -1
- package/dist/types/src/components/Heading/index.d.ts +0 -2
- package/dist/types/src/components/Heading/index.d.ts.map +0 -1
- package/dist/types/src/components/Input/BarePinInput.d.ts +0 -314
- package/dist/types/src/components/Input/BarePinInput.d.ts.map +0 -1
- package/dist/types/src/components/Input/BareTextInput.d.ts +0 -7
- package/dist/types/src/components/Input/BareTextInput.d.ts.map +0 -1
- package/dist/types/src/components/Input/BareTextareaInput.d.ts +0 -7
- package/dist/types/src/components/Input/BareTextareaInput.d.ts.map +0 -1
- package/dist/types/src/components/Input/Input.d.ts +0 -4
- package/dist/types/src/components/Input/Input.d.ts.map +0 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +0 -27
- package/dist/types/src/components/Input/Input.stories.d.ts.map +0 -1
- package/dist/types/src/components/Input/InputProps.d.ts +0 -37
- package/dist/types/src/components/Input/InputProps.d.ts.map +0 -1
- package/dist/types/src/components/Input/index.d.ts +0 -2
- package/dist/types/src/components/Input/index.d.ts.map +0 -1
- package/dist/types/src/components/Loading/Loading.d.ts +0 -15
- package/dist/types/src/components/Loading/Loading.d.ts.map +0 -1
- package/dist/types/src/components/Loading/Loading.stories.d.ts +0 -23
- package/dist/types/src/components/Loading/Loading.stories.d.ts.map +0 -1
- package/dist/types/src/components/Loading/index.d.ts +0 -2
- package/dist/types/src/components/Loading/index.d.ts.map +0 -1
- package/dist/types/src/components/NavMenu/NavMenu.d.ts +0 -39
- package/dist/types/src/components/NavMenu/NavMenu.d.ts.map +0 -1
- package/dist/types/src/components/NavMenu/NavMenu.stories.d.ts +0 -9
- package/dist/types/src/components/NavMenu/NavMenu.stories.d.ts.map +0 -1
- package/dist/types/src/components/NavMenu/index.d.ts +0 -2
- package/dist/types/src/components/NavMenu/index.d.ts.map +0 -1
- package/dist/types/src/components/Popover/Popover.d.ts +0 -21
- package/dist/types/src/components/Popover/Popover.d.ts.map +0 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +0 -10
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +0 -1
- package/dist/types/src/components/Popover/index.d.ts +0 -2
- package/dist/types/src/components/Popover/index.d.ts.map +0 -1
- package/dist/types/src/components/QrCode/QrCode.d.ts +0 -39
- package/dist/types/src/components/QrCode/QrCode.d.ts.map +0 -1
- package/dist/types/src/components/QrCode/QrCode.stories.d.ts +0 -10
- package/dist/types/src/components/QrCode/QrCode.stories.d.ts.map +0 -1
- package/dist/types/src/components/QrCode/index.d.ts +0 -2
- package/dist/types/src/components/QrCode/index.d.ts.map +0 -1
- package/dist/types/src/components/Tag/Tag.d.ts +0 -8
- package/dist/types/src/components/Tag/Tag.d.ts.map +0 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +0 -10
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +0 -1
- package/dist/types/src/components/Tag/index.d.ts +0 -2
- package/dist/types/src/components/Tag/index.d.ts.map +0 -1
- package/dist/types/src/components/Toast/Toast.d.ts +0 -25
- package/dist/types/src/components/Toast/Toast.d.ts.map +0 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +0 -9
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +0 -1
- package/dist/types/src/components/Toast/index.d.ts +0 -2
- package/dist/types/src/components/Toast/index.d.ts.map +0 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +0 -19
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +0 -9
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +0 -1
- package/dist/types/src/components/Tooltip/index.d.ts +0 -2
- package/dist/types/src/components/Tooltip/index.d.ts.map +0 -1
- package/dist/types/src/components/UiProvider/UiProvider.d.ts +0 -10
- package/dist/types/src/components/UiProvider/UiProvider.d.ts.map +0 -1
- package/dist/types/src/components/UiProvider/index.d.ts +0 -2
- package/dist/types/src/components/UiProvider/index.d.ts.map +0 -1
- package/dist/types/src/components/index.d.ts +0 -18
- package/dist/types/src/components/index.d.ts.map +0 -1
- package/dist/types/src/config/index.d.ts +0 -2
- package/dist/types/src/config/index.d.ts.map +0 -1
- package/dist/types/src/config/tailwind.d.ts +0 -7
- package/dist/types/src/config/tailwind.d.ts.map +0 -1
- package/dist/types/src/esbuild-plugin.d.ts +0 -6
- package/dist/types/src/esbuild-plugin.d.ts.map +0 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useForwardedRef.d.ts +0 -2
- package/dist/types/src/hooks/useForwardedRef.d.ts.map +0 -1
- package/dist/types/src/hooks/useId.d.ts +0 -3
- package/dist/types/src/hooks/useId.d.ts.map +0 -1
- package/dist/types/src/hooks/useIsFocused.d.ts +0 -3
- package/dist/types/src/hooks/useIsFocused.d.ts.map +0 -1
- package/dist/types/src/plugin.d.ts +0 -9
- package/dist/types/src/plugin.d.ts.map +0 -1
- package/dist/types/src/props/Elevation.d.ts +0 -2
- package/dist/types/src/props/Elevation.d.ts.map +0 -1
- package/dist/types/src/props/MessageValence.d.ts +0 -2
- package/dist/types/src/props/MessageValence.d.ts.map +0 -1
- package/dist/types/src/props/Size.d.ts +0 -2
- package/dist/types/src/props/Size.d.ts.map +0 -1
- package/dist/types/src/props/index.d.ts +0 -4
- package/dist/types/src/props/index.d.ts.map +0 -1
- package/dist/types/src/styles/active.d.ts +0 -2
- package/dist/types/src/styles/active.d.ts.map +0 -1
- package/dist/types/src/styles/disabled.d.ts +0 -2
- package/dist/types/src/styles/disabled.d.ts.map +0 -1
- package/dist/types/src/styles/focus.d.ts +0 -3
- package/dist/types/src/styles/focus.d.ts.map +0 -1
- package/dist/types/src/styles/group.d.ts +0 -7
- package/dist/types/src/styles/group.d.ts.map +0 -1
- package/dist/types/src/styles/hover.d.ts +0 -4
- package/dist/types/src/styles/hover.d.ts.map +0 -1
- package/dist/types/src/styles/input.d.ts +0 -11
- package/dist/types/src/styles/input.d.ts.map +0 -1
- package/dist/types/src/styles/ornament.d.ts +0 -3
- package/dist/types/src/styles/ornament.d.ts.map +0 -1
- package/dist/types/src/styles/shimmer.d.ts +0 -3
- package/dist/types/src/styles/shimmer.d.ts.map +0 -1
- package/dist/types/src/styles/size.d.ts +0 -7
- package/dist/types/src/styles/size.d.ts.map +0 -1
- package/dist/types/src/styles/text.d.ts +0 -5
- package/dist/types/src/styles/text.d.ts.map +0 -1
- package/dist/types/src/styles/valence.d.ts +0 -19
- package/dist/types/src/styles/valence.d.ts.map +0 -1
- package/dist/types/src/testing/templateForComponent.d.ts +0 -4
- package/dist/types/src/testing/templateForComponent.d.ts.map +0 -1
- package/dist/types/src/util/index.d.ts +0 -2
- package/dist/types/src/util/index.d.ts.map +0 -1
- package/dist/types/src/util/mx.d.ts +0 -2
- package/dist/types/src/util/mx.d.ts.map +0 -1
- package/dist/types/src/util/withLogical.d.ts +0 -3
- package/dist/types/src/util/withLogical.d.ts.map +0 -1
- package/plugin.d.ts +0 -5
- package/plugin.js +0 -8
- package/src/components/Alert/Alert.stories.tsx +0 -31
- package/src/components/Alert/Alert.tsx +0 -40
- package/src/components/Alert/index.ts +0 -5
- package/src/components/AlertDialog/AlertDialog.stories.tsx +0 -35
- package/src/components/AlertDialog/AlertDialog.tsx +0 -147
- package/src/components/AlertDialog/index.ts +0 -5
- package/src/components/Avatar/Avatar.stories.tsx +0 -29
- package/src/components/Avatar/Avatar.tsx +0 -104
- package/src/components/Avatar/index.ts +0 -5
- package/src/components/Button/Button.stories.tsx +0 -45
- package/src/components/Button/Button.tsx +0 -20
- package/src/components/Button/ButtonGroup.tsx +0 -23
- package/src/components/Button/ButtonProps.ts +0 -11
- package/src/components/Button/buttonStyles.ts +0 -35
- package/src/components/Button/index.ts +0 -8
- package/src/components/CompoundButton/CompoundButton.stories.tsx +0 -46
- package/src/components/CompoundButton/CompoundButton.tsx +0 -53
- package/src/components/CompoundButton/index.ts +0 -5
- package/src/components/Dialog/Dialog.stories.tsx +0 -37
- package/src/components/Dialog/Dialog.tsx +0 -157
- package/src/components/Dialog/index.ts +0 -5
- package/src/components/Group/Group.stories.tsx +0 -25
- package/src/components/Group/Group.tsx +0 -32
- package/src/components/Group/index.ts +0 -5
- package/src/components/Heading/Heading.stories.tsx +0 -29
- package/src/components/Heading/Heading.tsx +0 -29
- package/src/components/Heading/index.ts +0 -5
- package/src/components/Input/BarePinInput.tsx +0 -67
- package/src/components/Input/BareTextInput.tsx +0 -48
- package/src/components/Input/BareTextareaInput.tsx +0 -39
- package/src/components/Input/Input.stories.tsx +0 -108
- package/src/components/Input/Input.tsx +0 -115
- package/src/components/Input/InputProps.ts +0 -47
- package/src/components/Input/index.ts +0 -5
- package/src/components/Loading/Loading.stories.tsx +0 -34
- package/src/components/Loading/Loading.tsx +0 -69
- package/src/components/Loading/index.ts +0 -5
- package/src/components/NavMenu/NavMenu.stories.tsx +0 -54
- package/src/components/NavMenu/NavMenu.tsx +0 -203
- package/src/components/NavMenu/index.ts +0 -5
- package/src/components/Popover/Popover.stories.tsx +0 -49
- package/src/components/Popover/Popover.tsx +0 -110
- package/src/components/Popover/index.ts +0 -5
- package/src/components/QrCode/QrCode.stories.tsx +0 -42
- package/src/components/QrCode/QrCode.tsx +0 -165
- package/src/components/QrCode/index.ts +0 -5
- package/src/components/Tag/Tag.stories.tsx +0 -23
- package/src/components/Tag/Tag.tsx +0 -32
- package/src/components/Tag/index.ts +0 -5
- package/src/components/Toast/Toast.stories.tsx +0 -31
- package/src/components/Toast/Toast.tsx +0 -106
- package/src/components/Toast/index.ts +0 -5
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -28
- package/src/components/Tooltip/Tooltip.tsx +0 -88
- package/src/components/Tooltip/index.ts +0 -5
- package/src/components/UiProvider/UiProvider.tsx +0 -44
- package/src/components/UiProvider/index.ts +0 -5
- package/src/components/index.ts +0 -21
- package/src/config/index.ts +0 -5
- package/src/config/tailwind.ts +0 -250
- package/src/esbuild-plugin.ts +0 -42
- package/src/hooks/index.ts +0 -7
- package/src/hooks/useForwardedRef.ts +0 -22
- package/src/hooks/useId.ts +0 -21
- package/src/hooks/useIsFocused.ts +0 -38
- package/src/plugin.ts +0 -44
- package/src/props/Elevation.ts +0 -5
- package/src/props/MessageValence.ts +0 -5
- package/src/props/Size.ts +0 -40
- package/src/props/index.ts +0 -7
- package/src/styles/active.ts +0 -11
- package/src/styles/disabled.ts +0 -5
- package/src/styles/focus.ts +0 -9
- package/src/styles/group.ts +0 -35
- package/src/styles/hover.ts +0 -10
- package/src/styles/input.ts +0 -46
- package/src/styles/ornament.ts +0 -6
- package/src/styles/shimmer.ts +0 -9
- package/src/styles/size.ts +0 -86
- package/src/styles/text.ts +0 -10
- package/src/styles/valence.ts +0 -71
- package/src/testing/templateForComponent.tsx +0 -16
- package/src/theme.css +0 -65
- package/src/typings.d.ts +0 -7
- package/src/util/index.ts +0 -5
- package/src/util/mx.ts +0 -28
- package/src/util/withLogical.ts +0 -103
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// Based upon the useIsFocused hook which is part of the `rci` project:
|
|
6
|
-
/// https://github.com/leonardodino/rci/blob/main/packages/use-is-focused
|
|
7
|
-
|
|
8
|
-
import { useEffect, useRef, useState, RefObject } from 'react';
|
|
9
|
-
|
|
10
|
-
export const useIsFocused = (inputRef: RefObject<HTMLInputElement>) => {
|
|
11
|
-
const [isFocused, setIsFocused] = useState<boolean | undefined>(undefined);
|
|
12
|
-
const isFocusedRef = useRef<boolean | undefined>(isFocused);
|
|
13
|
-
|
|
14
|
-
isFocusedRef.current = isFocused;
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const input = inputRef.current;
|
|
18
|
-
if (!input) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const onFocus = () => setIsFocused(true);
|
|
23
|
-
const onBlur = () => setIsFocused(false);
|
|
24
|
-
input.addEventListener('focus', onFocus);
|
|
25
|
-
input.addEventListener('blur', onBlur);
|
|
26
|
-
|
|
27
|
-
if (isFocusedRef.current === undefined) {
|
|
28
|
-
setIsFocused(document.activeElement === input);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return () => {
|
|
32
|
-
input.removeEventListener('focus', onFocus);
|
|
33
|
-
input.removeEventListener('blur', onBlur);
|
|
34
|
-
};
|
|
35
|
-
}, [inputRef, setIsFocused]);
|
|
36
|
-
|
|
37
|
-
return isFocused;
|
|
38
|
-
};
|
package/src/plugin.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import autoprefixer from 'autoprefixer';
|
|
6
|
-
import { resolve } from 'node:path';
|
|
7
|
-
import tailwindcss from 'tailwindcss';
|
|
8
|
-
import { Plugin } from 'vite';
|
|
9
|
-
|
|
10
|
-
import { tailwindConfig } from './config';
|
|
11
|
-
|
|
12
|
-
export interface VitePluginTailwindOptions {
|
|
13
|
-
jit?: boolean;
|
|
14
|
-
cssPath?: string;
|
|
15
|
-
virtualFileId?: string;
|
|
16
|
-
content: string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const ThemePlugin = (options: Pick<VitePluginTailwindOptions, 'content'>) => {
|
|
20
|
-
const config: VitePluginTailwindOptions = {
|
|
21
|
-
jit: true,
|
|
22
|
-
cssPath: resolve(__dirname, './theme.css'),
|
|
23
|
-
virtualFileId: '@dxosTheme',
|
|
24
|
-
...options
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
name: 'vite-plugin-dxos-ui-theme',
|
|
29
|
-
config: ({ root }, env) => {
|
|
30
|
-
return {
|
|
31
|
-
css: {
|
|
32
|
-
postcss: {
|
|
33
|
-
plugins: [tailwindcss(tailwindConfig({ env: env.mode, root, content: options.content })), autoprefixer]
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
resolveId: (id) => {
|
|
39
|
-
if (id === config.virtualFileId) {
|
|
40
|
-
return config.cssPath;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} as Plugin;
|
|
44
|
-
};
|
package/src/props/Elevation.ts
DELETED
package/src/props/Size.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export type Size =
|
|
6
|
-
| 0
|
|
7
|
-
| 'px'
|
|
8
|
-
| 0.5
|
|
9
|
-
| 1
|
|
10
|
-
| 1.5
|
|
11
|
-
| 2
|
|
12
|
-
| 2.5
|
|
13
|
-
| 3
|
|
14
|
-
| 3.5
|
|
15
|
-
| 4
|
|
16
|
-
| 5
|
|
17
|
-
| 6
|
|
18
|
-
| 7
|
|
19
|
-
| 8
|
|
20
|
-
| 9
|
|
21
|
-
| 10
|
|
22
|
-
| 11
|
|
23
|
-
| 12
|
|
24
|
-
| 14
|
|
25
|
-
| 16
|
|
26
|
-
| 20
|
|
27
|
-
| 24
|
|
28
|
-
| 28
|
|
29
|
-
| 32
|
|
30
|
-
| 36
|
|
31
|
-
| 40
|
|
32
|
-
| 44
|
|
33
|
-
| 48
|
|
34
|
-
| 52
|
|
35
|
-
| 56
|
|
36
|
-
| 60
|
|
37
|
-
| 64
|
|
38
|
-
| 72
|
|
39
|
-
| 80
|
|
40
|
-
| 96;
|
package/src/props/index.ts
DELETED
package/src/styles/active.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { mx } from '../util';
|
|
6
|
-
|
|
7
|
-
export const defaultActive = mx(
|
|
8
|
-
'radix-state-open:outline-2 radix-state-open:outline-offset-1 radix-state-open:outline-primary-300 radix-state-open:outline-offset-transparent dark:radix-state-open:outline-primary-400 dark:radix-state-open:outline-offset-transparent',
|
|
9
|
-
'radix-state-on:outline-2 radix-state-on:outline-offset-1 radix-state-on:outline-primary-300 radix-state-on:outline-offset-transparent dark:radix-state-on:outline-primary-400 dark:radix-state-on:outline-offset-transparent',
|
|
10
|
-
'radix-state-instant-open:outline-2 radix-state-instant-open:outline-offset-1 radix-state-instant-open:outline-primary-300 radix-state-instant-open:outline-offset-transparent dark:radix-state-instant-open:outline-primary-400 dark:radix-state-instant-open:outline-offset-transparent'
|
|
11
|
-
);
|
package/src/styles/disabled.ts
DELETED
package/src/styles/focus.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export const defaultFocus =
|
|
6
|
-
'focus:outline-none focus-visible:z-[1] focus-visible:hover:outline-none dark:focus-visible:hover:outline-none focus-visible:ring focus-visible:ring-offset-1 focus-visible:ring-primary-500 focus-visible:ring-offset-white dark:focus-visible:ring-primary-200 dark:focus-visible:ring-offset-black';
|
|
7
|
-
|
|
8
|
-
export const staticFocus =
|
|
9
|
-
'ring ring-offset-1 ring-primary-500 ring-offset-white dark:ring-primary-200 dark:ring-offset-black';
|
package/src/styles/group.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Elevation } from '../props';
|
|
6
|
-
import { mx } from '../util';
|
|
7
|
-
|
|
8
|
-
const elevationClassNameMap = new Map<number, string>([
|
|
9
|
-
[0, 'shadow-none'],
|
|
10
|
-
[1, 'shadow-sm'],
|
|
11
|
-
[2, 'shadow'],
|
|
12
|
-
[3, 'shadow-md'],
|
|
13
|
-
[4, 'shadow-lg'],
|
|
14
|
-
[5, 'shadow-xl'],
|
|
15
|
-
[6, 'shadow-2xl']
|
|
16
|
-
]);
|
|
17
|
-
|
|
18
|
-
export const defaultGroup = ({
|
|
19
|
-
elevation,
|
|
20
|
-
rounding,
|
|
21
|
-
spacing
|
|
22
|
-
}: {
|
|
23
|
-
elevation: Elevation;
|
|
24
|
-
rounding?: string;
|
|
25
|
-
spacing?: string;
|
|
26
|
-
}) => {
|
|
27
|
-
return mx(
|
|
28
|
-
rounding ?? 'rounded-lg',
|
|
29
|
-
spacing ?? 'p-4',
|
|
30
|
-
elevation === 0
|
|
31
|
-
? 'bg-transparent border border-neutral-200 dark:border-neutral-700'
|
|
32
|
-
: 'bg-white dark:bg-neutral-800 elevated-buttons',
|
|
33
|
-
elevationClassNameMap.get(elevation)
|
|
34
|
-
);
|
|
35
|
-
};
|
package/src/styles/hover.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export const defaultHover = ({ disabled }: { disabled?: boolean }) => {
|
|
6
|
-
return (
|
|
7
|
-
!disabled &&
|
|
8
|
-
'outline outline-3 outline-transparent hover:z-[1] hover:outline-primary-300 dark:hover:outline-primary-400 hover:focus:outline-primary-300 dark:hover:focus:outline-primary-400'
|
|
9
|
-
);
|
|
10
|
-
};
|
package/src/styles/input.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { MessageValence } from '../props';
|
|
6
|
-
import { mx } from '../util';
|
|
7
|
-
import { defaultDisabled } from './disabled';
|
|
8
|
-
import { defaultFocus, staticFocus } from './focus';
|
|
9
|
-
import { defaultHover } from './hover';
|
|
10
|
-
import { defaultPlaceholder } from './text';
|
|
11
|
-
import { valenceInputBorder } from './valence';
|
|
12
|
-
|
|
13
|
-
export const defaultInput = ({
|
|
14
|
-
disabled,
|
|
15
|
-
validationValence
|
|
16
|
-
}: {
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
validationValence?: MessageValence;
|
|
19
|
-
}) => {
|
|
20
|
-
return mx(
|
|
21
|
-
'text-base border rounded bg-white/50 text-neutral-900 dark:bg-neutral-700/50 dark:text-white',
|
|
22
|
-
defaultFocus,
|
|
23
|
-
defaultPlaceholder,
|
|
24
|
-
defaultHover({ disabled }),
|
|
25
|
-
valenceInputBorder(validationValence),
|
|
26
|
-
disabled && defaultDisabled
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const staticInput = ({
|
|
31
|
-
disabled,
|
|
32
|
-
focused,
|
|
33
|
-
validationValence
|
|
34
|
-
}: {
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
focused?: boolean;
|
|
37
|
-
validationValence?: MessageValence;
|
|
38
|
-
}) => {
|
|
39
|
-
return mx(
|
|
40
|
-
defaultPlaceholder,
|
|
41
|
-
'text-base border rounded bg-white/50 text-neutral-900 dark:bg-neutral-700/50 dark:text-white',
|
|
42
|
-
valenceInputBorder(validationValence),
|
|
43
|
-
disabled && defaultDisabled,
|
|
44
|
-
focused && staticFocus
|
|
45
|
-
);
|
|
46
|
-
};
|
package/src/styles/ornament.ts
DELETED
package/src/styles/shimmer.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export const defaultShimmer =
|
|
6
|
-
'relative before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-neutral-100/10 before:to-transparent isolate overflow-hidden';
|
|
7
|
-
|
|
8
|
-
export const strongShimmer =
|
|
9
|
-
'relative before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-primary-100/80 before:to-transparent isolate overflow-hidden';
|
package/src/styles/size.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Size } from '../props';
|
|
6
|
-
import { mx } from '../util';
|
|
7
|
-
|
|
8
|
-
export const sizeWidthMap = new Map<Size, string>([
|
|
9
|
-
[0, 'w-0'],
|
|
10
|
-
['px', 'w-px'],
|
|
11
|
-
[0.5, 'w-0.5'],
|
|
12
|
-
[1, 'w-1'],
|
|
13
|
-
[1.5, 'w-1.5'],
|
|
14
|
-
[2, 'w-2'],
|
|
15
|
-
[2.5, 'w-2.5'],
|
|
16
|
-
[3, 'w-3'],
|
|
17
|
-
[3.5, 'w-3.5'],
|
|
18
|
-
[4, 'w-4'],
|
|
19
|
-
[5, 'w-5'],
|
|
20
|
-
[6, 'w-6'],
|
|
21
|
-
[7, 'w-7'],
|
|
22
|
-
[8, 'w-8'],
|
|
23
|
-
[9, 'w-9'],
|
|
24
|
-
[10, 'w-10'],
|
|
25
|
-
[11, 'w-11'],
|
|
26
|
-
[12, 'w-12'],
|
|
27
|
-
[14, 'w-14'],
|
|
28
|
-
[16, 'w-16'],
|
|
29
|
-
[20, 'w-20'],
|
|
30
|
-
[24, 'w-24'],
|
|
31
|
-
[28, 'w-28'],
|
|
32
|
-
[32, 'w-32'],
|
|
33
|
-
[36, 'w-36'],
|
|
34
|
-
[40, 'w-40'],
|
|
35
|
-
[44, 'w-44'],
|
|
36
|
-
[48, 'w-48'],
|
|
37
|
-
[52, 'w-52'],
|
|
38
|
-
[56, 'w-56'],
|
|
39
|
-
[60, 'w-60'],
|
|
40
|
-
[64, 'w-64'],
|
|
41
|
-
[72, 'w-72'],
|
|
42
|
-
[80, 'w-80'],
|
|
43
|
-
[96, 'w-96']
|
|
44
|
-
]);
|
|
45
|
-
|
|
46
|
-
export const sizeHeightMap = new Map<Size, string>([
|
|
47
|
-
[0, 'h-0'],
|
|
48
|
-
['px', 'h-px'],
|
|
49
|
-
[0.5, 'h-0.5'],
|
|
50
|
-
[1, 'h-1'],
|
|
51
|
-
[1.5, 'h-1.5'],
|
|
52
|
-
[2, 'h-2'],
|
|
53
|
-
[2.5, 'h-2.5'],
|
|
54
|
-
[3, 'h-3'],
|
|
55
|
-
[3.5, 'h-3.5'],
|
|
56
|
-
[4, 'h-4'],
|
|
57
|
-
[5, 'h-5'],
|
|
58
|
-
[6, 'h-6'],
|
|
59
|
-
[7, 'h-7'],
|
|
60
|
-
[8, 'h-8'],
|
|
61
|
-
[9, 'h-9'],
|
|
62
|
-
[10, 'h-10'],
|
|
63
|
-
[11, 'h-11'],
|
|
64
|
-
[12, 'h-12'],
|
|
65
|
-
[14, 'h-14'],
|
|
66
|
-
[16, 'h-16'],
|
|
67
|
-
[20, 'h-20'],
|
|
68
|
-
[24, 'h-24'],
|
|
69
|
-
[28, 'h-28'],
|
|
70
|
-
[32, 'h-32'],
|
|
71
|
-
[36, 'h-36'],
|
|
72
|
-
[40, 'h-40'],
|
|
73
|
-
[44, 'h-44'],
|
|
74
|
-
[48, 'h-48'],
|
|
75
|
-
[52, 'h-52'],
|
|
76
|
-
[56, 'h-56'],
|
|
77
|
-
[60, 'h-60'],
|
|
78
|
-
[64, 'h-64'],
|
|
79
|
-
[72, 'h-72'],
|
|
80
|
-
[80, 'h-80'],
|
|
81
|
-
[96, 'h-96']
|
|
82
|
-
]);
|
|
83
|
-
|
|
84
|
-
export const getSizeHeight = sizeHeightMap.get.bind(sizeHeightMap);
|
|
85
|
-
export const getSizeWidth = sizeWidthMap.get.bind(sizeWidthMap);
|
|
86
|
-
export const getSize = (size: Size) => mx(getSizeHeight(size), getSizeWidth(size));
|
package/src/styles/text.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export const defaultPlaceholder = 'placeholder-neutral-500 dark:placeholder-neutral-400';
|
|
6
|
-
|
|
7
|
-
export const defaultDescription = 'text-xs font-normal text-neutral-650 dark:text-neutral-300';
|
|
8
|
-
export const primaryDescription = 'text-xs font-normal text-white/90';
|
|
9
|
-
|
|
10
|
-
export const defaultTooltip = 'text-xs font-normal text-neutral-900 dark:text-neutral-50';
|
package/src/styles/valence.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { MessageValence } from '../props';
|
|
6
|
-
|
|
7
|
-
export const successText = 'text-xs font-medium text-success-700 dark:text-success-300';
|
|
8
|
-
export const infoText = 'text-xs font-medium text-info-700 dark:text-info-300';
|
|
9
|
-
export const warningText = 'text-xs font-medium text-warning-700 dark:text-warning-300';
|
|
10
|
-
export const errorText = 'text-xs font-medium text-error-700 dark:text-error-300';
|
|
11
|
-
|
|
12
|
-
export const valenceColorText = (valence?: MessageValence) => {
|
|
13
|
-
switch (valence) {
|
|
14
|
-
case 'success':
|
|
15
|
-
return successText;
|
|
16
|
-
case 'info':
|
|
17
|
-
return infoText;
|
|
18
|
-
case 'warning':
|
|
19
|
-
return warningText;
|
|
20
|
-
case 'error':
|
|
21
|
-
return errorText;
|
|
22
|
-
default:
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const neutralInputBorder = 'border-neutral-500 dark:border-neutral-600';
|
|
28
|
-
export const successInputBorder = 'border-success-500 dark:border-success-600';
|
|
29
|
-
export const infoInputBorder = 'border-info-500 dark:border-info-600';
|
|
30
|
-
export const warningInputBorder = 'border-warning-500 dark:border-warning-600';
|
|
31
|
-
export const errorInputBorder = 'border-error-500 dark:border-error-600';
|
|
32
|
-
|
|
33
|
-
export const valenceInputBorder = (valence?: MessageValence) => {
|
|
34
|
-
switch (valence) {
|
|
35
|
-
case 'success':
|
|
36
|
-
return successInputBorder;
|
|
37
|
-
case 'info':
|
|
38
|
-
return infoInputBorder;
|
|
39
|
-
case 'warning':
|
|
40
|
-
return warningInputBorder;
|
|
41
|
-
case 'error':
|
|
42
|
-
return errorInputBorder;
|
|
43
|
-
default:
|
|
44
|
-
return neutralInputBorder;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const neutralAlertColors = 'border-neutral-500 dark:border-neutral-600';
|
|
49
|
-
export const successAlertColors =
|
|
50
|
-
'border-success-500 dark:border-success-600 text-success-700 dark:text-success-100 bg-success-50 dark:bg-success-900';
|
|
51
|
-
export const infoAlertColors =
|
|
52
|
-
'border-info-500 dark:border-info-600 text-info-700 dark:text-info-100 bg-info-50 dark:bg-info-900';
|
|
53
|
-
export const warningAlertColors =
|
|
54
|
-
'border-warning-500 dark:border-warning-600 text-warning-700 dark:text-warning-100 bg-warning-50 dark:bg-warning-900';
|
|
55
|
-
export const errorAlertColors =
|
|
56
|
-
'border-error-500 dark:border-error-600 text-error-700 dark:text-error-100 bg-error-50 dark:bg-error-900';
|
|
57
|
-
|
|
58
|
-
export const valenceAlertColors = (valence?: MessageValence) => {
|
|
59
|
-
switch (valence) {
|
|
60
|
-
case 'success':
|
|
61
|
-
return successAlertColors;
|
|
62
|
-
case 'info':
|
|
63
|
-
return infoAlertColors;
|
|
64
|
-
case 'warning':
|
|
65
|
-
return warningAlertColors;
|
|
66
|
-
case 'error':
|
|
67
|
-
return errorAlertColors;
|
|
68
|
-
default:
|
|
69
|
-
return neutralAlertColors;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ComponentStory, Story } from '@storybook/react';
|
|
6
|
-
import React, { FC } from 'react';
|
|
7
|
-
|
|
8
|
-
export const templateForComponent =
|
|
9
|
-
<P extends {}>(Component: FC<P>) =>
|
|
10
|
-
(props: P): Story<P> => {
|
|
11
|
-
const template: ComponentStory<typeof Component> = (args) => <Component {...args} />;
|
|
12
|
-
|
|
13
|
-
const story = template.bind({});
|
|
14
|
-
story.args = props;
|
|
15
|
-
return story;
|
|
16
|
-
};
|
package/src/theme.css
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
@import '@fontsource/roboto-flex/variable-full.css';
|
|
2
|
-
@import '@fontsource/fira-code/variable.css';
|
|
3
|
-
@import '@fontsource/space-grotesk/variable-full.css';
|
|
4
|
-
|
|
5
|
-
@tailwind base;
|
|
6
|
-
@tailwind utilities;
|
|
7
|
-
@tailwind components;
|
|
8
|
-
|
|
9
|
-
@layer utilities {
|
|
10
|
-
/* Font weights */
|
|
11
|
-
.font-thin {
|
|
12
|
-
font-variation-settings: 'wght' 100;
|
|
13
|
-
}
|
|
14
|
-
.font-extralight {
|
|
15
|
-
font-variation-settings: 'wght' 200;
|
|
16
|
-
}
|
|
17
|
-
.font-light {
|
|
18
|
-
font-variation-settings: 'wght' 300;
|
|
19
|
-
}
|
|
20
|
-
.font-normal {
|
|
21
|
-
font-variation-settings: 'wght' 400;
|
|
22
|
-
}
|
|
23
|
-
.font-medium {
|
|
24
|
-
font-variation-settings: 'wght' 500;
|
|
25
|
-
}
|
|
26
|
-
.font-semibold {
|
|
27
|
-
font-variation-settings: 'wght' 600;
|
|
28
|
-
}
|
|
29
|
-
.font-bold {
|
|
30
|
-
font-variation-settings: 'wght' 700;
|
|
31
|
-
}
|
|
32
|
-
.font-extrabold {
|
|
33
|
-
font-variation-settings: 'wght' 800;
|
|
34
|
-
}
|
|
35
|
-
.font-black {
|
|
36
|
-
font-variation-settings: 'wght' 900;
|
|
37
|
-
}
|
|
38
|
-
/* Elevations */
|
|
39
|
-
.button-elevation {
|
|
40
|
-
box-shadow: var(--button-elevation)
|
|
41
|
-
}
|
|
42
|
-
.elevated-buttons {
|
|
43
|
-
--button-elevation: theme(boxShadow.sm);
|
|
44
|
-
}
|
|
45
|
-
.grouped-buttons {
|
|
46
|
-
--button-elevation: theme(boxShadow.none);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:root {
|
|
51
|
-
--surface-bg: theme(colors.neutral.50);
|
|
52
|
-
--surface-text: theme(colors.neutral.900);
|
|
53
|
-
--button-elevation: theme(boxShadow.md);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.dark {
|
|
57
|
-
--surface-bg: theme(colors.neutral.900);
|
|
58
|
-
--surface-text: theme(colors.neutral.50);
|
|
59
|
-
--button-elevation: theme(boxShadow.lg);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
html {
|
|
63
|
-
background-color: var(--surface-bg);
|
|
64
|
-
color: var(--surface-text);
|
|
65
|
-
}
|
package/src/typings.d.ts
DELETED
package/src/util/index.ts
DELETED
package/src/util/mx.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { extendTailwindMerge, validators } from 'tailwind-merge';
|
|
6
|
-
|
|
7
|
-
import { withLogical } from './withLogical';
|
|
8
|
-
|
|
9
|
-
export const mx = extendTailwindMerge(
|
|
10
|
-
{
|
|
11
|
-
classGroups: {
|
|
12
|
-
fontFamily: ['font-body', 'font-display', 'font-mono'],
|
|
13
|
-
fontWeight: [
|
|
14
|
-
'font-thin',
|
|
15
|
-
'font-extralight',
|
|
16
|
-
'font-light',
|
|
17
|
-
'font-normal',
|
|
18
|
-
'font-medium',
|
|
19
|
-
'font-semibold',
|
|
20
|
-
'font-bold',
|
|
21
|
-
'font-extrabold',
|
|
22
|
-
'font-black',
|
|
23
|
-
validators.isArbitraryNumber
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
withLogical
|
|
28
|
-
);
|