@qyu/reactcmp-dropdown 1.2.0 → 2.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.
Files changed (84) hide show
  1. package/README.md +173 -75
  2. package/build/bundle/entry/index.js +1266 -398
  3. package/build/declaration/component/button/element/view.d.ts +8 -5
  4. package/build/declaration/component/button/element/virtual.d.ts +9 -0
  5. package/build/declaration/component/container/element/view.d.ts +14 -23
  6. package/build/declaration/component/container/element/virtual.d.ts +13 -0
  7. package/build/declaration/component/content/element/view.d.ts +11 -0
  8. package/build/declaration/component/ctx-state/element/config.d.ts +3 -0
  9. package/build/declaration/component/ctx-state/element/content.d.ts +3 -0
  10. package/build/declaration/component/ctx-state/element/open.d.ts +2 -5
  11. package/build/declaration/component/ctx-state/element/refs.d.ts +3 -0
  12. package/build/declaration/component/ctx-state/hook/init/config.d.ts +8 -0
  13. package/build/declaration/component/ctx-state/hook/init/content.d.ts +6 -0
  14. package/build/declaration/component/ctx-state/hook/init/open.d.ts +7 -0
  15. package/build/declaration/component/ctx-state/hook/init/refs.d.ts +5 -0
  16. package/build/declaration/component/ctx-state/hook/view/config.d.ts +1 -0
  17. package/build/declaration/component/ctx-state/hook/view/content.d.ts +1 -0
  18. package/build/declaration/component/ctx-state/hook/view/open.d.ts +1 -0
  19. package/build/declaration/component/ctx-state/hook/view/refs.d.ts +1 -0
  20. package/build/declaration/component/ctx-state/type/state.d.ts +40 -6
  21. package/build/declaration/component/list-abs/element/view.d.ts +23 -36
  22. package/build/declaration/component/list-fix/element/view.d.ts +24 -38
  23. package/build/declaration/component/list-portal/element/view.d.ts +29 -0
  24. package/build/declaration/hook/closeevt/root.d.ts +8 -0
  25. package/build/declaration/hook/closeevt/root_infer.d.ts +3 -0
  26. package/build/declaration/hook/closeevt/shard.d.ts +9 -0
  27. package/build/declaration/hook/closeevt/shard_infer.d.ts +3 -0
  28. package/build/declaration/hook/ddnparts/list.d.ts +6 -0
  29. package/build/declaration/hook/ddnparts/list_infer.d.ts +3 -0
  30. package/build/declaration/hook/ddnparts/root.d.ts +8 -0
  31. package/build/declaration/hook/ddnparts/root_infer.d.ts +3 -0
  32. package/build/declaration/hook/ddnparts/shard.d.ts +9 -0
  33. package/build/declaration/hook/ddnparts/shard_infer.d.ts +3 -0
  34. package/build/declaration/hook/focus/capture.d.ts +16 -0
  35. package/build/declaration/hook/focus/capture_infer.d.ts +3 -0
  36. package/build/declaration/hook/listpos/api/absolute.d.ts +15 -0
  37. package/build/declaration/hook/listpos/api/fixed.d.ts +18 -0
  38. package/build/declaration/hook/listpos/api/type/api.d.ts +13 -0
  39. package/build/declaration/hook/listpos/api/type/position.d.ts +6 -0
  40. package/build/declaration/hook/listpos/api/type/reverse.d.ts +4 -0
  41. package/build/declaration/hook/listpos/api/type/size.d.ts +4 -0
  42. package/build/declaration/hook/listpos/rearrange/index.d.ts +10 -0
  43. package/build/declaration/hook/listpos/rearrange/type/config.d.ts +7 -0
  44. package/build/declaration/hook/open/view.d.ts +6 -0
  45. package/build/declaration/hook/open/view_infer.d.ts +3 -0
  46. package/build/declaration/hook/ref/merge.d.ts +2 -0
  47. package/build/declaration/hook/ref/o.d.ts +3 -0
  48. package/build/declaration/index.d.ts +58 -3
  49. package/build/declaration/type/fnref.d.ts +4 -0
  50. package/build/declaration/util/clname/merge.d.ts +1 -0
  51. package/build/declaration/util/closeevt/type/config.d.ts +11 -0
  52. package/build/declaration/util/cssprops/new/position.d.ts +3 -0
  53. package/build/declaration/util/cssprops/new/size.d.ts +9 -0
  54. package/build/declaration/util/focus/config/type/config.d.ts +6 -0
  55. package/build/declaration/util/prop/align/new/index.d.ts +2 -0
  56. package/build/declaration/util/prop/align/new/reversed.d.ts +2 -0
  57. package/build/declaration/util/prop/align/type/prop.d.ts +2 -0
  58. package/build/declaration/util/prop/clmap/def/container.d.ts +6 -0
  59. package/build/declaration/util/prop/clmap/def/content.d.ts +8 -0
  60. package/build/declaration/util/prop/clmap/def/listabs.d.ts +15 -0
  61. package/build/declaration/util/prop/clmap/def/listfix.d.ts +16 -0
  62. package/build/declaration/util/prop/clmap/new/index.d.ts +2 -0
  63. package/build/declaration/util/prop/clmap/type/prop.d.ts +4 -0
  64. package/build/declaration/util/prop/direction/new/index.d.ts +2 -0
  65. package/build/declaration/util/prop/direction/type/prop.d.ts +2 -0
  66. package/build/declaration/util/prop/justify/new/index.d.ts +2 -0
  67. package/build/declaration/util/prop/justify/new/reversed.d.ts +2 -0
  68. package/build/declaration/util/prop/justify/type/prop.d.ts +2 -0
  69. package/build/declaration/util/prop/portal/new/index.d.ts +2 -0
  70. package/build/declaration/util/prop/portal/type/prop.d.ts +2 -0
  71. package/build/declaration/util/ref/use.d.ts +2 -0
  72. package/build/style/index.css +132 -0
  73. package/build/style/index.css.d.ts +21 -0
  74. package/package.json +6 -9
  75. package/build/declaration/component/container/hook/useDropdownCloseEvents.d.ts +0 -15
  76. package/build/declaration/type/params.d.ts +0 -6
  77. package/build/declaration/util/cl.d.ts +0 -1
  78. package/build/declaration/util/nprop/index.d.ts +0 -5
  79. package/build/declaration/util/stylemap/new/remap.d.ts +0 -2
  80. package/build/declaration/util/stylemap/type/StyleMap.d.ts +0 -3
  81. package/build/style/index.global.css +0 -110
  82. package/build/style/index.global.css.d.ts +0 -21
  83. package/build/style/index.module.css +0 -110
  84. package/build/style/index.module.css.d.ts +0 -20
@@ -1,9 +1,64 @@
1
+ export * from "./type/fnref.js";
1
2
  export * from "./type/setter.js";
2
- export * from "./type/params.js";
3
3
  export * from "./component/ctx-state/type/state.js";
4
4
  export * from "./component/ctx-state/element/open.js";
5
+ export * from "./component/ctx-state/element/refs.js";
6
+ export * from "./component/ctx-state/element/content.js";
7
+ export * from "./component/ctx-state/element/config.js";
8
+ export * from "./component/ctx-state/hook/view/open.js";
9
+ export * from "./component/ctx-state/hook/view/refs.js";
10
+ export * from "./component/ctx-state/hook/view/content.js";
11
+ export * from "./component/ctx-state/hook/view/config.js";
12
+ export * from "./component/ctx-state/hook/init/open.js";
13
+ export * from "./component/ctx-state/hook/init/refs.js";
14
+ export * from "./component/ctx-state/hook/init/content.js";
15
+ export * from "./component/ctx-state/hook/init/config.js";
5
16
  export * from "./component/button/element/view.js";
6
- export * from "./component/container/element/view.js";
7
- export * from "./component/container/hook/useDropdownCloseEvents.js";
17
+ export * from "./component/button/element/virtual.js";
8
18
  export * from "./component/list-fix/element/view.js";
9
19
  export * from "./component/list-abs/element/view.js";
20
+ export * from "./component/list-portal/element/view.js";
21
+ export * from "./component/content/element/view.js";
22
+ export * from "./component/container/element/view.js";
23
+ export * from "./component/container/element/virtual.js";
24
+ export * from "./hook/closeevt/root.js";
25
+ export * from "./hook/closeevt/root_infer.js";
26
+ export * from "./hook/closeevt/shard.js";
27
+ export * from "./hook/closeevt/shard_infer.js";
28
+ export * from "./hook/open/view.js";
29
+ export * from "./hook/open/view_infer.js";
30
+ export * from "./hook/listpos/rearrange/index.js";
31
+ export * from "./hook/listpos/rearrange/type/config.js";
32
+ export * from "./hook/focus/capture.js";
33
+ export * from "./hook/focus/capture_infer.js";
34
+ export * from "./hook/listpos/api/type/api.js";
35
+ export * from "./hook/listpos/api/type/size.js";
36
+ export * from "./hook/listpos/api/type/reverse.js";
37
+ export * from "./hook/listpos/api/type/position.js";
38
+ export * from "./hook/listpos/api/fixed.js";
39
+ export * from "./hook/listpos/api/absolute.js";
40
+ export * from "./hook/ddnparts/root.js";
41
+ export * from "./hook/ddnparts/root_infer.js";
42
+ export * from "./hook/ddnparts/list.js";
43
+ export * from "./hook/ddnparts/list_infer.js";
44
+ export * from "./hook/ddnparts/shard.js";
45
+ export * from "./hook/ddnparts/shard_infer.js";
46
+ export * from "./util/closeevt/type/config.js";
47
+ export * from "./util/prop/portal/type/prop.js";
48
+ export * from "./util/prop/portal/new/index.js";
49
+ export * from "./util/prop/align/type/prop.js";
50
+ export * from "./util/prop/align/new/index.js";
51
+ export * from "./util/prop/align/new/reversed.js";
52
+ export * from "./util/prop/justify/type/prop.js";
53
+ export * from "./util/prop/justify/new/index.js";
54
+ export * from "./util/prop/justify/new/reversed.js";
55
+ export * from "./util/prop/direction/type/prop.js";
56
+ export * from "./util/prop/direction/new/index.js";
57
+ export * from "./util/prop/clmap/type/prop.js";
58
+ export * from "./util/prop/clmap/new/index.js";
59
+ export * from "./util/prop/clmap/def/listabs.js";
60
+ export * from "./util/prop/clmap/def/listfix.js";
61
+ export * from "./util/prop/clmap/def/container.js";
62
+ export * from "./util/prop/clmap/def/content.js";
63
+ export * from "./util/cssprops/new/size.js";
64
+ export * from "./util/cssprops/new/position.js";
@@ -0,0 +1,4 @@
1
+ export type FnORef<T> = () => T;
2
+ export type FnORefHTML<T extends HTMLElement | null = HTMLElement | null> = FnORef<T>;
3
+ export type FnIRef<T> = (element: T) => void;
4
+ export type FnIRefHTML<T extends HTMLElement | null = HTMLElement | null> = FnIRef<T>;
@@ -0,0 +1 @@
1
+ export declare const cl: (...names: (string | false | null | undefined)[]) => string | undefined;
@@ -0,0 +1,11 @@
1
+ export type CloseEvt_KeysShard = ("scroll");
2
+ export type CloseEvt_KeysRoot = ("blur" | "click" | "escape" | "resize");
3
+ export type CloseEvt_ConfigShard = {
4
+ readonly [K in CloseEvt_KeysShard]: boolean;
5
+ };
6
+ export type CloseEvt_ConfigRoot = {
7
+ readonly [K in CloseEvt_KeysRoot]: boolean;
8
+ };
9
+ export type CloseEvt_ConfigFull = {
10
+ readonly [K in CloseEvt_KeysRoot | CloseEvt_KeysShard]: boolean;
11
+ };
@@ -0,0 +1,3 @@
1
+ import type { ListPosApi_Position } from "../../../hook/listpos/api/type/position.js";
2
+ import * as r from "react";
3
+ export declare const cssprops_new_position: (params: ListPosApi_Position) => r.CSSProperties;
@@ -0,0 +1,9 @@
1
+ import type { ListPosApi_Size } from "../../../hook/listpos/api/type/size.js";
2
+ import type { PropDirection } from "../../prop/direction/type/prop.js";
3
+ import * as r from "react";
4
+ export type CSSProps_NewSize_Params = {
5
+ readonly open: boolean;
6
+ readonly size: ListPosApi_Size;
7
+ readonly direction: PropDirection;
8
+ };
9
+ export declare const cssprops_new_size: (params: CSSProps_NewSize_Params) => r.CSSProperties;
@@ -0,0 +1,6 @@
1
+ export type Focus_Config = {
2
+ readonly capture: boolean;
3
+ readonly capture_options: FocusOptions;
4
+ readonly restore: boolean;
5
+ readonly restore_options: FocusOptions;
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { PropAlign, PropAlign_Raw } from "../type/prop.js";
2
+ export declare const prop_align_new: (raw: PropAlign_Raw) => PropAlign;
@@ -0,0 +1,2 @@
1
+ import type { PropAlign } from "../type/prop.js";
2
+ export declare const prop_align_new_reversed: (src_align: PropAlign) => PropAlign;
@@ -0,0 +1,2 @@
1
+ export type PropAlign = ("start" | "center" | "end");
2
+ export type PropAlign_Raw = (PropAlign | null | boolean | undefined);
@@ -0,0 +1,6 @@
1
+ import type { PropClMap } from "../type/prop.js";
2
+ export type PropClMap_DefContainer = PropClMap<keyof typeof prop_clmap_def_container>;
3
+ export declare const prop_clmap_def_container: {
4
+ readonly __qyuddn: "__qyuddn";
5
+ readonly container: "container";
6
+ };
@@ -0,0 +1,8 @@
1
+ import type { PropClMap } from "../type/prop.js";
2
+ export type PropClMap_DefContent = PropClMap<keyof typeof prop_clmap_def_content>;
3
+ export declare const prop_clmap_def_content: {
4
+ readonly __qyuddn: "__qyuddn";
5
+ readonly content: "content";
6
+ readonly _tracking: "_tracking";
7
+ readonly focusguard: "focusguard";
8
+ };
@@ -0,0 +1,15 @@
1
+ import type { PropClMap } from "../type/prop.js";
2
+ export type PropClMap_DefListAbs = PropClMap<keyof typeof prop_clmap_def_listabs>;
3
+ export declare const prop_clmap_def_listabs: {
4
+ readonly __qyuddn: "__qyuddn";
5
+ readonly listabs: "listabs";
6
+ readonly _transition_nosize: "_transition_nosize";
7
+ readonly _open: "_open";
8
+ readonly _justify_start: "_justify_start";
9
+ readonly _justify_end: "_justify_end";
10
+ readonly _align_start: "_align_start";
11
+ readonly _align_end: "_align_end";
12
+ readonly _align_center: "_align_center";
13
+ readonly _vertical: "_vertical";
14
+ readonly _horizontal: "_horizontal";
15
+ };
@@ -0,0 +1,16 @@
1
+ import type { PropClMap } from "../type/prop.js";
2
+ export type PropClMap_DefListFix = PropClMap<keyof typeof prop_clmap_def_listfix>;
3
+ export declare const prop_clmap_def_listfix: {
4
+ readonly __qyuddn: "__qyuddn";
5
+ readonly listfix: "listfix";
6
+ readonly _transition_nopos: "_transition_nopos";
7
+ readonly _transition_nosize: "_transition_nosize";
8
+ readonly _open: "_open";
9
+ readonly _justify_start: "_justify_start";
10
+ readonly _justify_end: "_justify_end";
11
+ readonly _align_start: "_align_start";
12
+ readonly _align_end: "_align_end";
13
+ readonly _align_center: "_align_center";
14
+ readonly _vertical: "_vertical";
15
+ readonly _horizontal: "_horizontal";
16
+ };
@@ -0,0 +1,2 @@
1
+ import type { PropClMap, PropClMap_Raw } from "../type/prop.js";
2
+ export declare const prop_clmap_new: <Def extends Readonly<Record<string, string>>>(stylemap: PropClMap_Raw<keyof Def>, def: Def) => PropClMap<keyof Def>;
@@ -0,0 +1,4 @@
1
+ export type PropClMap<ClName extends keyof any> = {
2
+ [K in ClName]: string | null;
3
+ };
4
+ export type PropClMap_Raw<ClName extends keyof any> = (Partial<PropClMap<ClName>> | undefined | null);
@@ -0,0 +1,2 @@
1
+ import type { PropDirection, PropDirection_Raw } from "../type/prop.js";
2
+ export declare const prop_direction_new: (raw: PropDirection_Raw) => PropDirection;
@@ -0,0 +1,2 @@
1
+ export type PropDirection = ("hor" | "ver");
2
+ export type PropDirection_Raw = (PropDirection | null | boolean | undefined);
@@ -0,0 +1,2 @@
1
+ import type { PropJustify, PropJustify_Raw } from "../type/prop.js";
2
+ export declare const prop_justify_new: (raw: PropJustify_Raw) => PropJustify;
@@ -0,0 +1,2 @@
1
+ import type { PropJustify } from "../type/prop.js";
2
+ export declare const prop_justify_new_reversed: (src_justify: PropJustify) => PropJustify;
@@ -0,0 +1,2 @@
1
+ export type PropJustify = ("start" | "end");
2
+ export type PropJustify_Raw = (PropJustify | null | boolean | undefined);
@@ -0,0 +1,2 @@
1
+ import type { PropPortal, PropPortal_Raw } from "../type/prop.js";
2
+ export declare const prop_portal_new: (portal: PropPortal_Raw) => PropPortal;
@@ -0,0 +1,2 @@
1
+ export type PropPortal = (HTMLElement | null);
2
+ export type PropPortal_Raw = (PropPortal | string | undefined);
@@ -0,0 +1,2 @@
1
+ import * as r from "react";
2
+ export declare const ref_use: <T>(ref: r.Ref<T>, value: T) => void;
@@ -0,0 +1,132 @@
1
+ .__qyuddn.container {
2
+ position: relative;
3
+ }
4
+ .__qyuddn.listabs {
5
+ --transition-size: ;
6
+ overflow: hidden;
7
+ position: absolute;
8
+ z-index: var(--qyuddn-z-index, 3);
9
+ transition: opacity var(--qyuddn-trtime, 0.2s) var(--transition-size);
10
+ }
11
+ .__qyuddn.listabs:not(._transition_nosize) {
12
+ --transition-size: , width var(--qyuddn-trtime, 0.2s),
13
+ height var(--qyuddn-trtime, 0.2s);
14
+ }
15
+ .__qyuddn.listabs:not(._open) {
16
+ opacity: 0;
17
+ user-select: none;
18
+ pointer-events: none;
19
+ }
20
+ .__qyuddn.listabs._justify_start._horizontal {
21
+ right: 100%;
22
+ transform-origin: center right;
23
+ }
24
+ .__qyuddn.listabs._justify_start._horizontal:not(._align_center) {
25
+ transform: translateX(calc(-1 * var(--gap, 0px)));
26
+ }
27
+ .__qyuddn.listabs._justify_start._horizontal._align_center {
28
+ transform: translateX(calc(-1 * var(--gap, 0px))) translateY(-50%);
29
+ }
30
+ .__qyuddn.listabs._justify_start._vertical {
31
+ bottom: 100%;
32
+ transform-origin: bottom center;
33
+ }
34
+ .__qyuddn.listabs._justify_start._vertical:not(._align_center) {
35
+ transform: translateY(calc(-1 * var(--gap, 0px)));
36
+ }
37
+ .__qyuddn.listabs._justify_start._vertical._align_center {
38
+ transform: translateY(calc(-1 * var(--gap, 0px))) translateX(-50%);
39
+ }
40
+ .__qyuddn.listabs._justify_end._horizontal {
41
+ left: 100%;
42
+ transform-origin: center left;
43
+ }
44
+ .__qyuddn.listabs._justify_end._horizontal:not(._align_center) {
45
+ transform: translateX(var(--gap, 0px));
46
+ }
47
+ .__qyuddn.listabs._justify_end._horizontal._align_center {
48
+ transform: translateX(var(--gap, 0px)) translateY(-50%);
49
+ }
50
+ .__qyuddn.listabs._justify_end._vertical {
51
+ top: 100%;
52
+ transform-origin: top center;
53
+ }
54
+ .__qyuddn.listabs._justify_end._vertical:not(._align_center) {
55
+ transform: translateY(var(--gap, 0px));
56
+ }
57
+ .__qyuddn.listabs._justify_end._vertical._align_center {
58
+ transform: translateY(var(--gap, 0px)) translateX(-50%);
59
+ }
60
+ .__qyuddn.listabs._align_start._horizontal {
61
+ top: 0;
62
+ }
63
+ .__qyuddn.listabs._align_start._vertical {
64
+ left: 0;
65
+ }
66
+ .__qyuddn.listabs._align_center._horizontal {
67
+ top: 50%;
68
+ }
69
+ .__qyuddn.listabs._align_center._vertical {
70
+ left: 50%;
71
+ }
72
+ .__qyuddn.listabs._align_end._horizontal {
73
+ bottom: 0;
74
+ }
75
+ .__qyuddn.listabs._align_end._vertical {
76
+ right: 0;
77
+ }
78
+ .__qyuddn.listfix {
79
+ --transition-pos: ;
80
+ --transition-size: ;
81
+ position: fixed;
82
+ overflow: hidden;
83
+ z-index: var(--qyuddn-z-index, 3);
84
+ transition: opacity var(--qyuddn-trtime, 0.2s) var(--transition-size) var(--transition-pos);
85
+ }
86
+ .__qyuddn.listfix:not(._open) {
87
+ opacity: 0;
88
+ user-select: none;
89
+ pointer-events: none;
90
+ }
91
+ .__qyuddn.listfix:not(._transition_nosize) {
92
+ --transition-size: , width var(--qyuddn-trtime, 0.2s),
93
+ height var(--qyuddn-trtime, 0.2s);
94
+ }
95
+ .__qyuddn.listfix:not(._transition_nopos) {
96
+ --transition-pos: , top var(--qyuddn-trtime, 0.2s),
97
+ left var(--qyuddn-trtime, 0.2s),
98
+ right var(--qyuddn-trtime, 0.2s),
99
+ bottom var(--qyuddn-trtime, 0.2s);
100
+ }
101
+ .__qyuddn.listfix._justify_start._horizontal {
102
+ transform-origin: center right;
103
+ transform: translateX(calc(-1 * var(--gap, 0px)));
104
+ }
105
+ .__qyuddn.listfix._justify_start._vertical {
106
+ transform-origin: bottom center;
107
+ transform: translateY(calc(-1 * var(--gap, 0px)));
108
+ }
109
+ .__qyuddn.listfix._justify_end._horizontal {
110
+ transform-origin: center left;
111
+ transform: translateX(var(--gap, 0px));
112
+ }
113
+ .__qyuddn.listfix._justify_end._vertical {
114
+ transform-origin: top center;
115
+ transform: translateY(var(--gap, 0px));
116
+ }
117
+ .__qyuddn.content._tracking {
118
+ position: absolute;
119
+ }
120
+ .__qyuddn.content:not(._tracking) {
121
+ width: 100%;
122
+ height: 100%;
123
+ }
124
+ .__qyuddn .focusguard {
125
+ user-select: none;
126
+ pointer-events: none;
127
+ position: fixed;
128
+ width: 0;
129
+ height: 0;
130
+ top: -100px;
131
+ left: -100px;
132
+ }
@@ -0,0 +1,21 @@
1
+ declare const styles: {
2
+ readonly "__qyuddn": string;
3
+ readonly "_align_center": string;
4
+ readonly "_align_end": string;
5
+ readonly "_align_start": string;
6
+ readonly "_horizontal": string;
7
+ readonly "_justify_end": string;
8
+ readonly "_justify_start": string;
9
+ readonly "_open": string;
10
+ readonly "_tracking": string;
11
+ readonly "_transition_nopos": string;
12
+ readonly "_transition_nosize": string;
13
+ readonly "_vertical": string;
14
+ readonly "container": string;
15
+ readonly "content": string;
16
+ readonly "focusguard": string;
17
+ readonly "listabs": string;
18
+ readonly "listfix": string;
19
+ };
20
+ export = styles;
21
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qyu/reactcmp-dropdown",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "2.0.0",
5
5
  "main": "./build/bundle/entry/index.js",
6
6
  "description": "React Components for Dropdown Positioning",
7
7
  "keywords": [
@@ -19,11 +19,10 @@
19
19
  "url": "git+https://github.com/qlwt/reactcmp-dropdown.git"
20
20
  },
21
21
  "scripts": {
22
- "build": "run-s build:clear build:style:module build:style:global build:style:types build:rollup",
22
+ "build": "run-s build:clear build:style:module build:style:types build:rollup",
23
23
  "build:clear": "rimraf ./build",
24
24
  "build:rollup": "rollup -c npm/rollup/rollup.config.js",
25
- "build:style:module": "sass ./src/style/index.module.scss:./build/style/index.module.css --no-source-map",
26
- "build:style:global": "postcss ./build/style/index.module.css --config ./npm/postcss/ -o ./build/style/index.global.css",
25
+ "build:style:module": "sass ./src/style/index.module.scss:./build/style/index.css --no-source-map",
27
26
  "build:style:types": "tcm ./build/style"
28
27
  },
29
28
  "exports": {
@@ -32,8 +31,8 @@
32
31
  "import": "./build/bundle/entry/index.js"
33
32
  },
34
33
  "./style/*": {
35
- "types": "./build/style/*.css.d.ts",
36
- "import": "./build/style/*.css"
34
+ "types": "./build/style/*.d.ts",
35
+ "import": "./build/style/*"
37
36
  }
38
37
  },
39
38
  "devDependencies": {
@@ -41,9 +40,6 @@
41
40
  "@types/react": "^19.0.0",
42
41
  "@types/react-dom": "^19.0.0",
43
42
  "npm-run-all": "^4.1.5",
44
- "postcss": "^8.5.6",
45
- "postcss-cli": "^11.0.1",
46
- "postcss-prefix-selector": "^2.1.1",
47
43
  "rimraf": "^6.0.1",
48
44
  "rollup": "^4.20.0",
49
45
  "sass": "^1.94.2",
@@ -59,3 +55,4 @@
59
55
  "react-dom": ">=19.0.0"
60
56
  }
61
57
  }
58
+
@@ -1,15 +0,0 @@
1
- import type { FnSetterStateful } from "../../../type/setter.js";
2
- export type UseDropdownCloseEvents_Config = Readonly<{
3
- blur?: boolean;
4
- click?: boolean;
5
- scroll?: boolean;
6
- resize?: boolean;
7
- escape?: boolean;
8
- }>;
9
- export type UseDropdownCloseEvents_Params = Readonly<{
10
- ref: () => HTMLElement | null;
11
- open: boolean;
12
- open_set: FnSetterStateful<boolean>;
13
- config?: UseDropdownCloseEvents_Config;
14
- }>;
15
- export declare const useDropdownCloseEvents: (params: UseDropdownCloseEvents_Params) => void;
@@ -1,6 +0,0 @@
1
- export type Direction = ("hor" | "ver");
2
- export type Justify = ("start" | "end");
3
- export type Align = ("start" | "center" | "end");
4
- export type DirectionRaw = (Direction | null | boolean | undefined);
5
- export type JustifyRaw = (Justify | null | boolean | undefined);
6
- export type AlignRaw = (Align | null | boolean | undefined);
@@ -1 +0,0 @@
1
- export declare const cl: (...clnames: (string | false | undefined | null)[]) => string;
@@ -1,5 +0,0 @@
1
- import type { Align, AlignRaw, Direction, DirectionRaw, Justify, JustifyRaw } from "../../type/params.js";
2
- export declare const nprop_align_new: (raw: AlignRaw) => Align;
3
- export declare const nprop_justify_new: (raw: JustifyRaw) => Justify;
4
- export declare const nprop_direction_new: (raw: DirectionRaw) => Direction;
5
- export declare const nprop_portal_new: (portal: string | HTMLElement | undefined | null) => HTMLElement | null;
@@ -1,2 +0,0 @@
1
- import type { StyleMap } from "../type/StyleMap.js";
2
- export declare const stylemap_new_remap: <Def extends Readonly<Record<string, string>>>(def: Def, remap: Readonly<Record<string, string | null>>) => StyleMap<keyof Def>;
@@ -1,3 +0,0 @@
1
- export type StyleMap<ClName extends keyof any> = {
2
- [K in ClName]: string | null;
3
- };
@@ -1,110 +0,0 @@
1
- .__qyuddn.container {
2
- position: relative;
3
- }
4
-
5
- .__qyuddn.listabs {
6
- --scale: 1;
7
- position: absolute;
8
- z-index: var(--qyuddn-z-index, 3);
9
- transition: transform var(--qyuddn-trtime, 0.2s), opacity var(--qyuddn-trtime, 0.2s);
10
- }
11
- .__qyuddn.listabs:not(.listabs_open) {
12
- --scale: 0;
13
- opacity: 0;
14
- user-select: none;
15
- pointer-events: none;
16
- }
17
-
18
- .__qyuddn.listabs_justify_start.listabs_horizontal {
19
- right: 100%;
20
- transform-origin: center right;
21
- }
22
- .__qyuddn.listabs_justify_start.listabs_horizontal:not(.listabs_align_center) {
23
- transform: scaleX(var(--scale)) translateX(calc(-1 * var(--gap, 0px)));
24
- }
25
- .__qyuddn.listabs_justify_start.listabs_horizontal.listabs_align_center {
26
- transform: scaleX(var(--scale)) translateX(calc(-1 * var(--gap, 0px))) translateY(-50%);
27
- }
28
- .__qyuddn.listabs_justify_start.listabs_vertical {
29
- bottom: 100%;
30
- transform-origin: bottom center;
31
- }
32
- .__qyuddn.listabs_justify_start.listabs_vertical:not(.listabs_align_center) {
33
- transform: scaleY(var(--scale)) translateY(calc(-1 * var(--gap, 0px)));
34
- }
35
- .__qyuddn.listabs_justify_start.listabs_vertical.listabs_align_center {
36
- transform: scaleY(var(--scale)) translateY(calc(-1 * var(--gap, 0px))) translateX(-50%);
37
- }
38
-
39
- .__qyuddn.listabs_justify_end.listabs_horizontal {
40
- left: 100%;
41
- transform-origin: center left;
42
- }
43
- .__qyuddn.listabs_justify_end.listabs_horizontal:not(.listabs_align_center) {
44
- transform: scaleX(var(--scale)) translateX(var(--gap, 0px));
45
- }
46
- .__qyuddn.listabs_justify_end.listabs_horizontal.listabs_align_center {
47
- transform: scaleX(var(--scale)) translateX(var(--gap, 0px)) translateY(-50%);
48
- }
49
- .__qyuddn.listabs_justify_end.listabs_vertical {
50
- top: 100%;
51
- transform-origin: top center;
52
- }
53
- .__qyuddn.listabs_justify_end.listabs_vertical:not(.listabs_align_center) {
54
- transform: scaleY(var(--scale)) translateY(var(--gap, 0px));
55
- }
56
- .__qyuddn.listabs_justify_end.listabs_vertical.listabs_align_center {
57
- transform: scaleY(var(--scale)) translateY(var(--gap, 0px)) translateX(-50%);
58
- }
59
-
60
- .__qyuddn.listabs_align_start.listabs_horizontal {
61
- top: 0;
62
- }
63
- .__qyuddn.listabs_align_start.listabs_vertical {
64
- left: 0;
65
- }
66
-
67
- .__qyuddn.listabs_align_center.listabs_horizontal {
68
- top: 50%;
69
- }
70
- .__qyuddn.listabs_align_center.listabs_vertical {
71
- left: 50%;
72
- }
73
-
74
- .__qyuddn.listabs_align_end.listabs_horizontal {
75
- right: 0;
76
- }
77
- .__qyuddn.listabs_align_end.listabs_vertical {
78
- top: 0;
79
- }
80
-
81
- .__qyuddn.listfix {
82
- --scale: 1;
83
- position: fixed;
84
- z-index: var(--qyuddn-z-index, 3);
85
- transition: transform var(--qyuddn-trtime, 0.2s), opacity var(--qyuddn-trtime, 0.2s);
86
- }
87
- .__qyuddn.listfix:not(.listfix_open) {
88
- --scale: 0;
89
- opacity: 0;
90
- user-select: none;
91
- pointer-events: none;
92
- }
93
-
94
- .__qyuddn.listfix_justify_start.listfix_horizontal {
95
- transform-origin: center right;
96
- transform: scaleX(var(--scale)) translateX(calc(-1 * var(--gap, 0px)));
97
- }
98
- .__qyuddn.listfix_justify_start.listfix_vertical {
99
- transform-origin: bottom center;
100
- transform: scaleY(var(--scale)) translateY(calc(-1 * var(--gap, 0px)));
101
- }
102
-
103
- .__qyuddn.listfix_justify_end.listfix_horizontal {
104
- transform-origin: center left;
105
- transform: scaleX(var(--scale)) translateX(var(--gap, 0px));
106
- }
107
- .__qyuddn.listfix_justify_end.listfix_vertical {
108
- transform-origin: top center;
109
- transform: scaleY(var(--scale)) translateY(var(--gap, 0px));
110
- }
@@ -1,21 +0,0 @@
1
- declare const styles: {
2
- readonly "__qyuddn": string;
3
- readonly "container": string;
4
- readonly "listabs": string;
5
- readonly "listabs_align_center": string;
6
- readonly "listabs_align_end": string;
7
- readonly "listabs_align_start": string;
8
- readonly "listabs_horizontal": string;
9
- readonly "listabs_justify_end": string;
10
- readonly "listabs_justify_start": string;
11
- readonly "listabs_open": string;
12
- readonly "listabs_vertical": string;
13
- readonly "listfix": string;
14
- readonly "listfix_horizontal": string;
15
- readonly "listfix_justify_end": string;
16
- readonly "listfix_justify_start": string;
17
- readonly "listfix_open": string;
18
- readonly "listfix_vertical": string;
19
- };
20
- export = styles;
21
-