@design-factory/core 21.1.0 → 22.0.0-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.
Files changed (130) hide show
  1. package/{accordion-D9ba0XYq.js → accordion-B5RqDwi3.js} +76 -15
  2. package/alert-Db6cG6JE.js +125 -0
  3. package/{collapse-Bn8iHKrd.js → collapse-D8Jo56k9.js} +2 -2
  4. package/{common-DFyZvkII.js → common-CP4amR0Z.js} +2 -2
  5. package/components/accordion/accordion.d.ts +73 -15
  6. package/components/accordion/index.js +1 -1
  7. package/components/alert/alert.d.ts +77 -8
  8. package/components/alert/common.d.ts +9 -9
  9. package/components/alert/index.js +2 -3
  10. package/components/carousel/index.js +2 -2
  11. package/components/collapse/index.js +1 -1
  12. package/components/drawer/drawer.d.ts +6 -0
  13. package/components/drawer/index.js +1 -1
  14. package/components/dropdown/dropdown.d.ts +110 -0
  15. package/components/dropdown/index.d.ts +1 -0
  16. package/components/dropdown/index.js +5 -0
  17. package/components/modal/index.js +1 -1
  18. package/components/pagination/index.js +1 -1
  19. package/components/progressbar/index.js +1 -1
  20. package/components/rating/index.js +1 -1
  21. package/components/slider/index.js +1 -1
  22. package/components/slider/slider.d.ts +23 -4
  23. package/components/toast/index.js +1 -1
  24. package/components/tooltip/index.d.ts +1 -0
  25. package/components/tooltip/index.js +174 -0
  26. package/components/tooltip/tooltip.d.ts +63 -0
  27. package/components/tree/index.js +1 -1
  28. package/{directive-CNNSo5Yn.js → directive-CMT2vEDg.js} +7 -4
  29. package/{drawer-CoBXUPyv.js → drawer-CpGnS2ln.js} +11 -4
  30. package/dropdown-Bjj2ql6d.js +246 -0
  31. package/index.d.ts +3 -1
  32. package/index.js +44 -37
  33. package/isFocusable-C2iRr0zh.js +72 -0
  34. package/{modal-BH9nrwVz.js → modal-CQWh2Sm5.js} +3 -3
  35. package/package.json +1 -1
  36. package/{pagination-BQWusWXN.js → pagination-DIRcpdRE.js} +2 -2
  37. package/{progressbar-S1pNn5rM.js → progressbar-Bth8r3Qu.js} +2 -2
  38. package/{promise-D-RZVPuv.js → promise-CkIc0KKt.js} +3 -3
  39. package/{rating-DWgGgwk3.js → rating-DLsgFSyB.js} +2 -2
  40. package/services/extendWidget.d.ts +1 -1
  41. package/services/focusElement.js +2 -2
  42. package/services/focustrack.js +2 -2
  43. package/services/matchMedia.js +1 -1
  44. package/services/mousetrack.d.ts +34 -0
  45. package/services/mousetrack.js +41 -0
  46. package/services/navManager.js +2 -2
  47. package/services/pointerdownPosition.js +1 -1
  48. package/services/portal.js +1 -1
  49. package/services/positioning.d.ts +101 -0
  50. package/services/positioning.js +104 -0
  51. package/services/resizeObserver.js +1 -1
  52. package/services/siblingsInert.js +1 -1
  53. package/services/transitions/baseTransitions.js +3 -3
  54. package/services/transitions/collapse.js +4 -7
  55. package/services/transitions/cssTransitions.js +2 -2
  56. package/services/transitions/simpleClassTransition.js +1 -1
  57. package/{slider-Br_Qiopx.js → slider-b9cVFNAL.js} +96 -58
  58. package/{toaster-BUBzFeJM.js → toaster-BS9qeRLF.js} +3 -3
  59. package/{tree-vD7ZkV8Z.js → tree-DW6iLxdw.js} +2 -2
  60. package/types.d.ts +8 -1
  61. package/utils/debounceSignal.d.ts +11 -0
  62. package/utils/debounceSignal.js +18 -0
  63. package/utils/directive.js +1 -1
  64. package/utils/edgeState.d.ts +23 -0
  65. package/utils/edgeState.js +43 -0
  66. package/utils/internal/isFocusable.d.ts +40 -0
  67. package/utils/stores.d.ts +1 -1
  68. package/utils/stores.js +4 -1
  69. package/utils/writables.d.ts +27 -13
  70. package/utils/writables.js +12 -11
  71. package/{writables-DYGjj5T3.js → writables-_7BriMb2.js} +37 -12
  72. package/accordion-B0vs8JWM.cjs +0 -314
  73. package/alert-AhaliJ17.cjs +0 -9
  74. package/alert-Cb9FhbFQ.js +0 -10
  75. package/collapse-BnWw4Hnc.cjs +0 -94
  76. package/common-B5jS-Ih_.cjs +0 -73
  77. package/components/accordion/index.cjs +0 -7
  78. package/components/alert/index.cjs +0 -5
  79. package/components/carousel/index.cjs +0 -292
  80. package/components/collapse/index.cjs +0 -5
  81. package/components/drawer/index.cjs +0 -5
  82. package/components/modal/index.cjs +0 -8
  83. package/components/pagination/index.cjs +0 -5
  84. package/components/progressbar/index.cjs +0 -5
  85. package/components/rating/index.cjs +0 -5
  86. package/components/slider/index.cjs +0 -5
  87. package/components/toast/index.cjs +0 -7
  88. package/components/tree/index.cjs +0 -5
  89. package/config.cjs +0 -36
  90. package/directive-DyTodNPd.cjs +0 -523
  91. package/drawer-Ca_ktkEs.cjs +0 -328
  92. package/index.cjs +0 -134
  93. package/isFocusable-Ckwus82R.js +0 -32
  94. package/isFocusable-DfzDLeAN.cjs +0 -31
  95. package/modal-Dxdw2Pkv.cjs +0 -252
  96. package/pagination-BLVa1UsZ.cjs +0 -254
  97. package/progressbar-RopgvVeA.cjs +0 -86
  98. package/promise-CxCD3NYv.cjs +0 -118
  99. package/rating-DZ3OQgtt.cjs +0 -183
  100. package/scrollbars-f651ntzz.cjs +0 -33
  101. package/services/extendWidget.cjs +0 -41
  102. package/services/floatingUI.cjs +0 -111
  103. package/services/floatingUI.d.ts +0 -76
  104. package/services/floatingUI.js +0 -111
  105. package/services/focusElement.cjs +0 -46
  106. package/services/focustrack.cjs +0 -47
  107. package/services/hash.cjs +0 -15
  108. package/services/intersection.cjs +0 -53
  109. package/services/matchMedia.cjs +0 -14
  110. package/services/navManager.cjs +0 -166
  111. package/services/pointerdownPosition.cjs +0 -60
  112. package/services/portal.cjs +0 -42
  113. package/services/resizeObserver.cjs +0 -54
  114. package/services/siblingsInert.cjs +0 -44
  115. package/services/transitions/baseTransitions.cjs +0 -186
  116. package/services/transitions/collapse.cjs +0 -40
  117. package/services/transitions/cssTransitions.cjs +0 -32
  118. package/services/transitions/simpleClassTransition.cjs +0 -37
  119. package/slider-pgDq1V5r.cjs +0 -807
  120. package/textDirection-zqcZ5-eK.cjs +0 -3
  121. package/toaster-Dlube4Ya.cjs +0 -161
  122. package/tree-Chcy4ulJ.cjs +0 -228
  123. package/types.cjs +0 -6
  124. package/utils/directive.cjs +0 -28
  125. package/utils/func.cjs +0 -7
  126. package/utils/id.cjs +0 -5
  127. package/utils/stores.cjs +0 -172
  128. package/utils/widget.cjs +0 -8
  129. package/utils/writables.cjs +0 -16
  130. package/writables-Dt68gADJ.cjs +0 -102
@@ -1,102 +0,0 @@
1
- "use strict";
2
- const types = require("./types.cjs");
3
- function isNumber(value) {
4
- return typeof value === "number" && !isNaN(value) && Number.isFinite(value);
5
- }
6
- function isBoolean(value) {
7
- return value === true || value === false;
8
- }
9
- function isFunction(value) {
10
- return typeof value === "function";
11
- }
12
- function isString(value) {
13
- return typeof value === "string";
14
- }
15
- const isArray = Array.isArray;
16
- function clamp(value, max, min = 0) {
17
- return Math.max(Math.min(value, max), min);
18
- }
19
- const isHTMLElement = (value) => value instanceof HTMLElement;
20
- const allowNull = (isType) => (value) => value === null || isType(value);
21
- function isFromEnum(list) {
22
- return (value) => list.includes(value);
23
- }
24
- const testToNormalizeValue = (filter) => (value) => filter(value) ? value : types.INVALID_VALUE;
25
- const numberNormalizeFn = testToNormalizeValue(isNumber);
26
- const typeNumber = {
27
- normalizeValue: numberNormalizeFn
28
- };
29
- function typeNumberInRangeFactory(min, max, options = {}) {
30
- const { strict = false, useClamp = true } = options;
31
- return {
32
- normalizeValue: (value) => {
33
- let normalizedNumber = numberNormalizeFn(value);
34
- if (normalizedNumber !== types.INVALID_VALUE) {
35
- if (!strict && useClamp) {
36
- normalizedNumber = clamp(normalizedNumber, max, min);
37
- }
38
- if (normalizedNumber >= min && normalizedNumber <= max) {
39
- if (!strict || normalizedNumber !== min && normalizedNumber !== max) {
40
- return normalizedNumber;
41
- }
42
- }
43
- }
44
- return types.INVALID_VALUE;
45
- }
46
- };
47
- }
48
- const typeBoolean = {
49
- normalizeValue: testToNormalizeValue(isBoolean)
50
- };
51
- const typeBooleanOrNull = {
52
- normalizeValue: testToNormalizeValue(allowNull(isBoolean))
53
- };
54
- const typeString = {
55
- normalizeValue: testToNormalizeValue(isString)
56
- };
57
- const typeStringOrNull = {
58
- normalizeValue: testToNormalizeValue(allowNull(isString))
59
- };
60
- const typeNumberOrNull = {
61
- normalizeValue: testToNormalizeValue(allowNull(isNumber))
62
- };
63
- const typeFunction = {
64
- normalizeValue: testToNormalizeValue(isFunction),
65
- equal: Object.is
66
- };
67
- const typeHTMLElementOrNull = {
68
- normalizeValue: testToNormalizeValue(allowNull(isHTMLElement)),
69
- equal: Object.is
70
- };
71
- const typeArray = {
72
- normalizeValue: testToNormalizeValue(isArray),
73
- equal: (a, b) => {
74
- if (a === b) {
75
- return true;
76
- } else {
77
- if (a?.length !== b?.length) {
78
- return false;
79
- }
80
- return a.every((val, index) => val === b[index]);
81
- }
82
- }
83
- };
84
- function createTypeEnum(enumList) {
85
- return {
86
- normalizeValue: testToNormalizeValue(isFromEnum(enumList))
87
- };
88
- }
89
- exports.clamp = clamp;
90
- exports.createTypeEnum = createTypeEnum;
91
- exports.isNumber = isNumber;
92
- exports.testToNormalizeValue = testToNormalizeValue;
93
- exports.typeArray = typeArray;
94
- exports.typeBoolean = typeBoolean;
95
- exports.typeBooleanOrNull = typeBooleanOrNull;
96
- exports.typeFunction = typeFunction;
97
- exports.typeHTMLElementOrNull = typeHTMLElementOrNull;
98
- exports.typeNumber = typeNumber;
99
- exports.typeNumberInRangeFactory = typeNumberInRangeFactory;
100
- exports.typeNumberOrNull = typeNumberOrNull;
101
- exports.typeString = typeString;
102
- exports.typeStringOrNull = typeStringOrNull;