@clubmed/trident-ui 1.3.0-beta.5 → 1.3.0-beta.7
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.
- package/CHANGELOG.md +14 -0
- package/chunks/_commonjsHelpers.js +24 -4
- package/chunks/_commonjsHelpers.js.map +1 -1
- package/chunks/index.js.map +1 -1
- package/chunks/plugin.js.map +1 -1
- package/contexts/Device.d.ts +2 -22
- package/contexts/Device.js +5 -59
- package/contexts/Device.js.map +1 -1
- package/contexts/Devices/Device.d.ts +11 -0
- package/contexts/Devices/Device.js +23 -0
- package/contexts/Devices/Device.js.map +1 -0
- package/contexts/Devices/hooks/useQueries.d.ts +6 -0
- package/contexts/Devices/hooks/useQueries.js +24 -0
- package/contexts/Devices/hooks/useQueries.js.map +1 -0
- package/contexts/Devices/reducers/reducer.d.ts +25 -0
- package/contexts/Devices/reducers/reducer.js +50 -0
- package/contexts/Devices/reducers/reducer.js.map +1 -0
- package/contexts/TridentUIConfig.js +228 -228
- package/contexts/TridentUIConfig.js.map +1 -1
- package/hooks/keyboard.constants.js.map +1 -1
- package/hooks/useInternalStatus.js.map +1 -1
- package/hooks/useKeyboardControls.js.map +1 -1
- package/hooks/useSafeBoop.js.map +1 -1
- package/hooks/useValue.js.map +1 -1
- package/molecules/Arrows/Arrows.js.map +1 -1
- package/molecules/Avatar.js.map +1 -1
- package/molecules/Backdrop.js.map +1 -1
- package/molecules/Breadcrumb.js +8 -9
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Buttons/ArrowButton.js +3 -3
- package/molecules/Buttons/ArrowButton.js.map +1 -1
- package/molecules/Buttons/Button.d.ts +1 -1
- package/molecules/Buttons/Button.js.map +1 -1
- package/molecules/Buttons/ButtonAnchor.js +3 -3
- package/molecules/Buttons/ButtonAnchor.js.map +1 -1
- package/molecules/Buttons/ButtonContent.d.ts +1 -1
- package/molecules/Buttons/ButtonContent.js +7 -8
- package/molecules/Buttons/ButtonContent.js.map +1 -1
- package/molecules/Buttons/{v2/FakeButton.d.ts → FakeButton.d.ts} +2 -2
- package/molecules/Buttons/{v2/FakeButton.js → FakeButton.js} +4 -4
- package/molecules/Buttons/FakeButton.js.map +1 -0
- package/molecules/Buttons/InertButton.js +4 -4
- package/molecules/Buttons/InertButton.js.map +1 -1
- package/molecules/Buttons/v2/Button.js.map +1 -1
- package/molecules/Buttons/v2/Button.type.d.ts +1 -1
- package/molecules/Buttons/v2/Button.type.js.map +1 -1
- package/molecules/Buttons/v2/ButtonAnchor.js.map +1 -1
- package/molecules/Card.d.ts +1 -1
- package/molecules/Card.js +7 -8
- package/molecules/Card.js.map +1 -1
- package/molecules/ElasticHeight.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +12 -13
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js.map +1 -1
- package/molecules/Forms/DateField.d.ts +1 -1
- package/molecules/Forms/DateField.js +142 -116
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.js +12 -13
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.js +15 -16
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/FormLabel.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +1 -1
- package/molecules/Forms/NumberField.js.map +1 -1
- package/molecules/Forms/Password/Password.js +10 -11
- package/molecules/Forms/Password/Password.js.map +1 -1
- package/molecules/Forms/Password/ValidationMessage.js +8 -9
- package/molecules/Forms/Password/ValidationMessage.js.map +1 -1
- package/molecules/Forms/Radios/Radio.js.map +1 -1
- package/molecules/Forms/Radios/RadioGroup.js +2 -2
- package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.d.ts +1 -1
- package/molecules/Forms/Select.js +3 -4
- package/molecules/Forms/Select.js.map +1 -1
- package/molecules/Forms/Switch.js.map +1 -1
- package/molecules/Forms/TextField.d.ts +1 -1
- package/molecules/Forms/TextField.js +7 -8
- package/molecules/Forms/TextField.js.map +1 -1
- package/molecules/HamburgerIcon.js.map +1 -1
- package/molecules/Link.d.ts +1 -1
- package/molecules/Link.js +8 -9
- package/molecules/Link.js.map +1 -1
- package/molecules/Loader.js.map +1 -1
- package/molecules/Pagination.helper.js.map +1 -1
- package/molecules/Pagination.js +3 -3
- package/molecules/Pagination.js.map +1 -1
- package/molecules/Popin.js.map +1 -1
- package/molecules/Spinner.js.map +1 -1
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabList.js.map +1 -1
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.js.map +1 -1
- package/molecules/Tabs/TabsBody.js.map +1 -1
- package/molecules/Tabs/context/TabControl.js.map +1 -1
- package/molecules/Tabs/hooks/tabControl.js.map +1 -1
- package/molecules/Tabs/theme.js.map +1 -1
- package/package.json +6 -6
- package/tailwind/plugins/animationDelay.js.map +1 -1
- package/tailwind/plugins/lineClampFix.js.map +1 -1
- package/tailwind/plugins/transitionBehavior.js.map +1 -1
- package/tailwind/tailwind.preset.js.map +1 -1
- package/types/Devices.d.ts +8 -0
- package/types/Devices.js +11 -0
- package/types/Devices.js.map +1 -0
- package/types/Direction.d.js +2 -0
- package/types/Direction.d.js.map +1 -0
- package/molecules/Buttons/v2/FakeButton.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.js","sources":["../../../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../../../node_modules/@juggle/resize-observer/lib/utils/freeze.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../../../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../../../node_modules/@juggle/resize-observer/lib/utils/element.js","../../../node_modules/@juggle/resize-observer/lib/utils/global.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../../../node_modules/@juggle/resize-observer/lib/utils/process.js","../../../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../../../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../../../node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserver.js","../../../node_modules/debounce/index.js","../../../node_modules/react-use-measure/dist/web.js","../../../lib/molecules/Forms/Range.tsx"],"sourcesContent":["var resizeObservers = [];\nexport { resizeObservers };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasActiveObservations = function () {\n return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });\n};\nexport { hasActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasSkippedObservations = function () {\n return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });\n};\nexport { hasSkippedObservations };\n","var msg = 'ResizeObserver loop completed with undelivered notifications.';\nvar deliverResizeLoopError = function () {\n var event;\n if (typeof ErrorEvent === 'function') {\n event = new ErrorEvent('error', {\n message: msg\n });\n }\n else {\n event = document.createEvent('Event');\n event.initEvent('error', false, false);\n event.message = msg;\n }\n window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n ResizeObserverBoxOptions[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","export var freeze = function (obj) { return Object.freeze(obj); };\n","import { freeze } from './utils/freeze';\nvar ResizeObserverSize = (function () {\n function ResizeObserverSize(inlineSize, blockSize) {\n this.inlineSize = inlineSize;\n this.blockSize = blockSize;\n freeze(this);\n }\n return ResizeObserverSize;\n}());\nexport { ResizeObserverSize };\n","import { freeze } from './utils/freeze';\nvar DOMRectReadOnly = (function () {\n function DOMRectReadOnly(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.top = this.y;\n this.left = this.x;\n this.bottom = this.top + this.height;\n this.right = this.left + this.width;\n return freeze(this);\n }\n DOMRectReadOnly.prototype.toJSON = function () {\n var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };\n };\n DOMRectReadOnly.fromRect = function (rectangle) {\n return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n };\n return DOMRectReadOnly;\n}());\nexport { DOMRectReadOnly };\n","var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };\nvar isHidden = function (target) {\n if (isSVG(target)) {\n var _a = target.getBBox(), width = _a.width, height = _a.height;\n return !width && !height;\n }\n var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nvar isElement = function (obj) {\n var _a;\n if (obj instanceof Element) {\n return true;\n }\n var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;\n return !!(scope && obj instanceof scope.Element);\n};\nvar isReplacedElement = function (target) {\n switch (target.tagName) {\n case 'INPUT':\n if (target.type !== 'image') {\n break;\n }\n case 'VIDEO':\n case 'AUDIO':\n case 'EMBED':\n case 'OBJECT':\n case 'CANVAS':\n case 'IFRAME':\n case 'IMG':\n return true;\n }\n return false;\n};\nexport { isSVG, isHidden, isElement, isReplacedElement };\n","export var global = typeof window !== 'undefined' ? window : {};\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { ResizeObserverSize } from '../ResizeObserverSize';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nimport { freeze } from '../utils/freeze';\nimport { global } from '../utils/global';\nvar cache = new WeakMap();\nvar scrollRegexp = /auto|scroll/;\nvar verticalRegexp = /^tb|vertical/;\nvar IE = (/msie|trident/i).test(global.navigator && global.navigator.userAgent);\nvar parseDimension = function (pixel) { return parseFloat(pixel || '0'); };\nvar size = function (inlineSize, blockSize, switchSizes) {\n if (inlineSize === void 0) { inlineSize = 0; }\n if (blockSize === void 0) { blockSize = 0; }\n if (switchSizes === void 0) { switchSizes = false; }\n return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n};\nvar zeroBoxes = freeze({\n devicePixelContentBoxSize: size(),\n borderBoxSize: size(),\n contentBoxSize: size(),\n contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nvar calculateBoxSizes = function (target, forceRecalculation) {\n if (forceRecalculation === void 0) { forceRecalculation = false; }\n if (cache.has(target) && !forceRecalculation) {\n return cache.get(target);\n }\n if (isHidden(target)) {\n cache.set(target, zeroBoxes);\n return zeroBoxes;\n }\n var cs = getComputedStyle(target);\n var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n var removePadding = !IE && cs.boxSizing === 'border-box';\n var switchSizes = verticalRegexp.test(cs.writingMode || '');\n var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n var horizontalPadding = paddingLeft + paddingRight;\n var verticalPadding = paddingTop + paddingBottom;\n var horizontalBorderArea = borderLeft + borderRight;\n var verticalBorderArea = borderTop + borderBottom;\n var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n var boxes = freeze({\n devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n });\n cache.set(target, boxes);\n return boxes;\n};\nvar calculateBoxSize = function (target, observedBox, forceRecalculation) {\n var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n switch (observedBox) {\n case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n return devicePixelContentBoxSize;\n case ResizeObserverBoxOptions.BORDER_BOX:\n return borderBoxSize;\n default:\n return contentBoxSize;\n }\n};\nexport { calculateBoxSize, calculateBoxSizes };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nimport { freeze } from './utils/freeze';\nvar ResizeObserverEntry = (function () {\n function ResizeObserverEntry(target) {\n var boxes = calculateBoxSizes(target);\n this.target = target;\n this.contentRect = boxes.contentRect;\n this.borderBoxSize = freeze([boxes.borderBoxSize]);\n this.contentBoxSize = freeze([boxes.contentBoxSize]);\n this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n }\n return ResizeObserverEntry;\n}());\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nvar calculateDepthForNode = function (node) {\n if (isHidden(node)) {\n return Infinity;\n }\n var depth = 0;\n var parent = node.parentNode;\n while (parent) {\n depth += 1;\n parent = parent.parentNode;\n }\n return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nvar broadcastActiveObservations = function () {\n var shallowestDepth = Infinity;\n var callbacks = [];\n resizeObservers.forEach(function processObserver(ro) {\n if (ro.activeTargets.length === 0) {\n return;\n }\n var entries = [];\n ro.activeTargets.forEach(function processTarget(ot) {\n var entry = new ResizeObserverEntry(ot.target);\n var targetDepth = calculateDepthForNode(ot.target);\n entries.push(entry);\n ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n if (targetDepth < shallowestDepth) {\n shallowestDepth = targetDepth;\n }\n });\n callbacks.push(function resizeObserverCallback() {\n ro.callback.call(ro.observer, entries, ro.observer);\n });\n ro.activeTargets.splice(0, ro.activeTargets.length);\n });\n for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {\n var callback = callbacks_1[_i];\n callback();\n }\n return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nvar gatherActiveObservationsAtDepth = function (depth) {\n resizeObservers.forEach(function processObserver(ro) {\n ro.activeTargets.splice(0, ro.activeTargets.length);\n ro.skippedTargets.splice(0, ro.skippedTargets.length);\n ro.observationTargets.forEach(function processTarget(ot) {\n if (ot.isActive()) {\n if (calculateDepthForNode(ot.target) > depth) {\n ro.activeTargets.push(ot);\n }\n else {\n ro.skippedTargets.push(ot);\n }\n }\n });\n });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { hasActiveObservations } from '../algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from '../algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';\nvar process = function () {\n var depth = 0;\n gatherActiveObservationsAtDepth(depth);\n while (hasActiveObservations()) {\n depth = broadcastActiveObservations();\n gatherActiveObservationsAtDepth(depth);\n }\n if (hasSkippedObservations()) {\n deliverResizeLoopError();\n }\n return depth > 0;\n};\nexport { process };\n","var trigger;\nvar callbacks = [];\nvar notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };\nvar queueMicroTask = function (callback) {\n if (!trigger) {\n var toggle_1 = 0;\n var el_1 = document.createTextNode('');\n var config = { characterData: true };\n new MutationObserver(function () { return notify(); }).observe(el_1, config);\n trigger = function () { el_1.textContent = \"\".concat(toggle_1 ? toggle_1-- : toggle_1++); };\n }\n callbacks.push(callback);\n trigger();\n};\nexport { queueMicroTask };\n","import { queueMicroTask } from './queueMicroTask';\nvar queueResizeObserver = function (cb) {\n queueMicroTask(function ResizeObserver() {\n requestAnimationFrame(cb);\n });\n};\nexport { queueResizeObserver };\n","import { process } from './process';\nimport { global } from './global';\nimport { queueResizeObserver } from './queueResizeObserver';\nvar watching = 0;\nvar isWatching = function () { return !!watching; };\nvar CATCH_PERIOD = 250;\nvar observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nvar events = [\n 'resize',\n 'load',\n 'transitionend',\n 'animationend',\n 'animationstart',\n 'animationiteration',\n 'keyup',\n 'keydown',\n 'mouseup',\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'blur',\n 'focus'\n];\nvar time = function (timeout) {\n if (timeout === void 0) { timeout = 0; }\n return Date.now() + timeout;\n};\nvar scheduled = false;\nvar Scheduler = (function () {\n function Scheduler() {\n var _this = this;\n this.stopped = true;\n this.listener = function () { return _this.schedule(); };\n }\n Scheduler.prototype.run = function (timeout) {\n var _this = this;\n if (timeout === void 0) { timeout = CATCH_PERIOD; }\n if (scheduled) {\n return;\n }\n scheduled = true;\n var until = time(timeout);\n queueResizeObserver(function () {\n var elementsHaveResized = false;\n try {\n elementsHaveResized = process();\n }\n finally {\n scheduled = false;\n timeout = until - time();\n if (!isWatching()) {\n return;\n }\n if (elementsHaveResized) {\n _this.run(1000);\n }\n else if (timeout > 0) {\n _this.run(timeout);\n }\n else {\n _this.start();\n }\n }\n });\n };\n Scheduler.prototype.schedule = function () {\n this.stop();\n this.run();\n };\n Scheduler.prototype.observe = function () {\n var _this = this;\n var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };\n document.body ? cb() : global.addEventListener('DOMContentLoaded', cb);\n };\n Scheduler.prototype.start = function () {\n var _this = this;\n if (this.stopped) {\n this.stopped = false;\n this.observer = new MutationObserver(this.listener);\n this.observe();\n events.forEach(function (name) { return global.addEventListener(name, _this.listener, true); });\n }\n };\n Scheduler.prototype.stop = function () {\n var _this = this;\n if (!this.stopped) {\n this.observer && this.observer.disconnect();\n events.forEach(function (name) { return global.removeEventListener(name, _this.listener, true); });\n this.stopped = true;\n }\n };\n return Scheduler;\n}());\nvar scheduler = new Scheduler();\nvar updateCount = function (n) {\n !watching && n > 0 && scheduler.start();\n watching += n;\n !watching && scheduler.stop();\n};\nexport { scheduler, updateCount };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nimport { isSVG, isReplacedElement } from './utils/element';\nvar skipNotifyOnElement = function (target) {\n return !isSVG(target)\n && !isReplacedElement(target)\n && getComputedStyle(target).display === 'inline';\n};\nvar ResizeObservation = (function () {\n function ResizeObservation(target, observedBox) {\n this.target = target;\n this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n this.lastReportedSize = {\n inlineSize: 0,\n blockSize: 0\n };\n }\n ResizeObservation.prototype.isActive = function () {\n var size = calculateBoxSize(this.target, this.observedBox, true);\n if (skipNotifyOnElement(this.target)) {\n this.lastReportedSize = size;\n }\n if (this.lastReportedSize.inlineSize !== size.inlineSize\n || this.lastReportedSize.blockSize !== size.blockSize) {\n return true;\n }\n return false;\n };\n return ResizeObservation;\n}());\nexport { ResizeObservation };\n","var ResizeObserverDetail = (function () {\n function ResizeObserverDetail(resizeObserver, callback) {\n this.activeTargets = [];\n this.skippedTargets = [];\n this.observationTargets = [];\n this.observer = resizeObserver;\n this.callback = callback;\n }\n return ResizeObserverDetail;\n}());\nexport { ResizeObserverDetail };\n","import { scheduler, updateCount } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { resizeObservers } from './utils/resizeObservers';\nvar observerMap = new WeakMap();\nvar getObservationIndex = function (observationTargets, target) {\n for (var i = 0; i < observationTargets.length; i += 1) {\n if (observationTargets[i].target === target) {\n return i;\n }\n }\n return -1;\n};\nvar ResizeObserverController = (function () {\n function ResizeObserverController() {\n }\n ResizeObserverController.connect = function (resizeObserver, callback) {\n var detail = new ResizeObserverDetail(resizeObserver, callback);\n observerMap.set(resizeObserver, detail);\n };\n ResizeObserverController.observe = function (resizeObserver, target, options) {\n var detail = observerMap.get(resizeObserver);\n var firstObservation = detail.observationTargets.length === 0;\n if (getObservationIndex(detail.observationTargets, target) < 0) {\n firstObservation && resizeObservers.push(detail);\n detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n updateCount(1);\n scheduler.schedule();\n }\n };\n ResizeObserverController.unobserve = function (resizeObserver, target) {\n var detail = observerMap.get(resizeObserver);\n var index = getObservationIndex(detail.observationTargets, target);\n var lastObservation = detail.observationTargets.length === 1;\n if (index >= 0) {\n lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n detail.observationTargets.splice(index, 1);\n updateCount(-1);\n }\n };\n ResizeObserverController.disconnect = function (resizeObserver) {\n var _this = this;\n var detail = observerMap.get(resizeObserver);\n detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });\n detail.activeTargets.splice(0, detail.activeTargets.length);\n };\n return ResizeObserverController;\n}());\nexport { ResizeObserverController };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { isElement } from './utils/element';\nvar ResizeObserver = (function () {\n function ResizeObserver(callback) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (typeof callback !== 'function') {\n throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n }\n ResizeObserverController.connect(this, callback);\n }\n ResizeObserver.prototype.observe = function (target, options) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.observe(this, target, options);\n };\n ResizeObserver.prototype.unobserve = function (target) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.unobserve(this, target);\n };\n ResizeObserver.prototype.disconnect = function () {\n ResizeObserverController.disconnect(this);\n };\n ResizeObserver.toString = function () {\n return 'function ResizeObserver () { [polyfill code] }';\n };\n return ResizeObserver;\n}());\nexport { ResizeObserver };\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","import { useState, useRef, useEffect, useMemo } from 'react';\nimport createDebounce from 'debounce';\n\nfunction useMeasure(_temp) {\n let {\n debounce,\n scroll,\n polyfill,\n offsetSize\n } = _temp === void 0 ? {\n debounce: 0,\n scroll: false,\n offsetSize: false\n } : _temp;\n const ResizeObserver = polyfill || (typeof window === 'undefined' ? class ResizeObserver {} : window.ResizeObserver);\n\n if (!ResizeObserver) {\n throw new Error('This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills');\n }\n\n const [bounds, set] = useState({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0\n }); // keep all state in a ref\n\n const state = useRef({\n element: null,\n scrollContainers: null,\n resizeObserver: null,\n lastBounds: bounds\n }); // set actual debounce values early, so effects know if they should react accordingly\n\n const scrollDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.scroll : null;\n const resizeDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.resize : null; // make sure to update state only as long as the component is truly mounted\n\n const mounted = useRef(false);\n useEffect(() => {\n mounted.current = true;\n return () => void (mounted.current = false);\n }); // memoize handlers, so event-listeners know when they should update\n\n const [forceRefresh, resizeChange, scrollChange] = useMemo(() => {\n const callback = () => {\n if (!state.current.element) return;\n const {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n } = state.current.element.getBoundingClientRect();\n const size = {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n };\n\n if (state.current.element instanceof HTMLElement && offsetSize) {\n size.height = state.current.element.offsetHeight;\n size.width = state.current.element.offsetWidth;\n }\n\n Object.freeze(size);\n if (mounted.current && !areBoundsEqual(state.current.lastBounds, size)) set(state.current.lastBounds = size);\n };\n\n return [callback, resizeDebounce ? createDebounce(callback, resizeDebounce) : callback, scrollDebounce ? createDebounce(callback, scrollDebounce) : callback];\n }, [set, offsetSize, scrollDebounce, resizeDebounce]); // cleanup current scroll-listeners / observers\n\n function removeListeners() {\n if (state.current.scrollContainers) {\n state.current.scrollContainers.forEach(element => element.removeEventListener('scroll', scrollChange, true));\n state.current.scrollContainers = null;\n }\n\n if (state.current.resizeObserver) {\n state.current.resizeObserver.disconnect();\n state.current.resizeObserver = null;\n }\n } // add scroll-listeners / observers\n\n\n function addListeners() {\n if (!state.current.element) return;\n state.current.resizeObserver = new ResizeObserver(scrollChange);\n state.current.resizeObserver.observe(state.current.element);\n\n if (scroll && state.current.scrollContainers) {\n state.current.scrollContainers.forEach(scrollContainer => scrollContainer.addEventListener('scroll', scrollChange, {\n capture: true,\n passive: true\n }));\n }\n } // the ref we expose to the user\n\n\n const ref = node => {\n if (!node || node === state.current.element) return;\n removeListeners();\n state.current.element = node;\n state.current.scrollContainers = findScrollContainers(node);\n addListeners();\n }; // add general event listeners\n\n\n useOnWindowScroll(scrollChange, Boolean(scroll));\n useOnWindowResize(resizeChange); // respond to changes that are relevant for the listeners\n\n useEffect(() => {\n removeListeners();\n addListeners();\n }, [scroll, scrollChange, resizeChange]); // remove all listeners when the components unmounts\n\n useEffect(() => removeListeners, []);\n return [ref, bounds, forceRefresh];\n} // Adds native resize listener to window\n\n\nfunction useOnWindowResize(onWindowResize) {\n useEffect(() => {\n const cb = onWindowResize;\n window.addEventListener('resize', cb);\n return () => void window.removeEventListener('resize', cb);\n }, [onWindowResize]);\n}\n\nfunction useOnWindowScroll(onScroll, enabled) {\n useEffect(() => {\n if (enabled) {\n const cb = onScroll;\n window.addEventListener('scroll', cb, {\n capture: true,\n passive: true\n });\n return () => void window.removeEventListener('scroll', cb, true);\n }\n }, [onScroll, enabled]);\n} // Returns a list of scroll offsets\n\n\nfunction findScrollContainers(element) {\n const result = [];\n if (!element || element === document.body) return result;\n const {\n overflow,\n overflowX,\n overflowY\n } = window.getComputedStyle(element);\n if ([overflow, overflowX, overflowY].some(prop => prop === 'auto' || prop === 'scroll')) result.push(element);\n return [...result, ...findScrollContainers(element.parentElement)];\n} // Checks if element boundaries are equal\n\n\nconst keys = ['x', 'y', 'top', 'bottom', 'left', 'right', 'width', 'height'];\n\nconst areBoundsEqual = (a, b) => keys.every(key => a[key] === b[key]);\n\nexport { useMeasure as default };\n","import { ResizeObserver } from '@juggle/resize-observer';\nimport classnames from 'classnames';\nimport {\n type ChangeEvent,\n type CSSProperties,\n type InputHTMLAttributes,\n useId,\n useState,\n} from 'react';\n\nimport useMeasure from 'react-use-measure';\nimport './range.css';\n\ninterface RangeProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n /**\n * Aria label\n * @default 'Range'\n * */\n ariaLabel?: string;\n /**\n * Additional class names\n * */\n className?: string;\n /**\n * Data test id\n * */\n dataTestId?: string;\n /**\n * Single cursor mode\n * @default false\n * */\n singleCursorMode?: boolean;\n /**\n * Min value\n * @default 0\n * */\n min?: number;\n /**\n * On change\n * */\n onChange?: (name: string, value: number[]) => void;\n /**\n * Options\n * @default []\n * */\n options: { value: number; label: string }[];\n}\n\nexport const Range = (props: RangeProps) => {\n const internalId = useId();\n\n const {\n ariaLabel,\n className,\n dataTestId = 'range',\n id = internalId,\n name = id,\n singleCursorMode = false,\n min = 0,\n options = [],\n step = 1,\n readOnly,\n disabled,\n onChange,\n ...rest\n } = props;\n\n const [valueA, setValueA] = useState(options.length - 1);\n const [valueB, setValueB] = useState(min);\n const [containerRef, { width }] = useMeasure({ polyfill: ResizeObserver });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!readOnly) {\n e.persist();\n const inputValue = Number(e.target.value);\n const inputId = e.target.id[e.target.id.length - 1];\n\n if (inputId === 'a') {\n setValueA(inputValue);\n } else {\n setValueB(inputValue);\n }\n\n onChange && onChange(name, [valueA, valueB]);\n }\n };\n\n return (\n <div\n style={\n {\n '--min': min,\n '--max': options.length - 1,\n '--inputWidth': `${width}px`,\n '--inputHeight': '4px',\n '--thumbWidth': '32px',\n '--usefulWidth': 'calc(var(--inputWidth) - var(--thumbWidth))',\n '--valueA': valueA,\n '--valueB': valueB,\n } as CSSProperties\n }\n className={classnames('relative w-full', className)}\n data-testid={dataTestId}\n data-name=\"Range\"\n ref={containerRef}\n >\n <div className=\"input-range-container\">\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n id={`${id}-a`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n disabled={disabled}\n step={step}\n type=\"range\"\n value={valueA}\n />\n {!singleCursorMode && (\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n disabled={disabled}\n id={`${id}-b`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n step={step}\n type=\"range\"\n value={valueB}\n />\n )}\n </div>\n <output\n htmlFor={`${id}-a`}\n style={{ '--value': valueA } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueA].label}\n </output>\n {!singleCursorMode && (\n <output\n htmlFor={`${id}-b`}\n style={{ '--value': valueB } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueB].label}\n </output>\n )}\n </div>\n );\n};\n"],"names":["resizeObservers","hasActiveObservations","ro","hasSkippedObservations","msg","deliverResizeLoopError","event","ResizeObserverBoxOptions","freeze","obj","ResizeObserverSize","inlineSize","blockSize","DOMRectReadOnly","x","y","width","height","_a","top","right","bottom","left","rectangle","isSVG","target","isHidden","_b","offsetWidth","offsetHeight","isElement","scope","isReplacedElement","global","cache","scrollRegexp","verticalRegexp","IE","parseDimension","pixel","size","switchSizes","zeroBoxes","calculateBoxSizes","forceRecalculation","cs","svg","removePadding","canScrollVertically","canScrollHorizontally","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTop","borderRight","borderBottom","borderLeft","horizontalPadding","verticalPadding","horizontalBorderArea","verticalBorderArea","horizontalScrollbarThickness","verticalScrollbarThickness","widthReduction","heightReduction","contentWidth","contentHeight","borderBoxWidth","borderBoxHeight","boxes","calculateBoxSize","observedBox","borderBoxSize","contentBoxSize","devicePixelContentBoxSize","ResizeObserverEntry","calculateDepthForNode","node","depth","parent","broadcastActiveObservations","shallowestDepth","callbacks","entries","ot","entry","targetDepth","_i","callbacks_1","callback","gatherActiveObservationsAtDepth","process","trigger","notify","cb","queueMicroTask","toggle_1","el_1","config","queueResizeObserver","watching","isWatching","CATCH_PERIOD","observerConfig","events","time","timeout","scheduled","Scheduler","_this","until","elementsHaveResized","name","scheduler","updateCount","n","skipNotifyOnElement","ResizeObservation","ResizeObserverDetail","resizeObserver","observerMap","getObservationIndex","observationTargets","i","ResizeObserverController","detail","options","firstObservation","index","lastObservation","ResizeObserver","debounce","func","wait","immediate","args","context","timestamp","result","later","last","debounced","callNow","debounce_1","useMeasure","_temp","scroll","polyfill","offsetSize","bounds","set","useState","state","useRef","scrollDebounce","resizeDebounce","mounted","useEffect","forceRefresh","resizeChange","scrollChange","useMemo","areBoundsEqual","createDebounce","removeListeners","element","addListeners","scrollContainer","ref","findScrollContainers","useOnWindowScroll","useOnWindowResize","onWindowResize","onScroll","enabled","overflow","overflowX","overflowY","prop","keys","a","b","key","Range","props","internalId","useId","ariaLabel","className","dataTestId","id","singleCursorMode","min","step","readOnly","disabled","onChange","rest","valueA","setValueA","valueB","setValueB","containerRef","handleChange","e","inputValue","jsxs","classnames","jsx"],"mappings":";;;;AAAA,IAAIA,IAAkB,CAAE,GCCpBC,KAAwB,WAAY;AACpC,SAAOD,EAAgB,KAAK,SAAUE,GAAI;AAAE,WAAOA,EAAG,cAAc,SAAS;AAAA,EAAE,CAAE;AACrF,GCFIC,KAAyB,WAAY;AACrC,SAAOH,EAAgB,KAAK,SAAUE,GAAI;AAAE,WAAOA,EAAG,eAAe,SAAS;AAAA,EAAE,CAAE;AACtF,GCHIE,IAAM,iEACNC,KAAyB,WAAY;AACrC,MAAIC;AACJ,EAAI,OAAO,cAAe,aACtBA,IAAQ,IAAI,WAAW,SAAS;AAAA,IAC5B,SAASF;AAAA,EACrB,CAAS,KAGDE,IAAQ,SAAS,YAAY,OAAO,GACpCA,EAAM,UAAU,SAAS,IAAO,EAAK,GACrCA,EAAM,UAAUF,IAEpB,OAAO,cAAcE,CAAK;AAC9B,GCdIC;AAAA,CACH,SAAUA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AAF;AAAA,cACA,MAAK;AAAA,cACL,OAAOK;AAAA,YAAA;AAAA,UACT;AAAA,UACC,CAACP,KACA,gBAAAiB;AAAA,YAAC;AAAA,YAAA;AAAA,cACE,GAAGX;AAAA,cACJ,cAAYV;AAAA,cACZ,WAAU;AAAA,cACV,UAAAQ;AAAA,cACA,IAAI,GAAGL,CAAE;AAAA,cACT,KAAKhE,EAAQ,SAAS;AAAA,cACtB,KAAAkE;AAAA,cACA,MAAAhF;AAAA,cACA,UAAU2F;AAAA,cACV,MAAAV;AAAA,cACA,MAAK;AAAA,cACL,OAAOO;AAAA,YAAA;AAAA,UACT;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAQ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,GAAGlB,CAAE;AAAA,YACd,OAAO,EAAE,WAAWQ,EAAO;AAAA,YAC3B,WAAU;AAAA,YAET,UAAAxE,EAAQwE,CAAM,EAAE;AAAA,UAAA;AAAA,QACnB;AAAA,QACC,CAACP,KACA,gBAAAiB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,GAAGlB,CAAE;AAAA,YACd,OAAO,EAAE,WAAWU,EAAO;AAAA,YAC3B,WAAU;AAAA,YAET,UAAA1E,EAAQ0E,CAAM,EAAE;AAAA,UAAA;AAAA,QACnB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]}
|
|
1
|
+
{"version":3,"file":"Range.js","sources":["../../../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../../../node_modules/@juggle/resize-observer/lib/utils/freeze.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../../../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../../../node_modules/@juggle/resize-observer/lib/utils/element.js","../../../node_modules/@juggle/resize-observer/lib/utils/global.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../../../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../../../node_modules/@juggle/resize-observer/lib/utils/process.js","../../../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../../../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../../../node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../../../node_modules/@juggle/resize-observer/lib/ResizeObserver.js","../../../node_modules/debounce/index.js","../../../node_modules/react-use-measure/dist/web.js","../../../lib/molecules/Forms/Range.tsx"],"sourcesContent":["var resizeObservers = [];\nexport { resizeObservers };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasActiveObservations = function () {\n return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });\n};\nexport { hasActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasSkippedObservations = function () {\n return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });\n};\nexport { hasSkippedObservations };\n","var msg = 'ResizeObserver loop completed with undelivered notifications.';\nvar deliverResizeLoopError = function () {\n var event;\n if (typeof ErrorEvent === 'function') {\n event = new ErrorEvent('error', {\n message: msg\n });\n }\n else {\n event = document.createEvent('Event');\n event.initEvent('error', false, false);\n event.message = msg;\n }\n window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n ResizeObserverBoxOptions[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","export var freeze = function (obj) { return Object.freeze(obj); };\n","import { freeze } from './utils/freeze';\nvar ResizeObserverSize = (function () {\n function ResizeObserverSize(inlineSize, blockSize) {\n this.inlineSize = inlineSize;\n this.blockSize = blockSize;\n freeze(this);\n }\n return ResizeObserverSize;\n}());\nexport { ResizeObserverSize };\n","import { freeze } from './utils/freeze';\nvar DOMRectReadOnly = (function () {\n function DOMRectReadOnly(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.top = this.y;\n this.left = this.x;\n this.bottom = this.top + this.height;\n this.right = this.left + this.width;\n return freeze(this);\n }\n DOMRectReadOnly.prototype.toJSON = function () {\n var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };\n };\n DOMRectReadOnly.fromRect = function (rectangle) {\n return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n };\n return DOMRectReadOnly;\n}());\nexport { DOMRectReadOnly };\n","var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };\nvar isHidden = function (target) {\n if (isSVG(target)) {\n var _a = target.getBBox(), width = _a.width, height = _a.height;\n return !width && !height;\n }\n var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nvar isElement = function (obj) {\n var _a;\n if (obj instanceof Element) {\n return true;\n }\n var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;\n return !!(scope && obj instanceof scope.Element);\n};\nvar isReplacedElement = function (target) {\n switch (target.tagName) {\n case 'INPUT':\n if (target.type !== 'image') {\n break;\n }\n case 'VIDEO':\n case 'AUDIO':\n case 'EMBED':\n case 'OBJECT':\n case 'CANVAS':\n case 'IFRAME':\n case 'IMG':\n return true;\n }\n return false;\n};\nexport { isSVG, isHidden, isElement, isReplacedElement };\n","export var global = typeof window !== 'undefined' ? window : {};\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { ResizeObserverSize } from '../ResizeObserverSize';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nimport { freeze } from '../utils/freeze';\nimport { global } from '../utils/global';\nvar cache = new WeakMap();\nvar scrollRegexp = /auto|scroll/;\nvar verticalRegexp = /^tb|vertical/;\nvar IE = (/msie|trident/i).test(global.navigator && global.navigator.userAgent);\nvar parseDimension = function (pixel) { return parseFloat(pixel || '0'); };\nvar size = function (inlineSize, blockSize, switchSizes) {\n if (inlineSize === void 0) { inlineSize = 0; }\n if (blockSize === void 0) { blockSize = 0; }\n if (switchSizes === void 0) { switchSizes = false; }\n return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n};\nvar zeroBoxes = freeze({\n devicePixelContentBoxSize: size(),\n borderBoxSize: size(),\n contentBoxSize: size(),\n contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nvar calculateBoxSizes = function (target, forceRecalculation) {\n if (forceRecalculation === void 0) { forceRecalculation = false; }\n if (cache.has(target) && !forceRecalculation) {\n return cache.get(target);\n }\n if (isHidden(target)) {\n cache.set(target, zeroBoxes);\n return zeroBoxes;\n }\n var cs = getComputedStyle(target);\n var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n var removePadding = !IE && cs.boxSizing === 'border-box';\n var switchSizes = verticalRegexp.test(cs.writingMode || '');\n var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n var horizontalPadding = paddingLeft + paddingRight;\n var verticalPadding = paddingTop + paddingBottom;\n var horizontalBorderArea = borderLeft + borderRight;\n var verticalBorderArea = borderTop + borderBottom;\n var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n var boxes = freeze({\n devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n });\n cache.set(target, boxes);\n return boxes;\n};\nvar calculateBoxSize = function (target, observedBox, forceRecalculation) {\n var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n switch (observedBox) {\n case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n return devicePixelContentBoxSize;\n case ResizeObserverBoxOptions.BORDER_BOX:\n return borderBoxSize;\n default:\n return contentBoxSize;\n }\n};\nexport { calculateBoxSize, calculateBoxSizes };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nimport { freeze } from './utils/freeze';\nvar ResizeObserverEntry = (function () {\n function ResizeObserverEntry(target) {\n var boxes = calculateBoxSizes(target);\n this.target = target;\n this.contentRect = boxes.contentRect;\n this.borderBoxSize = freeze([boxes.borderBoxSize]);\n this.contentBoxSize = freeze([boxes.contentBoxSize]);\n this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n }\n return ResizeObserverEntry;\n}());\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nvar calculateDepthForNode = function (node) {\n if (isHidden(node)) {\n return Infinity;\n }\n var depth = 0;\n var parent = node.parentNode;\n while (parent) {\n depth += 1;\n parent = parent.parentNode;\n }\n return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nvar broadcastActiveObservations = function () {\n var shallowestDepth = Infinity;\n var callbacks = [];\n resizeObservers.forEach(function processObserver(ro) {\n if (ro.activeTargets.length === 0) {\n return;\n }\n var entries = [];\n ro.activeTargets.forEach(function processTarget(ot) {\n var entry = new ResizeObserverEntry(ot.target);\n var targetDepth = calculateDepthForNode(ot.target);\n entries.push(entry);\n ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n if (targetDepth < shallowestDepth) {\n shallowestDepth = targetDepth;\n }\n });\n callbacks.push(function resizeObserverCallback() {\n ro.callback.call(ro.observer, entries, ro.observer);\n });\n ro.activeTargets.splice(0, ro.activeTargets.length);\n });\n for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {\n var callback = callbacks_1[_i];\n callback();\n }\n return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nvar gatherActiveObservationsAtDepth = function (depth) {\n resizeObservers.forEach(function processObserver(ro) {\n ro.activeTargets.splice(0, ro.activeTargets.length);\n ro.skippedTargets.splice(0, ro.skippedTargets.length);\n ro.observationTargets.forEach(function processTarget(ot) {\n if (ot.isActive()) {\n if (calculateDepthForNode(ot.target) > depth) {\n ro.activeTargets.push(ot);\n }\n else {\n ro.skippedTargets.push(ot);\n }\n }\n });\n });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { hasActiveObservations } from '../algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from '../algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';\nvar process = function () {\n var depth = 0;\n gatherActiveObservationsAtDepth(depth);\n while (hasActiveObservations()) {\n depth = broadcastActiveObservations();\n gatherActiveObservationsAtDepth(depth);\n }\n if (hasSkippedObservations()) {\n deliverResizeLoopError();\n }\n return depth > 0;\n};\nexport { process };\n","var trigger;\nvar callbacks = [];\nvar notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };\nvar queueMicroTask = function (callback) {\n if (!trigger) {\n var toggle_1 = 0;\n var el_1 = document.createTextNode('');\n var config = { characterData: true };\n new MutationObserver(function () { return notify(); }).observe(el_1, config);\n trigger = function () { el_1.textContent = \"\".concat(toggle_1 ? toggle_1-- : toggle_1++); };\n }\n callbacks.push(callback);\n trigger();\n};\nexport { queueMicroTask };\n","import { queueMicroTask } from './queueMicroTask';\nvar queueResizeObserver = function (cb) {\n queueMicroTask(function ResizeObserver() {\n requestAnimationFrame(cb);\n });\n};\nexport { queueResizeObserver };\n","import { process } from './process';\nimport { global } from './global';\nimport { queueResizeObserver } from './queueResizeObserver';\nvar watching = 0;\nvar isWatching = function () { return !!watching; };\nvar CATCH_PERIOD = 250;\nvar observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nvar events = [\n 'resize',\n 'load',\n 'transitionend',\n 'animationend',\n 'animationstart',\n 'animationiteration',\n 'keyup',\n 'keydown',\n 'mouseup',\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'blur',\n 'focus'\n];\nvar time = function (timeout) {\n if (timeout === void 0) { timeout = 0; }\n return Date.now() + timeout;\n};\nvar scheduled = false;\nvar Scheduler = (function () {\n function Scheduler() {\n var _this = this;\n this.stopped = true;\n this.listener = function () { return _this.schedule(); };\n }\n Scheduler.prototype.run = function (timeout) {\n var _this = this;\n if (timeout === void 0) { timeout = CATCH_PERIOD; }\n if (scheduled) {\n return;\n }\n scheduled = true;\n var until = time(timeout);\n queueResizeObserver(function () {\n var elementsHaveResized = false;\n try {\n elementsHaveResized = process();\n }\n finally {\n scheduled = false;\n timeout = until - time();\n if (!isWatching()) {\n return;\n }\n if (elementsHaveResized) {\n _this.run(1000);\n }\n else if (timeout > 0) {\n _this.run(timeout);\n }\n else {\n _this.start();\n }\n }\n });\n };\n Scheduler.prototype.schedule = function () {\n this.stop();\n this.run();\n };\n Scheduler.prototype.observe = function () {\n var _this = this;\n var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };\n document.body ? cb() : global.addEventListener('DOMContentLoaded', cb);\n };\n Scheduler.prototype.start = function () {\n var _this = this;\n if (this.stopped) {\n this.stopped = false;\n this.observer = new MutationObserver(this.listener);\n this.observe();\n events.forEach(function (name) { return global.addEventListener(name, _this.listener, true); });\n }\n };\n Scheduler.prototype.stop = function () {\n var _this = this;\n if (!this.stopped) {\n this.observer && this.observer.disconnect();\n events.forEach(function (name) { return global.removeEventListener(name, _this.listener, true); });\n this.stopped = true;\n }\n };\n return Scheduler;\n}());\nvar scheduler = new Scheduler();\nvar updateCount = function (n) {\n !watching && n > 0 && scheduler.start();\n watching += n;\n !watching && scheduler.stop();\n};\nexport { scheduler, updateCount };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nimport { isSVG, isReplacedElement } from './utils/element';\nvar skipNotifyOnElement = function (target) {\n return !isSVG(target)\n && !isReplacedElement(target)\n && getComputedStyle(target).display === 'inline';\n};\nvar ResizeObservation = (function () {\n function ResizeObservation(target, observedBox) {\n this.target = target;\n this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n this.lastReportedSize = {\n inlineSize: 0,\n blockSize: 0\n };\n }\n ResizeObservation.prototype.isActive = function () {\n var size = calculateBoxSize(this.target, this.observedBox, true);\n if (skipNotifyOnElement(this.target)) {\n this.lastReportedSize = size;\n }\n if (this.lastReportedSize.inlineSize !== size.inlineSize\n || this.lastReportedSize.blockSize !== size.blockSize) {\n return true;\n }\n return false;\n };\n return ResizeObservation;\n}());\nexport { ResizeObservation };\n","var ResizeObserverDetail = (function () {\n function ResizeObserverDetail(resizeObserver, callback) {\n this.activeTargets = [];\n this.skippedTargets = [];\n this.observationTargets = [];\n this.observer = resizeObserver;\n this.callback = callback;\n }\n return ResizeObserverDetail;\n}());\nexport { ResizeObserverDetail };\n","import { scheduler, updateCount } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { resizeObservers } from './utils/resizeObservers';\nvar observerMap = new WeakMap();\nvar getObservationIndex = function (observationTargets, target) {\n for (var i = 0; i < observationTargets.length; i += 1) {\n if (observationTargets[i].target === target) {\n return i;\n }\n }\n return -1;\n};\nvar ResizeObserverController = (function () {\n function ResizeObserverController() {\n }\n ResizeObserverController.connect = function (resizeObserver, callback) {\n var detail = new ResizeObserverDetail(resizeObserver, callback);\n observerMap.set(resizeObserver, detail);\n };\n ResizeObserverController.observe = function (resizeObserver, target, options) {\n var detail = observerMap.get(resizeObserver);\n var firstObservation = detail.observationTargets.length === 0;\n if (getObservationIndex(detail.observationTargets, target) < 0) {\n firstObservation && resizeObservers.push(detail);\n detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n updateCount(1);\n scheduler.schedule();\n }\n };\n ResizeObserverController.unobserve = function (resizeObserver, target) {\n var detail = observerMap.get(resizeObserver);\n var index = getObservationIndex(detail.observationTargets, target);\n var lastObservation = detail.observationTargets.length === 1;\n if (index >= 0) {\n lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n detail.observationTargets.splice(index, 1);\n updateCount(-1);\n }\n };\n ResizeObserverController.disconnect = function (resizeObserver) {\n var _this = this;\n var detail = observerMap.get(resizeObserver);\n detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });\n detail.activeTargets.splice(0, detail.activeTargets.length);\n };\n return ResizeObserverController;\n}());\nexport { ResizeObserverController };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { isElement } from './utils/element';\nvar ResizeObserver = (function () {\n function ResizeObserver(callback) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (typeof callback !== 'function') {\n throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n }\n ResizeObserverController.connect(this, callback);\n }\n ResizeObserver.prototype.observe = function (target, options) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.observe(this, target, options);\n };\n ResizeObserver.prototype.unobserve = function (target) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.unobserve(this, target);\n };\n ResizeObserver.prototype.disconnect = function () {\n ResizeObserverController.disconnect(this);\n };\n ResizeObserver.toString = function () {\n return 'function ResizeObserver () { [polyfill code] }';\n };\n return ResizeObserver;\n}());\nexport { ResizeObserver };\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","import { useState, useRef, useEffect, useMemo } from 'react';\nimport createDebounce from 'debounce';\n\nfunction useMeasure(_temp) {\n let {\n debounce,\n scroll,\n polyfill,\n offsetSize\n } = _temp === void 0 ? {\n debounce: 0,\n scroll: false,\n offsetSize: false\n } : _temp;\n const ResizeObserver = polyfill || (typeof window === 'undefined' ? class ResizeObserver {} : window.ResizeObserver);\n\n if (!ResizeObserver) {\n throw new Error('This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills');\n }\n\n const [bounds, set] = useState({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0\n }); // keep all state in a ref\n\n const state = useRef({\n element: null,\n scrollContainers: null,\n resizeObserver: null,\n lastBounds: bounds\n }); // set actual debounce values early, so effects know if they should react accordingly\n\n const scrollDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.scroll : null;\n const resizeDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.resize : null; // make sure to update state only as long as the component is truly mounted\n\n const mounted = useRef(false);\n useEffect(() => {\n mounted.current = true;\n return () => void (mounted.current = false);\n }); // memoize handlers, so event-listeners know when they should update\n\n const [forceRefresh, resizeChange, scrollChange] = useMemo(() => {\n const callback = () => {\n if (!state.current.element) return;\n const {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n } = state.current.element.getBoundingClientRect();\n const size = {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n };\n\n if (state.current.element instanceof HTMLElement && offsetSize) {\n size.height = state.current.element.offsetHeight;\n size.width = state.current.element.offsetWidth;\n }\n\n Object.freeze(size);\n if (mounted.current && !areBoundsEqual(state.current.lastBounds, size)) set(state.current.lastBounds = size);\n };\n\n return [callback, resizeDebounce ? createDebounce(callback, resizeDebounce) : callback, scrollDebounce ? createDebounce(callback, scrollDebounce) : callback];\n }, [set, offsetSize, scrollDebounce, resizeDebounce]); // cleanup current scroll-listeners / observers\n\n function removeListeners() {\n if (state.current.scrollContainers) {\n state.current.scrollContainers.forEach(element => element.removeEventListener('scroll', scrollChange, true));\n state.current.scrollContainers = null;\n }\n\n if (state.current.resizeObserver) {\n state.current.resizeObserver.disconnect();\n state.current.resizeObserver = null;\n }\n } // add scroll-listeners / observers\n\n\n function addListeners() {\n if (!state.current.element) return;\n state.current.resizeObserver = new ResizeObserver(scrollChange);\n state.current.resizeObserver.observe(state.current.element);\n\n if (scroll && state.current.scrollContainers) {\n state.current.scrollContainers.forEach(scrollContainer => scrollContainer.addEventListener('scroll', scrollChange, {\n capture: true,\n passive: true\n }));\n }\n } // the ref we expose to the user\n\n\n const ref = node => {\n if (!node || node === state.current.element) return;\n removeListeners();\n state.current.element = node;\n state.current.scrollContainers = findScrollContainers(node);\n addListeners();\n }; // add general event listeners\n\n\n useOnWindowScroll(scrollChange, Boolean(scroll));\n useOnWindowResize(resizeChange); // respond to changes that are relevant for the listeners\n\n useEffect(() => {\n removeListeners();\n addListeners();\n }, [scroll, scrollChange, resizeChange]); // remove all listeners when the components unmounts\n\n useEffect(() => removeListeners, []);\n return [ref, bounds, forceRefresh];\n} // Adds native resize listener to window\n\n\nfunction useOnWindowResize(onWindowResize) {\n useEffect(() => {\n const cb = onWindowResize;\n window.addEventListener('resize', cb);\n return () => void window.removeEventListener('resize', cb);\n }, [onWindowResize]);\n}\n\nfunction useOnWindowScroll(onScroll, enabled) {\n useEffect(() => {\n if (enabled) {\n const cb = onScroll;\n window.addEventListener('scroll', cb, {\n capture: true,\n passive: true\n });\n return () => void window.removeEventListener('scroll', cb, true);\n }\n }, [onScroll, enabled]);\n} // Returns a list of scroll offsets\n\n\nfunction findScrollContainers(element) {\n const result = [];\n if (!element || element === document.body) return result;\n const {\n overflow,\n overflowX,\n overflowY\n } = window.getComputedStyle(element);\n if ([overflow, overflowX, overflowY].some(prop => prop === 'auto' || prop === 'scroll')) result.push(element);\n return [...result, ...findScrollContainers(element.parentElement)];\n} // Checks if element boundaries are equal\n\n\nconst keys = ['x', 'y', 'top', 'bottom', 'left', 'right', 'width', 'height'];\n\nconst areBoundsEqual = (a, b) => keys.every(key => a[key] === b[key]);\n\nexport { useMeasure as default };\n","import { ResizeObserver } from '@juggle/resize-observer';\nimport classnames from 'classnames';\nimport {\n type ChangeEvent,\n type CSSProperties,\n type InputHTMLAttributes,\n useId,\n useState,\n} from 'react';\n\nimport useMeasure from 'react-use-measure';\nimport './range.css';\n\ninterface RangeProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n /**\n * Aria label\n * @default 'Range'\n * */\n ariaLabel?: string;\n /**\n * Additional class names\n * */\n className?: string;\n /**\n * Data test id\n * */\n dataTestId?: string;\n /**\n * Single cursor mode\n * @default false\n * */\n singleCursorMode?: boolean;\n /**\n * Min value\n * @default 0\n * */\n min?: number;\n /**\n * On change\n * */\n onChange?: (name: string, value: number[]) => void;\n /**\n * Options\n * @default []\n * */\n options: { value: number; label: string }[];\n}\n\nexport const Range = (props: RangeProps) => {\n const internalId = useId();\n\n const {\n ariaLabel,\n className,\n dataTestId = 'range',\n id = internalId,\n name = id,\n singleCursorMode = false,\n min = 0,\n options = [],\n step = 1,\n readOnly,\n disabled,\n onChange,\n ...rest\n } = props;\n\n const [valueA, setValueA] = useState(options.length - 1);\n const [valueB, setValueB] = useState(min);\n const [containerRef, { width }] = useMeasure({ polyfill: ResizeObserver });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!readOnly) {\n e.persist();\n const inputValue = Number(e.target.value);\n const inputId = e.target.id[e.target.id.length - 1];\n\n if (inputId === 'a') {\n setValueA(inputValue);\n } else {\n setValueB(inputValue);\n }\n\n onChange && onChange(name, [valueA, valueB]);\n }\n };\n\n return (\n <div\n style={\n {\n '--min': min,\n '--max': options.length - 1,\n '--inputWidth': `${width}px`,\n '--inputHeight': '4px',\n '--thumbWidth': '32px',\n '--usefulWidth': 'calc(var(--inputWidth) - var(--thumbWidth))',\n '--valueA': valueA,\n '--valueB': valueB,\n } as CSSProperties\n }\n className={classnames('relative w-full', className)}\n data-testid={dataTestId}\n data-name=\"Range\"\n ref={containerRef}\n >\n <div className=\"input-range-container\">\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n id={`${id}-a`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n disabled={disabled}\n step={step}\n type=\"range\"\n value={valueA}\n />\n {!singleCursorMode && (\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n disabled={disabled}\n id={`${id}-b`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n step={step}\n type=\"range\"\n value={valueB}\n />\n )}\n </div>\n <output\n htmlFor={`${id}-a`}\n style={{ '--value': valueA } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueA].label}\n </output>\n {!singleCursorMode && (\n <output\n htmlFor={`${id}-b`}\n style={{ '--value': valueB } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueB].label}\n </output>\n )}\n </div>\n );\n};\n"],"names":["resizeObservers","hasActiveObservations","ro","hasSkippedObservations","msg","deliverResizeLoopError","event","ResizeObserverBoxOptions","freeze","obj","ResizeObserverSize","inlineSize","blockSize","DOMRectReadOnly","x","y","width","height","_a","top","right","bottom","left","rectangle","isSVG","target","isHidden","_b","offsetWidth","offsetHeight","isElement","scope","isReplacedElement","global","cache","scrollRegexp","verticalRegexp","IE","parseDimension","pixel","size","switchSizes","zeroBoxes","calculateBoxSizes","forceRecalculation","cs","svg","removePadding","canScrollVertically","canScrollHorizontally","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTop","borderRight","borderBottom","borderLeft","horizontalPadding","verticalPadding","horizontalBorderArea","verticalBorderArea","horizontalScrollbarThickness","verticalScrollbarThickness","widthReduction","heightReduction","contentWidth","contentHeight","borderBoxWidth","borderBoxHeight","boxes","calculateBoxSize","observedBox","borderBoxSize","contentBoxSize","devicePixelContentBoxSize","ResizeObserverEntry","calculateDepthForNode","node","depth","parent","broadcastActiveObservations","shallowestDepth","callbacks","entries","ot","entry","targetDepth","_i","callbacks_1","callback","gatherActiveObservationsAtDepth","process","trigger","notify","cb","queueMicroTask","toggle_1","el_1","config","queueResizeObserver","watching","isWatching","CATCH_PERIOD","observerConfig","events","time","timeout","scheduled","Scheduler","_this","until","elementsHaveResized","name","scheduler","updateCount","n","skipNotifyOnElement","ResizeObservation","ResizeObserverDetail","resizeObserver","observerMap","getObservationIndex","observationTargets","i","ResizeObserverController","detail","options","firstObservation","index","lastObservation","ResizeObserver","debounce","func","wait","immediate","args","context","timestamp","result","later","last","debounced","callNow","debounce_1","useMeasure","_temp","scroll","polyfill","offsetSize","bounds","set","useState","state","useRef","scrollDebounce","resizeDebounce","mounted","useEffect","forceRefresh","resizeChange","scrollChange","useMemo","areBoundsEqual","createDebounce","removeListeners","element","addListeners","scrollContainer","ref","findScrollContainers","useOnWindowScroll","useOnWindowResize","onWindowResize","onScroll","enabled","overflow","overflowX","overflowY","prop","keys","a","b","key","Range","props","internalId","useId","ariaLabel","className","dataTestId","id","singleCursorMode","min","step","readOnly","disabled","onChange","rest","valueA","setValueA","valueB","setValueB","containerRef","handleChange","e","inputValue","jsxs","classnames","jsx"],"mappings":";;;;AAAA,IAAIA,IAAkB,CAAA,GCClBC,KAAwB,WAAY;AACpC,SAAOD,EAAgB,KAAK,SAAUE,GAAI;AAAE,WAAOA,EAAG,cAAc,SAAS;AAAA,EAAG,CAAC;AACrF,GCFIC,KAAyB,WAAY;AACrC,SAAOH,EAAgB,KAAK,SAAUE,GAAI;AAAE,WAAOA,EAAG,eAAe,SAAS;AAAA,EAAG,CAAC;AACtF,GCHIE,IAAM,iEACNC,KAAyB,WAAY;AACrC,MAAIC;AACJ,EAAI,OAAO,cAAe,aACtBA,IAAQ,IAAI,WAAW,SAAS;AAAA,IAC5B,SAASF;AAAA,EACrB,CAAS,KAGDE,IAAQ,SAAS,YAAY,OAAO,GACpCA,EAAM,UAAU,SAAS,IAAO,EAAK,GACrCA,EAAM,UAAUF,IAEpB,OAAO,cA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-
import { type IconicTypes } from '
|
|
2
|
+
import { type IconicTypes } from '@clubmed/trident-icons';
|
|
3
3
|
import { type SelectHTMLAttributes } from 'react';
|
|
4
4
|
export interface SelectProps<Value> extends FormControlProps<Value, SelectHTMLAttributes<HTMLSelectElement>> {
|
|
5
5
|
description?: string;
|
|
@@ -3,10 +3,9 @@ import { c as l } from "../../chunks/index.js";
|
|
|
3
3
|
import { useValue as I } from "../../hooks/useValue.js";
|
|
4
4
|
import { useInternalStatus as S } from "../../hooks/useInternalStatus.js";
|
|
5
5
|
import { FormControl as j } from "./FormControl.js";
|
|
6
|
-
import { Icon as n } from "
|
|
7
|
-
import "@clubmed/trident-icons";
|
|
6
|
+
import { Icon as n } from "@clubmed/trident-icons";
|
|
8
7
|
import { useId as T } from "react";
|
|
9
|
-
const
|
|
8
|
+
const R = (p) => {
|
|
10
9
|
const u = T(), {
|
|
11
10
|
id: t = u,
|
|
12
11
|
name: a = t,
|
|
@@ -100,6 +99,6 @@ const B = (p) => {
|
|
|
100
99
|
);
|
|
101
100
|
};
|
|
102
101
|
export {
|
|
103
|
-
|
|
102
|
+
R as Select
|
|
104
103
|
};
|
|
105
104
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../lib/molecules/Forms/Select.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue } from '@/hooks/useValue';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\nimport { FormControl, type FormControlProps } from './FormControl.js';\nimport { Icon, type IconicTypes } from '
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../lib/molecules/Forms/Select.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue } from '@/hooks/useValue';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\nimport { FormControl, type FormControlProps } from './FormControl.js';\nimport { Icon, type IconicTypes } from '@clubmed/trident-icons';\nimport { type SelectHTMLAttributes, useId } from 'react';\n\nexport interface SelectProps<Value>\n extends FormControlProps<Value, SelectHTMLAttributes<HTMLSelectElement>> {\n description?: string;\n iconType?: IconicTypes;\n errorMessage?: string;\n dataTestId?: string;\n}\n\nexport const Select = <Value = string,>(props: SelectProps<Value>) => {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n label,\n value: initialValue,\n description,\n validationStatus = 'default',\n iconType,\n errorMessage,\n disabled = false,\n required = false,\n hideRequiredStar,\n className,\n dataTestId = id,\n onChange,\n children,\n ...rest\n } = props;\n\n const { value, setValue } = useValue<Value>({ name, initialValue, onChange });\n const internalStatus = useInternalStatus({\n isDisabled: disabled,\n validationStatus,\n });\n\n return (\n <FormControl\n id={id}\n className={className}\n label={label}\n description={description}\n dataName=\"TextField\"\n dataTestId={dataTestId}\n disabled={disabled}\n required={required}\n hideRequiredStar={hideRequiredStar}\n validationStatus={validationStatus}\n errorMessage={errorMessage}\n >\n <div\n className={classnames('relative rounded-pill z-0', {\n 'bg-white': internalStatus !== 'disabled',\n 'bg-pearl': internalStatus === 'disabled',\n })}\n >\n <select\n {...rest}\n id={id}\n name={name}\n disabled={disabled}\n required={required}\n value={value as any}\n onChange={(e) => setValue(e.target.value as Value)}\n className={classnames(\n 'text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none appearance-none bg-transparent',\n {\n 'border-lightGrey focus:border-black active:border-black pe-[52px]':\n internalStatus === 'default',\n 'pe-[84px]': internalStatus === 'error' || internalStatus === 'success',\n 'text-black': internalStatus !== 'disabled',\n 'text-grey': internalStatus === 'disabled',\n 'border-red': internalStatus === 'error',\n 'border-green': internalStatus === 'success',\n },\n )}\n aria-label={name}\n >\n {children}\n </select>\n\n <div\n className={classnames(\n 'pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12 -z-1',\n {\n 'text-grey': internalStatus === 'disabled',\n 'text-red': internalStatus === 'error',\n 'text-green': internalStatus === 'success',\n },\n )}\n >\n <span className=\"ms-auto flex gap-x-8\">\n {internalStatus === 'error' && (\n <Icon name=\"CrossDefault\" width=\"24px\" type={iconType} />\n )}\n\n {internalStatus === 'success' && (\n <Icon name=\"CheckDefault\" width=\"24px\" type={iconType} />\n )}\n\n <button className=\"pointer-events-auto inline-flex\">\n <Icon name=\"ArrowDefaultDown\" type=\"svg\" width=\"24px\" color=\"black\" />\n </button>\n </span>\n </div>\n </div>\n </FormControl>\n );\n};\n"],"names":["Select","props","internalId","useId","id","name","label","initialValue","description","validationStatus","iconType","errorMessage","disabled","required","hideRequiredStar","className","dataTestId","onChange","children","rest","value","setValue","useValue","internalStatus","useInternalStatus","jsx","FormControl","jsxs","classnames","e","Icon"],"mappings":";;;;;;;AAeO,MAAMA,IAAS,CAAkBC,MAA8B;AACpE,QAAMC,IAAaC,EAAA,GAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,OAAAE;AAAA,IACA,OAAOC;AAAA,IACP,aAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,kBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC,IAAaZ;AAAA,IACb,UAAAa;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDlB,GAEE,EAAE,OAAAmB,GAAO,UAAAC,MAAaC,EAAgB,EAAE,MAAAjB,GAAM,cAAAE,GAAc,UAAAU,GAAU,GACtEM,IAAiBC,EAAkB;AAAA,IACvC,YAAYZ;AAAA,IACZ,kBAAAH;AAAA,EAAA,CACD;AAED,SACE,gBAAAgB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAAtB;AAAA,MACA,WAAAW;AAAA,MACA,OAAAT;AAAA,MACA,aAAAE;AAAA,MACA,UAAS;AAAA,MACT,YAAAQ;AAAA,MACA,UAAAJ;AAAA,MACA,UAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAL;AAAA,MACA,cAAAE;A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K,MAAK,oBAAmB,MAAK,OAAM,OAAM,QAAO,OAAM,SAAQ,EAAA,CACtE;AAAA,gBAAA,EAAA,CACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sources":["../../../lib/molecules/Forms/Switch.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue } from '@/hooks/useValue.js';\nimport './controls.css';\nimport type { FormControlProps } from './FormControl.js';\nimport { useId } from 'react';\n\nexport interface SwitchProps extends FormControlProps<boolean> {\n width?: number;\n}\n\nexport function Switch(props: SwitchProps) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n className,\n checked: initialChecked,\n disabled,\n width = 56,\n onChange,\n tabIndex = 0,\n children,\n } = props;\n\n const { value: checked, setValue } = useValue<boolean>({\n initialValue: initialChecked,\n name,\n onChange,\n });\n\n return (\n <label\n className={classnames(className, 'relative flex items-center gap-[10px]', {\n 'text-grey': disabled,\n 'cursor-pointer': !disabled,\n })}\n data-testid=\"SwitchContainer\"\n >\n <span className=\"relative\">\n <input\n type=\"checkbox\"\n name={name}\n tabIndex={tabIndex}\n checked={checked}\n disabled={disabled}\n role=\"switch\"\n className=\"absolute w-full h-full opacity-0 cursor-pointer\"\n onChange={() => {\n !disabled && setValue(!checked);\n }}\n data-name=\"Switch\"\n />\n\n <span style={{ height: (width * 4) / 7, width }}>\n <svg viewBox=\"0 0 24 24\" width={(width * 3) / 7}>\n <g>\n <circle cx={12} cy={12} r={12} fill=\"hsl(var(--color-white))\" />\n <circle cx={12} cy={12} r={4} fill=\"hsl(var(--color-grey))\" />\n </g>\n </svg>\n </span>\n </span>\n\n <span className=\"text-b2 font-semibold\">{children}</span>\n </label>\n );\n}\n"],"names":["Switch","props","internalId","useId","id","name","className","initialChecked","disabled","width","onChange","tabIndex","children","checked","setValue","useValue","jsxs","classnames","jsx"],"mappings":";;;;;AAUO,SAASA,EAAOC,GAAoB;AACzC,QAAMC,IAAaC,
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../../lib/molecules/Forms/Switch.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue } from '@/hooks/useValue.js';\nimport './controls.css';\nimport type { FormControlProps } from './FormControl.js';\nimport { useId } from 'react';\n\nexport interface SwitchProps extends FormControlProps<boolean> {\n width?: number;\n}\n\nexport function Switch(props: SwitchProps) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n className,\n checked: initialChecked,\n disabled,\n width = 56,\n onChange,\n tabIndex = 0,\n children,\n } = props;\n\n const { value: checked, setValue } = useValue<boolean>({\n initialValue: initialChecked,\n name,\n onChange,\n });\n\n return (\n <label\n className={classnames(className, 'relative flex items-center gap-[10px]', {\n 'text-grey': disabled,\n 'cursor-pointer': !disabled,\n })}\n data-testid=\"SwitchContainer\"\n >\n <span className=\"relative\">\n <input\n type=\"checkbox\"\n name={name}\n tabIndex={tabIndex}\n checked={checked}\n disabled={disabled}\n role=\"switch\"\n className=\"absolute w-full h-full opacity-0 cursor-pointer\"\n onChange={() => {\n !disabled && setValue(!checked);\n }}\n data-name=\"Switch\"\n />\n\n <span style={{ height: (width * 4) / 7, width }}>\n <svg viewBox=\"0 0 24 24\" width={(width * 3) / 7}>\n <g>\n <circle cx={12} cy={12} r={12} fill=\"hsl(var(--color-white))\" />\n <circle cx={12} cy={12} r={4} fill=\"hsl(var(--color-grey))\" />\n </g>\n </svg>\n </span>\n </span>\n\n <span className=\"text-b2 font-semibold\">{children}</span>\n </label>\n );\n}\n"],"names":["Switch","props","internalId","useId","id","name","className","initialChecked","disabled","width","onChange","tabIndex","children","checked","setValue","useValue","jsxs","classnames","jsx"],"mappings":";;;;;AAUO,SAASA,EAAOC,GAAoB;AACzC,QAAMC,IAAaC,EAAA,GAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,WAAA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,QAAA,EAAK,WAAU,yBAAyB,UAAAN,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxD;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UseValueProps } from '../../hooks/useValue';
|
|
2
2
|
import { type FormControlProps } from './FormControl.js';
|
|
3
|
-
import { type IconicNames, type IconicTypes } from '
|
|
3
|
+
import { type IconicNames, type IconicTypes } from '@clubmed/trident-icons';
|
|
4
4
|
export interface TextFieldProps<Value> extends FormControlProps<Value> {
|
|
5
5
|
description?: string;
|
|
6
6
|
icon?: IconicNames;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as u } from "../../chunks/index.js";
|
|
3
3
|
import { useValue as F } from "../../hooks/useValue.js";
|
|
4
4
|
import { useInternalStatus as S } from "../../hooks/useInternalStatus.js";
|
|
5
5
|
import { FormControl as j } from "./FormControl.js";
|
|
6
|
-
import { Icon as i } from "
|
|
7
|
-
import "@clubmed/trident-icons";
|
|
6
|
+
import { Icon as i } from "@clubmed/trident-icons";
|
|
8
7
|
import { useId as D } from "react";
|
|
9
|
-
const
|
|
8
|
+
const B = (m) => {
|
|
10
9
|
const p = D(), {
|
|
11
10
|
id: t = p,
|
|
12
11
|
name: a = t,
|
|
@@ -25,7 +24,7 @@ const E = (u) => {
|
|
|
25
24
|
onChange: w,
|
|
26
25
|
formatter: N,
|
|
27
26
|
...C
|
|
28
|
-
} =
|
|
27
|
+
} = m, { value: I, setValue: T } = F({ name: a, initialValue: b, onChange: w, formatter: N }), e = S({
|
|
29
28
|
isDisabled: l,
|
|
30
29
|
validationStatus: n
|
|
31
30
|
});
|
|
@@ -54,7 +53,7 @@ const E = (u) => {
|
|
|
54
53
|
required: c,
|
|
55
54
|
value: I,
|
|
56
55
|
onChange: (k) => T(k.target.value),
|
|
57
|
-
className:
|
|
56
|
+
className: u(
|
|
58
57
|
"text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none",
|
|
59
58
|
{
|
|
60
59
|
"border-lightGrey focus:border-black active:border-black": e === "default",
|
|
@@ -72,7 +71,7 @@ const E = (u) => {
|
|
|
72
71
|
/* @__PURE__ */ o(
|
|
73
72
|
"div",
|
|
74
73
|
{
|
|
75
|
-
className:
|
|
74
|
+
className: u(
|
|
76
75
|
"pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12",
|
|
77
76
|
{
|
|
78
77
|
"text-grey": e === "disabled",
|
|
@@ -94,6 +93,6 @@ const E = (u) => {
|
|
|
94
93
|
);
|
|
95
94
|
};
|
|
96
95
|
export {
|
|
97
|
-
|
|
96
|
+
B as TextField
|
|
98
97
|
};
|
|
99
98
|
//# sourceMappingURL=TextField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../../../lib/molecules/Forms/TextField.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue, type UseValueProps } from '@/hooks/useValue';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\nimport { FormControl, type FormControlProps } from './FormControl.js';\nimport { Icon, type IconicNames, type IconicTypes } from '
|
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../../../lib/molecules/Forms/TextField.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue, type UseValueProps } from '@/hooks/useValue';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\nimport { FormControl, type FormControlProps } from './FormControl.js';\nimport { Icon, type IconicNames, type IconicTypes } from '@clubmed/trident-icons';\nimport { useId } from 'react';\n\nexport interface TextFieldProps<Value> extends FormControlProps<Value> {\n description?: string;\n icon?: IconicNames;\n iconType?: IconicTypes;\n errorMessage?: string;\n dataTestId?: string;\n formatter?: UseValueProps<Value>['formatter'];\n}\n\nexport const TextField = <Value = string,>(props: TextFieldProps<Value>) => {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n label,\n value: initialValue,\n description,\n validationStatus = 'default',\n icon,\n iconType,\n errorMessage,\n disabled = false,\n required = false,\n hideRequiredStar,\n className,\n dataTestId = 'TextField',\n onChange,\n formatter,\n ...rest\n } = props;\n\n const { value, setValue } = useValue<Value>({ name, initialValue, onChange, formatter });\n const internalStatus = useInternalStatus({\n isDisabled: disabled,\n validationStatus,\n });\n\n return (\n <FormControl\n id={id}\n label={label}\n className={className}\n description={description}\n dataName=\"TextField\"\n dataTestId={dataTestId}\n disabled={disabled}\n required={required}\n hideRequiredStar={hideRequiredStar}\n validationStatus={validationStatus}\n errorMessage={errorMessage}\n >\n <div className=\"relative\">\n <input\n {...rest}\n id={id}\n name={name}\n disabled={disabled}\n required={required}\n value={value as any}\n onChange={(e) => setValue(e.target.value as Value)}\n className={classnames(\n 'text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none',\n {\n 'border-lightGrey focus:border-black active:border-black':\n internalStatus === 'default',\n 'ps-[52px]': icon,\n 'pe-[52px]': internalStatus === 'error' || internalStatus === 'success',\n 'bg-white text-black': internalStatus !== 'disabled',\n 'bg-pearl text-grey': internalStatus === 'disabled',\n 'border-red': internalStatus === 'error',\n 'border-green': internalStatus === 'success',\n },\n )}\n aria-label={name}\n />\n\n <div\n className={classnames(\n 'pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12',\n {\n 'text-grey': internalStatus === 'disabled',\n 'text-red': internalStatus === 'error',\n 'text-green': internalStatus === 'success',\n },\n )}\n >\n {icon && <Icon name={icon} width=\"24px\" />}\n\n <span className=\"ms-auto flex gap-x-8\">\n {internalStatus === 'error' && (\n <Icon name=\"CrossDefault\" width=\"24px\" type={iconType} />\n )}\n\n {internalStatus === 'success' && (\n <Icon name=\"CheckDefault\" width=\"24px\" type={iconType} />\n )}\n </span>\n </div>\n </div>\n </FormControl>\n );\n};\n"],"names":["TextField","props","internalId","useId","id","name","label","initialValue","description","validationStatus","icon","iconType","errorMessage","disabled","required","hideRequiredStar","className","dataTestId","onChange","formatter","rest","value","setValue","useValue","internalStatus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AAA,cACT;AAAA,cACA;AAAA,gBACE,2DACEN,MAAmB;AAAA,gBACrB,aAAad;AAAA,gBACb,aAAac,MAAmB,WAAWA,MAAmB;AAAA,gBAC9D,uBAAuBA,MAAmB;AAAA,gBAC1C,sBAAsBA,MAAmB;AAAA,gBACzC,cAAcA,MAAmB;AAAA,gBACjC,gBAAgBA,MAAmB;AAAA,cAAA;AAAA,YACrC;AAAA,YAEF,cAAYnB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGd,gBAAAuB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWE;AAAA,cACT;AAAA,cACA;AAAA,gBACE,aAAaN,MAAmB;AAAA,gBAChC,YAAYA,MAAmB;AAAA,gBAC/B,cAAcA,MAAmB;AAAA,cAAA;AAAA,YACnC;AAAA,YAGD,UAAA;AAAA,cAAAd,KAAQ,gBAAAgB,EAACK,GAAA,EAAK,MAAMrB,GAAM,OAAM,QAAO;AAAA,cAExC,gBAAAkB,EAAC,QAAA,EAAK,WAAU,wBACb,UAAA;AAAA,gBAAAJ,MAAmB,6BACjBO,GAAA,EAAK,MAAK,gBAAe,OAAM,QAAO,MAAMpB,EAAA,CAAU;AAAA,gBAGxDa,MAAmB,aAClB,gBAAAE,EAACK,GAAA,EAAK,MAAK,gBAAe,OAAM,QAAO,MAAMpB,EAAA,CAAU;AAAA,cAAA,EAAA,CAE3D;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HamburgerIcon.js","sources":["../../lib/molecules/HamburgerIcon.tsx"],"sourcesContent":["import { animated, useSpring } from '@react-spring/web';\nimport type { FunctionComponent } from 'react';\n\ninterface HamburgerIconProps {\n /**\n * Width of the HamburgerIcon\n */\n width?: string;\n /**\n * Whether the HamburgerIcon is active or not\n */\n isActive?: boolean;\n}\n\nexport const HamburgerIcon: FunctionComponent<HamburgerIconProps> = ({\n width: widthProp = '24px',\n isActive = false,\n}) => {\n const { width } = useSpring({ width: widthProp });\n const iconStyle = useSpring({\n transform: isActive ? 'translate(3.002700, 6.224356)' : 'translate(3,6)',\n path1: isActive\n ? 'M4.93259468,0.296729803 L20.476916,15.8410511 C20.8700674,16.2342025 20.8721957,16.8713128 20.4825799,17.2609286 C20.0929641,17.6505444 19.4558538,17.648416 19.0627024,17.2552647 L3.51838112,1.71094337 C3.12522975,1.317792 3.12240132,0.679981679 3.51201716,0.290365842 C3.901633,-0.0992499941 4.53944331,-0.096421567 4.93259468,0.296729803 Z'\n : 'M1.009,0 L22.99199,0 C23.54799,0 24,0.449 24,1 C24,1.551 23.54799,2 22.99199,2 L1.009,2 C0.453,2 0,1.551 0,1 C0,0.449 0.453,0 1.009,0 Z',\n path2: isActive\n ? 'M5.1242772,17.4441138 L20.665063,1.90332799 C21.0582143,1.51017662 21.0617499,0.873073405 20.6714269,0.482750462 C20.281104,0.092427519 19.6440008,0.0959630529 19.2508494,0.489114423 L3.71006364,16.0299002 C3.31691227,16.4230516 3.31408384,17.0594477 3.70440678,17.4497706 C4.09472972,17.8400935 4.73112583,17.8372651 5.1242772,17.4441138 Z'\n : 'M1.0113,18 L22.98929,18 C23.54529,18 23.99829,17.552 23.99829,17 C23.99829,16.448 23.54529,16 22.98929,16 L1.0113,16 C0.4553,16 0.0033,16.448 0.0033,17 C0.0033,17.552 0.4553,18 1.0113,18 Z',\n opacity: isActive ? 0 : 1,\n });\n\n return (\n <animated.svg\n className=\"shrink-0\"\n data-testid={isActive ? 'HamburgerIcon-active' : 'HamburgerIcon'}\n data-name=\"HamburgerIcon\"\n width={width}\n height={width}\n viewBox=\"0 0 30 30\"\n >\n <animated.g transform={iconStyle.transform} fill=\"currentColor\">\n <animated.path d={iconStyle.path1} />\n <animated.path\n opacity={iconStyle.opacity}\n d=\"M22.98969,8 L1.0117,8 C0.4557,8 0.0027,8.448 0.0027,9 C0.0027,9.552 0.4557,10 1.0117,10 L22.98969,10 C23.54569,10 23.99769,9.552 23.99769,9 C23.99769,8.448 23.54569,8 22.98969,8 Z\"\n />\n <animated.path d={iconStyle.path2} />\n </animated.g>\n </animated.svg>\n );\n};\n"],"names":["HamburgerIcon","widthProp","isActive","width","useSpring","iconStyle","jsx","animated","jsxs"],"mappings":";;AAcO,MAAMA,IAAuD,CAAC;AAAA,EACnE,OAAOC,IAAY;AAAA,EACnB,UAAAC,IAAW;AACb,MAAM;AACJ,QAAM,EAAE,OAAAC,
|
|
1
|
+
{"version":3,"file":"HamburgerIcon.js","sources":["../../lib/molecules/HamburgerIcon.tsx"],"sourcesContent":["import { animated, useSpring } from '@react-spring/web';\nimport type { FunctionComponent } from 'react';\n\ninterface HamburgerIconProps {\n /**\n * Width of the HamburgerIcon\n */\n width?: string;\n /**\n * Whether the HamburgerIcon is active or not\n */\n isActive?: boolean;\n}\n\nexport const HamburgerIcon: FunctionComponent<HamburgerIconProps> = ({\n width: widthProp = '24px',\n isActive = false,\n}) => {\n const { width } = useSpring({ width: widthProp });\n const iconStyle = useSpring({\n transform: isActive ? 'translate(3.002700, 6.224356)' : 'translate(3,6)',\n path1: isActive\n ? 'M4.93259468,0.296729803 L20.476916,15.8410511 C20.8700674,16.2342025 20.8721957,16.8713128 20.4825799,17.2609286 C20.0929641,17.6505444 19.4558538,17.648416 19.0627024,17.2552647 L3.51838112,1.71094337 C3.12522975,1.317792 3.12240132,0.679981679 3.51201716,0.290365842 C3.901633,-0.0992499941 4.53944331,-0.096421567 4.93259468,0.296729803 Z'\n : 'M1.009,0 L22.99199,0 C23.54799,0 24,0.449 24,1 C24,1.551 23.54799,2 22.99199,2 L1.009,2 C0.453,2 0,1.551 0,1 C0,0.449 0.453,0 1.009,0 Z',\n path2: isActive\n ? 'M5.1242772,17.4441138 L20.665063,1.90332799 C21.0582143,1.51017662 21.0617499,0.873073405 20.6714269,0.482750462 C20.281104,0.092427519 19.6440008,0.0959630529 19.2508494,0.489114423 L3.71006364,16.0299002 C3.31691227,16.4230516 3.31408384,17.0594477 3.70440678,17.4497706 C4.09472972,17.8400935 4.73112583,17.8372651 5.1242772,17.4441138 Z'\n : 'M1.0113,18 L22.98929,18 C23.54529,18 23.99829,17.552 23.99829,17 C23.99829,16.448 23.54529,16 22.98929,16 L1.0113,16 C0.4553,16 0.0033,16.448 0.0033,17 C0.0033,17.552 0.4553,18 1.0113,18 Z',\n opacity: isActive ? 0 : 1,\n });\n\n return (\n <animated.svg\n className=\"shrink-0\"\n data-testid={isActive ? 'HamburgerIcon-active' : 'HamburgerIcon'}\n data-name=\"HamburgerIcon\"\n width={width}\n height={width}\n viewBox=\"0 0 30 30\"\n >\n <animated.g transform={iconStyle.transform} fill=\"currentColor\">\n <animated.path d={iconStyle.path1} />\n <animated.path\n opacity={iconStyle.opacity}\n d=\"M22.98969,8 L1.0117,8 C0.4557,8 0.0027,8.448 0.0027,9 C0.0027,9.552 0.4557,10 1.0117,10 L22.98969,10 C23.54569,10 23.99769,9.552 23.99769,9 C23.99769,8.448 23.54569,8 22.98969,8 Z\"\n />\n <animated.path d={iconStyle.path2} />\n </animated.g>\n </animated.svg>\n );\n};\n"],"names":["HamburgerIcon","widthProp","isActive","width","useSpring","iconStyle","jsx","animated","jsxs"],"mappings":";;AAcO,MAAMA,IAAuD,CAAC;AAAA,EACnE,OAAOC,IAAY;AAAA,EACnB,UAAAC,IAAW;AACb,MAAM;AACJ,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAU,EAAE,OAAOH,GAAW,GAC1CI,IAAYD,EAAU;AAAA,IAC1B,WAAWF,IAAW,kCAAkC;AAAA,IACxD,OAAOA,IACH,0VACA;AAAA,IACJ,OAAOA,IACH,yVACA;AAAA,IACJ,SAASA,IAAW,IAAI;AAAA,EAAA,CACzB;AAED,SACE,gBAAAI;AAAA,IAACC,EAAS;AAAA,IAAT;AAAA,MACC,WAAU;AAAA,MACV,eAAaL,IAAW,yBAAyB;AAAA,MACjD,aAAU;AAAA,MACV,OAAAC;AAAA,MACA,QAAQA;AAAA,MACR,SAAQ;AAAA,MAER,UAAA,gBAAAK,EAACD,EAAS,GAAT,EAAW,WAAWF,EAAU,WAAW,MAAK,gBAC/C,UAAA;AAAA,QAAA,gBAAAC,EAACC,EAAS,MAAT,EAAc,GAAGF,EAAU,OAAO;AAAA,QACnC,gBAAAC;AAAA,UAACC,EAAS;AAAA,UAAT;AAAA,YACC,SAASF,EAAU;AAAA,YACnB,GAAE;AAAA,UAAA;AAAA,QAAA;AAAA,0BAEHE,EAAS,MAAT,EAAc,GAAGF,EAAU,MAAA,CAAO;AAAA,MAAA,EAAA,CACrC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/molecules/Link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
-
import { type IconicNames, type IconicTypes } from '
|
|
2
|
+
import { type IconicNames, type IconicTypes } from '@clubmed/trident-icons';
|
|
3
3
|
interface LinkProps<T extends HTMLAnchorElement = HTMLAnchorElement> extends AnchorHTMLAttributes<T> {
|
|
4
4
|
/**
|
|
5
5
|
* Label text
|
package/molecules/Link.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
1
|
+
import { jsxs as t, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as a } from "../chunks/index.js";
|
|
3
|
-
import { Icon as u } from "
|
|
4
|
-
|
|
5
|
-
const C = ({
|
|
3
|
+
import { Icon as u } from "@clubmed/trident-icons";
|
|
4
|
+
const j = ({
|
|
6
5
|
label: n,
|
|
7
6
|
icon: s,
|
|
8
|
-
component:
|
|
7
|
+
component: o = "a",
|
|
9
8
|
iconType: m,
|
|
10
9
|
underlined: e = !0,
|
|
11
10
|
className: l,
|
|
@@ -14,7 +13,7 @@ const C = ({
|
|
|
14
13
|
}) => {
|
|
15
14
|
const r = n.lastIndexOf(" "), i = r === -1 ? n.length : r, h = n.substring(0, 1), x = n.substring(1, i + 1), g = n.substring(i);
|
|
16
15
|
return /* @__PURE__ */ t(
|
|
17
|
-
p ? "span" :
|
|
16
|
+
p ? "span" : o,
|
|
18
17
|
{
|
|
19
18
|
className: a(
|
|
20
19
|
"text-b3 decoration-none link-container cursor-pointer text-inherit",
|
|
@@ -23,7 +22,7 @@ const C = ({
|
|
|
23
22
|
"data-name": "Link",
|
|
24
23
|
...d,
|
|
25
24
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ c("span", { className: a({ "link-underline": e }), children: h }),
|
|
27
26
|
/* @__PURE__ */ t(
|
|
28
27
|
"span",
|
|
29
28
|
{
|
|
@@ -35,7 +34,7 @@ const C = ({
|
|
|
35
34
|
x,
|
|
36
35
|
/* @__PURE__ */ t("span", { className: "inline-block", children: [
|
|
37
36
|
g,
|
|
38
|
-
s && /* @__PURE__ */
|
|
37
|
+
s && /* @__PURE__ */ c(
|
|
39
38
|
u,
|
|
40
39
|
{
|
|
41
40
|
name: s,
|
|
@@ -53,6 +52,6 @@ const C = ({
|
|
|
53
52
|
);
|
|
54
53
|
};
|
|
55
54
|
export {
|
|
56
|
-
|
|
55
|
+
j as Link
|
|
57
56
|
};
|
|
58
57
|
//# sourceMappingURL=Link.js.map
|
package/molecules/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":["../../lib/molecules/Link.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';\n\nimport { Icon, type IconicNames, type IconicTypes } from '
|
|
1
|
+
{"version":3,"file":"Link.js","sources":["../../lib/molecules/Link.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';\n\nimport { Icon, type IconicNames, type IconicTypes } from '@clubmed/trident-icons';\n\ninterface LinkProps<T extends HTMLAnchorElement = HTMLAnchorElement>\n extends AnchorHTMLAttributes<T> {\n /**\n * Label text\n */\n label: string;\n /**\n * Icon name\n */\n icon?: IconicNames;\n iconType?: IconicTypes;\n /**\n * Underlined\n */\n underlined?: boolean;\n /**\n * Additional class names\n */\n className?: string;\n /**\n * Is the link inert (not itself clickable but part of a clickable element)\n */\n inert?: boolean;\n /**\n * Allow giving a custom component\n */\n component?: FunctionComponent<PropsWithChildren<any>> | string;\n}\n\nexport const Link: FunctionComponent<LinkProps> = ({\n label,\n icon,\n component = 'a',\n iconType,\n underlined = true,\n className,\n inert,\n ...anchorAttrs\n}) => {\n const lastSpace = label.lastIndexOf(' ');\n const lastIndex = lastSpace === -1 ? label.length : lastSpace;\n\n const first = label.substring(0, 1);\n const middle = label.substring(1, lastIndex + 1);\n const last = label.substring(lastIndex);\n const Cmp = component as FunctionComponent<PropsWithChildren>;\n\n const TagName = inert ? 'span' : Cmp;\n\n return (\n <TagName\n className={classnames(\n 'text-b3 decoration-none link-container cursor-pointer text-inherit',\n className,\n )}\n data-name=\"Link\"\n {...anchorAttrs}\n >\n <span className={classnames({ 'link-underline': underlined })}>{first}</span>\n <span\n className={classnames('hoverable', {\n 'has-icon': icon,\n 'link-underline': underlined,\n })}\n >\n {middle}\n <span className=\"inline-block\">\n {last}\n {icon && (\n <Icon\n name={icon}\n iconType={iconType}\n width=\"24px\"\n style={{ marginInlineStart: '8px' }}\n />\n )}\n </span>\n </span>\n </TagName>\n );\n};\n"],"names":["Link","label","icon","component","iconType","underlined","className","inert","anchorAttrs","lastSpace","lastIndex","first","middle","last","jsxs","classnames","jsx","Icon"],"mappings":";;;AAkCO,MAAMA,IAAqC,CAAC;AAAA,EACjD,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAYR,EAAM,YAAY,GAAG,GACjCS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