@design-factory/core 21.1.0 → 22.0.0-next.1

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 (131) hide show
  1. package/{accordion-D9ba0XYq.js → accordion-DUFLBQkV.js} +90 -28
  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 +80 -22
  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 +13 -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-D4xSbhcT.js} +19 -5
  30. package/dropdown-Bjj2ql6d.js +246 -0
  31. package/index.d.ts +3 -1
  32. package/index.js +45 -39
  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 +8 -8
  54. package/services/transitions/collapse.d.ts +4 -0
  55. package/services/transitions/collapse.js +23 -19
  56. package/services/transitions/cssTransitions.js +2 -2
  57. package/services/transitions/simpleClassTransition.js +1 -1
  58. package/{slider-Br_Qiopx.js → slider-tH5g55yQ.js} +132 -97
  59. package/{toaster-BUBzFeJM.js → toaster-BS9qeRLF.js} +3 -3
  60. package/{tree-vD7ZkV8Z.js → tree-DW6iLxdw.js} +2 -2
  61. package/types.d.ts +8 -1
  62. package/utils/debounceSignal.d.ts +11 -0
  63. package/utils/debounceSignal.js +18 -0
  64. package/utils/directive.js +1 -1
  65. package/utils/edgeState.d.ts +23 -0
  66. package/utils/edgeState.js +43 -0
  67. package/utils/internal/isFocusable.d.ts +40 -0
  68. package/utils/stores.d.ts +2 -16
  69. package/utils/stores.js +5 -24
  70. package/utils/writables.d.ts +27 -13
  71. package/utils/writables.js +12 -11
  72. package/{writables-DYGjj5T3.js → writables-_7BriMb2.js} +37 -12
  73. package/accordion-B0vs8JWM.cjs +0 -314
  74. package/alert-AhaliJ17.cjs +0 -9
  75. package/alert-Cb9FhbFQ.js +0 -10
  76. package/collapse-BnWw4Hnc.cjs +0 -94
  77. package/common-B5jS-Ih_.cjs +0 -73
  78. package/components/accordion/index.cjs +0 -7
  79. package/components/alert/index.cjs +0 -5
  80. package/components/carousel/index.cjs +0 -292
  81. package/components/collapse/index.cjs +0 -5
  82. package/components/drawer/index.cjs +0 -5
  83. package/components/modal/index.cjs +0 -8
  84. package/components/pagination/index.cjs +0 -5
  85. package/components/progressbar/index.cjs +0 -5
  86. package/components/rating/index.cjs +0 -5
  87. package/components/slider/index.cjs +0 -5
  88. package/components/toast/index.cjs +0 -7
  89. package/components/tree/index.cjs +0 -5
  90. package/config.cjs +0 -36
  91. package/directive-DyTodNPd.cjs +0 -523
  92. package/drawer-Ca_ktkEs.cjs +0 -328
  93. package/index.cjs +0 -134
  94. package/isFocusable-Ckwus82R.js +0 -32
  95. package/isFocusable-DfzDLeAN.cjs +0 -31
  96. package/modal-Dxdw2Pkv.cjs +0 -252
  97. package/pagination-BLVa1UsZ.cjs +0 -254
  98. package/progressbar-RopgvVeA.cjs +0 -86
  99. package/promise-CxCD3NYv.cjs +0 -118
  100. package/rating-DZ3OQgtt.cjs +0 -183
  101. package/scrollbars-f651ntzz.cjs +0 -33
  102. package/services/extendWidget.cjs +0 -41
  103. package/services/floatingUI.cjs +0 -111
  104. package/services/floatingUI.d.ts +0 -76
  105. package/services/floatingUI.js +0 -111
  106. package/services/focusElement.cjs +0 -46
  107. package/services/focustrack.cjs +0 -47
  108. package/services/hash.cjs +0 -15
  109. package/services/intersection.cjs +0 -53
  110. package/services/matchMedia.cjs +0 -14
  111. package/services/navManager.cjs +0 -166
  112. package/services/pointerdownPosition.cjs +0 -60
  113. package/services/portal.cjs +0 -42
  114. package/services/resizeObserver.cjs +0 -54
  115. package/services/siblingsInert.cjs +0 -44
  116. package/services/transitions/baseTransitions.cjs +0 -186
  117. package/services/transitions/collapse.cjs +0 -40
  118. package/services/transitions/cssTransitions.cjs +0 -32
  119. package/services/transitions/simpleClassTransition.cjs +0 -37
  120. package/slider-pgDq1V5r.cjs +0 -807
  121. package/textDirection-zqcZ5-eK.cjs +0 -3
  122. package/toaster-Dlube4Ya.cjs +0 -161
  123. package/tree-Chcy4ulJ.cjs +0 -228
  124. package/types.cjs +0 -6
  125. package/utils/directive.cjs +0 -28
  126. package/utils/func.cjs +0 -7
  127. package/utils/id.cjs +0 -5
  128. package/utils/stores.cjs +0 -172
  129. package/utils/widget.cjs +0 -8
  130. package/utils/writables.cjs +0 -16
  131. 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;