@pathscale/ui 1.1.53 → 1.1.54

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.
Files changed (32) hide show
  1. package/dist/components/drawer/Drawer.classes.d.ts +26 -88
  2. package/dist/components/drawer/Drawer.classes.js +26 -88
  3. package/dist/components/drawer/Drawer.css +2 -102
  4. package/dist/components/drawer/Drawer.d.ts +9 -26
  5. package/dist/components/drawer/Drawer.js +241 -409
  6. package/dist/components/drawer/index.d.ts +1 -1
  7. package/dist/components/field-error/FieldError.d.ts +3 -3
  8. package/dist/components/field-error/FieldError.js +11 -11
  9. package/dist/components/form/Form.d.ts +6 -0
  10. package/dist/hooks/form/index.d.ts +6 -0
  11. package/dist/hooks/form/index.js +12 -1
  12. package/dist/hooks/form/useField.d.ts +11 -0
  13. package/dist/hooks/form/useField.js +20 -0
  14. package/dist/hooks/form/useFieldError.d.ts +3 -0
  15. package/dist/hooks/form/useFieldError.js +3 -0
  16. package/dist/hooks/form/useFieldMeta.d.ts +20 -0
  17. package/dist/hooks/form/useFieldMeta.js +49 -0
  18. package/dist/hooks/form/useFieldProps.d.ts +10 -0
  19. package/dist/hooks/form/useFieldProps.js +51 -0
  20. package/dist/hooks/form/useForm.d.ts +27 -0
  21. package/dist/hooks/form/useForm.js +59 -0
  22. package/dist/hooks/form/utils.d.ts +4 -0
  23. package/dist/hooks/form/utils.js +30 -0
  24. package/dist/index.d.ts +3 -1
  25. package/dist/index.js +6 -1
  26. package/dist/purge-manifest.json +2332 -2352
  27. package/dist/styles/icons/generated-icons.css +1 -63
  28. package/package.json +1 -1
  29. package/dist/components/drawer/Drawer.a11y.d.ts +0 -11
  30. package/dist/components/drawer/Drawer.a11y.js +0 -32
  31. package/dist/components/drawer/Drawer.context.d.ts +0 -27
  32. package/dist/components/drawer/Drawer.context.js +0 -8
@@ -1,63 +1 @@
1
-
2
- .iconify {
3
- display: inline-block;
4
- width: 1em;
5
- height: 1em;
6
- background-color: currentColor;
7
- -webkit-mask-repeat: no-repeat;
8
- mask-repeat: no-repeat;
9
- -webkit-mask-size: 100% 100%;
10
- mask-size: 100% 100%;
11
- }
12
-
13
- .iconify-color {
14
- display: inline-block;
15
- width: 1em;
16
- height: 1em;
17
- background-repeat: no-repeat;
18
- background-size: 100% 100%;
19
- }
20
-
21
- .icon-[mdi--close] {
22
- --svg: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3C%2Fsvg%3E");
23
- }
24
- .icon-[mdi--close].iconify {
25
- -webkit-mask-image: var(--svg);
26
- mask-image: var(--svg);
27
- }
28
- .icon-[mdi--close].iconify-color {
29
- background-image: var(--svg);
30
- }
31
-
32
- .icon-[mdi--firefox] {
33
- --svg: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M6.85%206.74q.015%200%200%200M21.28%208.6c-.43-1.05-1.32-2.18-2.01-2.54.56%201.11.89%202.22%201.02%203.04v.02c-1.13-2.82-3.05-3.96-4.62-6.44-.08-.12-.17-.25-.24-.38-.04-.07-.07-.14-.11-.21-.06-.13-.12-.26-.15-.4%200-.01-.01-.02-.02-.02h-.03c-2.22%201.3-3.15%203.59-3.38%205.04-.69.04-1.37.21-1.99.51-.12.05-.17.19-.13.31.05.14.21.21.34.15.54-.26%201.14-.41%201.74-.45h.05c.08-.01.17-.01.25-.01.5-.01.97.06%201.44.2l.06.02c.1.02.17.06.25.06.05.04.11.06.16.08l.14.06c.07.03.14.06.2.09.03.02.06.03.09.05.07.04.16.07.2.11.04.02.08.05.12.07.73.45%201.34%201.07%201.75%201.81-.53-.37-1.49-.74-2.41-.58%203.6%201.81%202.63%208-2.36%207.76-.44-.01-.88-.1-1.3-.25-.1-.03-.2-.07-.29-.12-.05-.02-.12-.05-.17-.08-1.23-.63-2.24-1.82-2.38-3.27%200%200%20.5-1.73%203.33-1.73.31%200%201.17-.86%201.2-1.1%200-.09-1.74-.78-2.42-1.45-.37-.36-.54-.53-.69-.66-.08-.07-.17-.13-.26-.19a4.63%204.63%200%200%201-.03-2.45C7.6%206.12%206.8%206.86%206.22%207.5c-.4-.5-.37-2.15-.35-2.5-.01%200-.3.16-.33.18-.35.25-.68.53-.98.82-.35.37-.66.74-.94%201.14-.62.91-1.12%201.95-1.34%203.04%200%20.01-.1.41-.17.92l-.03.23c-.02.17-.04.32-.08.58v.41c0%205.53%204.5%2010.01%2010%2010.01%204.97%200%209.08-3.59%209.88-8.33.02-.11.03-.24.05-.37.2-1.72-.02-3.52-.65-5.03%22%2F%3E%3C%2Fsvg%3E");
34
- }
35
- .icon-[mdi--firefox].iconify {
36
- -webkit-mask-image: var(--svg);
37
- mask-image: var(--svg);
38
- }
39
- .icon-[mdi--firefox].iconify-color {
40
- background-image: var(--svg);
41
- }
42
-
43
- .icon-[mdi--loading] {
44
- --svg: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M12%204V2A10%2010%200%200%200%202%2012h2a8%208%200%200%201%208-8%22%2F%3E%3C%2Fsvg%3E");
45
- }
46
- .icon-[mdi--loading].iconify {
47
- -webkit-mask-image: var(--svg);
48
- mask-image: var(--svg);
49
- }
50
- .icon-[mdi--loading].iconify-color {
51
- background-image: var(--svg);
52
- }
53
-
54
- .icon-[mdi--palette] {
55
- --svg: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M17.5%2012a1.5%201.5%200%200%201-1.5-1.5A1.5%201.5%200%200%201%2017.5%209a1.5%201.5%200%200%201%201.5%201.5%201.5%201.5%200%200%201-1.5%201.5m-3-4A1.5%201.5%200%200%201%2013%206.5%201.5%201.5%200%200%201%2014.5%205%201.5%201.5%200%200%201%2016%206.5%201.5%201.5%200%200%201%2014.5%208m-5%200A1.5%201.5%200%200%201%208%206.5%201.5%201.5%200%200%201%209.5%205%201.5%201.5%200%200%201%2011%206.5%201.5%201.5%200%200%201%209.5%208m-3%204A1.5%201.5%200%200%201%205%2010.5%201.5%201.5%200%200%201%206.5%209%201.5%201.5%200%200%201%208%2010.5%201.5%201.5%200%200%201%206.5%2012M12%203a9%209%200%200%200-9%209%209%209%200%200%200%209%209%201.5%201.5%200%200%200%201.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5%201.5%200%200%201%201.5-1.5H16a5%205%200%200%200%205-5c0-4.42-4.03-8-9-8%22%2F%3E%3C%2Fsvg%3E");
56
- }
57
- .icon-[mdi--palette].iconify {
58
- -webkit-mask-image: var(--svg);
59
- mask-image: var(--svg);
60
- }
61
- .icon-[mdi--palette].iconify-color {
62
- background-image: var(--svg);
63
- }
1
+ .iconify{background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.iconify,.iconify-color{display:inline-block;height:1em;width:1em}.iconify-color{background-repeat:no-repeat;background-size:100% 100%}.icon-[mdi--close]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E")}.icon-[mdi--close].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi--close].iconify-color{background-image:var(--svg)}.icon-[mdi--firefox]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M6.85 6.74q.015 0 0 0M21.28 8.6c-.43-1.05-1.32-2.18-2.01-2.54.56 1.11.89 2.22 1.02 3.04v.02c-1.13-2.82-3.05-3.96-4.62-6.44-.08-.12-.17-.25-.24-.38-.04-.07-.07-.14-.11-.21-.06-.13-.12-.26-.15-.4 0-.01-.01-.02-.02-.02h-.03c-2.22 1.3-3.15 3.59-3.38 5.04-.69.04-1.37.21-1.99.51-.12.05-.17.19-.13.31.05.14.21.21.34.15.54-.26 1.14-.41 1.74-.45h.05c.08-.01.17-.01.25-.01.5-.01.97.06 1.44.2l.06.02c.1.02.17.06.25.06.05.04.11.06.16.08l.14.06c.07.03.14.06.2.09.03.02.06.03.09.05.07.04.16.07.2.11.04.02.08.05.12.07.73.45 1.34 1.07 1.75 1.81-.53-.37-1.49-.74-2.41-.58 3.6 1.81 2.63 8-2.36 7.76-.44-.01-.88-.1-1.3-.25-.1-.03-.2-.07-.29-.12-.05-.02-.12-.05-.17-.08-1.23-.63-2.24-1.82-2.38-3.27 0 0 .5-1.73 3.33-1.73.31 0 1.17-.86 1.2-1.1 0-.09-1.74-.78-2.42-1.45-.37-.36-.54-.53-.69-.66-.08-.07-.17-.13-.26-.19a4.63 4.63 0 0 1-.03-2.45C7.6 6.12 6.8 6.86 6.22 7.5c-.4-.5-.37-2.15-.35-2.5-.01 0-.3.16-.33.18-.35.25-.68.53-.98.82-.35.37-.66.74-.94 1.14-.62.91-1.12 1.95-1.34 3.04 0 .01-.1.41-.17.92l-.03.23c-.02.17-.04.32-.08.58v.41c0 5.53 4.5 10.01 10 10.01 4.97 0 9.08-3.59 9.88-8.33.02-.11.03-.24.05-.37.2-1.72-.02-3.52-.65-5.03'/%3E%3C/svg%3E")}.icon-[mdi--firefox].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi--firefox].iconify-color{background-image:var(--svg)}.icon-[mdi--loading]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8'/%3E%3C/svg%3E")}.icon-[mdi--loading].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi--loading].iconify-color{background-image:var(--svg)}.icon-[mdi--palette]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M17.5 12a1.5 1.5 0 0 1-1.5-1.5A1.5 1.5 0 0 1 17.5 9a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1-1.5 1.5m-3-4A1.5 1.5 0 0 1 13 6.5 1.5 1.5 0 0 1 14.5 5 1.5 1.5 0 0 1 16 6.5 1.5 1.5 0 0 1 14.5 8m-5 0A1.5 1.5 0 0 1 8 6.5 1.5 1.5 0 0 1 9.5 5 1.5 1.5 0 0 1 11 6.5 1.5 1.5 0 0 1 9.5 8m-3 4A1.5 1.5 0 0 1 5 10.5 1.5 1.5 0 0 1 6.5 9 1.5 1.5 0 0 1 8 10.5 1.5 1.5 0 0 1 6.5 12M12 3a9 9 0 0 0-9 9 9 9 0 0 0 9 9 1.5 1.5 0 0 0 1.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 0 1 1.5-1.5H16a5 5 0 0 0 5-5c0-4.42-4.03-8-9-8'/%3E%3C/svg%3E")}.icon-[mdi--palette].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi--palette].iconify-color{background-image:var(--svg)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "1.1.53",
3
+ "version": "1.1.54",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +0,0 @@
1
- export type DrawerPlacement = "top" | "bottom" | "left" | "right";
2
- export type DrawerSize = "sm" | "md" | "lg" | "full";
3
- export type DrawerBackdropVariant = "opaque" | "blur" | "transparent";
4
- export type DrawerScrollBehavior = "inside" | "outside";
5
- export type DrawerAnimState = "entering" | "open" | "exiting" | "closed";
6
- export type DrawerCloseReason = "escape" | "backdrop" | "trigger" | "api";
7
- export declare const isSidePlacement: (placement: DrawerPlacement) => placement is "left" | "right";
8
- export declare const isVisibleState: (state: DrawerAnimState) => state is "open" | "entering";
9
- export declare const getFocusable: (container: HTMLElement) => HTMLElement[];
10
- export declare const focusFirst: (container: HTMLElement) => void;
11
- export declare const trapFocus: (event: KeyboardEvent, container: HTMLElement) => void;
@@ -1,32 +0,0 @@
1
- const isSidePlacement = (placement)=>"left" === placement || "right" === placement;
2
- const isVisibleState = (state)=>"entering" === state || "open" === state;
3
- const FOCUSABLE_SELECTOR = "a[href],area[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[contenteditable='true'],[tabindex]:not([tabindex='-1'])";
4
- const getFocusable = (container)=>Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el)=>!el.hidden && el.tabIndex >= 0 && "true" !== el.getAttribute("aria-hidden"));
5
- const focusFirst = (container)=>{
6
- const autofocus = container.querySelector("[autofocus]");
7
- if (autofocus) return void autofocus.focus();
8
- const nodes = getFocusable(container);
9
- if (nodes.length > 0) return void nodes[0].focus();
10
- container.focus();
11
- };
12
- const trapFocus = (event, container)=>{
13
- const nodes = getFocusable(container);
14
- if (0 === nodes.length) {
15
- event.preventDefault();
16
- container.focus();
17
- return;
18
- }
19
- const first = nodes[0];
20
- const last = nodes[nodes.length - 1];
21
- const active = document.activeElement;
22
- if (!event.shiftKey && active === last) {
23
- event.preventDefault();
24
- first.focus();
25
- return;
26
- }
27
- if (event.shiftKey && (active === first || active === container)) {
28
- event.preventDefault();
29
- last.focus();
30
- }
31
- };
32
- export { focusFirst, getFocusable, isSidePlacement, isVisibleState, trapFocus };
@@ -1,27 +0,0 @@
1
- import type { DrawerAnimState, DrawerBackdropVariant, DrawerCloseReason, DrawerPlacement, DrawerScrollBehavior, DrawerSize } from "./Drawer.a11y";
2
- export type DrawerContextValue = {
3
- isOpen: () => boolean;
4
- setIsOpen: (next: boolean) => void;
5
- requestClose: (reason: DrawerCloseReason) => void;
6
- animState: () => DrawerAnimState;
7
- placement: () => DrawerPlacement;
8
- size: () => DrawerSize;
9
- backdrop: () => DrawerBackdropVariant;
10
- scrollBehavior: () => DrawerScrollBehavior;
11
- isDismissable: () => boolean;
12
- shouldCloseOnEsc: () => boolean;
13
- shouldCloseOnBackdropClick: () => boolean;
14
- trapFocus: () => boolean;
15
- restoreFocus: () => boolean;
16
- dialogRef: () => HTMLDivElement | undefined;
17
- setDialogRef: (node: HTMLDivElement | undefined) => void;
18
- labelledBy: () => string | undefined;
19
- setLabelledBy: (id: string | undefined) => void;
20
- describedBy: () => string | undefined;
21
- setDescribedBy: (id: string | undefined) => void;
22
- setPlacementOverride: (value: DrawerPlacement | undefined) => void;
23
- setBackdropDismissableOverride: (value: boolean | undefined) => void;
24
- setBackdropCloseOnClickOverride: (value: boolean | undefined) => void;
25
- };
26
- export declare const DrawerContext: import("solid-js").Context<DrawerContextValue | undefined>;
27
- export declare const useDrawerContext: () => DrawerContextValue;
@@ -1,8 +0,0 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
2
- const DrawerContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)();
3
- const useDrawerContext = ()=>{
4
- const ctx = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(DrawerContext);
5
- if (!ctx) throw new Error("Drawer compound components must be used within <Drawer.Root>.");
6
- return ctx;
7
- };
8
- export { DrawerContext, useDrawerContext };