aidos-ui 3.0.0
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/.prettierrc +4 -0
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/Badge.d.ts +7 -0
- package/dist/Badge.js +22 -0
- package/dist/Badge.js.map +1 -0
- package/dist/BaseButton.d.ts +13 -0
- package/dist/BaseButton.js +22 -0
- package/dist/BaseButton.js.map +1 -0
- package/dist/BaseInput.d.ts +15 -0
- package/dist/BaseInput.js +14 -0
- package/dist/BaseInput.js.map +1 -0
- package/dist/BaseLink.d.ts +17 -0
- package/dist/BaseLink.js +28 -0
- package/dist/BaseLink.js.map +1 -0
- package/dist/BaseList.d.ts +6 -0
- package/dist/BaseList.js +14 -0
- package/dist/BaseList.js.map +1 -0
- package/dist/BaseListAddOn.d.ts +5 -0
- package/dist/BaseListAddOn.js +7 -0
- package/dist/BaseListAddOn.js.map +1 -0
- package/dist/BaseListItem.d.ts +27 -0
- package/dist/BaseListItem.js +26 -0
- package/dist/BaseListItem.js.map +1 -0
- package/dist/BaseView.d.ts +12 -0
- package/dist/BaseView.js +26 -0
- package/dist/BaseView.js.map +1 -0
- package/dist/Box.d.ts +5 -0
- package/dist/Box.js +6 -0
- package/dist/Box.js.map +1 -0
- package/dist/Button.d.ts +20 -0
- package/dist/Button.js +20 -0
- package/dist/Button.js.map +1 -0
- package/dist/Calendar.d.ts +18 -0
- package/dist/Calendar.js +57 -0
- package/dist/Calendar.js.map +1 -0
- package/dist/Card.d.ts +4 -0
- package/dist/Card.js +12 -0
- package/dist/Card.js.map +1 -0
- package/dist/Checkbox.d.ts +12 -0
- package/dist/Checkbox.js +32 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/Circle.d.ts +6 -0
- package/dist/Circle.js +12 -0
- package/dist/Circle.js.map +1 -0
- package/dist/Column.d.ts +6 -0
- package/dist/Column.js +7 -0
- package/dist/Column.js.map +1 -0
- package/dist/DarkMode.d.ts +13 -0
- package/dist/DarkMode.js +61 -0
- package/dist/DarkMode.js.map +1 -0
- package/dist/DateInput.d.ts +13 -0
- package/dist/DateInput.js +29 -0
- package/dist/DateInput.js.map +1 -0
- package/dist/DatePicker.d.ts +12 -0
- package/dist/DatePicker.js +34 -0
- package/dist/DatePicker.js.map +1 -0
- package/dist/DatetimeInput.d.ts +13 -0
- package/dist/DatetimeInput.js +31 -0
- package/dist/DatetimeInput.js.map +1 -0
- package/dist/DesignBook.d.ts +2 -0
- package/dist/DesignBook.js +55 -0
- package/dist/DesignBook.js.map +1 -0
- package/dist/Dialog.d.ts +17 -0
- package/dist/Dialog.js +86 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Dropdown.d.ts +10 -0
- package/dist/Dropdown.js +64 -0
- package/dist/Dropdown.js.map +1 -0
- package/dist/Emitter.d.ts +6 -0
- package/dist/Emitter.js +19 -0
- package/dist/Emitter.js.map +1 -0
- package/dist/FlexLayout.d.ts +11 -0
- package/dist/FlexLayout.js +18 -0
- package/dist/FlexLayout.js.map +1 -0
- package/dist/Icon.d.ts +12 -0
- package/dist/Icon.js +69 -0
- package/dist/Icon.js.map +1 -0
- package/dist/IconButton.d.ts +9 -0
- package/dist/IconButton.js +31 -0
- package/dist/IconButton.js.map +1 -0
- package/dist/IconLink.d.ts +9 -0
- package/dist/IconLink.js +31 -0
- package/dist/IconLink.js.map +1 -0
- package/dist/IconType.d.ts +1 -0
- package/dist/IconType.js +2 -0
- package/dist/IconType.js.map +1 -0
- package/dist/Interactable.d.ts +48 -0
- package/dist/Interactable.js +131 -0
- package/dist/Interactable.js.map +1 -0
- package/dist/Link.d.ts +20 -0
- package/dist/Link.js +22 -0
- package/dist/Link.js.map +1 -0
- package/dist/List.d.ts +11 -0
- package/dist/List.js +17 -0
- package/dist/List.js.map +1 -0
- package/dist/ListButtonItem.d.ts +15 -0
- package/dist/ListButtonItem.js +9 -0
- package/dist/ListButtonItem.js.map +1 -0
- package/dist/ListDivider.d.ts +2 -0
- package/dist/ListDivider.js +12 -0
- package/dist/ListDivider.js.map +1 -0
- package/dist/ListHeaderItem.d.ts +11 -0
- package/dist/ListHeaderItem.js +13 -0
- package/dist/ListHeaderItem.js.map +1 -0
- package/dist/ListItem.d.ts +10 -0
- package/dist/ListItem.js +7 -0
- package/dist/ListItem.js.map +1 -0
- package/dist/ListLinkItem.d.ts +17 -0
- package/dist/ListLinkItem.js +9 -0
- package/dist/ListLinkItem.js.map +1 -0
- package/dist/ListSpacer.d.ts +2 -0
- package/dist/ListSpacer.js +13 -0
- package/dist/ListSpacer.js.map +1 -0
- package/dist/OnVisible.d.ts +5 -0
- package/dist/OnVisible.js +28 -0
- package/dist/OnVisible.js.map +1 -0
- package/dist/Popover.d.ts +21 -0
- package/dist/Popover.js +88 -0
- package/dist/Popover.js.map +1 -0
- package/dist/ProgressBar.d.ts +8 -0
- package/dist/ProgressBar.js +42 -0
- package/dist/ProgressBar.js.map +1 -0
- package/dist/ProgressCircle.d.ts +6 -0
- package/dist/ProgressCircle.js +12 -0
- package/dist/ProgressCircle.js.map +1 -0
- package/dist/Providers.d.ts +9 -0
- package/dist/Providers.js +16 -0
- package/dist/Providers.js.map +1 -0
- package/dist/RangeInput.d.ts +14 -0
- package/dist/RangeInput.js +32 -0
- package/dist/RangeInput.js.map +1 -0
- package/dist/ResultOrError.d.ts +13 -0
- package/dist/ResultOrError.js +7 -0
- package/dist/ResultOrError.js.map +1 -0
- package/dist/RootView.d.ts +5 -0
- package/dist/RootView.js +35 -0
- package/dist/RootView.js.map +1 -0
- package/dist/Router.d.ts +2 -0
- package/dist/Router.js +37 -0
- package/dist/Router.js.map +1 -0
- package/dist/RouterState.d.ts +38 -0
- package/dist/RouterState.js +111 -0
- package/dist/RouterState.js.map +1 -0
- package/dist/Row.d.ts +6 -0
- package/dist/Row.js +7 -0
- package/dist/Row.js.map +1 -0
- package/dist/StackContext.d.ts +8 -0
- package/dist/StackContext.js +25 -0
- package/dist/StackContext.js.map +1 -0
- package/dist/StaticCheckbox.d.ts +17 -0
- package/dist/StaticCheckbox.js +48 -0
- package/dist/StaticCheckbox.js.map +1 -0
- package/dist/Storage.d.ts +12 -0
- package/dist/Storage.js +148 -0
- package/dist/Storage.js.map +1 -0
- package/dist/Stream.d.ts +9 -0
- package/dist/Stream.js +36 -0
- package/dist/Stream.js.map +1 -0
- package/dist/Sublist.d.ts +12 -0
- package/dist/Sublist.js +18 -0
- package/dist/Sublist.js.map +1 -0
- package/dist/SubmitIconInput.d.ts +9 -0
- package/dist/SubmitIconInput.js +25 -0
- package/dist/SubmitIconInput.js.map +1 -0
- package/dist/Tabs.d.ts +20 -0
- package/dist/Tabs.js +35 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Text.d.ts +25 -0
- package/dist/Text.js +50 -0
- package/dist/Text.js.map +1 -0
- package/dist/TextArea.d.ts +10 -0
- package/dist/TextArea.js +22 -0
- package/dist/TextArea.js.map +1 -0
- package/dist/TextInput.d.ts +14 -0
- package/dist/TextInput.js +52 -0
- package/dist/TextInput.js.map +1 -0
- package/dist/TextInputWithState.d.ts +10 -0
- package/dist/TextInputWithState.js +14 -0
- package/dist/TextInputWithState.js.map +1 -0
- package/dist/TextPairing.d.ts +21 -0
- package/dist/TextPairing.js +26 -0
- package/dist/TextPairing.js.map +1 -0
- package/dist/TimeInput.d.ts +15 -0
- package/dist/TimeInput.js +58 -0
- package/dist/TimeInput.js.map +1 -0
- package/dist/Tooltip.d.ts +11 -0
- package/dist/Tooltip.js +72 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/aria.d.ts +8 -0
- package/dist/aria.js +42 -0
- package/dist/aria.js.map +1 -0
- package/dist/guid.d.ts +1 -0
- package/dist/guid.js +7 -0
- package/dist/guid.js.map +1 -0
- package/dist/hash.d.ts +1 -0
- package/dist/hash.js +20 -0
- package/dist/hash.js.map +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/dist/jss.d.ts +110 -0
- package/dist/jss.js +438 -0
- package/dist/jss.js.map +1 -0
- package/dist/numberToBase.d.ts +1 -0
- package/dist/numberToBase.js +44 -0
- package/dist/numberToBase.js.map +1 -0
- package/dist/stateMachineContextFactory.d.ts +36 -0
- package/dist/stateMachineContextFactory.js +48 -0
- package/dist/stateMachineContextFactory.js.map +1 -0
- package/dist/useCookie.d.ts +9 -0
- package/dist/useCookie.js +65 -0
- package/dist/useCookie.js.map +1 -0
- package/dist/useKeyboard.d.ts +8 -0
- package/dist/useKeyboard.js +26 -0
- package/dist/useKeyboard.js.map +1 -0
- package/dist/useNavigation.d.ts +5 -0
- package/dist/useNavigation.js +79 -0
- package/dist/useNavigation.js.map +1 -0
- package/dist/usePromise.d.ts +1 -0
- package/dist/usePromise.js +12 -0
- package/dist/usePromise.js.map +1 -0
- package/dist/useRefEffect.d.ts +1 -0
- package/dist/useRefEffect.js +15 -0
- package/dist/useRefEffect.js.map +1 -0
- package/next-env.d.ts +5 -0
- package/next.config.js +21 -0
- package/package.json +40 -0
- package/scripts/publish.js +27 -0
- package/src/Badge.tsx +36 -0
- package/src/BaseButton.tsx +58 -0
- package/src/BaseInput.tsx +57 -0
- package/src/BaseLink.tsx +77 -0
- package/src/BaseList.tsx +29 -0
- package/src/BaseListAddOn.tsx +10 -0
- package/src/BaseListItem.tsx +117 -0
- package/src/BaseView.tsx +57 -0
- package/src/Box.tsx +20 -0
- package/src/Button.tsx +84 -0
- package/src/Calendar.tsx +125 -0
- package/src/Card.tsx +17 -0
- package/src/Checkbox.tsx +63 -0
- package/src/Circle.tsx +24 -0
- package/src/Column.tsx +12 -0
- package/src/DarkMode.tsx +99 -0
- package/src/DateInput.tsx +63 -0
- package/src/DatePicker.tsx +67 -0
- package/src/DatetimeInput.tsx +71 -0
- package/src/DesignBook.tsx +697 -0
- package/src/Dialog.tsx +144 -0
- package/src/Dropdown.tsx +129 -0
- package/src/Emitter.ts +26 -0
- package/src/FlexLayout.tsx +53 -0
- package/src/Icon.tsx +96 -0
- package/src/IconButton.tsx +66 -0
- package/src/IconLink.tsx +58 -0
- package/src/IconType.ts +787 -0
- package/src/Interactable.tsx +159 -0
- package/src/Link.tsx +86 -0
- package/src/List.tsx +41 -0
- package/src/ListButtonItem.tsx +69 -0
- package/src/ListDivider.tsx +13 -0
- package/src/ListHeaderItem.tsx +45 -0
- package/src/ListItem.tsx +27 -0
- package/src/ListLinkItem.tsx +76 -0
- package/src/ListSpacer.tsx +14 -0
- package/src/OnVisible.tsx +42 -0
- package/src/Popover.tsx +141 -0
- package/src/ProgressBar.tsx +63 -0
- package/src/ProgressCircle.tsx +38 -0
- package/src/Providers.tsx +33 -0
- package/src/RangeInput.tsx +82 -0
- package/src/ResultOrError.ts +15 -0
- package/src/RootView.tsx +55 -0
- package/src/Router.tsx +62 -0
- package/src/RouterState.tsx +154 -0
- package/src/Row.tsx +12 -0
- package/src/StackContext.tsx +52 -0
- package/src/StaticCheckbox.tsx +74 -0
- package/src/Storage.tsx +200 -0
- package/src/Stream.tsx +50 -0
- package/src/Sublist.tsx +62 -0
- package/src/SubmitIconInput.tsx +45 -0
- package/src/Tabs.tsx +103 -0
- package/src/Text.tsx +102 -0
- package/src/TextArea.tsx +45 -0
- package/src/TextInput.tsx +111 -0
- package/src/TextInputWithState.tsx +35 -0
- package/src/TextPairing.tsx +115 -0
- package/src/TimeInput.tsx +109 -0
- package/src/Tooltip.tsx +108 -0
- package/src/aria.ts +72 -0
- package/src/examples/ExampleDialog.tsx +28 -0
- package/src/guid.ts +7 -0
- package/src/hash.ts +21 -0
- package/src/index.ts +65 -0
- package/src/jss.tsx +607 -0
- package/src/numberToBase.ts +52 -0
- package/src/pages/Badge.mdx +30 -0
- package/src/pages/Button.mdx +57 -0
- package/src/pages/Calendar.mdx +60 -0
- package/src/pages/Checkbox.mdx +56 -0
- package/src/pages/Dialog.mdx +32 -0
- package/src/pages/FlexLayout.mdx +77 -0
- package/src/pages/Hashing.mdx +20 -0
- package/src/pages/Icon.mdx +63 -0
- package/src/pages/IconButton.mdx +144 -0
- package/src/pages/Link.mdx +57 -0
- package/src/pages/List.mdx +292 -0
- package/src/pages/ListHeader.mdx +94 -0
- package/src/pages/Popover.mdx +101 -0
- package/src/pages/ProgressBar.mdx +20 -0
- package/src/pages/ProgressCircle.mdx +35 -0
- package/src/pages/RangeInput.mdx +109 -0
- package/src/pages/Tabs.mdx +168 -0
- package/src/pages/Text.mdx +133 -0
- package/src/pages/TextInput.mdx +110 -0
- package/src/pages/TextPairing.mdx +155 -0
- package/src/pages/TimeInput.mdx +73 -0
- package/src/pages/Tooltip.mdx +28 -0
- package/src/pages/_app.tsx +561 -0
- package/src/pages/_document.tsx +30 -0
- package/src/pages/css-in-js.mdx +127 -0
- package/src/pages/index.mdx +58 -0
- package/src/pages/navigation.mdx +56 -0
- package/src/pages/prism.css +3 -0
- package/src/pages/useCookie.mdx +15 -0
- package/src/pages/useKeyboard.mdx +20 -0
- package/src/pages/useNavigation.mdx +30 -0
- package/src/pages/usePromise.mdx +15 -0
- package/src/pages/useRefEffect.mdx +49 -0
- package/src/stateMachineContextFactory.tsx +111 -0
- package/src/useCookie.tsx +89 -0
- package/src/useKeyboard.tsx +43 -0
- package/src/useNavigation.tsx +89 -0
- package/src/usePromise.tsx +18 -0
- package/src/useRefEffect.tsx +18 -0
- package/tsconfig.build.json +23 -0
- package/tsconfig.json +23 -0
package/dist/aria.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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
|
package/dist/aria.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria.js","sourceRoot":"","sources":["../src/aria.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,IAAiB;IAC/C,MAAM,UAAU,GAAgB,KAAK,CAAC,IAAI,CACxC,IAAI,CAAC,gBAAgB,CACnB,wDAAwD,CACzD,CACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,OAAkB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAA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MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,UAAyB,EACzB,KAAa,EACP,EAAE;IACR,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE;QAChC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACvB;IACD,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,UAAyB,EACzB,KAAa,EACP,EAAE;IACR,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,EAAE,CAAC;IAChB,iCAAiC;AACnC,CAAC,CAAC"}
|
package/dist/guid.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function guid(): string;
|
package/dist/guid.js
ADDED
package/dist/guid.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guid.js","sourceRoot":"","sources":["../src/guid.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QAC/C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAChC,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QACtC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/hash.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hash(source: string, modulus?: number): number;
|
package/dist/hash.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function hash(source, modulus) {
|
|
2
|
+
let hash = 0;
|
|
3
|
+
let i;
|
|
4
|
+
let chr;
|
|
5
|
+
if (source.length === 0) {
|
|
6
|
+
return hash;
|
|
7
|
+
}
|
|
8
|
+
for (i = 0; i < source.length; i++) {
|
|
9
|
+
chr = source.charCodeAt(i);
|
|
10
|
+
hash = (hash << 5) - hash + chr;
|
|
11
|
+
hash |= 0; // Convert to 32bit integer
|
|
12
|
+
}
|
|
13
|
+
if (modulus) {
|
|
14
|
+
return Math.abs(hash) % modulus;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return Math.abs(hash);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=hash.js.map
|
package/dist/hash.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,CAAC,MAAc,EAAE,OAAgB;IACnD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,CAAS,CAAC;IACd,IAAI,GAAW,CAAC;IAEhB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,IAAI,CAAC;KACb;IAED,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC;QAChC,IAAI,IAAI,CAAC,CAAC,CAAC,2BAA2B;KACvC;IAED,IAAI,OAAO,EAAE;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;KACjC;SAAM;QACL,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACvB;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export * from "./aria";
|
|
2
|
+
export * from "./Badge";
|
|
3
|
+
export * from "./BaseButton";
|
|
4
|
+
export * from "./BaseInput";
|
|
5
|
+
export * from "./BaseLink";
|
|
6
|
+
export * from "./BaseList";
|
|
7
|
+
export * from "./BaseListAddOn";
|
|
8
|
+
export * from "./BaseListItem";
|
|
9
|
+
export * from "./BaseView";
|
|
10
|
+
export * from "./Box";
|
|
11
|
+
export * from "./Button";
|
|
12
|
+
export * from "./Calendar";
|
|
13
|
+
export * from "./Checkbox";
|
|
14
|
+
export * from "./Circle";
|
|
15
|
+
export * from "./Column";
|
|
16
|
+
export * from "./DarkMode";
|
|
17
|
+
export * from "./DateInput";
|
|
18
|
+
export * from "./DatePicker";
|
|
19
|
+
export * from "./DatetimeInput";
|
|
20
|
+
export * from "./Dialog";
|
|
21
|
+
export * from "./Dropdown";
|
|
22
|
+
export * from "./Emitter";
|
|
23
|
+
export * from "./FlexLayout";
|
|
24
|
+
export * from "./guid";
|
|
25
|
+
export * from "./Icon";
|
|
26
|
+
export * from "./IconButton";
|
|
27
|
+
export * from "./IconLink";
|
|
28
|
+
export * from "./IconType";
|
|
29
|
+
export * from "./jss";
|
|
30
|
+
export * from "./Link";
|
|
31
|
+
export * from "./List";
|
|
32
|
+
export * from "./ListButtonItem";
|
|
33
|
+
export * from "./ListDivider";
|
|
34
|
+
export * from "./ListHeaderItem";
|
|
35
|
+
export * from "./ListItem";
|
|
36
|
+
export * from "./ListLinkItem";
|
|
37
|
+
export * from "./ListSpacer";
|
|
38
|
+
export * from "./numberToBase";
|
|
39
|
+
export * from "./OnVisible";
|
|
40
|
+
export * from "./Popover";
|
|
41
|
+
export * from "./ProgressBar";
|
|
42
|
+
export * from "./ProgressCircle";
|
|
43
|
+
export * from "./Providers";
|
|
44
|
+
export * from "./RangeInput";
|
|
45
|
+
export * from "./RootView";
|
|
46
|
+
export * from "./Row";
|
|
47
|
+
export * from "./StackContext";
|
|
48
|
+
export * from "./stateMachineContextFactory";
|
|
49
|
+
export * from "./StaticCheckbox";
|
|
50
|
+
export * from "./Storage";
|
|
51
|
+
export * from "./Stream";
|
|
52
|
+
export * from "./Sublist";
|
|
53
|
+
export * from "./SubmitIconInput";
|
|
54
|
+
export * from "./Tabs";
|
|
55
|
+
export * from "./Text";
|
|
56
|
+
export * from "./TextArea";
|
|
57
|
+
export * from "./TextInput";
|
|
58
|
+
export * from "./TextInputWithState";
|
|
59
|
+
export * from "./TextPairing";
|
|
60
|
+
export * from "./TimeInput";
|
|
61
|
+
export * from "./TimeInput";
|
|
62
|
+
export * from "./useCookie";
|
|
63
|
+
export * from "./useNavigation";
|
|
64
|
+
export * from "./usePromise";
|
|
65
|
+
export * from "./useRefEffect";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export * from "./aria";
|
|
2
|
+
export * from "./Badge";
|
|
3
|
+
export * from "./BaseButton";
|
|
4
|
+
export * from "./BaseInput";
|
|
5
|
+
export * from "./BaseLink";
|
|
6
|
+
export * from "./BaseList";
|
|
7
|
+
export * from "./BaseListAddOn";
|
|
8
|
+
export * from "./BaseListItem";
|
|
9
|
+
export * from "./BaseView";
|
|
10
|
+
export * from "./Box";
|
|
11
|
+
export * from "./Button";
|
|
12
|
+
export * from "./Calendar";
|
|
13
|
+
export * from "./Checkbox";
|
|
14
|
+
export * from "./Circle";
|
|
15
|
+
export * from "./Column";
|
|
16
|
+
export * from "./DarkMode";
|
|
17
|
+
export * from "./DateInput";
|
|
18
|
+
export * from "./DatePicker";
|
|
19
|
+
export * from "./DatetimeInput";
|
|
20
|
+
export * from "./Dialog";
|
|
21
|
+
export * from "./Dropdown";
|
|
22
|
+
export * from "./Emitter";
|
|
23
|
+
export * from "./FlexLayout";
|
|
24
|
+
export * from "./guid";
|
|
25
|
+
export * from "./Icon";
|
|
26
|
+
export * from "./IconButton";
|
|
27
|
+
export * from "./IconLink";
|
|
28
|
+
export * from "./IconType";
|
|
29
|
+
export * from "./jss";
|
|
30
|
+
export * from "./Link";
|
|
31
|
+
export * from "./List";
|
|
32
|
+
export * from "./ListButtonItem";
|
|
33
|
+
export * from "./ListDivider";
|
|
34
|
+
export * from "./ListHeaderItem";
|
|
35
|
+
export * from "./ListItem";
|
|
36
|
+
export * from "./ListLinkItem";
|
|
37
|
+
export * from "./ListSpacer";
|
|
38
|
+
export * from "./numberToBase";
|
|
39
|
+
export * from "./OnVisible";
|
|
40
|
+
export * from "./Popover";
|
|
41
|
+
export * from "./ProgressBar";
|
|
42
|
+
export * from "./ProgressCircle";
|
|
43
|
+
export * from "./Providers";
|
|
44
|
+
export * from "./RangeInput";
|
|
45
|
+
export * from "./RootView";
|
|
46
|
+
export * from "./Row";
|
|
47
|
+
export * from "./StackContext";
|
|
48
|
+
export * from "./stateMachineContextFactory";
|
|
49
|
+
export * from "./StaticCheckbox";
|
|
50
|
+
export * from "./Storage";
|
|
51
|
+
export * from "./Stream";
|
|
52
|
+
export * from "./Sublist";
|
|
53
|
+
export * from "./SubmitIconInput";
|
|
54
|
+
export * from "./Tabs";
|
|
55
|
+
export * from "./Text";
|
|
56
|
+
export * from "./TextArea";
|
|
57
|
+
export * from "./TextInput";
|
|
58
|
+
export * from "./TextInputWithState";
|
|
59
|
+
export * from "./TextPairing";
|
|
60
|
+
export * from "./TimeInput";
|
|
61
|
+
export * from "./TimeInput";
|
|
62
|
+
export * from "./useCookie";
|
|
63
|
+
export * from "./useNavigation";
|
|
64
|
+
export * from "./usePromise";
|
|
65
|
+
export * from "./useRefEffect";
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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AAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
package/dist/jss.d.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import CSS from "csstype";
|
|
3
|
+
export type Styles = CSS.Properties<string | number | CSS.Properties<string | number>>;
|
|
4
|
+
export type JSStyle = Styles | null | false | undefined | {
|
|
5
|
+
[key: string]: Styles;
|
|
6
|
+
} | Array<JSStyle>;
|
|
7
|
+
export declare const jss: (jsStyle: JSStyle) => string;
|
|
8
|
+
export declare function JSStylesProvider({ themes, children, }: {
|
|
9
|
+
themes: {
|
|
10
|
+
dark: Theme;
|
|
11
|
+
light: Theme;
|
|
12
|
+
};
|
|
13
|
+
children: JSX.Element;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
export declare function JSServerStyles(): JSX.Element;
|
|
16
|
+
export type Size = "xsmall" | "small" | "medium" | "large" | "xlarge";
|
|
17
|
+
export type Spacing = "none" | Size;
|
|
18
|
+
export type Gap = Spacing;
|
|
19
|
+
export type Padding = Spacing | [Spacing, Spacing];
|
|
20
|
+
export type Margin = Spacing | [Spacing, Spacing];
|
|
21
|
+
export type Direction = "horizontal" | "vertical";
|
|
22
|
+
export type Position = "start" | "end";
|
|
23
|
+
export type Justify = "none" | "center" | "flex-start" | "space-between" | "flex-end" | "stretch";
|
|
24
|
+
export type Align = "none" | "center" | "stretch" | "flex-start" | "flex-end";
|
|
25
|
+
export type FlexDirection = "row" | "column";
|
|
26
|
+
export type Color = "none" | "negative" | "warning" | "highlight" | "primary-background" | "secondary-background" | "divider" | "inherit";
|
|
27
|
+
export type TextColor = "primary" | "secondary" | "highlight" | "negative" | "subtle" | "light" | "inherit";
|
|
28
|
+
export declare function cssVar(string: keyof Theme): string;
|
|
29
|
+
export declare function getSize(size: Size): string;
|
|
30
|
+
export declare function getSpacing(spacing: Spacing): string;
|
|
31
|
+
export declare function getPadding(padding: Padding): JSStyle;
|
|
32
|
+
export declare function getMargin(margin: Margin): JSStyle;
|
|
33
|
+
export type Theme = {
|
|
34
|
+
["--overlay-background"]: string;
|
|
35
|
+
["--primary-background"]: string;
|
|
36
|
+
["--secondary-background"]: string;
|
|
37
|
+
["--divider"]: string;
|
|
38
|
+
["--strong-divider"]: string;
|
|
39
|
+
["--pressed-background"]: string;
|
|
40
|
+
["--hovered-background"]: string;
|
|
41
|
+
["--selected-background"]: string;
|
|
42
|
+
["--nav-bar"]: string;
|
|
43
|
+
["--warning"]: string;
|
|
44
|
+
["--highlight"]: string;
|
|
45
|
+
["--outline"]: string;
|
|
46
|
+
["--light-highlight"]: string;
|
|
47
|
+
["--primary-text"]: string;
|
|
48
|
+
["--secondary-text"]: string;
|
|
49
|
+
["--subtle-text"]: string;
|
|
50
|
+
["--highlight-text"]: string;
|
|
51
|
+
["--negative-text"]: string;
|
|
52
|
+
["--light-text"]: string;
|
|
53
|
+
["--background-button-positive"]: string;
|
|
54
|
+
["--background-button-secondary"]: string;
|
|
55
|
+
["--background-button-negative"]: string;
|
|
56
|
+
["--background-button-disabled"]: string;
|
|
57
|
+
["--spacing-xs"]: string;
|
|
58
|
+
["--spacing-s"]: string;
|
|
59
|
+
["--spacing-m"]: string;
|
|
60
|
+
["--spacing-l"]: string;
|
|
61
|
+
["--spacing-xl"]: string;
|
|
62
|
+
["--spacing-xxl"]: string;
|
|
63
|
+
["--spacing-xxxl"]: string;
|
|
64
|
+
["--border-radius-s"]: string;
|
|
65
|
+
["--border-radius-m"]: string;
|
|
66
|
+
["--border-radius-l"]: string;
|
|
67
|
+
["--nav-bar-height"]: string;
|
|
68
|
+
};
|
|
69
|
+
export declare const lightTheme: Theme;
|
|
70
|
+
export declare const darkTheme: Theme;
|
|
71
|
+
export declare const baseStyles: string;
|
|
72
|
+
export declare const getBackground: (color: Color) => JSStyle;
|
|
73
|
+
export declare const MOBILE = 750;
|
|
74
|
+
export declare const TABLET = 1000;
|
|
75
|
+
export declare const LAPTOP = 1200;
|
|
76
|
+
export declare const MOBILE_MEDIA: string;
|
|
77
|
+
export declare const TABLET_MEDIA: string;
|
|
78
|
+
export declare const LAPTOP_MEDIA: string;
|
|
79
|
+
export declare const DESKTOP_MEDIA: string;
|
|
80
|
+
export declare function mobile(jsStyle: JSStyle): {
|
|
81
|
+
[key: string]: JSStyle;
|
|
82
|
+
};
|
|
83
|
+
export declare function tablet(jsStyle: JSStyle): {
|
|
84
|
+
[key: string]: JSStyle;
|
|
85
|
+
};
|
|
86
|
+
export declare function laptop(jsStyle: JSStyle): {
|
|
87
|
+
[key: string]: JSStyle;
|
|
88
|
+
};
|
|
89
|
+
export declare function desktop(jsStyle: JSStyle): {
|
|
90
|
+
[key: string]: JSStyle;
|
|
91
|
+
};
|
|
92
|
+
export declare const getTextColor: (color: TextColor) => {
|
|
93
|
+
color: string;
|
|
94
|
+
} | {
|
|
95
|
+
color: string;
|
|
96
|
+
} | {
|
|
97
|
+
color: string;
|
|
98
|
+
} | {
|
|
99
|
+
color: string;
|
|
100
|
+
} | {
|
|
101
|
+
color: string;
|
|
102
|
+
} | {
|
|
103
|
+
color: string;
|
|
104
|
+
} | {
|
|
105
|
+
color: string;
|
|
106
|
+
};
|
|
107
|
+
export declare function getBaseStyles(themes: {
|
|
108
|
+
light: Theme;
|
|
109
|
+
dark: Theme;
|
|
110
|
+
}): string[];
|