@opengovsg/oui 0.0.0-snapshot-20250812083020 → 0.0.0-snapshot-20250813172831

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 (147) hide show
  1. package/dist/cjs/badge/badge.cjs +4 -4
  2. package/dist/cjs/badge/use-badge.cjs +6 -6
  3. package/dist/cjs/banner/banner.cjs +3 -3
  4. package/dist/cjs/button/button.cjs +4 -4
  5. package/dist/cjs/calendar/calendar-bottom-content.cjs +2 -2
  6. package/dist/cjs/calendar/calendar-header.cjs +2 -2
  7. package/dist/cjs/calendar/calendar-month-day-selector.cjs +4 -4
  8. package/dist/cjs/calendar/calendar.cjs +4 -4
  9. package/dist/cjs/calendar/hooks/use-calendar-selectors.cjs +4 -4
  10. package/dist/cjs/calendar/utils.cjs +3 -3
  11. package/dist/cjs/checkbox/checkbox-group-style-context.cjs +16 -0
  12. package/dist/cjs/checkbox/checkbox.cjs +94 -0
  13. package/dist/cjs/checkbox/index.cjs +12 -0
  14. package/dist/cjs/combo-box/combo-box-fuzzy.cjs +6 -6
  15. package/dist/cjs/combo-box/combo-box-item.cjs +2 -2
  16. package/dist/cjs/combo-box/combo-box.cjs +4 -4
  17. package/dist/cjs/date-field/date-field.cjs +3 -3
  18. package/dist/cjs/date-picker/date-picker.cjs +3 -3
  19. package/dist/cjs/date-range-picker/date-range-picker.cjs +5 -5
  20. package/dist/cjs/govt-banner/govt-banner.cjs +3 -3
  21. package/dist/cjs/hooks/use-callback-ref.cjs +4 -4
  22. package/dist/cjs/hooks/use-controllable-state.cjs +2 -2
  23. package/dist/cjs/index.cjs +56 -39
  24. package/dist/cjs/input/input.cjs +2 -2
  25. package/dist/cjs/menu/menu.cjs +7 -7
  26. package/dist/cjs/node_modules/.pnpm/@react-aria_focus@3.20.5_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/focus/dist/useFocusRing.cjs +45 -0
  27. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/context.cjs +21 -0
  28. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/textSelection.cjs +72 -0
  29. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useFocus.cjs +60 -0
  30. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs +210 -0
  31. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs +100 -0
  32. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useHover.cjs +152 -0
  33. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/usePress.cjs +676 -0
  34. package/dist/cjs/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/utils.cjs +160 -0
  35. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs +9 -0
  36. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs +9 -0
  37. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs +16 -0
  38. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs +9 -0
  39. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_private_field_get.cjs +11 -0
  40. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_private_field_init.cjs +10 -0
  41. package/dist/cjs/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_private_field_set.cjs +12 -0
  42. package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/Icon.cjs +4 -4
  43. package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +3 -3
  44. package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevrons-right.cjs +22 -0
  45. package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/ellipsis.cjs +23 -0
  46. package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/minus.cjs +19 -0
  47. package/dist/cjs/pagination/hooks/use-pagination.cjs +117 -0
  48. package/dist/cjs/pagination/index.cjs +17 -0
  49. package/dist/cjs/pagination/pagination-cursor.cjs +18 -0
  50. package/dist/cjs/pagination/pagination-item.cjs +18 -0
  51. package/dist/cjs/pagination/pagination.cjs +263 -0
  52. package/dist/cjs/pagination/use-pagination-item.cjs +87 -0
  53. package/dist/cjs/pagination/use-pagination.cjs +251 -0
  54. package/dist/cjs/range-calendar/range-calendar.cjs +6 -6
  55. package/dist/cjs/ripple/use-ripple.cjs +4 -4
  56. package/dist/cjs/select/select.cjs +3 -3
  57. package/dist/cjs/spinner/use-spinner.cjs +3 -3
  58. package/dist/cjs/system/react-utils/context.cjs +3 -3
  59. package/dist/cjs/system/react-utils/dom-props.cjs +186 -0
  60. package/dist/cjs/system/react-utils/filter-dom-props.cjs +46 -0
  61. package/dist/cjs/system/react-utils/index.cjs +2 -0
  62. package/dist/cjs/system/react-utils/refs.cjs +3 -3
  63. package/dist/cjs/system/utils.cjs +3 -3
  64. package/dist/cjs/tabs/tabs.cjs +2 -2
  65. package/dist/cjs/tag-field/tag-field-item.cjs +2 -2
  66. package/dist/cjs/tag-field/tag-field-list.cjs +4 -4
  67. package/dist/cjs/tag-field/tag-field-root.cjs +14 -14
  68. package/dist/cjs/tag-field/tag-field-state-context.cjs +2 -2
  69. package/dist/cjs/tag-field/tag-field-tag-list.cjs +3 -3
  70. package/dist/cjs/tag-field/tag-field-trigger.cjs +2 -2
  71. package/dist/cjs/tag-field/tag-field.cjs +4 -4
  72. package/dist/cjs/tag-field/use-tag-field-state.cjs +6 -6
  73. package/dist/cjs/tag-field/use-tag-field.cjs +4 -4
  74. package/dist/cjs/text-area/text-area.cjs +2 -2
  75. package/dist/cjs/toggle/toggle.cjs +3 -3
  76. package/dist/esm/button/button.js +1 -1
  77. package/dist/esm/calendar/calendar-month-day-selector.js +2 -2
  78. package/dist/esm/checkbox/checkbox-group-style-context.js +13 -0
  79. package/dist/esm/checkbox/checkbox.js +91 -0
  80. package/dist/esm/checkbox/index.js +3 -0
  81. package/dist/esm/combo-box/combo-box.js +1 -1
  82. package/dist/esm/date-picker/date-picker.js +1 -1
  83. package/dist/esm/date-range-picker/date-range-picker.js +2 -2
  84. package/dist/esm/index.js +19 -12
  85. package/dist/esm/menu/menu.js +1 -1
  86. package/dist/esm/node_modules/.pnpm/@react-aria_focus@3.20.5_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/focus/dist/useFocusRing.js +43 -0
  87. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/context.js +19 -0
  88. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/textSelection.js +69 -0
  89. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useFocus.js +58 -0
  90. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useFocusVisible.js +205 -0
  91. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useFocusWithin.js +98 -0
  92. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/useHover.js +150 -0
  93. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/usePress.js +674 -0
  94. package/dist/esm/node_modules/.pnpm/@react-aria_interactions@3.25.3_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@react-aria/interactions/dist/utils.js +155 -0
  95. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
  96. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js +7 -0
  97. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js +14 -0
  98. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js +7 -0
  99. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_private_field_get.js +9 -0
  100. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_private_field_init.js +8 -0
  101. package/dist/esm/node_modules/.pnpm/@swc_helpers@0.5.17/node_modules/@swc/helpers/esm/_class_private_field_set.js +10 -0
  102. package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +17 -0
  103. package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/ellipsis.js +18 -0
  104. package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/minus.js +14 -0
  105. package/dist/esm/pagination/hooks/use-pagination.js +114 -0
  106. package/dist/esm/pagination/index.js +6 -0
  107. package/dist/esm/pagination/pagination-cursor.js +16 -0
  108. package/dist/esm/pagination/pagination-item.js +16 -0
  109. package/dist/esm/pagination/pagination.js +261 -0
  110. package/dist/esm/pagination/use-pagination-item.js +85 -0
  111. package/dist/esm/pagination/use-pagination.js +248 -0
  112. package/dist/esm/select/select.js +1 -1
  113. package/dist/esm/system/react-utils/dom-props.js +183 -0
  114. package/dist/esm/system/react-utils/filter-dom-props.js +44 -0
  115. package/dist/esm/system/react-utils/index.js +1 -0
  116. package/dist/esm/tag-field/tag-field.js +2 -2
  117. package/dist/types/checkbox/checkbox-group-style-context.d.ts +6 -0
  118. package/dist/types/checkbox/checkbox-group-style-context.d.ts.map +1 -0
  119. package/dist/types/checkbox/checkbox.d.ts +19 -0
  120. package/dist/types/checkbox/checkbox.d.ts.map +1 -0
  121. package/dist/types/checkbox/index.d.ts +3 -0
  122. package/dist/types/checkbox/index.d.ts.map +1 -0
  123. package/dist/types/index.d.mts +2 -0
  124. package/dist/types/index.d.ts +2 -0
  125. package/dist/types/index.d.ts.map +1 -1
  126. package/dist/types/pagination/hooks/use-pagination.d.ts +51 -0
  127. package/dist/types/pagination/hooks/use-pagination.d.ts.map +1 -0
  128. package/dist/types/pagination/index.d.ts +7 -0
  129. package/dist/types/pagination/index.d.ts.map +1 -0
  130. package/dist/types/pagination/pagination-cursor.d.ts +9 -0
  131. package/dist/types/pagination/pagination-cursor.d.ts.map +1 -0
  132. package/dist/types/pagination/pagination-item.d.ts +5 -0
  133. package/dist/types/pagination/pagination-item.d.ts.map +1 -0
  134. package/dist/types/pagination/pagination.d.ts +5 -0
  135. package/dist/types/pagination/pagination.d.ts.map +1 -0
  136. package/dist/types/pagination/use-pagination-item.d.ts +51 -0
  137. package/dist/types/pagination/use-pagination-item.d.ts.map +1 -0
  138. package/dist/types/pagination/use-pagination.d.ts +353 -0
  139. package/dist/types/pagination/use-pagination.d.ts.map +1 -0
  140. package/dist/types/system/react-utils/context.d.ts.map +1 -1
  141. package/dist/types/system/react-utils/dom-props.d.ts +3 -0
  142. package/dist/types/system/react-utils/dom-props.d.ts.map +1 -0
  143. package/dist/types/system/react-utils/filter-dom-props.d.ts +39 -0
  144. package/dist/types/system/react-utils/filter-dom-props.d.ts.map +1 -0
  145. package/dist/types/system/react-utils/index.d.ts +1 -0
  146. package/dist/types/system/react-utils/index.d.ts.map +1 -1
  147. package/package.json +8 -6
@@ -0,0 +1,160 @@
1
+ 'use strict';
2
+
3
+ var utils = require('@react-aria/utils');
4
+ var $670gB$react = require('react');
5
+
6
+ /*
7
+ * Copyright 2020 Adobe. All rights reserved.
8
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License. You may obtain a copy
10
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software distributed under
13
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
14
+ * OF ANY KIND, either express or implied. See the License for the specific language
15
+ * governing permissions and limitations under the License.
16
+ */
17
+
18
+ function $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {
19
+ let event = nativeEvent;
20
+ event.nativeEvent = nativeEvent;
21
+ event.isDefaultPrevented = ()=>event.defaultPrevented;
22
+ // cancelBubble is technically deprecated in the spec, but still supported in all browsers.
23
+ event.isPropagationStopped = ()=>event.cancelBubble;
24
+ event.persist = ()=>{};
25
+ return event;
26
+ }
27
+ function $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {
28
+ Object.defineProperty(event, 'target', {
29
+ value: target
30
+ });
31
+ Object.defineProperty(event, 'currentTarget', {
32
+ value: target
33
+ });
34
+ }
35
+ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
36
+ let stateRef = ($670gB$react.useRef)({
37
+ isFocused: false,
38
+ observer: null
39
+ });
40
+ // Clean up MutationObserver on unmount. See below.
41
+ (utils.useLayoutEffect)(()=>{
42
+ const state = stateRef.current;
43
+ return ()=>{
44
+ if (state.observer) {
45
+ state.observer.disconnect();
46
+ state.observer = null;
47
+ }
48
+ };
49
+ }, []);
50
+ let dispatchBlur = (utils.useEffectEvent)((e)=>{
51
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
52
+ });
53
+ // This function is called during a React onFocus event.
54
+ return ($670gB$react.useCallback)((e)=>{
55
+ // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142
56
+ // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
57
+ // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
58
+ // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
59
+ if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
60
+ stateRef.current.isFocused = true;
61
+ let target = e.target;
62
+ let onBlurHandler = (e)=>{
63
+ stateRef.current.isFocused = false;
64
+ if (target.disabled) {
65
+ // For backward compatibility, dispatch a (fake) React synthetic event.
66
+ let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
67
+ dispatchBlur(event);
68
+ }
69
+ // We no longer need the MutationObserver once the target is blurred.
70
+ if (stateRef.current.observer) {
71
+ stateRef.current.observer.disconnect();
72
+ stateRef.current.observer = null;
73
+ }
74
+ };
75
+ target.addEventListener('focusout', onBlurHandler, {
76
+ once: true
77
+ });
78
+ stateRef.current.observer = new MutationObserver(()=>{
79
+ if (stateRef.current.isFocused && target.disabled) {
80
+ var _stateRef_current_observer;
81
+ (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
82
+ let relatedTargetEl = target === document.activeElement ? null : document.activeElement;
83
+ target.dispatchEvent(new FocusEvent('blur', {
84
+ relatedTarget: relatedTargetEl
85
+ }));
86
+ target.dispatchEvent(new FocusEvent('focusout', {
87
+ bubbles: true,
88
+ relatedTarget: relatedTargetEl
89
+ }));
90
+ }
91
+ });
92
+ stateRef.current.observer.observe(target, {
93
+ attributes: true,
94
+ attributeFilter: [
95
+ 'disabled'
96
+ ]
97
+ });
98
+ }
99
+ }, [
100
+ dispatchBlur
101
+ ]);
102
+ }
103
+ exports.ignoreFocusEvent = false;
104
+ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
105
+ // The browser will focus the nearest focusable ancestor of our target.
106
+ while(target && !(utils.isFocusable)(target))target = target.parentElement;
107
+ let window = (utils.getOwnerWindow)(target);
108
+ let activeElement = window.document.activeElement;
109
+ if (!activeElement || activeElement === target) return;
110
+ exports.ignoreFocusEvent = true;
111
+ let isRefocusing = false;
112
+ let onBlur = (e)=>{
113
+ if (e.target === activeElement || isRefocusing) e.stopImmediatePropagation();
114
+ };
115
+ let onFocusOut = (e)=>{
116
+ if (e.target === activeElement || isRefocusing) {
117
+ e.stopImmediatePropagation();
118
+ // If there was no focusable ancestor, we don't expect a focus event.
119
+ // Re-focus the original active element here.
120
+ if (!target && !isRefocusing) {
121
+ isRefocusing = true;
122
+ (utils.focusWithoutScrolling)(activeElement);
123
+ cleanup();
124
+ }
125
+ }
126
+ };
127
+ let onFocus = (e)=>{
128
+ if (e.target === target || isRefocusing) e.stopImmediatePropagation();
129
+ };
130
+ let onFocusIn = (e)=>{
131
+ if (e.target === target || isRefocusing) {
132
+ e.stopImmediatePropagation();
133
+ if (!isRefocusing) {
134
+ isRefocusing = true;
135
+ (utils.focusWithoutScrolling)(activeElement);
136
+ cleanup();
137
+ }
138
+ }
139
+ };
140
+ window.addEventListener('blur', onBlur, true);
141
+ window.addEventListener('focusout', onFocusOut, true);
142
+ window.addEventListener('focusin', onFocusIn, true);
143
+ window.addEventListener('focus', onFocus, true);
144
+ let cleanup = ()=>{
145
+ cancelAnimationFrame(raf);
146
+ window.removeEventListener('blur', onBlur, true);
147
+ window.removeEventListener('focusout', onFocusOut, true);
148
+ window.removeEventListener('focusin', onFocusIn, true);
149
+ window.removeEventListener('focus', onFocus, true);
150
+ exports.ignoreFocusEvent = false;
151
+ isRefocusing = false;
152
+ };
153
+ let raf = requestAnimationFrame(cleanup);
154
+ return cleanup;
155
+ }
156
+
157
+ exports.createSyntheticEvent = $8a9cb279dc87e130$export$525bc4921d56d4a;
158
+ exports.preventFocus = $8a9cb279dc87e130$export$cabe61c495ee3649;
159
+ exports.setEventTarget = $8a9cb279dc87e130$export$c2b7abe5d61ec696;
160
+ exports.useSyntheticBlurEvent = $8a9cb279dc87e130$export$715c682d09d639cc;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ function _check_private_redeclaration(obj, privateCollection) {
4
+ if (privateCollection.has(obj)) {
5
+ throw new TypeError("Cannot initialize the same private elements twice on an object");
6
+ }
7
+ }
8
+
9
+ exports._ = _check_private_redeclaration;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ function _class_apply_descriptor_get(receiver, descriptor) {
4
+ if (descriptor.get) return descriptor.get.call(receiver);
5
+
6
+ return descriptor.value;
7
+ }
8
+
9
+ exports._ = _class_apply_descriptor_get;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ function _class_apply_descriptor_set(receiver, descriptor, value) {
4
+ if (descriptor.set) descriptor.set.call(receiver, value);
5
+ else {
6
+ if (!descriptor.writable) {
7
+ // This should only throw in strict mode, but class bodies are
8
+ // always strict and private fields can only be used inside
9
+ // class bodies.
10
+ throw new TypeError("attempted to set read only private field");
11
+ }
12
+ descriptor.value = value;
13
+ }
14
+ }
15
+
16
+ exports._ = _class_apply_descriptor_set;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ function _class_extract_field_descriptor(receiver, privateMap, action) {
4
+ if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
5
+
6
+ return privateMap.get(receiver);
7
+ }
8
+
9
+ exports._ = _class_extract_field_descriptor;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var _class_apply_descriptor_get = require('./_class_apply_descriptor_get.cjs');
4
+ var _class_extract_field_descriptor = require('./_class_extract_field_descriptor.cjs');
5
+
6
+ function _class_private_field_get(receiver, privateMap) {
7
+ var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "get");
8
+ return _class_apply_descriptor_get._(receiver, descriptor);
9
+ }
10
+
11
+ exports._ = _class_private_field_get;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var _check_private_redeclaration = require('./_check_private_redeclaration.cjs');
4
+
5
+ function _class_private_field_init(obj, privateMap, value) {
6
+ _check_private_redeclaration._(obj, privateMap);
7
+ privateMap.set(obj, value);
8
+ }
9
+
10
+ exports._ = _class_private_field_init;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var _class_apply_descriptor_set = require('./_class_apply_descriptor_set.cjs');
4
+ var _class_extract_field_descriptor = require('./_class_extract_field_descriptor.cjs');
5
+
6
+ function _class_private_field_set(receiver, privateMap, value) {
7
+ var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set");
8
+ _class_apply_descriptor_set._(receiver, descriptor, value);
9
+ return value;
10
+ }
11
+
12
+ exports._ = _class_private_field_set;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var react = require('react');
5
+ var $670gB$react = require('react');
6
6
  var defaultAttributes = require('./defaultAttributes.cjs');
7
7
  var utils = require('./shared/src/utils.cjs');
8
8
 
@@ -14,7 +14,7 @@ var utils = require('./shared/src/utils.cjs');
14
14
  */
15
15
 
16
16
 
17
- const Icon = react.forwardRef(
17
+ const Icon = $670gB$react.forwardRef(
18
18
  ({
19
19
  color = "currentColor",
20
20
  size = 24,
@@ -25,7 +25,7 @@ const Icon = react.forwardRef(
25
25
  iconNode,
26
26
  ...rest
27
27
  }, ref) => {
28
- return react.createElement(
28
+ return $670gB$react.createElement(
29
29
  "svg",
30
30
  {
31
31
  ref,
@@ -38,7 +38,7 @@ const Icon = react.forwardRef(
38
38
  ...rest
39
39
  },
40
40
  [
41
- ...iconNode.map(([tag, attrs]) => react.createElement(tag, attrs)),
41
+ ...iconNode.map(([tag, attrs]) => $670gB$react.createElement(tag, attrs)),
42
42
  ...Array.isArray(children) ? children : [children]
43
43
  ]
44
44
  );
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var react = require('react');
5
+ var $670gB$react = require('react');
6
6
  var utils = require('./shared/src/utils.cjs');
7
7
  var Icon = require('./Icon.cjs');
8
8
 
@@ -15,8 +15,8 @@ var Icon = require('./Icon.cjs');
15
15
 
16
16
 
17
17
  const createLucideIcon = (iconName, iconNode) => {
18
- const Component = react.forwardRef(
19
- ({ className, ...props }, ref) => react.createElement(Icon.default, {
18
+ const Component = $670gB$react.forwardRef(
19
+ ({ className, ...props }, ref) => $670gB$react.createElement(Icon.default, {
20
20
  ref,
21
21
  iconNode,
22
22
  className: utils.mergeClasses(`lucide-${utils.toKebabCase(iconName)}`, className),
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var createLucideIcon = require('../createLucideIcon.cjs');
6
+
7
+ /**
8
+ * @license lucide-react v0.475.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */
13
+
14
+
15
+ const __iconNode = [
16
+ ["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
17
+ ["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
18
+ ];
19
+ const ChevronsRight = createLucideIcon.default("ChevronsRight", __iconNode);
20
+
21
+ exports.__iconNode = __iconNode;
22
+ exports.default = ChevronsRight;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var createLucideIcon = require('../createLucideIcon.cjs');
6
+
7
+ /**
8
+ * @license lucide-react v0.475.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */
13
+
14
+
15
+ const __iconNode = [
16
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
17
+ ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
18
+ ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
19
+ ];
20
+ const Ellipsis = createLucideIcon.default("Ellipsis", __iconNode);
21
+
22
+ exports.__iconNode = __iconNode;
23
+ exports.default = Ellipsis;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var createLucideIcon = require('../createLucideIcon.cjs');
6
+
7
+ /**
8
+ * @license lucide-react v0.475.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */
13
+
14
+
15
+ const __iconNode = [["path", { d: "M5 12h14", key: "1ays0h" }]];
16
+ const Minus = createLucideIcon.default("Minus", __iconNode);
17
+
18
+ exports.__iconNode = __iconNode;
19
+ exports.default = Minus;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ "use client";
3
+ 'use strict';
4
+
5
+ var $670gB$react = require('react');
6
+ var i18n = require('@react-aria/i18n');
7
+
8
+ var PaginationItemType = /* @__PURE__ */ ((PaginationItemType2) => {
9
+ PaginationItemType2["DOTS"] = "dots";
10
+ PaginationItemType2["PREV"] = "prev";
11
+ PaginationItemType2["NEXT"] = "next";
12
+ return PaginationItemType2;
13
+ })(PaginationItemType || {});
14
+ function range(start, end) {
15
+ const length = end - start + 1;
16
+ return Array.from({ length }, (_, index) => index + start);
17
+ }
18
+ function usePagination(props) {
19
+ const {
20
+ page,
21
+ total,
22
+ siblings = 1,
23
+ boundaries = 1,
24
+ initialPage = 1,
25
+ showControls = false,
26
+ onChange
27
+ } = props;
28
+ const [activePage, setActivePage] = $670gB$react.useState(page || initialPage);
29
+ const { direction } = i18n.useLocale();
30
+ const isRTL = direction === "rtl";
31
+ const onChangeActivePage = $670gB$react.useCallback(
32
+ (newPage) => {
33
+ setActivePage(newPage);
34
+ onChange?.(newPage);
35
+ },
36
+ [onChange]
37
+ );
38
+ $670gB$react.useEffect(() => {
39
+ if (page && page !== activePage) {
40
+ setActivePage(page);
41
+ }
42
+ }, [activePage, page]);
43
+ const setPage = $670gB$react.useCallback(
44
+ (pageNumber) => {
45
+ if (pageNumber <= 0) {
46
+ onChangeActivePage(1);
47
+ } else if (pageNumber > total) {
48
+ onChangeActivePage(total);
49
+ } else {
50
+ onChangeActivePage(pageNumber);
51
+ }
52
+ },
53
+ [total, onChangeActivePage]
54
+ );
55
+ const next = () => setPage(activePage + 1);
56
+ const previous = () => setPage(activePage - 1);
57
+ const first = () => setPage(1);
58
+ const last = () => setPage(total);
59
+ const formatRange = $670gB$react.useCallback(
60
+ (range2) => {
61
+ if (showControls) {
62
+ return ["prev" /* PREV */, ...range2, "next" /* NEXT */];
63
+ }
64
+ return range2;
65
+ },
66
+ // eslint-disable-next-line react-hooks/exhaustive-deps
67
+ [isRTL, showControls]
68
+ );
69
+ const paginationRange = $670gB$react.useMemo(() => {
70
+ const totalPageNumbers = siblings * 2 + 3 + boundaries * 2;
71
+ if (totalPageNumbers >= total) {
72
+ return formatRange(range(1, total));
73
+ }
74
+ const leftSiblingIndex = Math.max(activePage - siblings, boundaries);
75
+ const rightSiblingIndex = Math.min(
76
+ activePage + siblings,
77
+ total - boundaries
78
+ );
79
+ const shouldShowLeftDots = leftSiblingIndex > boundaries + 2;
80
+ const shouldShowRightDots = rightSiblingIndex < total - (boundaries + 1);
81
+ if (!shouldShowLeftDots && shouldShowRightDots) {
82
+ const leftItemCount = siblings * 2 + boundaries + 2;
83
+ return formatRange([
84
+ ...range(1, leftItemCount),
85
+ "dots" /* DOTS */,
86
+ ...range(total - (boundaries - 1), total)
87
+ ]);
88
+ }
89
+ if (shouldShowLeftDots && !shouldShowRightDots) {
90
+ const rightItemCount = boundaries + 1 + 2 * siblings;
91
+ return formatRange([
92
+ ...range(1, boundaries),
93
+ "dots" /* DOTS */,
94
+ ...range(total - rightItemCount, total)
95
+ ]);
96
+ }
97
+ return formatRange([
98
+ ...range(1, boundaries),
99
+ "dots" /* DOTS */,
100
+ ...range(leftSiblingIndex, rightSiblingIndex),
101
+ "dots" /* DOTS */,
102
+ ...range(total - boundaries + 1, total)
103
+ ]);
104
+ }, [total, activePage, siblings, boundaries, formatRange]);
105
+ return {
106
+ range: paginationRange,
107
+ activePage,
108
+ setPage,
109
+ next,
110
+ previous,
111
+ first,
112
+ last
113
+ };
114
+ }
115
+
116
+ exports.PaginationItemType = PaginationItemType;
117
+ exports.usePagination = usePagination;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var pagination = require('./pagination.cjs');
5
+ var paginationCursor = require('./pagination-cursor.cjs');
6
+ var paginationItem = require('./pagination-item.cjs');
7
+ var usePagination = require('./hooks/use-pagination.cjs');
8
+ var usePagination$1 = require('./use-pagination.cjs');
9
+
10
+
11
+
12
+ exports.Pagination = pagination.Pagination;
13
+ exports.PaginationCursor = paginationCursor.PaginationCursor;
14
+ exports.PaginationItem = paginationItem.PaginationItem;
15
+ exports.PaginationItemType = usePagination.PaginationItemType;
16
+ exports.CURSOR_TRANSITION_TIMEOUT = usePagination$1.CURSOR_TRANSITION_TIMEOUT;
17
+ exports.usePagination = usePagination$1.usePagination;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ "use client";
3
+ 'use strict';
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var utils = require('../system/utils.cjs');
7
+ var refs = require('../system/react-utils/refs.cjs');
8
+
9
+ const PaginationCursor = utils.forwardRef(
10
+ (props, ref) => {
11
+ const { as, activePage, ...otherProps } = props;
12
+ const Component = as || "span";
13
+ const domRef = refs.useDomRef(ref);
14
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref: domRef, "aria-hidden": true, ...otherProps, children: activePage });
15
+ }
16
+ );
17
+
18
+ exports.PaginationCursor = PaginationCursor;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var utils = require('../system/utils.cjs');
6
+ var usePaginationItem = require('./use-pagination-item.cjs');
7
+
8
+ const PaginationItem = utils.forwardRef(
9
+ (props, ref) => {
10
+ const { Component, children, getItemProps } = usePaginationItem.usePaginationItem({
11
+ ...props,
12
+ ref
13
+ });
14
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...getItemProps(), children });
15
+ }
16
+ );
17
+
18
+ exports.PaginationItem = PaginationItem;