aidos-ui 4.0.3 → 4.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +23 -3
- package/dist/index.d.ts +797 -68
- package/dist/index.js +3868 -68
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +6 -2
- package/dist/jsx-dev-runtime.js +87 -42
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +2 -2
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/vite-plugin-jss-debug.d.ts +12 -6
- package/dist/vite-plugin-jss-debug.js +57 -72
- package/dist/vite-plugin-jss-debug.js.map +1 -1
- package/package.json +58 -27
- package/.claude/settings.local.json +0 -22
- package/.prettierrc +0 -4
- package/CLAUDE.md +0 -72
- package/dist/Badge.d.ts +0 -6
- package/dist/Badge.js +0 -22
- package/dist/Badge.js.map +0 -1
- package/dist/BaseButton.d.ts +0 -14
- package/dist/BaseButton.js +0 -23
- package/dist/BaseButton.js.map +0 -1
- package/dist/BaseInput.d.ts +0 -14
- package/dist/BaseInput.js +0 -15
- package/dist/BaseInput.js.map +0 -1
- package/dist/BaseLink.d.ts +0 -18
- package/dist/BaseLink.js +0 -29
- package/dist/BaseLink.js.map +0 -1
- package/dist/BaseList.d.ts +0 -6
- package/dist/BaseList.js +0 -14
- package/dist/BaseList.js.map +0 -1
- package/dist/BaseListAddOn.d.ts +0 -5
- package/dist/BaseListAddOn.js +0 -7
- package/dist/BaseListAddOn.js.map +0 -1
- package/dist/BaseListItem.d.ts +0 -26
- package/dist/BaseListItem.js +0 -29
- package/dist/BaseListItem.js.map +0 -1
- package/dist/BaseView.d.ts +0 -12
- package/dist/BaseView.js +0 -26
- package/dist/BaseView.js.map +0 -1
- package/dist/Box.d.ts +0 -4
- package/dist/Box.js +0 -6
- package/dist/Box.js.map +0 -1
- package/dist/Button.d.ts +0 -20
- package/dist/Button.js +0 -19
- package/dist/Button.js.map +0 -1
- package/dist/Calendar.d.ts +0 -18
- package/dist/Calendar.js +0 -57
- package/dist/Calendar.js.map +0 -1
- package/dist/Card.d.ts +0 -4
- package/dist/Card.js +0 -14
- package/dist/Card.js.map +0 -1
- package/dist/Checkbox.d.ts +0 -11
- package/dist/Checkbox.js +0 -32
- package/dist/Checkbox.js.map +0 -1
- package/dist/Circle.d.ts +0 -5
- package/dist/Circle.js +0 -12
- package/dist/Circle.js.map +0 -1
- package/dist/Column.d.ts +0 -6
- package/dist/Column.js +0 -7
- package/dist/Column.js.map +0 -1
- package/dist/DarkMode.d.ts +0 -13
- package/dist/DarkMode.js +0 -62
- package/dist/DarkMode.js.map +0 -1
- package/dist/DateInput.d.ts +0 -13
- package/dist/DateInput.js +0 -29
- package/dist/DateInput.js.map +0 -1
- package/dist/DatePicker.d.ts +0 -11
- package/dist/DatePicker.js +0 -34
- package/dist/DatePicker.js.map +0 -1
- package/dist/DatetimeInput.d.ts +0 -13
- package/dist/DatetimeInput.js +0 -31
- package/dist/DatetimeInput.js.map +0 -1
- package/dist/DesignBook.d.ts +0 -1
- package/dist/DesignBook.js +0 -55
- package/dist/DesignBook.js.map +0 -1
- package/dist/Dialog.d.ts +0 -17
- package/dist/Dialog.js +0 -92
- package/dist/Dialog.js.map +0 -1
- package/dist/Dropdown.d.ts +0 -14
- package/dist/Dropdown.js +0 -65
- package/dist/Dropdown.js.map +0 -1
- package/dist/Emitter.d.ts +0 -6
- package/dist/Emitter.js +0 -19
- package/dist/Emitter.js.map +0 -1
- package/dist/FlexLayout.d.ts +0 -11
- package/dist/FlexLayout.js +0 -18
- package/dist/FlexLayout.js.map +0 -1
- package/dist/Icon.d.ts +0 -12
- package/dist/Icon.js +0 -60
- package/dist/Icon.js.map +0 -1
- package/dist/IconButton.d.ts +0 -9
- package/dist/IconButton.js +0 -31
- package/dist/IconButton.js.map +0 -1
- package/dist/IconLink.d.ts +0 -9
- package/dist/IconLink.js +0 -32
- package/dist/IconLink.js.map +0 -1
- package/dist/IconType.d.ts +0 -1
- package/dist/IconType.js +0 -2
- package/dist/IconType.js.map +0 -1
- package/dist/Interactable.d.ts +0 -50
- package/dist/Interactable.js +0 -169
- package/dist/Interactable.js.map +0 -1
- package/dist/JSSComment.d.ts +0 -10
- package/dist/JSSComment.js +0 -52
- package/dist/JSSComment.js.map +0 -1
- package/dist/Link.d.ts +0 -22
- package/dist/Link.js +0 -29
- package/dist/Link.js.map +0 -1
- package/dist/List.d.ts +0 -15
- package/dist/List.js +0 -29
- package/dist/List.js.map +0 -1
- package/dist/ListButtonItem.d.ts +0 -14
- package/dist/ListButtonItem.js +0 -11
- package/dist/ListButtonItem.js.map +0 -1
- package/dist/ListDivider.d.ts +0 -1
- package/dist/ListDivider.js +0 -12
- package/dist/ListDivider.js.map +0 -1
- package/dist/ListHeaderItem.d.ts +0 -10
- package/dist/ListHeaderItem.js +0 -15
- package/dist/ListHeaderItem.js.map +0 -1
- package/dist/ListItem.d.ts +0 -9
- package/dist/ListItem.js +0 -9
- package/dist/ListItem.js.map +0 -1
- package/dist/ListLinkItem.d.ts +0 -16
- package/dist/ListLinkItem.js +0 -11
- package/dist/ListLinkItem.js.map +0 -1
- package/dist/ListSpacer.d.ts +0 -1
- package/dist/ListSpacer.js +0 -13
- package/dist/ListSpacer.js.map +0 -1
- package/dist/MenuIcon.d.ts +0 -5
- package/dist/MenuIcon.js +0 -31
- package/dist/MenuIcon.js.map +0 -1
- package/dist/NextJSRouter.d.ts +0 -1
- package/dist/NextJSRouter.js +0 -37
- package/dist/NextJSRouter.js.map +0 -1
- package/dist/NextJSRouterState.d.ts +0 -38
- package/dist/NextJSRouterState.js +0 -111
- package/dist/NextJSRouterState.js.map +0 -1
- package/dist/OnVisible.d.ts +0 -5
- package/dist/OnVisible.js +0 -28
- package/dist/OnVisible.js.map +0 -1
- package/dist/Popover.d.ts +0 -22
- package/dist/Popover.js +0 -90
- package/dist/Popover.js.map +0 -1
- package/dist/ProgressBar.d.ts +0 -7
- package/dist/ProgressBar.js +0 -42
- package/dist/ProgressBar.js.map +0 -1
- package/dist/ProgressCircle.d.ts +0 -5
- package/dist/ProgressCircle.js +0 -12
- package/dist/ProgressCircle.js.map +0 -1
- package/dist/Providers.d.ts +0 -9
- package/dist/Providers.js +0 -16
- package/dist/Providers.js.map +0 -1
- package/dist/RangeInput.d.ts +0 -14
- package/dist/RangeInput.js +0 -32
- package/dist/RangeInput.js.map +0 -1
- package/dist/ResultOrError.d.ts +0 -13
- package/dist/ResultOrError.js +0 -7
- package/dist/ResultOrError.js.map +0 -1
- package/dist/RootView.d.ts +0 -5
- package/dist/RootView.js +0 -35
- package/dist/RootView.js.map +0 -1
- package/dist/Row.d.ts +0 -6
- package/dist/Row.js +0 -7
- package/dist/Row.js.map +0 -1
- package/dist/Select.d.ts +0 -9
- package/dist/Select.js +0 -17
- package/dist/Select.js.map +0 -1
- package/dist/StackContext.d.ts +0 -8
- package/dist/StackContext.js +0 -25
- package/dist/StackContext.js.map +0 -1
- package/dist/StaticCheckbox.d.ts +0 -16
- package/dist/StaticCheckbox.js +0 -48
- package/dist/StaticCheckbox.js.map +0 -1
- package/dist/Storage.d.ts +0 -13
- package/dist/Storage.js +0 -146
- package/dist/Storage.js.map +0 -1
- package/dist/Stream.d.ts +0 -9
- package/dist/Stream.js +0 -36
- package/dist/Stream.js.map +0 -1
- package/dist/Sublist.d.ts +0 -12
- package/dist/Sublist.js +0 -18
- package/dist/Sublist.js.map +0 -1
- package/dist/SubmitIconInput.d.ts +0 -8
- package/dist/SubmitIconInput.js +0 -25
- package/dist/SubmitIconInput.js.map +0 -1
- package/dist/Tabs.d.ts +0 -23
- package/dist/Tabs.js +0 -39
- package/dist/Tabs.js.map +0 -1
- package/dist/Text.d.ts +0 -25
- package/dist/Text.js +0 -52
- package/dist/Text.js.map +0 -1
- package/dist/TextArea.d.ts +0 -11
- package/dist/TextArea.js +0 -27
- package/dist/TextArea.js.map +0 -1
- package/dist/TextInput.d.ts +0 -15
- package/dist/TextInput.js +0 -61
- package/dist/TextInput.js.map +0 -1
- package/dist/TextInputWithState.d.ts +0 -8
- package/dist/TextInputWithState.js +0 -14
- package/dist/TextInputWithState.js.map +0 -1
- package/dist/TextPairing.d.ts +0 -21
- package/dist/TextPairing.js +0 -26
- package/dist/TextPairing.js.map +0 -1
- package/dist/TimeInput.d.ts +0 -15
- package/dist/TimeInput.js +0 -58
- package/dist/TimeInput.js.map +0 -1
- package/dist/Tooltip.d.ts +0 -11
- package/dist/Tooltip.js +0 -73
- package/dist/Tooltip.js.map +0 -1
- package/dist/aria.d.ts +0 -8
- package/dist/aria.js +0 -42
- package/dist/aria.js.map +0 -1
- package/dist/guid.d.ts +0 -1
- package/dist/guid.js +0 -7
- package/dist/guid.js.map +0 -1
- package/dist/hash.d.ts +0 -1
- package/dist/hash.js +0 -20
- package/dist/hash.js.map +0 -1
- package/dist/isServer.d.ts +0 -1
- package/dist/isServer.js +0 -4
- package/dist/isServer.js.map +0 -1
- package/dist/jss.d.ts +0 -122
- package/dist/jss.js +0 -515
- package/dist/jss.js.map +0 -1
- package/dist/numberToBase.d.ts +0 -1
- package/dist/numberToBase.js +0 -44
- package/dist/numberToBase.js.map +0 -1
- package/dist/stateMachineContextFactory.d.ts +0 -36
- package/dist/stateMachineContextFactory.js +0 -48
- package/dist/stateMachineContextFactory.js.map +0 -1
- package/dist/useCookie.d.ts +0 -9
- package/dist/useCookie.js +0 -67
- package/dist/useCookie.js.map +0 -1
- package/dist/useKeyboard.d.ts +0 -8
- package/dist/useKeyboard.js +0 -26
- package/dist/useKeyboard.js.map +0 -1
- package/dist/useNavigation.d.ts +0 -5
- package/dist/useNavigation.js +0 -79
- package/dist/useNavigation.js.map +0 -1
- package/dist/usePromise.d.ts +0 -1
- package/dist/usePromise.js +0 -12
- package/dist/usePromise.js.map +0 -1
- package/dist/useRefEffect.d.ts +0 -1
- package/dist/useRefEffect.js +0 -15
- package/dist/useRefEffect.js.map +0 -1
- package/jss-debug-loader.mjs +0 -44
- package/next-env.d.ts +0 -6
- package/next.config.js +0 -33
- package/scripts/embeddings.js +0 -93
- package/scripts/openai_embeddings.js +0 -100
- package/scripts/publish.js +0 -28
- package/scripts/test_embeddings.js +0 -47
- package/src/Badge.tsx +0 -36
- package/src/BaseButton.tsx +0 -62
- package/src/BaseInput.tsx +0 -63
- package/src/BaseLink.tsx +0 -80
- package/src/BaseList.tsx +0 -26
- package/src/BaseListAddOn.tsx +0 -10
- package/src/BaseListItem.tsx +0 -119
- package/src/BaseView.tsx +0 -57
- package/src/Box.tsx +0 -20
- package/src/Button.tsx +0 -90
- package/src/Calendar.tsx +0 -125
- package/src/Card.tsx +0 -30
- package/src/Checkbox.tsx +0 -63
- package/src/Circle.tsx +0 -24
- package/src/Column.tsx +0 -12
- package/src/DarkMode.tsx +0 -100
- package/src/DateInput.tsx +0 -63
- package/src/DatePicker.tsx +0 -67
- package/src/DatetimeInput.tsx +0 -64
- package/src/DesignBook.tsx +0 -677
- package/src/Dialog.tsx +0 -150
- package/src/Dropdown.tsx +0 -146
- package/src/Emitter.ts +0 -26
- package/src/FlexLayout.tsx +0 -53
- package/src/Icon.tsx +0 -80
- package/src/IconButton.tsx +0 -58
- package/src/IconLink.tsx +0 -59
- package/src/IconType.ts +0 -787
- package/src/Interactable.tsx +0 -210
- package/src/JSSComment.tsx +0 -56
- package/src/Link.tsx +0 -110
- package/src/List.tsx +0 -58
- package/src/ListButtonItem.tsx +0 -69
- package/src/ListDivider.tsx +0 -13
- package/src/ListHeaderItem.tsx +0 -45
- package/src/ListItem.tsx +0 -24
- package/src/ListLinkItem.tsx +0 -76
- package/src/ListSpacer.tsx +0 -14
- package/src/MenuIcon.tsx +0 -50
- package/src/NextJSRouter.tsx +0 -62
- package/src/NextJSRouterState.tsx +0 -154
- package/src/OnVisible.tsx +0 -42
- package/src/Popover.tsx +0 -145
- package/src/ProgressBar.tsx +0 -63
- package/src/ProgressCircle.tsx +0 -38
- package/src/Providers.tsx +0 -33
- package/src/RangeInput.tsx +0 -82
- package/src/ResultOrError.ts +0 -15
- package/src/RootView.tsx +0 -55
- package/src/Row.tsx +0 -12
- package/src/Select.tsx +0 -39
- package/src/StackContext.tsx +0 -52
- package/src/StaticCheckbox.tsx +0 -72
- package/src/Storage.tsx +0 -198
- package/src/Stream.tsx +0 -50
- package/src/Sublist.tsx +0 -61
- package/src/SubmitIconInput.tsx +0 -45
- package/src/Tabs.tsx +0 -110
- package/src/Text.tsx +0 -111
- package/src/TextArea.tsx +0 -58
- package/src/TextInput.tsx +0 -123
- package/src/TextInputWithState.tsx +0 -32
- package/src/TextPairing.tsx +0 -115
- package/src/TimeInput.tsx +0 -109
- package/src/Tooltip.tsx +0 -109
- package/src/aria.ts +0 -72
- package/src/docs/mdx.tsx +0 -137
- package/src/docs/pages.ts +0 -115
- package/src/docs/searchIndex.ts +0 -1
- package/src/examples/ExampleDialog.tsx +0 -28
- package/src/guid.ts +0 -7
- package/src/hash.ts +0 -21
- package/src/index.ts +0 -68
- package/src/isServer.ts +0 -3
- package/src/jss.tsx +0 -712
- package/src/jsx-dev-runtime.ts +0 -74
- package/src/jsx-runtime.ts +0 -2
- package/src/numberToBase.ts +0 -52
- package/src/pages/Badge.mdx +0 -152
- package/src/pages/Button.mdx +0 -163
- package/src/pages/Calendar.mdx +0 -254
- package/src/pages/Card.mdx +0 -147
- package/src/pages/Checkbox.mdx +0 -131
- package/src/pages/Dialog.mdx +0 -197
- package/src/pages/FlexLayout.mdx +0 -211
- package/src/pages/Hashing.mdx +0 -211
- package/src/pages/Icon.mdx +0 -171
- package/src/pages/IconButton.mdx +0 -155
- package/src/pages/Link.mdx +0 -160
- package/src/pages/List.mdx +0 -262
- package/src/pages/ListHeader.mdx +0 -220
- package/src/pages/Popover.mdx +0 -223
- package/src/pages/ProgressBar.mdx +0 -200
- package/src/pages/ProgressCircle.mdx +0 -218
- package/src/pages/RangeInput.mdx +0 -237
- package/src/pages/Tabs.mdx +0 -281
- package/src/pages/Text.mdx +0 -154
- package/src/pages/TextInput.mdx +0 -235
- package/src/pages/TextPairing.mdx +0 -204
- package/src/pages/TimeInput.mdx +0 -178
- package/src/pages/Tooltip.mdx +0 -115
- package/src/pages/_app.tsx +0 -466
- package/src/pages/_document.tsx +0 -30
- package/src/pages/css-in-js.mdx +0 -240
- package/src/pages/index.mdx +0 -58
- package/src/pages/navigation.mdx +0 -158
- package/src/pages/prism.css +0 -3
- package/src/pages/useCookie.mdx +0 -176
- package/src/pages/useKeyboard.mdx +0 -257
- package/src/pages/useNavigation.mdx +0 -258
- package/src/pages/usePromise.mdx +0 -280
- package/src/pages/useRefEffect.mdx +0 -251
- package/src/stateMachineContextFactory.tsx +0 -111
- package/src/useCookie.tsx +0 -95
- package/src/useKeyboard.tsx +0 -43
- package/src/useNavigation.tsx +0 -89
- package/src/usePromise.tsx +0 -18
- package/src/useRefEffect.tsx +0 -18
- package/src/vite-plugin-jss-debug.ts +0 -75
- package/tsconfig.build.json +0 -23
- package/tsconfig.json +0 -38
package/dist/SubmitIconInput.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BaseInput } from "./BaseInput";
|
|
3
|
-
import { Box } from "./Box";
|
|
4
|
-
import { Icon } from "./Icon";
|
|
5
|
-
export function SubmitIconInput({ icon, ...otherProps }) {
|
|
6
|
-
return (_jsx(BaseInput, { label: _jsx(Box, { jss: {
|
|
7
|
-
cursor: "pointer",
|
|
8
|
-
display: "flex",
|
|
9
|
-
justifyContent: "center",
|
|
10
|
-
alignItems: "center",
|
|
11
|
-
":hover": {
|
|
12
|
-
backgroundColor: "var(--secondary-background)",
|
|
13
|
-
opacity: 0.8,
|
|
14
|
-
},
|
|
15
|
-
":active": {
|
|
16
|
-
transform: "scale(0.92)",
|
|
17
|
-
},
|
|
18
|
-
height: 32,
|
|
19
|
-
width: 32,
|
|
20
|
-
borderRadius: 16,
|
|
21
|
-
}, children: _jsx(Icon, { icon: icon, size: "medium", color: "primary" }) }), ...otherProps, type: "submit", jss: {
|
|
22
|
-
visibility: "hidden",
|
|
23
|
-
}, value: "" }));
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=SubmitIconInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitIconInput.js","sourceRoot":"","sources":["../src/SubmitIconInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAQ9B,MAAM,UAAU,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,UAAU,EAAwB;IAC3E,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EACH,KAAC,GAAG,IACF,GAAG,EAAE;gBACH,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,MAAM;gBACf,cAAc,EAAE,QAAQ;gBACxB,UAAU,EAAE,QAAQ;gBACpB,QAAQ,EAAE;oBACR,eAAe,EAAE,6BAA6B;oBAC9C,OAAO,EAAE,GAAG;iBACb;gBACD,SAAS,EAAE;oBACT,SAAS,EAAE,aAAa;iBACzB;gBACD,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,EAAE;gBACT,YAAY,EAAE,EAAE;aACjB,YAED,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,GAAG,GAC9C,KAEJ,UAAU,EACd,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE;YACH,UAAU,EAAE,QAAQ;SACrB,EACD,KAAK,EAAC,EAAE,GACR,CACH,CAAC;AACJ,CAAC"}
|
package/dist/Tabs.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { RowProps } from "./Row";
|
|
2
|
-
import { JSS, Padding, Size } from "./jss";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
export type Tab = {
|
|
5
|
-
label: string;
|
|
6
|
-
href?: string;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
selected?: boolean;
|
|
9
|
-
addOn?: ReactNode;
|
|
10
|
-
addOnPosition?: "start" | "end";
|
|
11
|
-
};
|
|
12
|
-
export interface TabsProps extends RowProps {
|
|
13
|
-
["aria-controls"]: string;
|
|
14
|
-
tabs: Array<Tab>;
|
|
15
|
-
labelSize?: Size;
|
|
16
|
-
bare?: boolean;
|
|
17
|
-
tabPadding?: Padding;
|
|
18
|
-
jssTab?: JSS | ((data: {
|
|
19
|
-
selected: boolean;
|
|
20
|
-
}) => JSS);
|
|
21
|
-
labelRenderer?: (label: string) => ReactNode;
|
|
22
|
-
}
|
|
23
|
-
export declare function Tabs({ tabs, gap, padding, tabPadding, labelSize, jss, jssTab, labelRenderer, ["aria-controls"]: ariaControls, ...otherProps }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/Tabs.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BaseLink } from "./BaseLink";
|
|
3
|
-
import { Row } from "./Row";
|
|
4
|
-
import { cssVar, getPadding } from "./jss";
|
|
5
|
-
import { useNavigation } from "./useNavigation";
|
|
6
|
-
import { Text } from "./Text";
|
|
7
|
-
import { BaseButton } from "./BaseButton";
|
|
8
|
-
export function Tabs({ tabs, gap = "none", padding = "none", tabPadding = "medium", labelSize = "large", jss, jssTab, labelRenderer, ["aria-controls"]: ariaControls, ...otherProps }) {
|
|
9
|
-
const root = useNavigation();
|
|
10
|
-
return (_jsx(Row, { role: "tablist", jss: jss, gap: gap, padding: padding, ref: root, ...otherProps, children: tabs.map(({ label, href, onClick, selected, addOn, addOnPosition = "start", }) => {
|
|
11
|
-
const BaseComponent = href != null ? BaseLink : BaseButton;
|
|
12
|
-
return (_jsxs(BaseComponent, { "aria-controls": ariaControls, role: "tab", "aria-selected": selected ? "true" : undefined, bare: true, color: selected ? "positive" : "primary", href: href, onClick: onClick, animateInteraction: false, jss: [
|
|
13
|
-
{
|
|
14
|
-
textDecoration: "none",
|
|
15
|
-
borderBottom: selected
|
|
16
|
-
? `3px solid ${cssVar("--highlight")}`
|
|
17
|
-
: `3px solid transparent`,
|
|
18
|
-
":active span": {
|
|
19
|
-
transform: "scale(0.97)",
|
|
20
|
-
},
|
|
21
|
-
":first-child": {
|
|
22
|
-
borderTopLeftRadius: cssVar("--border-radius-m"),
|
|
23
|
-
},
|
|
24
|
-
":last-child": {
|
|
25
|
-
borderTopRightRadius: cssVar("--border-radius-m"),
|
|
26
|
-
},
|
|
27
|
-
":hover": {
|
|
28
|
-
backgroundColor: cssVar("--hovered-background"),
|
|
29
|
-
},
|
|
30
|
-
":active:hover": {
|
|
31
|
-
backgroundColor: cssVar("--pressed-background"),
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
getPadding(tabPadding),
|
|
35
|
-
typeof jssTab === "function" ? jssTab({ selected }) : jssTab,
|
|
36
|
-
], children: [addOnPosition === "start" && addOn, _jsx(Text, { size: labelSize, color: selected ? "primary" : "secondary", children: labelRenderer ? labelRenderer(label) : label }), addOnPosition === "end" && addOn] }, label));
|
|
37
|
-
}) }));
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=Tabs.js.map
|
package/dist/Tabs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,EAAsB,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,M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cAAc,EAAE;4BACd,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,CAAC;yBACjD;wBACD,aAAa,EAAE;4BACb,oBAAoB,EAAE,MAAM,CAAC,mBAAmB,CAAC;yBAClD;wBACD,QAAQ,EAAE;4BACR,eAAe,EAAE,MAAM,CAAC,sBAAsB,CAAC;yBAChD;wBACD,eAAe,EAAE;4BACf,eAAe,EAAE,MAAM,CAAC,sBAAsB,CAAC;yBAChD;qBACF;oBACD,UAAU,CAAC,UAAU,CAAC;oBACtB,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM;iBAC7D,aAEA,aAAa,KAAK,OAAO,IAAI,KAAK,EACnC,KAAC,IAAI,IAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,YAC7D,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GACxC,EACN,aAAa,KAAK,KAAK,IAAI,KAAK,KApC5B,KAAK,CAqCI,CACjB,CAAC;QACJ,CAAC,CACF,GACG,CACP,CAAC;AACJ,CAAC"}
|
package/dist/Text.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { JSS, Size, TextColor } from "./jss";
|
|
3
|
-
export type Display = "inline" | "block";
|
|
4
|
-
export interface TextProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
color?: TextColor;
|
|
7
|
-
size?: Size;
|
|
8
|
-
bold?: boolean;
|
|
9
|
-
ellipsis?: boolean | "default";
|
|
10
|
-
align?: "center" | "none";
|
|
11
|
-
type?: TextType;
|
|
12
|
-
grow?: boolean;
|
|
13
|
-
jss?: JSS;
|
|
14
|
-
id?: string;
|
|
15
|
-
htmlFor?: string;
|
|
16
|
-
}
|
|
17
|
-
export type TextType = "label" | "span" | "p" | "h1" | "h2" | "h3" | "h4" | "li";
|
|
18
|
-
export declare function Text({ children, color, size, align, bold, ellipsis, grow, type: Type, jss, id, htmlFor, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare function Label({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function Span({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function P({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare function H1({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare function H2({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function H3({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function Li({ size, type, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/Text.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cssVar, getTextColor, toClassnames, } from "./jss";
|
|
3
|
-
const fontSize = {
|
|
4
|
-
xsmall: cssVar("--font-xsmall"),
|
|
5
|
-
small: cssVar("--font-small"),
|
|
6
|
-
medium: cssVar("--font-medium"),
|
|
7
|
-
large: cssVar("--font-large"),
|
|
8
|
-
xlarge: cssVar("--font-xlarge"),
|
|
9
|
-
xxlarge: cssVar("--font-xxlarge"),
|
|
10
|
-
xxxlarge: cssVar("--font-xxxlarge"),
|
|
11
|
-
};
|
|
12
|
-
export function Text({ children, color = "primary", size = "medium", align = "none", bold = false, ellipsis = "default", grow, type: Type = "span", jss, id, htmlFor, }) {
|
|
13
|
-
if (ellipsis === "default") {
|
|
14
|
-
ellipsis = Type === "span" || Type === "label";
|
|
15
|
-
}
|
|
16
|
-
const className = toClassnames([
|
|
17
|
-
getTextColor(color),
|
|
18
|
-
{ fontSize: fontSize[size], padding: 0, margin: 0 },
|
|
19
|
-
bold && { fontWeight: "bold" },
|
|
20
|
-
align === "center" && { textAlign: "center" },
|
|
21
|
-
ellipsis && {
|
|
22
|
-
overflow: "hidden",
|
|
23
|
-
textOverflow: "ellipsis",
|
|
24
|
-
whiteSpace: "nowrap",
|
|
25
|
-
},
|
|
26
|
-
grow && { flexGrow: 1 },
|
|
27
|
-
jss,
|
|
28
|
-
]);
|
|
29
|
-
return (_jsx(Type, { id: id, className: className, htmlFor: htmlFor, children: children }));
|
|
30
|
-
}
|
|
31
|
-
export function Label({ size = "medium", type = "label", ...rest }) {
|
|
32
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
33
|
-
}
|
|
34
|
-
export function Span({ size = "medium", type = "span", ...rest }) {
|
|
35
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
36
|
-
}
|
|
37
|
-
export function P({ size = "medium", type = "p", ...rest }) {
|
|
38
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
39
|
-
}
|
|
40
|
-
export function H1({ size = "xxlarge", type = "h1", ...rest }) {
|
|
41
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
42
|
-
}
|
|
43
|
-
export function H2({ size = "xlarge", type = "h2", ...rest }) {
|
|
44
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
45
|
-
}
|
|
46
|
-
export function H3({ size = "large", type = "h3", ...rest }) {
|
|
47
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
48
|
-
}
|
|
49
|
-
export function Li({ size = "medium", type = "li", ...rest }) {
|
|
50
|
-
return _jsx(Text, { size: size, type: type, ...rest });
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=Text.js.map
|
package/dist/Text.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":";AACA,OAAO,EAIL,MAAM,EACN,YAAY,EACZ,YAAY,GAC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,IAAI,EAAE,GAAG,IAAI,EAAa;IACpE,OAAO,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAM,IAAI,GAAI,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,EAAE,CAAC,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,EAAa;IACrE,OAAO,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,KAAM,IAAI,GAAI,CAAC;AACpD,CAAC"}
|
package/dist/TextArea.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { JSS, Padding } from "./jss";
|
|
3
|
-
export interface TextAreaProps extends React.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
-
jss?: JSS;
|
|
5
|
-
onValueChange?: (value: string) => void;
|
|
6
|
-
value?: string;
|
|
7
|
-
className?: undefined;
|
|
8
|
-
size?: undefined;
|
|
9
|
-
padding?: Padding;
|
|
10
|
-
}
|
|
11
|
-
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
package/dist/TextArea.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { cssVar, getPadding, toClassnames } from "./jss";
|
|
4
|
-
export const TextArea = React.forwardRef(({ jss, onValueChange, value, onChange, padding = "medium", ...otherProps }, ref) => {
|
|
5
|
-
return (_jsx("textarea", { ...otherProps, ref: ref, className: toClassnames([
|
|
6
|
-
{
|
|
7
|
-
flexGrow: 1,
|
|
8
|
-
color: cssVar("--primary-text"),
|
|
9
|
-
outline: "none",
|
|
10
|
-
fontSize: 20,
|
|
11
|
-
lineHeight: 24 / 20,
|
|
12
|
-
backgroundColor: cssVar("--overlay-background"),
|
|
13
|
-
border: `1px solid ${cssVar("--divider")}`,
|
|
14
|
-
borderRadius: cssVar("--border-radius-m"),
|
|
15
|
-
"::placeholder": {
|
|
16
|
-
color: cssVar("--subtle-text"),
|
|
17
|
-
},
|
|
18
|
-
":focus-visible": {
|
|
19
|
-
outline: `2px solid ${cssVar("--highlight")}`,
|
|
20
|
-
outlineOffset: -2,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
getPadding(padding),
|
|
24
|
-
jss,
|
|
25
|
-
]), value: value, onChange: onValueChange ? (e) => onValueChange(e.target.value) : undefined }));
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=TextArea.js.map
|
package/dist/TextArea.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../src/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAYvE,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CACE,EACE,GAAG,EACH,aAAa,EACb,KAAK,EACL,QAAQ,EACR,OAAO,GAAG,QAAQ,EAClB,GAAG,UAAU,EACC,EAChB,GAAoC,EACpC,EAAE;IACF,OAAO,CACL,sBACM,UAAU,EACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,YAAY,CAAC;YACtB;gBACE,QAAQ,EAAE,CAAC;gBACX,KAAK,EAAE,MAAM,CAAC,gBAAgB,CAAC;gBAC/B,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE,GAAG,EAAE;gBACnB,eAAe,EAAE,MAAM,CAAC,sBAAsB,CAAC;gBAC/C,MAAM,EAAE,aAAa,MAAM,CAAC,WAAW,CAAC,EAAE;gBAC1C,YAAY,EAAE,MAAM,CAAC,mBAAmB,CAAC;gBACzC,eAAe,EAAE;oBACf,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;iBAC/B;gBACD,gBAAgB,EAAE;oBAChB,OAAO,EAAE,aAAa,MAAM,CAAC,aAAa,CAAC,EAAE;oBAC7C,aAAa,EAAE,CAAC,CAAC;iBAClB;aACF;YACD,UAAU,CAAC,OAAO,CAAC;YACnB,GAAG;SACJ,CAAC,EACF,KAAK,EAAE,KAAK,EACZ,QAAQ,EACN,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,GAElE,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/dist/TextInput.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { BaseInputProps } from "./BaseInput";
|
|
3
|
-
import { Gap, JSS, Padding, Size } from "./jss";
|
|
4
|
-
export interface TextInputProps extends Omit<BaseInputProps, "size"> {
|
|
5
|
-
onValueChange?: (value: string) => void;
|
|
6
|
-
jssRoot?: JSS;
|
|
7
|
-
addOn?: ReactNode;
|
|
8
|
-
addOnPosition?: "start" | "end";
|
|
9
|
-
gap?: Gap;
|
|
10
|
-
onChange?: undefined;
|
|
11
|
-
padding?: Padding;
|
|
12
|
-
bare?: boolean;
|
|
13
|
-
size?: Size;
|
|
14
|
-
}
|
|
15
|
-
export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
package/dist/TextInput.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { BaseInput } from "./BaseInput";
|
|
4
|
-
import { Column } from "./Column";
|
|
5
|
-
import { Row } from "./Row";
|
|
6
|
-
import { cssVar, getPadding } from "./jss";
|
|
7
|
-
const fontSize = {
|
|
8
|
-
xsmall: cssVar("--font-xsmall"),
|
|
9
|
-
small: cssVar("--font-small"),
|
|
10
|
-
medium: cssVar("--font-medium"),
|
|
11
|
-
large: cssVar("--font-large"),
|
|
12
|
-
xlarge: cssVar("--font-xlarge"),
|
|
13
|
-
xxlarge: cssVar("--font-xxlarge"),
|
|
14
|
-
xxxlarge: cssVar("--font-xxxlarge"),
|
|
15
|
-
};
|
|
16
|
-
export const TextInput = React.forwardRef(({ value, onValueChange, jssRoot, jss, addOn, gap = "small", addOnPosition = "start", padding = "medium", bare, size = "medium", ...inputProps }, ref) => {
|
|
17
|
-
return (_jsxs(Row, { gap: gap, jss: [
|
|
18
|
-
{
|
|
19
|
-
borderRadius: cssVar("--border-radius-m"),
|
|
20
|
-
overflow: "hidden",
|
|
21
|
-
},
|
|
22
|
-
bare
|
|
23
|
-
? {
|
|
24
|
-
backgroundColor: "inherit",
|
|
25
|
-
":has(:focus-visible)": {
|
|
26
|
-
backgroundColor: cssVar("--light-highlight"),
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
: {
|
|
30
|
-
border: `1px solid ${cssVar("--divider")}`,
|
|
31
|
-
backgroundColor: cssVar("--overlay-background"),
|
|
32
|
-
":has(:focus-visible)": {
|
|
33
|
-
outline: `2px solid ${cssVar("--highlight")}`,
|
|
34
|
-
outlineOffset: -2,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
jssRoot,
|
|
38
|
-
], children: [addOnPosition === "start" && addOn && (_jsx(Column, { justify: "center", align: "center", jss: [getPadding(padding), { paddingRight: 0 }], children: addOn })), _jsx(BaseInput, { ...inputProps, ref: ref, value: value, onChange: onValueChange ? (e) => onValueChange(e.target.value) : undefined, jss: [
|
|
39
|
-
{
|
|
40
|
-
minWidth: 0,
|
|
41
|
-
flexGrow: 1,
|
|
42
|
-
backgroundColor: "inherit",
|
|
43
|
-
color: cssVar("--primary-text"),
|
|
44
|
-
outline: "none",
|
|
45
|
-
border: "none",
|
|
46
|
-
fontSize: fontSize[size],
|
|
47
|
-
lineHeight: 1.2,
|
|
48
|
-
"::placeholder": {
|
|
49
|
-
color: cssVar("--subtle-text"),
|
|
50
|
-
},
|
|
51
|
-
":disabled": {
|
|
52
|
-
color: cssVar("--subtle-text"),
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
getPadding(padding),
|
|
56
|
-
addOn && addOnPosition === "start" ? { paddingLeft: 0 } : null,
|
|
57
|
-
addOn && addOnPosition === "end" ? { paddingRight: 0 } : null,
|
|
58
|
-
jss,
|
|
59
|
-
] }), addOnPosition === "end" && addOn && (_jsx(Column, { justify: "center", align: "center", jss: [getPadding(padding), { paddingLeft: 0 }], children: addOn }))] }));
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=TextInput.js.map
|
package/dist/TextInput.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../src/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAA2B,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,QAAQ,GAAG;IACf,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC;CACpC,CAAC;AAcF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,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AQ,EAAE,CAAC;wBACX,QAAQ,EAAE,CAAC;wBACX,eAAe,EAAE,SAAS;wBAC1B,KAAK,EAAE,MAAM,CAAC,gBAAgB,CAAC;wBAC/B,OAAO,EAAE,MAAM;wBACf,MAAM,EAAE,MAAM;wBACd,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC;wBACxB,UAAU,EAAE,GAAG;wBACf,eAAe,EAAE;4BACf,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;yBAC/B;wBACD,WAAW,EAAE;4BACX,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;yBAC/B;qBACF;oBACD,UAAU,CAAC,OAAO,CAAC;oBACnB,KAAK,IAAI,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;oBAC9D,KAAK,IAAI,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;oBAC7D,GAAG;iBACJ,GACD,EACD,aAAa,KAAK,KAAK,IAAI,KAAK,IAAI,CACnC,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAC,QAAQ,EACd,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,YAE7C,KAAK,GACC,CACV,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BaseInputProps } from "./BaseInput";
|
|
3
|
-
export interface TextInputWithStateProps extends BaseInputProps {
|
|
4
|
-
onValueChange?: (value: string) => void;
|
|
5
|
-
valueRef: React.MutableRefObject<string>;
|
|
6
|
-
onChange?: undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare function TextInputWithState({ valueRef, onValueChange: externalOnChange, ...otherProps }: TextInputWithStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
import { TextInput } from "./TextInput";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
export function TextInputWithState({ valueRef, onValueChange: externalOnChange, ...otherProps }) {
|
|
6
|
-
const [value, setValue] = useState(valueRef.current);
|
|
7
|
-
const onValueChange = useCallback((value) => {
|
|
8
|
-
valueRef.current = value;
|
|
9
|
-
setValue(value);
|
|
10
|
-
externalOnChange && externalOnChange(value);
|
|
11
|
-
}, [setValue, externalOnChange, valueRef]);
|
|
12
|
-
return (_jsx(TextInput, { ...otherProps, value: value, onValueChange: onValueChange }));
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=TextInputWithState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputWithState.js","sourceRoot":"","sources":["../src/TextInputWithState.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQjC,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,aAAa,EAAE,gBAAgB,EAC/B,GAAG,UAAU,EACW;IACxB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAErD,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,KAAK,EAAE,EAAE;QACR,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;QACzB,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,gBAAgB,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC,EACD,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CACvC,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,OAAK,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,GAAI,CAC1E,CAAC;AACJ,CAAC"}
|
package/dist/TextPairing.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { TextColor, Size, Position, Gap, Padding, Align, JSS } from "./jss";
|
|
3
|
-
export interface TextPairingProps {
|
|
4
|
-
headline: ReactNode;
|
|
5
|
-
body?: ReactNode;
|
|
6
|
-
headlineColor?: TextColor;
|
|
7
|
-
headlineSize?: Size;
|
|
8
|
-
headlineAddOn?: ReactNode;
|
|
9
|
-
bodyColor?: TextColor;
|
|
10
|
-
bodySize?: Size;
|
|
11
|
-
addOn?: ReactNode;
|
|
12
|
-
addOnPosition?: Position;
|
|
13
|
-
gap?: Gap;
|
|
14
|
-
padding?: Padding;
|
|
15
|
-
align?: Align;
|
|
16
|
-
grow?: boolean;
|
|
17
|
-
shrink?: boolean;
|
|
18
|
-
headlineBold?: boolean;
|
|
19
|
-
jss?: JSS;
|
|
20
|
-
}
|
|
21
|
-
export declare function TextPairing({ headline, body, headlineColor, headlineSize, headlineAddOn, bodyColor, bodySize, addOn, addOnPosition, gap, align, grow, shrink, headlineBold, padding, jss, }: TextPairingProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/TextPairing.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from "./Text";
|
|
3
|
-
import { Row } from "./Row";
|
|
4
|
-
import { BaseView } from "./BaseView";
|
|
5
|
-
import { Column } from "./Column";
|
|
6
|
-
import { cssVar, } from "./jss";
|
|
7
|
-
export function TextPairing({ headline, body, headlineColor = "primary", headlineSize = "medium", headlineAddOn, bodyColor = "secondary", bodySize = "medium", addOn, addOnPosition = "start", gap = "small", align = "stretch", grow, shrink, headlineBold, padding, jss, }) {
|
|
8
|
-
const textElement = (_jsxs(Column, { grow: grow, shrink: shrink, padding: addOn ? undefined : padding, align: align, jss: [
|
|
9
|
-
{
|
|
10
|
-
overflow: "hidden",
|
|
11
|
-
},
|
|
12
|
-
jss,
|
|
13
|
-
], children: [_jsxs(Row, { align: "center", jss: {
|
|
14
|
-
textAlign: "start",
|
|
15
|
-
}, children: [_jsx(Text, { bold: headlineBold, color: headlineColor, size: headlineSize, children: headline }), headlineAddOn && _jsx(BaseView, { children: headlineAddOn })] }), body && (_jsx(Row, { align: "center", jss: {
|
|
16
|
-
marginTop: cssVar("--spacing-xs"),
|
|
17
|
-
textAlign: "start",
|
|
18
|
-
}, children: _jsx(Text, { ellipsis: true, color: bodyColor, size: bodySize, children: body }) }))] }));
|
|
19
|
-
if (addOn) {
|
|
20
|
-
return (_jsxs(Row, { grow: grow, shrink: shrink, gap: gap, align: "center", padding: padding, jss: {
|
|
21
|
-
overflow: "hidden",
|
|
22
|
-
}, children: [addOnPosition === "start" && addOn, textElement, addOnPosition === "end" && addOn] }));
|
|
23
|
-
}
|
|
24
|
-
return textElement;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=TextPairing.js.map
|
package/dist/TextPairing.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextPairing.js","sourceRoot":"","sources":["../src/TextPairing.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAOL,MAAM,GAEP,MAAM,OAAO,CAAC;AAqBf,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,SAAS,EACzB,YAAY,GAAG,QAAQ,EACvB,aAAa,EACb,SAAS,GAA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ClC,WAAW,EACX,aAAa,KAAK,KAAK,IAAI,KAAK,IAC7B,CACP,CAAC;IACJ,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/dist/TimeInput.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { BaseInputProps } from "./BaseInput";
|
|
3
|
-
import { Gap, Padding } from "./jss";
|
|
4
|
-
export interface TimeInputProps extends BaseInputProps {
|
|
5
|
-
onTimeChange: (date: Date) => void;
|
|
6
|
-
time: Date;
|
|
7
|
-
gap?: Gap;
|
|
8
|
-
padding?: Padding;
|
|
9
|
-
addOn?: ReactNode;
|
|
10
|
-
addOnPosition?: "start" | "end";
|
|
11
|
-
onChange?: undefined;
|
|
12
|
-
bare?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const timeFormatter: Intl.DateTimeFormat;
|
|
15
|
-
export declare const TimeInput: React.ForwardRefExoticComponent<TimeInputProps & React.RefAttributes<HTMLInputElement>>;
|
package/dist/TimeInput.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { BaseInput } from "./BaseInput";
|
|
4
|
-
import { Row } from "./Row";
|
|
5
|
-
import { cssVar } from "./jss";
|
|
6
|
-
export const timeFormatter = Intl.DateTimeFormat("en-UK", {
|
|
7
|
-
hour: "2-digit",
|
|
8
|
-
minute: "2-digit",
|
|
9
|
-
});
|
|
10
|
-
function TimeInputInternal({ time: date, onTimeChange: onDateChange, jss, addOn, padding = "small", gap = "none", addOnPosition = "start", bare, ...inputProps }, ref) {
|
|
11
|
-
return (_jsxs(Row, { padding: padding, gap: gap, align: "center", jss: [
|
|
12
|
-
{
|
|
13
|
-
borderRadius: cssVar("--border-radius-m"),
|
|
14
|
-
overflow: "hidden",
|
|
15
|
-
},
|
|
16
|
-
bare
|
|
17
|
-
? {
|
|
18
|
-
backgroundColor: "inherit",
|
|
19
|
-
":has(:focus-visible)": {
|
|
20
|
-
backgroundColor: cssVar("--light-highlight"),
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
: {
|
|
24
|
-
border: `1px solid ${cssVar("--divider")}`,
|
|
25
|
-
backgroundColor: cssVar("--overlay-background"),
|
|
26
|
-
":has(:focus-visible)": {
|
|
27
|
-
outline: `2px solid ${cssVar("--highlight")}`,
|
|
28
|
-
outlineOffset: -2,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
], children: [addOnPosition === "start" && addOn, _jsx(BaseInput, { ...inputProps, type: "time", ref: ref, value: timeFormatter.format(date), onChange: (e) => {
|
|
32
|
-
const value = e.target.value;
|
|
33
|
-
const [hour, minute] = value.split(":");
|
|
34
|
-
onDateChange(new Date(date.getFullYear(), date.getMonth(), date.getDate(), parseInt(hour), parseInt(minute)));
|
|
35
|
-
}, jss: [
|
|
36
|
-
{
|
|
37
|
-
flexGrow: 1,
|
|
38
|
-
backgroundColor: "inherit",
|
|
39
|
-
color: "var(--primary-text)",
|
|
40
|
-
outline: "none",
|
|
41
|
-
border: "none",
|
|
42
|
-
fontSize: 20,
|
|
43
|
-
lineHeight: 24 / 20,
|
|
44
|
-
"::placeholder": {
|
|
45
|
-
color: "var(--subtle-text);",
|
|
46
|
-
},
|
|
47
|
-
":disabled": {
|
|
48
|
-
color: "var(--subtle-text);",
|
|
49
|
-
},
|
|
50
|
-
"::-webkit-calendar-picker-indicator": {
|
|
51
|
-
backgroundColor: "none",
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
jss,
|
|
55
|
-
] }), addOnPosition === "end" && addOn] }));
|
|
56
|
-
}
|
|
57
|
-
export const TimeInput = React.forwardRef(TimeInputInternal);
|
|
58
|
-
//# sourceMappingURL=TimeInput.js.map
|
package/dist/TimeInput.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.js","sourceRoot":"","s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I,EAAC,MAAM,EACX,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EACjC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;oBAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACxC,YAAY,CACV,IAAI,IAAI,CACN,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,OAAO,EAAE,EACd,QAAQ,CAAC,IAAI,CAAC,EACd,QAAQ,CAAC,MAAM,CAAC,CACjB,CACF,CAAC;gBACJ,CAAC,EACD,GAAG,EAAE;oBACH;wBACE,QAAQ,EAAE,CAAC;wBACX,eAAe,EAAE,SAAS;wBAC1B,KAAK,EAAE,qBAAqB;wBAC5B,OAAO,EAAE,MAAM;wBACf,MAAM,EAAE,MAAM;wBACd,QAAQ,EAAE,EAAE;wBACZ,UAAU,EAAE,EAAE,GAAG,EAAE;wBACnB,eAAe,EAAE;4BACf,KAAK,EAAE,qBAAqB;yBAC7B;wBACD,WAAW,EAAE;4BACX,KAAK,EAAE,qBAAqB;yBAC7B;wBACD,qCAAqC,EAAE;4BACrC,eAAe,EAAE,MAAM;yBACxB;qBACF;oBACD,GAAG;iBACJ,GACD,EACD,aAAa,KAAK,KAAK,IAAI,KAAK,IAC7B,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC"}
|
package/dist/Tooltip.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { JSS } from "./jss";
|
|
3
|
-
interface TooltipProps {
|
|
4
|
-
content: string;
|
|
5
|
-
jss?: JSS;
|
|
6
|
-
className?: undefined;
|
|
7
|
-
tag?: keyof HTMLElementTagNameMap;
|
|
8
|
-
children: React.JSX.Element;
|
|
9
|
-
}
|
|
10
|
-
export declare function Tooltip({ content, jss, tag, children }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
package/dist/Tooltip.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState } from "react";
|
|
3
|
-
import { BaseView } from "./BaseView";
|
|
4
|
-
import { useRefEffect } from "./useRefEffect";
|
|
5
|
-
import { Text } from "./Text";
|
|
6
|
-
import { cssVar, toClassnames } from "./jss";
|
|
7
|
-
const jsss = {
|
|
8
|
-
tooltip: {
|
|
9
|
-
top: "-100%",
|
|
10
|
-
transform: "translateY(50%)",
|
|
11
|
-
backgroundColor: cssVar("--primary-background"),
|
|
12
|
-
padding: `${cssVar("--spacing-s")} ${cssVar("--spacing-m")}`,
|
|
13
|
-
borderRadius: cssVar("--border-radius-m"),
|
|
14
|
-
border: `1px solid ${cssVar("--divider")}`,
|
|
15
|
-
boxShadow: cssVar("--shadow-md"),
|
|
16
|
-
overflow: "hidden",
|
|
17
|
-
animation: "popoverFadeIn 0.15s ease-out",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export function Tooltip({ content, jss, tag, children }) {
|
|
21
|
-
const [tooltip, setTooltip] = useState(null);
|
|
22
|
-
const dialogRef = useRef(null);
|
|
23
|
-
const focusTrapRoot = useRefEffect((root) => {
|
|
24
|
-
dialogRef.current = root;
|
|
25
|
-
const keydown = (e) => {
|
|
26
|
-
if (e.key === "Escape") {
|
|
27
|
-
dialogRef.current?.close();
|
|
28
|
-
}
|
|
29
|
-
else if (e.key === "Tab") {
|
|
30
|
-
dialogRef.current?.close();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const click = () => {
|
|
34
|
-
dialogRef.current?.close();
|
|
35
|
-
};
|
|
36
|
-
window.addEventListener("keydown", keydown);
|
|
37
|
-
window.addEventListener("click", click);
|
|
38
|
-
const activeElement = document.activeElement;
|
|
39
|
-
root.show();
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
activeElement.focus();
|
|
42
|
-
return () => {
|
|
43
|
-
window.removeEventListener("keydown", keydown);
|
|
44
|
-
window.removeEventListener("click", click);
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
const toggle = () => {
|
|
48
|
-
if (tooltip == null) {
|
|
49
|
-
setTooltip(_jsx("dialog", { ref: (ref) => {
|
|
50
|
-
dialogRef.current = ref;
|
|
51
|
-
focusTrapRoot(ref);
|
|
52
|
-
}, className: toClassnames(jsss.tooltip), onClose: () => {
|
|
53
|
-
setTooltip(null);
|
|
54
|
-
}, onClick: (e) => {
|
|
55
|
-
e.preventDefault();
|
|
56
|
-
e.stopPropagation();
|
|
57
|
-
}, children: _jsx(Text, { size: "medium", color: "secondary", children: content }) }));
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
setTooltip(null);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return (_jsxs(BaseView, { tag: tag, relative: true, jss: [{ display: "inline-block" }, jss], onMouseEnter: () => {
|
|
64
|
-
if (tooltip == null) {
|
|
65
|
-
toggle();
|
|
66
|
-
}
|
|
67
|
-
}, onMouseLeave: () => {
|
|
68
|
-
if (tooltip != null) {
|
|
69
|
-
toggle();
|
|
70
|
-
}
|
|
71
|
-
}, children: [children, tooltip] }));
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=Tooltip.js.map
|
package/dist/Tooltip.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EA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,CACL,MAAC,QAAQ,IACP,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,IAAI,EACd,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,GAAG,CAAC,EACvC,YAAY,EAAE,GAAG,EAAE;YACjB,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;gBACpB,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;YACjB,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;gBACpB,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,aAEA,QAAQ,EACR,OAAO,IACC,CACZ,CAAC;AACJ,CAAC"}
|
package/dist/aria.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type Focusable = HTMLElement;
|
|
2
|
-
export declare function queryFocusables(root: HTMLElement): Focusable[];
|
|
3
|
-
export declare function queryGrid(root: HTMLElement): HTMLElement[][];
|
|
4
|
-
export declare const normalizeGrid: (rows: HTMLElement[][], rowIndex: number, columnIndex: number) => void;
|
|
5
|
-
export declare const focusGridElement: (rows: HTMLElement[][], rowIndex: number, columnIndex: number) => void;
|
|
6
|
-
export declare const normalizeElements: (focusables: HTMLElement[], index: number) => void;
|
|
7
|
-
export declare const focusElement: (focusables: HTMLElement[], index: number) => void;
|
|
8
|
-
export {};
|
package/dist/aria.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export function queryFocusables(root) {
|
|
2
|
-
const focusables = Array.from(root.querySelectorAll("button,input,textarea,a,[tabindex='0'],[tabindex='-1']"));
|
|
3
|
-
return focusables.filter((element) => !element["disabled"]);
|
|
4
|
-
}
|
|
5
|
-
export function queryGrid(root) {
|
|
6
|
-
const rows = Array.from(root.querySelectorAll('li[role="row"]'));
|
|
7
|
-
const rowsWithColumns = rows
|
|
8
|
-
.map((row) => Array.from(queryFocusables(row)))
|
|
9
|
-
.filter((row) => row.length > 0);
|
|
10
|
-
return rowsWithColumns;
|
|
11
|
-
}
|
|
12
|
-
export const normalizeGrid = (rows, rowIndex, columnIndex) => {
|
|
13
|
-
for (const row of rows) {
|
|
14
|
-
for (const column of row) {
|
|
15
|
-
column.tabIndex = -1;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const row = rows[rowIndex];
|
|
19
|
-
const column = row[columnIndex] ?? row[row.length - 1];
|
|
20
|
-
column.tabIndex = 0;
|
|
21
|
-
};
|
|
22
|
-
export const focusGridElement = (rows, rowIndex, columnIndex) => {
|
|
23
|
-
normalizeGrid(rows, rowIndex, columnIndex);
|
|
24
|
-
const row = rows[rowIndex];
|
|
25
|
-
const column = row[columnIndex] ?? row[row.length - 1];
|
|
26
|
-
column.focus();
|
|
27
|
-
column.scrollIntoView(false);
|
|
28
|
-
};
|
|
29
|
-
export const normalizeElements = (focusables, index) => {
|
|
30
|
-
for (const element of focusables) {
|
|
31
|
-
element.tabIndex = -1;
|
|
32
|
-
}
|
|
33
|
-
const element = focusables[index] ?? focusables[focusables.length - 1];
|
|
34
|
-
element.tabIndex = 0;
|
|
35
|
-
};
|
|
36
|
-
export const focusElement = (focusables, index) => {
|
|
37
|
-
normalizeElements(focusables, index);
|
|
38
|
-
const element = focusables[index] ?? focusables[focusables.length - 1];
|
|
39
|
-
element.focus();
|
|
40
|
-
// element.scrollIntoView(false);
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=aria.js.map
|