tfy-web-components 0.0.41 → 0.0.43
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/dist/{Button-CHzl5RaT.js → Button-CPJYHldw.js} +3 -2
- package/dist/{Button-CHzl5RaT.js.map → Button-CPJYHldw.js.map} +1 -1
- package/dist/{CompositeItem-BGwD51jI.js → CompositeItem-DJWNsIwE.js} +2 -2
- package/dist/{CompositeItem-BGwD51jI.js.map → CompositeItem-DJWNsIwE.js.map} +1 -1
- package/dist/{CompositeRoot-BxrPc7F6.js → CompositeRoot-BlljDWkR.js} +5 -5
- package/dist/{CompositeRoot-BxrPc7F6.js.map → CompositeRoot-BlljDWkR.js.map} +1 -1
- package/dist/{Input-WdhMjVoF.js → Input-Dcxu6SVO.js} +3 -3
- package/dist/{Input-WdhMjVoF.js.map → Input-Dcxu6SVO.js.map} +1 -1
- package/dist/{Modal-MUzR0rK2.js → Modal-BUWlwJcN.js} +18 -18
- package/dist/{Modal-MUzR0rK2.js.map → Modal-BUWlwJcN.js.map} +1 -1
- package/dist/{Popover-B3yBTSQa.js → Popover-BqqXJnK1.js} +10 -10
- package/dist/{Popover-B3yBTSQa.js.map → Popover-BqqXJnK1.js.map} +1 -1
- package/dist/{Tooltip-D5E-qGtP.js → Tooltip-uQIVdskf.js} +29 -132
- package/dist/{Tooltip-D5E-qGtP.js.map → Tooltip-uQIVdskf.js.map} +1 -1
- package/dist/components/atoms/Accordion.d.ts +20 -4
- package/dist/components/atoms/Accordion.es.js +74 -26
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/Button.d.ts +1 -0
- package/dist/components/atoms/Button.es.js +2 -2
- package/dist/components/atoms/ButtonGroup.d.ts +10 -5
- package/dist/components/atoms/ButtonGroup.es.js +95 -39
- package/dist/components/atoms/ButtonGroup.es.js.map +1 -1
- package/dist/components/atoms/IconButton.es.js +2 -2
- package/dist/components/atoms/Modal.es.js +6 -6
- package/dist/components/atoms/OverflowButton.es.js +2 -2
- package/dist/components/atoms/Switch.es.js +5 -5
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.es.js +6 -6
- package/dist/components/atoms/Tooltip.d.ts +3 -15
- package/dist/components/atoms/Tooltip.es.js +9 -10
- package/dist/components/molecules/Alert.es.js +3 -3
- package/dist/components/molecules/CopyField.es.js +2 -2
- package/dist/components/molecules/CustomDrawer.es.js +1 -1
- package/dist/components/molecules/Dialog.es.js +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +2 -2
- package/dist/components/molecules/Input.es.js +2 -2
- package/dist/components/molecules/Markdown.es.js +2 -2
- package/dist/components/molecules/Markdown.es.js.map +1 -1
- package/dist/components/molecules/SimpleCodeEditor.es.js +2 -2
- package/dist/components/molecules/ToggleButton.es.js +2 -2
- package/dist/components/molecules/agent-chat.es.js +2 -2
- package/dist/{composite-DCpXNxz9.js → composite-BL4bbAWg.js} +2 -2
- package/dist/{composite-DCpXNxz9.js.map → composite-BL4bbAWg.js.map} +1 -1
- package/dist/{composite-CrCQWAKA.js → composite-C22yiNy1.js} +2 -2
- package/dist/{composite-CrCQWAKA.js.map → composite-C22yiNy1.js.map} +1 -1
- package/dist/{index-B806bfA-.js → index-C-2yrwZl.js} +3 -3
- package/dist/{index-B806bfA-.js.map → index-C-2yrwZl.js.map} +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +23 -12
- package/dist/index.es.js.map +1 -1
- package/dist/new-components/atoms/Alert.d.ts +31 -0
- package/dist/new-components/atoms/Alert.es.js +158 -0
- package/dist/new-components/atoms/Alert.es.js.map +1 -0
- package/dist/new-components/atoms/Checkbox.es.js +4 -4
- package/dist/new-components/atoms/EmptyState.d.ts +44 -0
- package/dist/new-components/atoms/EmptyState.es.js +234 -0
- package/dist/new-components/atoms/EmptyState.es.js.map +1 -0
- package/dist/new-components/atoms/Popover.es.js +2 -2
- package/dist/new-components/atoms/Radio.es.js +8 -8
- package/dist/new-components/atoms/SegmentedControl.es.js +4 -4
- package/dist/new-components/atoms/Slider.es.js +5 -5
- package/dist/new-components/atoms/Toast.d.ts +79 -0
- package/dist/new-components/atoms/Toast.es.js +449 -0
- package/dist/new-components/atoms/Toast.es.js.map +1 -0
- package/dist/new-components/atoms/Toggletip.es.js +3 -3
- package/dist/new-components/atoms/Toggletip.es.js.map +1 -1
- package/dist/{shadowDom-Bq4g0Qeu.js → shadowDom-BfewIqRj.js} +2 -2
- package/dist/{shadowDom-Bq4g0Qeu.js.map → shadowDom-BfewIqRj.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/tokens.css +16 -5
- package/dist/{useAriaLabelledBy-B6n92QBS.js → useAriaLabelledBy-Lyj6n_TU.js} +2 -2
- package/dist/{useAriaLabelledBy-B6n92QBS.js.map → useAriaLabelledBy-Lyj6n_TU.js.map} +1 -1
- package/dist/{useBaseUiId-Ch7ujXpo.js → useBaseUiId-CmLtG9DS.js} +4 -4
- package/dist/{useBaseUiId-Ch7ujXpo.js.map → useBaseUiId-CmLtG9DS.js.map} +1 -1
- package/dist/{useButton-PUBhT4Vo.js → useButton-D2BMuSfC.js} +2 -2
- package/dist/{useButton-PUBhT4Vo.js.map → useButton-D2BMuSfC.js.map} +1 -1
- package/dist/{useLabelableId-DCLzrdD-.js → useLabelableId-CcIE3RU0.js} +2 -2
- package/dist/{useLabelableId-DCLzrdD-.js.map → useLabelableId-CcIE3RU0.js.map} +1 -1
- package/dist/{useOpenInteractionType-DGWLoAqp.js → useOpenInteractionType-CDFYOw2d.js} +9 -9
- package/dist/{useOpenInteractionType-DGWLoAqp.js.map → useOpenInteractionType-CDFYOw2d.js.map} +1 -1
- package/dist/{usePopupHandleStore-BdS-xYID.js → usePopupHandleStore-CkW2IoED.js} +32 -32
- package/dist/{usePopupHandleStore-BdS-xYID.js.map → usePopupHandleStore-CkW2IoED.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-B806bfA-.js","sources":["../node_modules/@base-ui/utils/owner.mjs","../node_modules/@base-ui/utils/platform/shared.mjs","../node_modules/@base-ui/utils/platform/env.mjs","../node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs","../node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs","../node_modules/@base-ui/react/floating-ui-react/utils/element.mjs","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}","/**\n * Reads `navigator.userAgent` / `navigator.platform` (legacy but universally\n * supported) into a normalized shape. In development, prefers the modern\n * `navigator.userAgentData` API on Chromium to avoid DevTools warnings about\n * the deprecated reads; that branch is dead-code-eliminated in production\n * builds to keep the bundle small.\n *\n * Returns empty/zero values when `navigator` is undefined (SSR), so every\n * derived flag safely evaluates to `false`.\n */\nfunction readRawData() {\n if (typeof navigator === 'undefined') {\n return {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return {\n userAgent: uaData.brands.map(({\n brand,\n version\n }) => `${brand}/${version}`).join(' '),\n platform: uaData.platform ?? navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? 0\n };\n }\n }\n return {\n userAgent: navigator.userAgent,\n platform: navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? 0\n };\n}\nconst {\n userAgent,\n platform,\n maxTouchPoints\n} = readRawData();\nexport const lowerUserAgent = userAgent.toLowerCase();\nexport const lowerPlatform = platform.toLowerCase();\nexport { maxTouchPoints };","import { lowerUserAgent } from \"./shared.mjs\";\n\n/** Running in jsdom or HappyDOM (used by unit tests). */\nexport const jsdom = /jsdom|happydom/.test(lowerUserAgent);","export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';","import { CommonTriggerDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the corresponding tooltip is open.\n */\nexport const popupOpen = CommonTriggerDataAttributes.popupOpen;\n/**\n * Present when the trigger is disabled, either by the `disabled` prop or by a parent `<Tooltip.Root>` component.\n */\nexport const triggerDisabled = 'data-trigger-disabled';","import { isElement, isHTMLElement } from '@floating-ui/utils/dom';\nimport { platform } from '@base-ui/utils/platform';\nimport { activeElement, closest, contains, getTarget } from '@base-ui/utils/shadowDom';\nimport { FOCUSABLE_ATTRIBUTE, TYPEABLE_SELECTOR } from \"./constants.mjs\";\nimport * as TooltipTriggerDataAttributes from \"../../tooltip/trigger/TooltipTriggerDataAttributes.mjs\";\nexport { activeElement, closest, contains, getTarget };\nexport function isTargetInsideEnabledTrigger(target, triggerElements) {\n if (!isElement(target)) {\n return false;\n }\n const targetElement = target;\n if (triggerElements.hasElement(targetElement)) {\n return !targetElement.hasAttribute(TooltipTriggerDataAttributes.triggerDisabled);\n }\n for (const [, trigger] of triggerElements.entries()) {\n if (contains(trigger, targetElement)) {\n return !trigger.hasAttribute(TooltipTriggerDataAttributes.triggerDisabled);\n }\n }\n return false;\n}\nexport function isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const eventAgain = event;\n return eventAgain.target != null && node.contains(eventAgain.target);\n}\nexport function isRootElement(element) {\n return element.matches('html,body');\n}\nexport function isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nexport function isInteractiveElement(element) {\n return closest(element, `button,a[href],[role=\"button\"],select,[tabindex]:not([tabindex=\"-1\"]),${TYPEABLE_SELECTOR}`) != null;\n}\nexport function isTypeableCombobox(element) {\n if (!element) {\n return false;\n }\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nexport function matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || platform.env.jsdom) {\n return true;\n }\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nexport function getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`) || floatingElement;\n}","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["TooltipTriggerDataAttributes.triggerDisabled","platform.env.jsdom","require$$0","shim","shimModule","require$$1"],"mappings":";;;AACO,SAAS,cAAc,MAAM;AAClC,UAAO,6BAAM,kBAAiB;AAChC;ACOA,SAAS,cAAc;AACrB,MAAI,OAAO,cAAc,aAAa;AACpC,WAAO;AAAA,MACL,WAAW;AAAA,MACX,UAAU;AAAA,MACV,gBAAgB;AAAA,IACtB;AAAA,EACE;AACA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,UAAM,SAAS,UAAU;AACzB,QAAI,UAAU,MAAM,QAAQ,OAAO,MAAM,GAAG;AAC1C,aAAO;AAAA,QACL,WAAW,OAAO,OAAO,IAAI,CAAC;AAAA,UAC5B;AAAA,UACA;AAAA,QACV,MAAc,GAAG,KAAK,IAAI,OAAO,EAAE,EAAE,KAAK,GAAG;AAAA,QACrC,UAAU,OAAO,YAAY,UAAU,YAAY;AAAA,QACnD,gBAAgB,UAAU,kBAAkB;AAAA,MACpD;AAAA,IACI;AAAA,EACF;AACA,SAAO;AAAA,IACL,WAAW,UAAU;AAAA,IACrB,UAAU,UAAU,YAAY;AAAA,IAChC,gBAAgB,UAAU,kBAAkB;AAAA,EAChD;AACA;AACK,MAAC;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AACF,IAAI,YAAW;AACH,MAAC,iBAAiB,UAAU,YAAW;AACvC,MAAC,gBAAgB,SAAS,YAAW;ACxCrC,MAAC,QAAQ,iBAAiB,KAAK,cAAc;ACH7C,MAAC,sBAAsB;AAG5B,MAAM,oBAAoB;ACMrB,MAAC,kBAAkB;ACHxB,SAAS,6BAA6B,QAAQ,iBAAiB;AACpE,MAAI,CAAC,UAAU,MAAM,GAAG;AACtB,WAAO;AAAA,EACT;AACA,QAAM,gBAAgB;AACtB,MAAI,gBAAgB,WAAW,aAAa,GAAG;AAC7C,WAAO,CAAC,cAAc,aAAaA,eAA4C;AAAA,EACjF;AACA,aAAW,CAAA,EAAG,OAA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eACE,OAAO,+BAA+B,+BACxC,+BAA+B,4BAA4B,OAAO;AACpE,QAAI,QAAQD,gBACV,WAAW,eAAe,OAAO,OAAO,KAAK,OAAO,KAAK,IACzD,WAAW,MAAM,UACjB,YAAY,MAAM,WAClB,kBAAkB,MAAM,iBACxB,gBAAgB,MAAM,eACtB,oBAAoB,OACpB,6BAA6B,OAC7BC,QACE,gBAAgB,OAAO,UACvB,gBAAgB,OAAO,OAAO,YAC9B,gBAAgB,OAAO,OAAO,SAAS,gBACnC,yBACA;AACR,yCAAA,uBACE,WAAW,MAAM,uBAAuB,MAAM,uBAAuBA;AACvE,oBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,8BACxC,+BAA+B,2BAA2B,OAAO;AAAA,EACvE,EAAG;;;AC5FH,IAAI,QAAQ,IAAI,aAAa,cAAc;AACzCC,OAAA,UAAiBF,2CAAA;AACnB,OAAO;AACLE,OAAA,UAAiBC,4CAAA;AACnB;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
|
1
|
+
{"version":3,"file":"index-C-2yrwZl.js","sources":["../node_modules/@base-ui/utils/owner.mjs","../node_modules/@base-ui/utils/platform/shared.mjs","../node_modules/@base-ui/utils/platform/env.mjs","../node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs","../node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs","../node_modules/@base-ui/react/floating-ui-react/utils/element.mjs","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}","/**\n * Reads `navigator.userAgent` / `navigator.platform` (legacy but universally\n * supported) into a normalized shape. In development, prefers the modern\n * `navigator.userAgentData` API on Chromium to avoid DevTools warnings about\n * the deprecated reads; that branch is dead-code-eliminated in production\n * builds to keep the bundle small.\n *\n * Returns empty/zero values when `navigator` is undefined (SSR), so every\n * derived flag safely evaluates to `false`.\n */\nfunction readRawData() {\n if (typeof navigator === 'undefined') {\n return {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return {\n userAgent: uaData.brands.map(({\n brand,\n version\n }) => `${brand}/${version}`).join(' '),\n platform: uaData.platform ?? navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? 0\n };\n }\n }\n return {\n userAgent: navigator.userAgent,\n platform: navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? 0\n };\n}\nconst {\n userAgent,\n platform,\n maxTouchPoints\n} = readRawData();\nexport const lowerUserAgent = userAgent.toLowerCase();\nexport const lowerPlatform = platform.toLowerCase();\nexport { maxTouchPoints };","import { lowerUserAgent } from \"./shared.mjs\";\n\n/** Running in jsdom or HappyDOM (used by unit tests). */\nexport const jsdom = /jsdom|happydom/.test(lowerUserAgent);","export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';","import { CommonTriggerDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the corresponding tooltip is open.\n */\nexport const popupOpen = CommonTriggerDataAttributes.popupOpen;\n/**\n * Present when the trigger is disabled, either by the `disabled` prop or by a parent `<Tooltip.Root>` component.\n */\nexport const triggerDisabled = 'data-trigger-disabled';","import { isElement, isHTMLElement } from '@floating-ui/utils/dom';\nimport { platform } from '@base-ui/utils/platform';\nimport { activeElement, closest, contains, getTarget } from '@base-ui/utils/shadowDom';\nimport { FOCUSABLE_ATTRIBUTE, TYPEABLE_SELECTOR } from \"./constants.mjs\";\nimport * as TooltipTriggerDataAttributes from \"../../tooltip/trigger/TooltipTriggerDataAttributes.mjs\";\nexport { activeElement, closest, contains, getTarget };\nexport function isTargetInsideEnabledTrigger(target, triggerElements) {\n if (!isElement(target)) {\n return false;\n }\n const targetElement = target;\n if (triggerElements.hasElement(targetElement)) {\n return !targetElement.hasAttribute(TooltipTriggerDataAttributes.triggerDisabled);\n }\n for (const [, trigger] of triggerElements.entries()) {\n if (contains(trigger, targetElement)) {\n return !trigger.hasAttribute(TooltipTriggerDataAttributes.triggerDisabled);\n }\n }\n return false;\n}\nexport function isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const eventAgain = event;\n return eventAgain.target != null && node.contains(eventAgain.target);\n}\nexport function isRootElement(element) {\n return element.matches('html,body');\n}\nexport function isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nexport function isInteractiveElement(element) {\n return closest(element, `button,a[href],[role=\"button\"],select,[tabindex]:not([tabindex=\"-1\"]),${TYPEABLE_SELECTOR}`) != null;\n}\nexport function isTypeableCombobox(element) {\n if (!element) {\n return false;\n }\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nexport function matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || platform.env.jsdom) {\n return true;\n }\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nexport function getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`) || floatingElement;\n}","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["TooltipTriggerDataAttributes.triggerDisabled","platform.env.jsdom","require$$0","shim","shimModule","require$$1"],"mappings":";;;AACO,SAAS,cAAc,MAAM;AAClC,UAAO,6BAAM,kBAAiB;AAChC;ACOA,SAAS,cAAc;AACrB,MAAI,OAAO,cAAc,aAAa;AACpC,WAAO;AAAA,MACL,WAAW;AAAA,MACX,UAAU;AAAA,MACV,gBAAgB;AAAA,IACtB;AAAA,EACE;AACA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,UAAM,SAAS,UAAU;AACzB,QAAI,UAAU,MAAM,QAAQ,OAAO,MAAM,GAAG;AAC1C,aAAO;AAAA,QACL,WAAW,OAAO,OAAO,IAAI,CAAC;AAAA,UAC5B;AAAA,UACA;AAAA,QACV,MAAc,GAAG,KAAK,IAAI,OAAO,EAAE,EAAE,KAAK,GAAG;AAAA,QACrC,UAAU,OA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OAAA,UAAiBC,4CAAA;AACnB;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,10 +9,14 @@ export { default as Progress, ProgressCircle, ProgressField, ProgressSteps } fro
|
|
|
9
9
|
export type { SpinnerProps, SpinnerSize, SpinnerTone } from './components/atoms/Spinner';
|
|
10
10
|
export { default as Spinner, SpinnerMark } from './components/atoms/Spinner';
|
|
11
11
|
export { default as CustomDrawer } from './components/molecules/CustomDrawer';
|
|
12
|
+
export type { AlertAction, AlertProps } from './new-components/atoms/Alert';
|
|
13
|
+
export { default as Alert, alertVariants } from './new-components/atoms/Alert';
|
|
12
14
|
export type { CheckboxProps } from './new-components/atoms/Checkbox';
|
|
13
15
|
export { default as Checkbox } from './new-components/atoms/Checkbox';
|
|
14
16
|
export type { ChipProps } from './new-components/atoms/Chip';
|
|
15
17
|
export { default as Chip } from './new-components/atoms/Chip';
|
|
18
|
+
export type { EmptyStateAction, EmptyStateLink, EmptyStateProps } from './new-components/atoms/EmptyState';
|
|
19
|
+
export { default as EmptyState, emptyStateVariants } from './new-components/atoms/EmptyState';
|
|
16
20
|
export { Popover, PopoverArrow, PopoverBody, PopoverClose, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverRoot, PopoverTitle, PopoverTrigger, } from './new-components/atoms/Popover';
|
|
17
21
|
export type { RadioGroupProps, RadioProps } from './new-components/atoms/Radio';
|
|
18
22
|
export { default as Radio, RadioGroup } from './new-components/atoms/Radio';
|
|
@@ -20,4 +24,6 @@ export type { SegmentedControlItemProps, SegmentedControlProps } from './new-com
|
|
|
20
24
|
export { default as SegmentedControl, SegmentedControlItem } from './new-components/atoms/SegmentedControl';
|
|
21
25
|
export type { SliderProps } from './new-components/atoms/Slider';
|
|
22
26
|
export { default as Slider } from './new-components/atoms/Slider';
|
|
27
|
+
export type { ToastAppearance, ToastLayout, ToastPager, ToastProps, ToastRawError, ToastStackProps, ToastTimerProps, ToastTone, } from './new-components/atoms/Toast';
|
|
28
|
+
export { default as Toast, ToastStack, ToastTimer, toastVariants } from './new-components/atoms/Toast';
|
|
23
29
|
export { Toggletip, ToggletipActions, ToggletipCode, ToggletipContent, ToggletipDescription, ToggletipHeader, ToggletipInlineCode, ToggletipLink, ToggletipRoot, ToggletipRow, ToggletipRows, ToggletipTitle, ToggletipTrigger, } from './new-components/atoms/Toggletip';
|
package/dist/index.es.js
CHANGED
|
@@ -5,14 +5,18 @@ import { default as default4 } from "./components/atoms/OutlinedRadio.es.js";
|
|
|
5
5
|
import { Progress, ProgressCircle, ProgressField, ProgressSteps } from "./components/atoms/Progress.es.js";
|
|
6
6
|
import { default as default5, SpinnerMark } from "./components/atoms/Spinner.es.js";
|
|
7
7
|
import { default as default6 } from "./components/molecules/CustomDrawer.es.js";
|
|
8
|
-
import { default as default7 } from "./new-components/atoms/
|
|
9
|
-
import { default as default8 } from "./new-components/atoms/
|
|
10
|
-
import {
|
|
11
|
-
import { default as
|
|
12
|
-
import {
|
|
13
|
-
import { default as default11 } from "./new-components/atoms/
|
|
8
|
+
import { default as default7, alertVariants } from "./new-components/atoms/Alert.es.js";
|
|
9
|
+
import { default as default8 } from "./new-components/atoms/Checkbox.es.js";
|
|
10
|
+
import { default as default9 } from "./new-components/atoms/Chip.es.js";
|
|
11
|
+
import { default as default10, emptyStateVariants } from "./new-components/atoms/EmptyState.es.js";
|
|
12
|
+
import { P, a, b, c, d, e, f, g, h, i, j } from "./Popover-BqqXJnK1.js";
|
|
13
|
+
import { default as default11, RadioGroup } from "./new-components/atoms/Radio.es.js";
|
|
14
|
+
import { default as default12, SegmentedControlItem } from "./new-components/atoms/SegmentedControl.es.js";
|
|
15
|
+
import { default as default13 } from "./new-components/atoms/Slider.es.js";
|
|
16
|
+
import { default as default14, ToastStack, ToastTimer, toastVariants } from "./new-components/atoms/Toast.es.js";
|
|
14
17
|
import { Toggletip, ToggletipActions, ToggletipCode, ToggletipContent, ToggletipDescription, ToggletipHeader, ToggletipInlineCode, ToggletipLink, ToggletipRoot, ToggletipRow, ToggletipRows, ToggletipTitle, ToggletipTrigger } from "./new-components/atoms/Toggletip.es.js";
|
|
15
18
|
export {
|
|
19
|
+
default7 as Alert,
|
|
16
20
|
Avatar,
|
|
17
21
|
AvatarBadge,
|
|
18
22
|
AvatarFallback,
|
|
@@ -20,9 +24,10 @@ export {
|
|
|
20
24
|
AvatarGroupCount,
|
|
21
25
|
AvatarImage,
|
|
22
26
|
default2 as Badge,
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
default8 as Checkbox,
|
|
28
|
+
default9 as Chip,
|
|
25
29
|
default6 as CustomDrawer,
|
|
30
|
+
default10 as EmptyState,
|
|
26
31
|
default3 as Logo,
|
|
27
32
|
default4 as OutlinedRadio,
|
|
28
33
|
P as Popover,
|
|
@@ -40,13 +45,16 @@ export {
|
|
|
40
45
|
ProgressCircle,
|
|
41
46
|
ProgressField,
|
|
42
47
|
ProgressSteps,
|
|
43
|
-
|
|
48
|
+
default11 as Radio,
|
|
44
49
|
RadioGroup,
|
|
45
|
-
|
|
50
|
+
default12 as SegmentedControl,
|
|
46
51
|
SegmentedControlItem,
|
|
47
|
-
|
|
52
|
+
default13 as Slider,
|
|
48
53
|
default5 as Spinner,
|
|
49
54
|
SpinnerMark,
|
|
55
|
+
default14 as Toast,
|
|
56
|
+
ToastStack,
|
|
57
|
+
ToastTimer,
|
|
50
58
|
Toggletip,
|
|
51
59
|
ToggletipActions,
|
|
52
60
|
ToggletipCode,
|
|
@@ -59,6 +67,9 @@ export {
|
|
|
59
67
|
ToggletipRow,
|
|
60
68
|
ToggletipRows,
|
|
61
69
|
ToggletipTitle,
|
|
62
|
-
ToggletipTrigger
|
|
70
|
+
ToggletipTrigger,
|
|
71
|
+
alertVariants,
|
|
72
|
+
emptyStateVariants,
|
|
73
|
+
toastVariants
|
|
63
74
|
};
|
|
64
75
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type IconProp } from '../../components/atoms/IconProvider';
|
|
4
|
+
declare const alertVariants: (props?: ({
|
|
5
|
+
appearance?: "inline" | "banner" | "plain" | "attached" | null | undefined;
|
|
6
|
+
tone?: "info" | "warning" | "neutral" | "success" | "error" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type AlertTone = NonNullable<VariantProps<typeof alertVariants>['tone']>;
|
|
9
|
+
type AlertAppearance = NonNullable<VariantProps<typeof alertVariants>['appearance']>;
|
|
10
|
+
export type AlertAction = {
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type AlertProps = Omit<React.ComponentProps<'div'>, 'title'> & {
|
|
17
|
+
tone?: AlertTone;
|
|
18
|
+
appearance?: AlertAppearance;
|
|
19
|
+
iconSize?: 16 | 24;
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
description?: React.ReactNode;
|
|
22
|
+
icon?: IconProp | false;
|
|
23
|
+
action?: AlertAction;
|
|
24
|
+
secondaryAction?: AlertAction;
|
|
25
|
+
onDismiss?: () => void;
|
|
26
|
+
dismissLabel?: string;
|
|
27
|
+
live?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare function Alert({ ref, tone, appearance, iconSize, title, description, icon, action, secondaryAction, onDismiss, dismissLabel, live, children, role, className, ...props }: AlertProps): React.JSX.Element;
|
|
30
|
+
export { alertVariants };
|
|
31
|
+
export default Alert;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c as cva } from "../../index-DSVg79g-.js";
|
|
3
|
+
import { faCircleXmark, faTriangleExclamation, faCircleCheck, faCircleInfo, faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { C as ControlButton } from "../../Button-CPJYHldw.js";
|
|
5
|
+
import IconButton from "../../components/atoms/IconButton.es.js";
|
|
6
|
+
import IconProvider, { iconFrame } from "../../components/atoms/IconProvider.es.js";
|
|
7
|
+
import { c as classNames } from "../../classNames-B1XpQHle.js";
|
|
8
|
+
const alertVariants = cva("flex w-full items-start gap-space-8 text-text-primary", {
|
|
9
|
+
variants: {
|
|
10
|
+
appearance: {
|
|
11
|
+
inline: "rounded-control border p-space-12",
|
|
12
|
+
attached: "rounded-control p-space-8",
|
|
13
|
+
banner: "border-b px-space-16 py-space-12",
|
|
14
|
+
plain: "p-0"
|
|
15
|
+
},
|
|
16
|
+
tone: {
|
|
17
|
+
neutral: "border-status-border-neutral bg-status-background-neutral",
|
|
18
|
+
info: "border-status-border-info bg-status-background-info",
|
|
19
|
+
success: "border-status-border-success bg-status-background-success",
|
|
20
|
+
warning: "border-status-border-warning bg-status-background-warning",
|
|
21
|
+
error: "border-status-border-error bg-status-background-error"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
compoundVariants: [
|
|
25
|
+
{
|
|
26
|
+
appearance: "plain",
|
|
27
|
+
className: "border-0 bg-transparent"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
appearance: "inline",
|
|
32
|
+
tone: "neutral"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const TONE_ICON = {
|
|
36
|
+
neutral: { icon: faCircleInfo, className: "text-status-icon-neutral" },
|
|
37
|
+
info: { icon: faCircleInfo, className: "text-status-icon-info" },
|
|
38
|
+
success: { icon: faCircleCheck, className: "text-status-text-success" },
|
|
39
|
+
warning: { icon: faTriangleExclamation, className: "text-status-icon-warning-bold" },
|
|
40
|
+
error: { icon: faCircleXmark, className: "text-status-icon-error" }
|
|
41
|
+
};
|
|
42
|
+
function AlertActions({
|
|
43
|
+
action,
|
|
44
|
+
secondaryAction,
|
|
45
|
+
trailing
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "alert-actions", className: classNames("flex gap-space-8", trailing && "shrink-0"), children: [
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
ControlButton,
|
|
50
|
+
{
|
|
51
|
+
variant: "secondary",
|
|
52
|
+
size: "md",
|
|
53
|
+
htmlType: "button",
|
|
54
|
+
onClick: action.onClick,
|
|
55
|
+
disabled: action.disabled,
|
|
56
|
+
loading: action.loading,
|
|
57
|
+
className: "bg-background-page text-text-primary ring-border-default",
|
|
58
|
+
children: action.label
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
secondaryAction ? /* @__PURE__ */ jsx(
|
|
62
|
+
ControlButton,
|
|
63
|
+
{
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
size: "md",
|
|
66
|
+
htmlType: "button",
|
|
67
|
+
onClick: secondaryAction.onClick,
|
|
68
|
+
disabled: secondaryAction.disabled,
|
|
69
|
+
loading: secondaryAction.loading,
|
|
70
|
+
children: secondaryAction.label
|
|
71
|
+
}
|
|
72
|
+
) : null
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
function Alert({
|
|
76
|
+
ref,
|
|
77
|
+
tone = "neutral",
|
|
78
|
+
appearance = "inline",
|
|
79
|
+
iconSize = 16,
|
|
80
|
+
title,
|
|
81
|
+
description,
|
|
82
|
+
icon,
|
|
83
|
+
action,
|
|
84
|
+
secondaryAction,
|
|
85
|
+
onDismiss,
|
|
86
|
+
dismissLabel = "Dismiss",
|
|
87
|
+
live = false,
|
|
88
|
+
children,
|
|
89
|
+
role,
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
const toneIcon = TONE_ICON[tone];
|
|
94
|
+
const resolvedIcon = icon === void 0 ? toneIcon.icon : icon;
|
|
95
|
+
const resolvedDescription = description ?? children;
|
|
96
|
+
const trailingActions = appearance === "attached" || appearance === "banner";
|
|
97
|
+
const liveRole = live ? tone === "error" || tone === "warning" ? "alert" : "status" : void 0;
|
|
98
|
+
return /* @__PURE__ */ jsxs(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
ref,
|
|
102
|
+
role: role ?? liveRole,
|
|
103
|
+
"data-slot": "alert",
|
|
104
|
+
"data-tone": tone,
|
|
105
|
+
"data-appearance": appearance,
|
|
106
|
+
...props,
|
|
107
|
+
className: classNames(alertVariants({ appearance, tone }), className),
|
|
108
|
+
children: [
|
|
109
|
+
resolvedIcon !== false ? /* @__PURE__ */ jsx(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
"aria-hidden": true,
|
|
113
|
+
"data-slot": "alert-icon",
|
|
114
|
+
className: classNames(
|
|
115
|
+
"relative shrink-0",
|
|
116
|
+
iconSize === 16 ? "flex h-5 w-4 items-center justify-center" : "size-5",
|
|
117
|
+
toneIcon.className
|
|
118
|
+
),
|
|
119
|
+
children: /* @__PURE__ */ jsx(
|
|
120
|
+
IconProvider,
|
|
121
|
+
{
|
|
122
|
+
icon: resolvedIcon,
|
|
123
|
+
size: iconSize === 16 ? iconFrame["16"].glyph : iconFrame["24"].glyph,
|
|
124
|
+
className: classNames(iconSize === 24 && "absolute -left-0.5 -top-0.5")
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
) : null,
|
|
129
|
+
/* @__PURE__ */ jsxs("div", { "data-slot": "alert-content", className: "flex min-w-0 flex-1 flex-col gap-space-8", children: [
|
|
130
|
+
title != null || resolvedDescription != null ? /* @__PURE__ */ jsxs("div", { "data-slot": "alert-text", className: "flex w-full flex-col gap-space-2 break-words", children: [
|
|
131
|
+
title != null ? /* @__PURE__ */ jsx("div", { "data-slot": "alert-title", className: "text-label-md", children: title }) : null,
|
|
132
|
+
resolvedDescription != null ? /* @__PURE__ */ jsx("div", { "data-slot": "alert-description", className: "text-body-sm", children: resolvedDescription }) : null
|
|
133
|
+
] }) : null,
|
|
134
|
+
action && !trailingActions ? /* @__PURE__ */ jsx(AlertActions, { action, secondaryAction, trailing: false }) : null
|
|
135
|
+
] }),
|
|
136
|
+
action && trailingActions ? /* @__PURE__ */ jsx(AlertActions, { action, secondaryAction, trailing: true }) : null,
|
|
137
|
+
onDismiss ? /* @__PURE__ */ jsx(
|
|
138
|
+
IconButton,
|
|
139
|
+
{
|
|
140
|
+
"data-slot": "alert-dismiss",
|
|
141
|
+
variant: "ghost",
|
|
142
|
+
size: "md",
|
|
143
|
+
icon: faXmark,
|
|
144
|
+
iconSize: iconFrame["16"].glyph,
|
|
145
|
+
"aria-label": dismissLabel,
|
|
146
|
+
onClick: onDismiss,
|
|
147
|
+
className: "shrink-0"
|
|
148
|
+
}
|
|
149
|
+
) : null
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
alertVariants,
|
|
156
|
+
Alert as default
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=Alert.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.es.js","sources":["../../../src/new-components/atoms/Alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {\n faCircleCheck,\n faCircleInfo,\n faCircleXmark,\n faTriangleExclamation,\n faXmark,\n} from '@fortawesome/free-solid-svg-icons'\n\nimport { ControlButton } from '@/components/atoms/Button'\nimport IconButton from '@/components/atoms/IconButton'\nimport IconProvider, { iconFrame, type IconProp } from '@/components/atoms/IconProvider'\nimport { cn } from '@/lib/utils'\n\nconst alertVariants = cva('flex w-full items-start gap-space-8 text-text-primary', {\n variants: {\n appearance: {\n inline: 'rounded-control border p-space-12',\n attached: 'rounded-control p-space-8',\n banner: 'border-b px-space-16 py-space-12',\n plain: 'p-0',\n },\n tone: {\n neutral: 'border-status-border-neutral bg-status-background-neutral',\n info: 'border-status-border-info bg-status-background-info',\n success: 'border-status-border-success bg-status-background-success',\n warning: 'border-status-border-warning bg-status-background-warning',\n error: 'border-status-border-error bg-status-background-error',\n },\n },\n compoundVariants: [\n {\n appearance: 'plain',\n className: 'border-0 bg-transparent',\n },\n ],\n defaultVariants: {\n appearance: 'inline',\n tone: 'neutral',\n },\n})\n\ntype AlertTone = NonNullable<VariantProps<typeof alertVariants>['tone']>\ntype AlertAppearance = NonNullable<VariantProps<typeof alertVariants>['appearance']>\n\nconst TONE_ICON = {\n neutral: { icon: faCircleInfo, className: 'text-status-icon-neutral' },\n info: { icon: faCircleInfo, className: 'text-status-icon-info' },\n success: { icon: faCircleCheck, className: 'text-status-text-success' },\n warning: { icon: faTriangleExclamation, className: 'text-status-icon-warning-bold' },\n error: { icon: faCircleXmark, className: 'text-status-icon-error' },\n} as const satisfies Record<AlertTone, { icon: IconProp; className: string }>\n\nexport type AlertAction = {\n label: React.ReactNode\n onClick?: React.MouseEventHandler<HTMLButtonElement>\n disabled?: boolean\n loading?: boolean\n}\n\nexport type AlertProps = Omit<React.ComponentProps<'div'>, 'title'> & {\n tone?: AlertTone\n appearance?: AlertAppearance\n iconSize?: 16 | 24\n title?: React.ReactNode\n description?: React.ReactNode\n icon?: IconProp | false\n action?: AlertAction\n secondaryAction?: AlertAction\n onDismiss?: () => void\n dismissLabel?: string\n live?: boolean\n}\n\nfunction AlertActions({\n action,\n secondaryAction,\n trailing,\n}: {\n action: AlertAction\n secondaryAction?: AlertAction\n trailing: boolean\n}) {\n return (\n <div data-slot=\"alert-actions\" className={cn('flex gap-space-8', trailing && 'shrink-0')}>\n <ControlButton\n variant=\"secondary\"\n size=\"md\"\n htmlType=\"button\"\n onClick={action.onClick}\n disabled={action.disabled}\n loading={action.loading}\n className=\"bg-background-page text-text-primary ring-border-default\"\n >\n {action.label}\n </ControlButton>\n {secondaryAction ? (\n <ControlButton\n variant=\"ghost\"\n size=\"md\"\n htmlType=\"button\"\n onClick={secondaryAction.onClick}\n disabled={secondaryAction.disabled}\n loading={secondaryAction.loading}\n >\n {secondaryAction.label}\n </ControlButton>\n ) : null}\n </div>\n )\n}\n\nfunction Alert({\n ref,\n tone = 'neutral',\n appearance = 'inline',\n iconSize = 16,\n title,\n description,\n icon,\n action,\n secondaryAction,\n onDismiss,\n dismissLabel = 'Dismiss',\n live = false,\n children,\n role,\n className,\n ...props\n}: AlertProps) {\n const toneIcon = TONE_ICON[tone]\n const resolvedIcon = icon === undefined ? toneIcon.icon : icon\n const resolvedDescription = description ?? children\n const trailingActions = appearance === 'attached' || appearance === 'banner'\n const liveRole = live ? (tone === 'error' || tone === 'warning' ? 'alert' : 'status') : undefined\n\n return (\n <div\n ref={ref}\n role={role ?? liveRole}\n data-slot=\"alert\"\n data-tone={tone}\n data-appearance={appearance}\n {...props}\n className={cn(alertVariants({ appearance, tone }), className)}\n >\n {resolvedIcon !== false ? (\n <span\n aria-hidden\n data-slot=\"alert-icon\"\n className={cn(\n 'relative shrink-0',\n iconSize === 16 ? 'flex h-5 w-4 items-center justify-center' : 'size-5',\n toneIcon.className,\n )}\n >\n <IconProvider\n icon={resolvedIcon}\n size={iconSize === 16 ? iconFrame['16'].glyph : iconFrame['24'].glyph}\n className={cn(iconSize === 24 && 'absolute -left-0.5 -top-0.5')}\n />\n </span>\n ) : null}\n\n <div data-slot=\"alert-content\" className=\"flex min-w-0 flex-1 flex-col gap-space-8\">\n {title != null || resolvedDescription != null ? (\n <div data-slot=\"alert-text\" className=\"flex w-full flex-col gap-space-2 break-words\">\n {title != null ? (\n <div data-slot=\"alert-title\" className=\"text-label-md\">\n {title}\n </div>\n ) : null}\n {resolvedDescription != null ? (\n <div data-slot=\"alert-description\" className=\"text-body-sm\">\n {resolvedDescription}\n </div>\n ) : null}\n </div>\n ) : null}\n\n {action && !trailingActions ? (\n <AlertActions action={action} secondaryAction={secondaryAction} trailing={false} />\n ) : null}\n </div>\n\n {action && trailingActions ? <AlertActions action={action} secondaryAction={secondaryAction} trailing /> : null}\n\n {onDismiss ? (\n <IconButton\n data-slot=\"alert-dismiss\"\n variant=\"ghost\"\n size=\"md\"\n icon={faXmark}\n iconSize={iconFrame['16'].glyph}\n aria-label={dismissLabel}\n onClick={onDismiss}\n className=\"shrink-0\"\n />\n ) : null}\n </div>\n )\n}\n\nexport { alertVariants }\nexport default Alert\n"],"names":["cn"],"mappings":";;;;;;;AAeA,MAAM,gBAAgB,IAAI,yDAAyD;AAAA,EACjF,UAAU;AAAA,IACR,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,IAAA;AAAA,IAET,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,kBAAkB;AAAA,IAChB;AAAA,MACE,YAAY;AAAA,MACZ,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,MAAM;AAAA,EAAA;AAEV,CAAC;AAKD,MAAM,YAAY;AAAA,EAChB,SAAS,EAAE,MAAM,cAAc,WAAW,2BAAA;AAAA,EAC1C,MAAM,EAAE,MAAM,cAAc,WAAW,wBAAA;AAAA,EACvC,SAAS,EAAE,MAAM,eAAe,WAAW,2BAAA;AAAA,EAC3C,SAAS,EAAE,MAAM,uBAAuB,WAAW,gCAAA;AAAA,EACnD,OAAO,EAAE,MAAM,eAAe,WAAW,yBAAA;AAC3C;AAuBA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACE,qBAAC,SAAI,aAAU,iBAAgB,WAAWA,WAAG,oBAAoB,YAAY,UAAU,GACr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as mergeProps, d as EMPTY_OBJECT, b as useRenderElement } from "../../useIsoLayoutEffect-e9VA-ICd.js";
|
|
7
7
|
import { u as useControlled } from "../../useControlled-BSyYkg5C.js";
|
|
8
8
|
import { v as visuallyHiddenInput, a as visuallyHidden } from "../../visuallyHidden-B6H2X3_Y.js";
|
|
9
|
-
import { f as fieldValidityMapping, u as useFormContext, a as useFieldRootContext, b as useLabelableContext, d as useLabelableId, c as useSetFieldFocused, e as useRegisterFieldControl, g as useValueChanged } from "../../useLabelableId-
|
|
10
|
-
import { a as useButton, d as dispatchClickWithModifiers } from "../../useButton-
|
|
11
|
-
import { u as useBaseUiId, c as createChangeEventDetails, n as none, g as getWindow } from "../../useBaseUiId-
|
|
9
|
+
import { f as fieldValidityMapping, u as useFormContext, a as useFieldRootContext, b as useLabelableContext, d as useLabelableId, c as useSetFieldFocused, e as useRegisterFieldControl, g as useValueChanged } from "../../useLabelableId-CcIE3RU0.js";
|
|
10
|
+
import { a as useButton, d as dispatchClickWithModifiers } from "../../useButton-D2BMuSfC.js";
|
|
11
|
+
import { u as useBaseUiId, c as createChangeEventDetails, n as none, g as getWindow } from "../../useBaseUiId-CmLtG9DS.js";
|
|
12
12
|
import { u as useFieldItemContext } from "../../FieldItemContext-DRVgx-D1.js";
|
|
13
|
-
import { u as useAriaLabelledBy } from "../../useAriaLabelledBy-
|
|
13
|
+
import { u as useAriaLabelledBy } from "../../useAriaLabelledBy-Lyj6n_TU.js";
|
|
14
14
|
import { u as useTransitionStatus, a as useOpenChangeComplete, t as transitionStatusMapping } from "../../useTransitionStatus-C9gg_XJ-.js";
|
|
15
15
|
function getDefaultFormSubmitter(form) {
|
|
16
16
|
if (!form) {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type IconProp } from '../../components/atoms/IconProvider';
|
|
4
|
+
declare const emptyStateVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "lg" | "md" | null | undefined;
|
|
6
|
+
surface?: "grid" | "none" | "filled" | "outline" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type EmptyStateSize = NonNullable<VariantProps<typeof emptyStateVariants>['size']>;
|
|
9
|
+
type EmptyStateSurface = NonNullable<VariantProps<typeof emptyStateVariants>['surface']>;
|
|
10
|
+
type EmptyStateMediaType = 'none' | 'icon' | 'illustration' | 'avatar' | 'avatar-group';
|
|
11
|
+
type EmptyStateTitleElement = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
12
|
+
export type EmptyStateAction = {
|
|
13
|
+
label: React.ReactNode;
|
|
14
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
variant?: 'primary' | 'secondary';
|
|
18
|
+
};
|
|
19
|
+
export type EmptyStateLink = {
|
|
20
|
+
label: React.ReactNode;
|
|
21
|
+
href: string;
|
|
22
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
23
|
+
rel?: string;
|
|
24
|
+
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
25
|
+
};
|
|
26
|
+
export type EmptyStateProps = Omit<React.ComponentProps<'section'>, 'children' | 'title'> & {
|
|
27
|
+
size?: EmptyStateSize;
|
|
28
|
+
surface?: EmptyStateSurface;
|
|
29
|
+
media?: EmptyStateMediaType;
|
|
30
|
+
icon?: IconProp;
|
|
31
|
+
illustration?: React.ReactNode;
|
|
32
|
+
avatar?: React.ReactNode;
|
|
33
|
+
avatars?: React.ReactNode;
|
|
34
|
+
title: React.ReactNode;
|
|
35
|
+
titleAs?: EmptyStateTitleElement;
|
|
36
|
+
description?: React.ReactNode;
|
|
37
|
+
action?: EmptyStateAction;
|
|
38
|
+
secondaryAction?: Omit<EmptyStateAction, 'variant'>;
|
|
39
|
+
link?: EmptyStateLink;
|
|
40
|
+
live?: boolean;
|
|
41
|
+
};
|
|
42
|
+
declare function EmptyState({ ref, size, surface, media, icon, illustration, avatar, avatars, title, titleAs: Title, description, action, secondaryAction, link, live, className, 'aria-labelledby': ariaLabelledBy, ...props }: EmptyStateProps): React.JSX.Element;
|
|
43
|
+
export { emptyStateVariants };
|
|
44
|
+
export default EmptyState;
|