@coveord/plasma-mantine 55.7.0 → 55.7.2-next.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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +52 -51
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/alert/Alert.d.ts +17 -0
- package/dist/cjs/components/alert/Alert.d.ts.map +1 -0
- package/dist/cjs/components/alert/Alert.js +53 -0
- package/dist/cjs/components/alert/Alert.js.map +1 -0
- package/dist/cjs/components/alert/index.d.ts +2 -0
- package/dist/cjs/components/alert/index.d.ts.map +1 -0
- package/dist/cjs/components/alert/index.js +8 -0
- package/dist/cjs/components/alert/index.js.map +1 -0
- package/dist/cjs/components/badge/Badge.d.ts +8 -0
- package/dist/cjs/components/badge/Badge.d.ts.map +1 -0
- package/dist/cjs/components/badge/Badge.js +60 -0
- package/dist/cjs/components/badge/Badge.js.map +1 -0
- package/dist/cjs/components/badge/index.d.ts +2 -0
- package/dist/cjs/components/badge/index.d.ts.map +1 -0
- package/dist/cjs/components/badge/index.js +8 -0
- package/dist/cjs/components/badge/index.js.map +1 -0
- package/dist/cjs/components/browser-preview/BrowserPreview.module.css +1 -1
- package/dist/cjs/components/button/Button.d.ts +5 -0
- package/dist/cjs/components/button/Button.d.ts.map +1 -1
- package/dist/cjs/components/button/Button.js +40 -3
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/code-editor/CodeEditor.d.ts +7 -0
- package/dist/cjs/components/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/cjs/components/code-editor/CodeEditor.js +6 -3
- package/dist/cjs/components/code-editor/CodeEditor.js.map +1 -1
- package/dist/cjs/components/header/Header.module.css +2 -7
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +2 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/modal/Modal.d.ts +2 -2
- package/dist/cjs/components/modal/Modal.d.ts.map +1 -1
- package/dist/cjs/components/modal/Modal.js.map +1 -1
- package/dist/cjs/components/prompt/Prompt.js +1 -1
- package/dist/cjs/components/prompt/Prompt.js.map +1 -1
- package/dist/cjs/components/prompt/Prompt.module.css +4 -15
- package/dist/cjs/components/prompt/PromptConfirmButton.js +4 -4
- package/dist/cjs/components/prompt/PromptConfirmButton.js.map +1 -1
- package/dist/cjs/components/sticky-footer/StickyFooter.module.css +3 -3
- package/dist/cjs/components/table/use-url-synced-state.d.ts.map +1 -1
- package/dist/cjs/components/table/use-url-synced-state.js +29 -19
- package/dist/cjs/components/table/use-url-synced-state.js.map +1 -1
- package/dist/cjs/styles/Alert.module.css +1 -26
- package/dist/cjs/styles/Badge.module.css +0 -2
- package/dist/cjs/styles/Checkbox.module.css +0 -17
- package/dist/cjs/styles/Combobox.module.css +3 -2
- package/dist/cjs/styles/InputWrapper.module.css +0 -9
- package/dist/cjs/styles/Modal.module.css +0 -62
- package/dist/cjs/styles/NavLink.module.css +0 -18
- package/dist/cjs/styles/Radio.module.css +0 -6
- package/dist/cjs/styles/ReadOnlyInput.module.css +3 -3
- package/dist/cjs/styles/SegmentedControl.module.css +0 -32
- package/dist/cjs/styles/Stepper.module.css +0 -66
- package/dist/cjs/styles/Tabs.module.css +0 -4
- package/dist/cjs/theme/PlasmaColors.d.ts +11 -7
- package/dist/cjs/theme/PlasmaColors.d.ts.map +1 -1
- package/dist/cjs/theme/PlasmaColors.js +144 -19
- package/dist/cjs/theme/PlasmaColors.js.map +1 -1
- package/dist/cjs/theme/Theme.d.ts.map +1 -1
- package/dist/cjs/theme/Theme.js +43 -115
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/cjs/theme/plasmaCSSVariablesResolver.d.ts.map +1 -1
- package/dist/cjs/theme/plasmaCSSVariablesResolver.js +1 -5
- package/dist/cjs/theme/plasmaCSSVariablesResolver.js.map +1 -1
- package/dist/esm/components/alert/Alert.d.ts +17 -0
- package/dist/esm/components/alert/Alert.d.ts.map +1 -0
- package/dist/esm/components/alert/Alert.js +29 -0
- package/dist/esm/components/alert/Alert.js.map +1 -0
- package/dist/esm/components/alert/index.d.ts +2 -0
- package/dist/esm/components/alert/index.d.ts.map +1 -0
- package/dist/esm/components/alert/index.js +3 -0
- package/dist/esm/components/alert/index.js.map +1 -0
- package/dist/esm/components/badge/Badge.d.ts +8 -0
- package/dist/esm/components/badge/Badge.d.ts.map +1 -0
- package/dist/esm/components/badge/Badge.js +27 -0
- package/dist/esm/components/badge/Badge.js.map +1 -0
- package/dist/esm/components/badge/index.d.ts +2 -0
- package/dist/esm/components/badge/index.d.ts.map +1 -0
- package/dist/esm/components/badge/index.js +3 -0
- package/dist/esm/components/badge/index.js.map +1 -0
- package/dist/esm/components/browser-preview/BrowserPreview.module.css +1 -1
- package/dist/esm/components/button/Button.d.ts +5 -0
- package/dist/esm/components/button/Button.d.ts.map +1 -1
- package/dist/esm/components/button/Button.js +17 -0
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/code-editor/CodeEditor.d.ts +7 -0
- package/dist/esm/components/code-editor/CodeEditor.d.ts.map +1 -1
- package/dist/esm/components/code-editor/CodeEditor.js +4 -2
- package/dist/esm/components/code-editor/CodeEditor.js.map +1 -1
- package/dist/esm/components/header/Header.module.css +2 -7
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/modal/Modal.d.ts +2 -2
- package/dist/esm/components/modal/Modal.d.ts.map +1 -1
- package/dist/esm/components/modal/Modal.js.map +1 -1
- package/dist/esm/components/prompt/Prompt.js +1 -1
- package/dist/esm/components/prompt/Prompt.js.map +1 -1
- package/dist/esm/components/prompt/Prompt.module.css +4 -15
- package/dist/esm/components/prompt/PromptConfirmButton.js +4 -4
- package/dist/esm/components/prompt/PromptConfirmButton.js.map +1 -1
- package/dist/esm/components/sticky-footer/StickyFooter.module.css +3 -3
- package/dist/esm/components/table/use-url-synced-state.d.ts.map +1 -1
- package/dist/esm/components/table/use-url-synced-state.js +26 -18
- package/dist/esm/components/table/use-url-synced-state.js.map +1 -1
- package/dist/esm/styles/Alert.module.css +1 -26
- package/dist/esm/styles/Badge.module.css +0 -2
- package/dist/esm/styles/Checkbox.module.css +0 -17
- package/dist/esm/styles/Combobox.module.css +3 -2
- package/dist/esm/styles/InputWrapper.module.css +0 -9
- package/dist/esm/styles/Modal.module.css +0 -62
- package/dist/esm/styles/NavLink.module.css +0 -18
- package/dist/esm/styles/Radio.module.css +0 -6
- package/dist/esm/styles/ReadOnlyInput.module.css +3 -3
- package/dist/esm/styles/SegmentedControl.module.css +0 -32
- package/dist/esm/styles/Stepper.module.css +0 -66
- package/dist/esm/styles/Tabs.module.css +0 -4
- package/dist/esm/theme/PlasmaColors.d.ts +11 -7
- package/dist/esm/theme/PlasmaColors.d.ts.map +1 -1
- package/dist/esm/theme/PlasmaColors.js +144 -19
- package/dist/esm/theme/PlasmaColors.js.map +1 -1
- package/dist/esm/theme/Theme.d.ts.map +1 -1
- package/dist/esm/theme/Theme.js +44 -114
- package/dist/esm/theme/Theme.js.map +1 -1
- package/dist/esm/theme/plasmaCSSVariablesResolver.d.ts.map +1 -1
- package/dist/esm/theme/plasmaCSSVariablesResolver.js +1 -5
- package/dist/esm/theme/plasmaCSSVariablesResolver.js.map +1 -1
- package/package.json +13 -13
- package/src/components/alert/Alert.tsx +7 -0
- package/src/components/alert/index.ts +1 -0
- package/src/components/badge/Badge.tsx +10 -0
- package/src/components/badge/index.ts +1 -0
- package/src/components/browser-preview/BrowserPreview.module.css +1 -1
- package/src/components/button/Button.tsx +6 -0
- package/src/components/code-editor/CodeEditor.tsx +8 -1
- package/src/components/header/Header.module.css +2 -7
- package/src/components/index.ts +2 -0
- package/src/components/modal/Modal.tsx +2 -2
- package/src/components/prompt/Prompt.module.css +4 -15
- package/src/components/prompt/Prompt.tsx +1 -1
- package/src/components/prompt/PromptConfirmButton.tsx +4 -4
- package/src/components/sticky-footer/StickyFooter.module.css +3 -3
- package/src/components/table/__tests__/use-url-synced-state.unit.spec.ts +189 -138
- package/src/components/table/use-url-synced-state.ts +36 -18
- package/src/styles/Alert.module.css +1 -26
- package/src/styles/Badge.module.css +0 -2
- package/src/styles/Checkbox.module.css +0 -17
- package/src/styles/Combobox.module.css +3 -2
- package/src/styles/InputWrapper.module.css +0 -9
- package/src/styles/Modal.module.css +0 -62
- package/src/styles/NavLink.module.css +0 -18
- package/src/styles/Radio.module.css +0 -6
- package/src/styles/ReadOnlyInput.module.css +3 -3
- package/src/styles/SegmentedControl.module.css +0 -32
- package/src/styles/Stepper.module.css +0 -66
- package/src/styles/Tabs.module.css +0 -4
- package/src/theme/PlasmaColors.ts +144 -19
- package/src/theme/Theme.tsx +37 -86
- package/src/theme/__tests__/plasmaCSSVariablesResolver.spec.ts +3 -46
- package/src/theme/plasmaCSSVariablesResolver.ts +2 -5
- package/dist/cjs/styles/ActionIcon.module.css +0 -6
- package/dist/cjs/styles/Anchor.module.css +0 -6
- package/dist/cjs/styles/AppShellNavBar.module.css +0 -3
- package/dist/cjs/styles/DatePicker.module.css +0 -3
- package/dist/cjs/styles/Input.module.css +0 -3
- package/dist/cjs/styles/Notification.module.css +0 -20
- package/dist/cjs/styles/Pagination.module.css +0 -30
- package/dist/cjs/styles/Select.module.css +0 -39
- package/dist/cjs/vars/Notification.vars.d.ts +0 -3
- package/dist/cjs/vars/Notification.vars.d.ts.map +0 -1
- package/dist/cjs/vars/Notification.vars.js +0 -44
- package/dist/cjs/vars/Notification.vars.js.map +0 -1
- package/dist/cjs/vars/Text.vars.d.ts +0 -3
- package/dist/cjs/vars/Text.vars.d.ts.map +0 -1
- package/dist/cjs/vars/Text.vars.js +0 -25
- package/dist/cjs/vars/Text.vars.js.map +0 -1
- package/dist/esm/styles/ActionIcon.module.css +0 -6
- package/dist/esm/styles/Anchor.module.css +0 -6
- package/dist/esm/styles/AppShellNavBar.module.css +0 -3
- package/dist/esm/styles/DatePicker.module.css +0 -3
- package/dist/esm/styles/Input.module.css +0 -3
- package/dist/esm/styles/Notification.module.css +0 -20
- package/dist/esm/styles/Pagination.module.css +0 -30
- package/dist/esm/styles/Select.module.css +0 -39
- package/dist/esm/vars/Notification.vars.d.ts +0 -3
- package/dist/esm/vars/Notification.vars.d.ts.map +0 -1
- package/dist/esm/vars/Notification.vars.js +0 -34
- package/dist/esm/vars/Notification.vars.js.map +0 -1
- package/dist/esm/vars/Text.vars.d.ts +0 -3
- package/dist/esm/vars/Text.vars.d.ts.map +0 -1
- package/dist/esm/vars/Text.vars.js +0 -15
- package/dist/esm/vars/Text.vars.js.map +0 -1
- package/src/styles/ActionIcon.module.css +0 -6
- package/src/styles/Anchor.module.css +0 -6
- package/src/styles/AppShellNavBar.module.css +0 -3
- package/src/styles/DatePicker.module.css +0 -3
- package/src/styles/Input.module.css +0 -3
- package/src/styles/Notification.module.css +0 -20
- package/src/styles/Pagination.module.css +0 -30
- package/src/styles/Select.module.css +0 -39
- package/src/vars/Notification.vars.ts +0 -14
- package/src/vars/Text.vars.ts +0 -8
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
position: sticky;
|
|
3
3
|
bottom: 0;
|
|
4
4
|
z-index: 10;
|
|
5
|
-
background-color:
|
|
5
|
+
background-color: var(--mantine-color-body);
|
|
6
6
|
padding: var(--mantine-spacing-md) var(--mantine-spacing-lg);
|
|
7
7
|
|
|
8
8
|
&[data-variant='modal-footer'] {
|
|
9
|
-
border-top: 1px solid var(--mantine-color-
|
|
9
|
+
border-top: 1px solid var(--mantine-color-default-border);
|
|
10
10
|
padding-bottom: 0;
|
|
11
11
|
margin: var(--mb-padding) calc(-1 * var(--mb-padding)) calc(var(--mantine-spacing-md) - var(--mb-padding))
|
|
12
12
|
calc(-1 * var(--mb-padding));
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.border {
|
|
17
|
-
border-top: 1px solid var(--mantine-color-
|
|
17
|
+
border-top: 1px solid var(--mantine-color-default-border);
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-url-synced-state.d.ts","sourceRoot":"","sources":["../../../../src/components/table/use-url-synced-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAoB,MAAM,OAAO,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"use-url-synced-state.d.ts","sourceRoot":"","sources":["../../../../src/components/table/use-url-synced-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAoB,MAAM,OAAO,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAuD7E,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACvC;;;;OAIG;IACH,YAAY,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5B;;;;;;;;;OASG;IACH,UAAU,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC1D;;;;;;;;OAQG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC;IAC9D;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAKD,eAAO,MAAM,iBAAiB,GAAI,CAAC,WAAW,wBAAwB,CAAC,CAAC,CAAC,8CAmDxE,CAAC"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { useMemo, useState } from 'react';
|
|
2
|
+
const slice = Function.prototype.call.bind(Array.prototype.slice);
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Performs a nested search for '#/', to detect hash router urls and take the params of the hash in that case.
|
|
4
|
+
* Split a url into its parts.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
7
|
-
* @returns The
|
|
8
|
-
*/ const
|
|
6
|
+
* @param href The url to extract the parts from.
|
|
7
|
+
* @returns The separate parts, all are an empty string if not present.
|
|
8
|
+
*/ const extractParts = (href)=>slice(/^([^?#]*)(\?[^#]*|)(#[^?]*|)(\?.*|)$/.exec(href ?? ''), 1, 5);
|
|
9
|
+
/**
|
|
10
|
+
* The index of the search parameter to use, e.g. hashSearch for hash routes (hash starts with '#/').
|
|
11
|
+
*
|
|
12
|
+
* @param parts: The url parts, as returned by `extractParts`.
|
|
13
|
+
* @returns The index of the search parameter to use (1 or 3).
|
|
14
|
+
*/ const searchIndex = (parts)=>/^#\//.test(parts[2]) ? 3 : 1;
|
|
9
15
|
/**
|
|
10
16
|
* Read the **current** search params from `window.location`, with support for detecting React's HashRouter.
|
|
11
17
|
* Also returns a method that will yield the href (string) value, after any changes made on the params object.
|
|
12
18
|
*
|
|
13
19
|
* @returns The `URLSearchParams` instance, and a function that can be used to get an updated href.
|
|
14
20
|
*/ const getSearchParams = ()=>{
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
return new URLSearchParams(searchStart < 0 ? undefined : href.substring(searchStart));
|
|
21
|
+
const parts = extractParts(window.location.href);
|
|
22
|
+
return new URLSearchParams(parts[searchIndex(parts)]);
|
|
18
23
|
};
|
|
19
24
|
/**
|
|
20
25
|
* Apply the search params to the current location, using `replaceState` (no navigation history).
|
|
@@ -23,13 +28,12 @@ import { useMemo, useState } from 'react';
|
|
|
23
28
|
* @param params The parameters to apply.
|
|
24
29
|
*/ const applySearchParams = (params)=>{
|
|
25
30
|
const currentHref = window.location.href;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
window.history.replaceState(null, '', nextHref);
|
|
31
|
+
const parts = extractParts(currentHref);
|
|
32
|
+
const search = params.size > 0 ? `?${params.toString()}` : '';
|
|
33
|
+
const index = searchIndex(parts);
|
|
34
|
+
if (parts[index] !== search) {
|
|
35
|
+
parts[index] = search;
|
|
36
|
+
window.history.replaceState(null, '', parts.join(''));
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
39
|
const getInitialState = (options)=>options.initialState instanceof Function ? options.initialState() : options.initialState;
|
|
@@ -43,14 +47,18 @@ export const useUrlSyncedState = (options)=>{
|
|
|
43
47
|
const initialStateSerialized = useMemo(()=>{
|
|
44
48
|
const stateMap = new Map();
|
|
45
49
|
let initialize = null;
|
|
50
|
+
let needsApply = false;
|
|
46
51
|
for (const [key, value, alwaysEmit] of options.serializer(getInitialState(options))){
|
|
47
52
|
stateMap.set(key, value);
|
|
48
|
-
if (alwaysEmit && value) {
|
|
53
|
+
if (sync && alwaysEmit && value) {
|
|
49
54
|
initialize ?? (initialize = getSearchParams());
|
|
50
|
-
initialize.
|
|
55
|
+
if (!initialize.has(key)) {
|
|
56
|
+
needsApply = true;
|
|
57
|
+
initialize.set(key, value);
|
|
58
|
+
}
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
|
-
if (
|
|
61
|
+
if (needsApply) {
|
|
54
62
|
applySearchParams(initialize);
|
|
55
63
|
}
|
|
56
64
|
return stateMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/use-url-synced-state.ts"],"sourcesContent":["import {Dispatch, SetStateAction, useMemo, useState} from 'react';\n\n/**\n * A search param entry defines the encoded value of a search parameter as `[key, value, alwaysEmit?]`.\n * The third entry is an optional boolean that defaults to `false`.\n * Setting `alwaysEmit` to `true` means any non-nullish value is always written to the search params,\n * even if it matches the initial value. It is also written on initialization.\n */\nexport type SearchParamEntry = [string, string | null | undefined, boolean?];\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/use-url-synced-state.ts"],"sourcesContent":["import {Dispatch, SetStateAction, useMemo, useState} from 'react';\n\n/**\n * A search param entry defines the encoded value of a search parameter as `[key, value, alwaysEmit?]`.\n * The third entry is an optional boolean that defaults to `false`.\n * Setting `alwaysEmit` to `true` means any non-nullish value is always written to the search params,\n * even if it matches the initial value. It is also written on initialization.\n */\nexport type SearchParamEntry = [string, string | null | undefined, boolean?];\n\n/** A URL split into an array of length 4, as [pathname, search, hash, hashSearch] */\ntype UrlParts = [string, string, string, string];\n\nconst slice = Function.prototype.call.bind(Array.prototype.slice) as <T>(\n from: ArrayLike<T>,\n start?: number,\n end?: number,\n) => T[];\n\n/**\n * Split a url into its parts.\n *\n * @param href The url to extract the parts from.\n * @returns The separate parts, all are an empty string if not present.\n */\nconst extractParts = (href: string) => slice(/^([^?#]*)(\\?[^#]*|)(#[^?]*|)(\\?.*|)$/.exec(href ?? ''), 1, 5) as UrlParts;\n\n/**\n * The index of the search parameter to use, e.g. hashSearch for hash routes (hash starts with '#/').\n *\n * @param parts: The url parts, as returned by `extractParts`.\n * @returns The index of the search parameter to use (1 or 3).\n */\nconst searchIndex = (parts: UrlParts): 1 | 3 => (/^#\\//.test(parts[2]) ? 3 : 1);\n\n/**\n * Read the **current** search params from `window.location`, with support for detecting React's HashRouter.\n * Also returns a method that will yield the href (string) value, after any changes made on the params object.\n *\n * @returns The `URLSearchParams` instance, and a function that can be used to get an updated href.\n */\nconst getSearchParams = (): URLSearchParams => {\n const parts = extractParts(window.location.href);\n return new URLSearchParams(parts[searchIndex(parts)]);\n};\n\n/**\n * Apply the search params to the current location, using `replaceState` (no navigation history).\n * Note that only parameters in the `params` argument will be set, any other current params will be removed.\n *\n * @param params The parameters to apply.\n */\nconst applySearchParams = (params: URLSearchParams): void => {\n const currentHref = window.location.href;\n const parts = extractParts(currentHref);\n const search = params.size > 0 ? `?${params.toString()}` : '';\n const index = searchIndex(parts);\n if (parts[index] !== search) {\n parts[index] = search;\n window.history.replaceState(null, '', parts.join(''));\n }\n};\n\nexport interface UseUrlSyncedStateOptions<T> {\n /**\n * The initial state to use, if there would be no search params to deserialize from.\n * These values are also treated as defaults, and if the current state matches the initialState,\n * no value will be written to the search params.\n */\n initialState: T | (() => T);\n /**\n * The serializer function is used to determine how the state is translated to url search parameters.\n * Called each time the state changes.\n * Note that the serializer should always return entries for keys it controls, also if the current value is \"unset\" (`null` or empty).\n * This ensures params get removed from the search when they are being unset.\n *\n * @param stateValue The new state value to serialize.\n * @returns An iterable of `[key, value]` to set as url search parameters.\n * @example (filterValue) => [['filter', filterValue]] // ?filter=filterValue\n */\n serializer: (stateValue: T) => Iterable<SearchParamEntry>;\n /**\n * The deserializer function is used to determine how the url parameters influence the initial state.\n * May return a partial state, values that are not deserialed are taken from the `initialState`.\n * Called only once when initializing the state.\n * @param params All the search parameters of the current url.\n * @param initialState The initialState, can be used to take defaults from.\n * @returns The initial state based on the current url.\n * @example (params) => params.get('filter') ?? '',\n */\n deserializer: (params: URLSearchParams, initialState: T) => T;\n /**\n * Whether the state should be synced with the url, defaults to `true`.\n * When set to `false`, the hook behaves just like a regular `useState` hook from react.\n */\n sync?: boolean;\n}\n\nconst getInitialState = <T>(options: UseUrlSyncedStateOptions<T>): T =>\n options.initialState instanceof Function ? options.initialState() : options.initialState;\n\nexport const useUrlSyncedState = <T>(options: UseUrlSyncedStateOptions<T>) => {\n const sync = options.sync !== false;\n const [state, setState] = useState<T>(() => {\n const initialState = getInitialState(options);\n return sync ? options.deserializer(getSearchParams(), initialState) : initialState;\n });\n // Capture the initial state as a map (first render only!), to compare values and see if they should be set to the params.\n const initialStateSerialized = useMemo(() => {\n const stateMap = new Map<string, string>();\n let initialize: URLSearchParams | null = null;\n let needsApply = false;\n for (const [key, value, alwaysEmit] of options.serializer(getInitialState(options))) {\n stateMap.set(key, value);\n if (sync && alwaysEmit && value) {\n initialize ??= getSearchParams();\n if (!initialize.has(key)) {\n needsApply = true;\n initialize.set(key, value);\n }\n }\n }\n if (needsApply) {\n applySearchParams(initialize);\n }\n return stateMap;\n }, []);\n\n const enhancedSetState = useMemo<Dispatch<SetStateAction<T>>>(() => {\n if (!sync) {\n return setState;\n }\n return (updater: SetStateAction<T>) => {\n setState((old) => {\n const newValue = updater instanceof Function ? updater(old) : updater;\n\n const search = getSearchParams();\n for (const [key, value, alwaysEmit] of options.serializer(newValue)) {\n if (value && (alwaysEmit || !Object.is(initialStateSerialized.get(key), value))) {\n search.set(key, value);\n } else {\n search.delete(key);\n }\n }\n applySearchParams(search);\n\n return newValue;\n });\n };\n }, [sync]);\n\n return [state, enhancedSetState] as const;\n};\n"],"names":["useMemo","useState","slice","Function","prototype","call","bind","Array","extractParts","href","exec","searchIndex","parts","test","getSearchParams","window","location","URLSearchParams","applySearchParams","params","currentHref","search","size","toString","index","history","replaceState","join","getInitialState","options","initialState","useUrlSyncedState","sync","state","setState","deserializer","initialStateSerialized","stateMap","Map","initialize","needsApply","key","value","alwaysEmit","serializer","set","has","enhancedSetState","updater","old","newValue","Object","is","get","delete"],"mappings":"AAAA,SAAkCA,OAAO,EAAEC,QAAQ,QAAO,QAAQ;AAalE,MAAMC,QAAQC,SAASC,SAAS,CAACC,IAAI,CAACC,IAAI,CAACC,MAAMH,SAAS,CAACF,KAAK;AAMhE;;;;;CAKC,GACD,MAAMM,eAAe,CAACC,OAAiBP,MAAM,uCAAuCQ,IAAI,CAACD,QAAQ,KAAK,GAAG;AAEzG;;;;;CAKC,GACD,MAAME,cAAc,CAACC,QAA4B,OAAOC,IAAI,CAACD,KAAK,CAAC,EAAE,IAAI,IAAI;AAE7E;;;;;CAKC,GACD,MAAME,kBAAkB;IACpB,MAAMF,QAAQJ,aAAaO,OAAOC,QAAQ,CAACP,IAAI;IAC/C,OAAO,IAAIQ,gBAAgBL,KAAK,CAACD,YAAYC,OAAO;AACxD;AAEA;;;;;CAKC,GACD,MAAMM,oBAAoB,CAACC;IACvB,MAAMC,cAAcL,OAAOC,QAAQ,CAACP,IAAI;IACxC,MAAMG,QAAQJ,aAAaY;IAC3B,MAAMC,SAASF,OAAOG,IAAI,GAAG,IAAI,CAAC,CAAC,EAAEH,OAAOI,QAAQ,IAAI,GAAG;IAC3D,MAAMC,QAAQb,YAAYC;IAC1B,IAAIA,KAAK,CAACY,MAAM,KAAKH,QAAQ;QACzBT,KAAK,CAACY,MAAM,GAAGH;QACfN,OAAOU,OAAO,CAACC,YAAY,CAAC,MAAM,IAAId,MAAMe,IAAI,CAAC;IACrD;AACJ;AAqCA,MAAMC,kBAAkB,CAAIC,UACxBA,QAAQC,YAAY,YAAY3B,WAAW0B,QAAQC,YAAY,KAAKD,QAAQC,YAAY;AAE5F,OAAO,MAAMC,oBAAoB,CAAIF;IACjC,MAAMG,OAAOH,QAAQG,IAAI,KAAK;IAC9B,MAAM,CAACC,OAAOC,SAAS,GAAGjC,SAAY;QAClC,MAAM6B,eAAeF,gBAAgBC;QACrC,OAAOG,OAAOH,QAAQM,YAAY,CAACrB,mBAAmBgB,gBAAgBA;IAC1E;IACA,0HAA0H;IAC1H,MAAMM,yBAAyBpC,QAAQ;QACnC,MAAMqC,WAAW,IAAIC;QACrB,IAAIC,aAAqC;QACzC,IAAIC,aAAa;QACjB,KAAK,MAAM,CAACC,KAAKC,OAAOC,WAAW,IAAId,QAAQe,UAAU,CAAChB,gBAAgBC,UAAW;YACjFQ,SAASQ,GAAG,CAACJ,KAAKC;YAClB,IAAIV,QAAQW,cAAcD,OAAO;gBAC7BH,eAAAA,aAAezB;gBACf,IAAI,CAACyB,WAAWO,GAAG,CAACL,MAAM;oBACtBD,aAAa;oBACbD,WAAWM,GAAG,CAACJ,KAAKC;gBACxB;YACJ;QACJ;QACA,IAAIF,YAAY;YACZtB,kBAAkBqB;QACtB;QACA,OAAOF;IACX,GAAG,EAAE;IAEL,MAAMU,mBAAmB/C,QAAqC;QAC1D,IAAI,CAACgC,MAAM;YACP,OAAOE;QACX;QACA,OAAO,CAACc;YACJd,SAAS,CAACe;gBACN,MAAMC,WAAWF,mBAAmB7C,WAAW6C,QAAQC,OAAOD;gBAE9D,MAAM3B,SAASP;gBACf,KAAK,MAAM,CAAC2B,KAAKC,OAAOC,WAAW,IAAId,QAAQe,UAAU,CAACM,UAAW;oBACjE,IAAIR,SAAUC,CAAAA,cAAc,CAACQ,OAAOC,EAAE,CAAChB,uBAAuBiB,GAAG,CAACZ,MAAMC,MAAK,GAAI;wBAC7ErB,OAAOwB,GAAG,CAACJ,KAAKC;oBACpB,OAAO;wBACHrB,OAAOiC,MAAM,CAACb;oBAClB;gBACJ;gBACAvB,kBAAkBG;gBAElB,OAAO6B;YACX;QACJ;IACJ,GAAG;QAAClB;KAAK;IAET,OAAO;QAACC;QAAOc;KAAiB;AACpC,EAAE"}
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
.root {
|
|
2
|
-
padding: var(--mantine-spacing-sm);
|
|
3
|
-
|
|
4
2
|
&:not(&[data-variant]) {
|
|
3
|
+
/* TODO: Plasma Reset, validate if we need the border */
|
|
5
4
|
border-color: color-mix(in srgb, var(--alert-color), var(--alert-bg) 85%);
|
|
6
5
|
}
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
.wrapper {
|
|
10
|
-
gap: var(--mantine-spacing-sm);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
8
|
.title {
|
|
14
9
|
font-weight: 500;
|
|
15
10
|
}
|
|
16
|
-
|
|
17
|
-
.icon {
|
|
18
|
-
width: 16px;
|
|
19
|
-
height: 16px;
|
|
20
|
-
margin-right: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.message {
|
|
24
|
-
@mixin light {
|
|
25
|
-
color: var(--mantine-color-gray-7);
|
|
26
|
-
|
|
27
|
-
&:where([data-variant='filled']) {
|
|
28
|
-
color: var(--alert-color);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:where([data-variant='white']) {
|
|
33
|
-
color: var(--mantine-color-black);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
1
|
.label {
|
|
2
|
-
font-size: var(--mantine-font-size-sm);
|
|
3
2
|
font-weight: 300;
|
|
4
3
|
}
|
|
5
|
-
|
|
6
|
-
.input {
|
|
7
|
-
&[data-indeterminate] {
|
|
8
|
-
background-color: var(--mantine-color-pureWhite);
|
|
9
|
-
border-color: var(--mantine-color-gray-4);
|
|
10
|
-
|
|
11
|
-
& + svg {
|
|
12
|
-
color: var(--mantine-color-gray-6);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&[readonly] {
|
|
17
|
-
background-color: var(--mantine-color-gray-2);
|
|
18
|
-
border-color: var(--mantine-color-gray-2);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/* TODO: Plasma Reset, validate if we need the custom style for the search */
|
|
1
2
|
.search {
|
|
2
3
|
margin: 0 0 var(--mantine-spacing-xs);
|
|
3
|
-
border-radius: var(--mantine-radius-
|
|
4
|
+
border-radius: var(--mantine-radius-default);
|
|
4
5
|
border: 1px solid;
|
|
5
6
|
width: 100%;
|
|
6
|
-
border-color: var(--mantine-color-
|
|
7
|
+
border-color: var(--mantine-color-default-border);
|
|
7
8
|
|
|
8
9
|
&:focus {
|
|
9
10
|
border-color: var(--mantine-primary-color-filled);
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
.label {
|
|
2
|
-
margin-bottom: var(--mantine-spacing-xs);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.description {
|
|
6
|
-
font-size: var(--mantine-font-size-sm);
|
|
7
|
-
color: var(--mantine-color-gray-7);
|
|
8
|
-
margin-bottom: var(--mantine-spacing-xs);
|
|
9
|
-
line-height: var(--mantine-line-height);
|
|
10
2
|
font-weight: 300;
|
|
11
3
|
}
|
|
12
4
|
|
|
13
5
|
.error {
|
|
14
|
-
line-height: var(--mantine-line-height);
|
|
15
6
|
font-weight: 300;
|
|
16
7
|
}
|
|
@@ -1,65 +1,3 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
&[data-full-screen] {
|
|
3
|
-
.content {
|
|
4
|
-
flex: 0 0 100%;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&[data-size='xs'] {
|
|
9
|
-
.content {
|
|
10
|
-
flex: 0 0 rem(432px);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&[data-size='sm'] {
|
|
15
|
-
.content {
|
|
16
|
-
flex: 0 0 rem(664px);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&[data-size='md'] {
|
|
21
|
-
.content {
|
|
22
|
-
flex: 0 0 rem(896px);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&[data-size='lg'] {
|
|
27
|
-
.content {
|
|
28
|
-
flex: 0 0 rem(1120px);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&[data-size='xl'] {
|
|
33
|
-
.content {
|
|
34
|
-
flex: 0 0 rem(88%);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:not([data-size]) {
|
|
39
|
-
.content {
|
|
40
|
-
flex: 0 0 rem(896px);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.content {
|
|
46
|
-
overflow: auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.header {
|
|
50
|
-
border-bottom: 1px solid var(--mantine-color-gray-3);
|
|
51
|
-
align-items: flex-start;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
1
|
.title {
|
|
55
|
-
width: 100%;
|
|
56
|
-
font-size: var(--mantine-h3-font-size);
|
|
57
|
-
line-height: var(--mantine-h3-line-height);
|
|
58
2
|
font-weight: 500;
|
|
59
3
|
}
|
|
60
|
-
|
|
61
|
-
.body {
|
|
62
|
-
&:where(:not(:only-child)) {
|
|
63
|
-
padding-top: var(--mb-padding, var(--mantine-spacing-md));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
color: var(--mantine-color-gray-6);
|
|
3
|
-
line-height: var(--mantine-line-height);
|
|
4
|
-
border-radius: var(--mantine-radius-default) 0 0 var(--mantine-radius-default);
|
|
5
|
-
|
|
6
|
-
&[data-active] {
|
|
7
|
-
color: var(--mantine-primary-color-6);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@mixin hover {
|
|
11
|
-
@mixin light {
|
|
12
|
-
&:where(:not([data-active])) {
|
|
13
|
-
background-color: var(--mantine-color-gray-1);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
1
|
.label {
|
|
20
2
|
font-weight: 500;
|
|
21
3
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
cursor: text;
|
|
3
3
|
|
|
4
4
|
--input-bd: transparent;
|
|
5
|
-
--input-bg: var(--mantine-color-
|
|
6
|
-
--input-color: var(--mantine-color-
|
|
7
|
-
--input-placeholder-color: var(--mantine-color-
|
|
5
|
+
--input-bg: var(--mantine-color-dark-light);
|
|
6
|
+
--input-color: var(--mantine-color-dimmed);
|
|
7
|
+
--input-placeholder-color: var(--mantine-color-dimmed);
|
|
8
8
|
}
|
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
background-color: var(--mantine-color-gray-2);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.indicator {
|
|
6
|
-
border-radius: var(--sc-radius, var(--mantine-radius-sm));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
.label {
|
|
10
2
|
font-weight: 300;
|
|
11
|
-
|
|
12
|
-
@mixin light {
|
|
13
|
-
color: var(--mantine-color-gray-6);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&:where([data-disabled]) {
|
|
17
|
-
@mixin light {
|
|
18
|
-
color: var(--mantine-color-gray-5);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:where([data-active]) {
|
|
23
|
-
@mixin light {
|
|
24
|
-
color: var(--sc-label-color, var(--mantine-color-black));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:where(:not([data-disabled], [data-active], [data-read-only])) {
|
|
29
|
-
@mixin hover {
|
|
30
|
-
@mixin light {
|
|
31
|
-
color: var(--mantine-color-black);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
3
|
}
|
|
@@ -1,69 +1,3 @@
|
|
|
1
|
-
.step {
|
|
2
|
-
&[disabled] {
|
|
3
|
-
color: var(--mantine-color-gray-5);
|
|
4
|
-
|
|
5
|
-
& .mantine-Stepper-stepDescription {
|
|
6
|
-
color: var(--mantine-color-gray-5);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
& .mantine-Stepper-stepIcon {
|
|
10
|
-
border-color: var(--mantine-color-gray-1);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
1
|
.stepIcon {
|
|
16
2
|
font-weight: 500;
|
|
17
|
-
background-color: var(--mantine-color-gray-1);
|
|
18
|
-
color: inherit;
|
|
19
|
-
border: rem(1) solid var(--mantine-color-gray-3);
|
|
20
|
-
|
|
21
|
-
&[data-progress] {
|
|
22
|
-
background-color: var(--mantine-color-white);
|
|
23
|
-
border-color: var(--step-color);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&[data-completed] {
|
|
27
|
-
background-color: var(--mantine-color-white);
|
|
28
|
-
border-color: var(--mantine-color-lime-6);
|
|
29
|
-
color: var(--mantine-color-lime-6);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.stepCompletedIcon {
|
|
34
|
-
color: var(--mantine-color-lime-6);
|
|
35
|
-
font-size: rem(16);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.stepDescription {
|
|
39
|
-
color: var(--mantine-color-gray-7);
|
|
40
|
-
|
|
41
|
-
&[data-size='xs'] {
|
|
42
|
-
font-size: var(--mantine-font-size-xs);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&[data-size='sm'] {
|
|
46
|
-
font-size: var(--mantine-font-size-sm);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&[data-size='md'] {
|
|
50
|
-
font-size: var(--mantine-font-size-md);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&[data-size='lg'] {
|
|
54
|
-
font-size: var(--mantine-font-size-lg);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&[data-size='xl'] {
|
|
58
|
-
font-size: var(--mantine-font-size-xl);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.separator {
|
|
63
|
-
height: rem(1);
|
|
64
|
-
background-color: var(--mantine-color-gray-3);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.verticalSeparator {
|
|
68
|
-
border-left: rem(1) solid var(--mantine-color-gray-3);
|
|
69
3
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { MantineColorsTuple } from '@mantine/core';
|
|
2
2
|
export declare const PlasmaColors: {
|
|
3
|
+
blue: MantineColorsTuple;
|
|
4
|
+
red: MantineColorsTuple;
|
|
3
5
|
gray: MantineColorsTuple;
|
|
4
|
-
|
|
6
|
+
dark: MantineColorsTuple;
|
|
7
|
+
teal: MantineColorsTuple;
|
|
8
|
+
yellow: MantineColorsTuple;
|
|
9
|
+
violet: MantineColorsTuple;
|
|
10
|
+
grape: MantineColorsTuple;
|
|
11
|
+
'cyan (Not used)': MantineColorsTuple;
|
|
12
|
+
orange: MantineColorsTuple;
|
|
13
|
+
indigo: MantineColorsTuple;
|
|
14
|
+
green: MantineColorsTuple;
|
|
5
15
|
navy: MantineColorsTuple;
|
|
6
16
|
info: MantineColorsTuple;
|
|
7
|
-
blue: MantineColorsTuple;
|
|
8
|
-
red: MantineColorsTuple;
|
|
9
17
|
critical: MantineColorsTuple;
|
|
10
|
-
teal: MantineColorsTuple;
|
|
11
18
|
new: MantineColorsTuple;
|
|
12
|
-
yellow: MantineColorsTuple;
|
|
13
19
|
warning: MantineColorsTuple;
|
|
14
|
-
green: MantineColorsTuple;
|
|
15
|
-
indigo: MantineColorsTuple;
|
|
16
20
|
lime: MantineColorsTuple;
|
|
17
21
|
success: MantineColorsTuple;
|
|
18
22
|
purple: MantineColorsTuple;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlasmaColors.d.ts","sourceRoot":"","sources":["../../../src/theme/PlasmaColors.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"PlasmaColors.d.ts","sourceRoot":"","sources":["../../../src/theme/PlasmaColors.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;CA4JxB,CAAC"}
|