@kismet-ux/constellation 1.14.0 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +227 -208
  2. package/dist/form/Checkbox/checkbox.js +4 -57
  3. package/dist/form/Checkbox/checkbox.js.map +1 -1
  4. package/dist/form/DatePicker/date-picker.d.ts +1 -1
  5. package/dist/form/DatePicker/date-picker.d.ts.map +1 -1
  6. package/dist/form/DatePicker/date-picker.js +7 -59
  7. package/dist/form/DatePicker/date-picker.js.map +1 -1
  8. package/dist/form/Input/input.css +42 -6
  9. package/dist/form/Input/input.d.ts +6 -0
  10. package/dist/form/Input/input.d.ts.map +1 -1
  11. package/dist/form/Input/input.js +3 -3
  12. package/dist/form/Input/input.js.map +1 -1
  13. package/dist/form/Input/input.module.scss.js +1 -1
  14. package/dist/form/Select/select.d.ts.map +1 -1
  15. package/dist/form/Select/select.js +5 -5
  16. package/dist/form/Select/select.js.map +1 -1
  17. package/dist/form.d.ts +2 -2
  18. package/dist/index-B0UMInYo.d.ts +647 -0
  19. package/dist/index-B828Nf0P.d.ts +200 -0
  20. package/dist/index-BPKtGvrM.d.ts +200 -0
  21. package/dist/index-BdpiAK5-.d.ts +354 -0
  22. package/dist/index-ByI9bvw8.d.ts +647 -0
  23. package/dist/index-C7SAfZfl.d.ts +647 -0
  24. package/dist/index-Cq8JgMRD.d.ts +354 -0
  25. package/dist/index-D8p7TX9C.d.ts +200 -0
  26. package/dist/index-DyDvelCa.d.ts +354 -0
  27. package/dist/index.d.ts +8 -8
  28. package/dist/index.js +29 -29
  29. package/dist/input-BHmlHvYR.d.ts +58 -0
  30. package/dist/layout/AppSidebarHeader/app-sidebar-header.js +1 -31
  31. package/dist/layout/AppSidebarHeader/app-sidebar-header.js.map +1 -1
  32. package/dist/layout.d.ts +3 -3
  33. package/dist/navigation/NavUser/nav-user.js +2 -2
  34. package/dist/navigation/Router/router-context.d.ts +13 -5
  35. package/dist/navigation/Router/router-context.d.ts.map +1 -1
  36. package/dist/navigation/Router/router-context.js +22 -5
  37. package/dist/navigation/Router/router-context.js.map +1 -1
  38. package/dist/navigation/Sheet/sheet.js +3 -30
  39. package/dist/navigation/Sheet/sheet.js.map +1 -1
  40. package/dist/navigation.d.ts +15 -7
  41. package/dist/settings/AppearanceTabs/appearance-tabs.js +1 -28
  42. package/dist/settings/AppearanceTabs/appearance-tabs.js.map +1 -1
  43. package/dist/tooltip-Cw8p0qeV.d.ts +46 -0
  44. package/dist/types/form/date-picker.d.ts +2 -0
  45. package/dist/types/form/date-picker.d.ts.map +1 -1
  46. package/dist/types/form/select.d.ts +2 -0
  47. package/dist/types/form/select.d.ts.map +1 -1
  48. package/dist/types/form/theme.d.ts +9 -0
  49. package/dist/types/form/theme.d.ts.map +1 -1
  50. package/dist/typography/Typography/typography.css +21 -1
  51. package/dist/ui/Button/button-variants.d.ts +1 -1
  52. package/dist/ui/Button/button.css +1 -1
  53. package/dist/ui/Icon/icon-variants.d.ts +1 -1
  54. package/dist/ui/SwipeRow/swipe-row-variants.js.map +1 -1
  55. package/dist/ui/SwipeRow/swipe-row.js.map +1 -1
  56. package/dist/ui/Toggle/toggle-variants.d.ts +1 -1
  57. package/dist/ui.d.ts +2 -2
  58. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"swipe-row.js","sources":["../../../src/ui/SwipeRow/swipe-row.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\r\nimport cn from 'clsx';\r\nimport * as React from 'react';\r\nimport { swipeRowVariants } from './swipe-row-variants';\r\nimport s from './swipe-row.module.scss';\r\n\r\n/*\r\n * Swipe left to act on a row, the way a phone's own lists do.\r\n *\r\n * Short swipe: the row rests open on its action, and a tap on the action does\r\n * it. Long swipe, past half the row: it is done on release. A tap anywhere\r\n * else on an open row only closes it, so a swipe cannot also open what the row\r\n * opens.\r\n *\r\n * Touch and pen only. A mouse drag is how text gets selected, and a desktop\r\n * already has the row's own button one click away. A swipe row is an\r\n * accelerator, never the only way to the action.\r\n *\r\n * ⚠️ No transform at rest. A transformed ancestor becomes the containing block\r\n * for `position: fixed` children, so a card that lifts out of its row would\r\n * centre itself in the row instead of on the screen. The offset is written\r\n * only while the row is off centre and removed at zero.\r\n *\r\n * ⚠️ `touch-action: pan-y` gives vertical scrolling to the browser and leaves\r\n * horizontal movement to us. A gesture is not claimed until it has clearly\r\n * gone sideways, so a slightly diagonal scroll still scrolls.\r\n */\r\nconst DECIDE_PX = 8;\r\nconst REST_PX = 88;\r\nconst OPEN_AT_PX = 56;\r\nconst COMMIT_SHARE = 0.5;\r\nconst LEAVE_MS = 160;\r\nconst SWALLOW_MS = 350;\r\nconst FIELD_SELECTOR = 'input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])';\r\n\r\ntype Gesture = { x: number; y: number; base: number; claimed: boolean; id: number };\r\n\r\nexport interface SwipeRowProps\r\n extends\r\n Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>,\r\n VariantProps<typeof swipeRowVariants> {\r\n children: React.ReactNode;\r\n /** What the revealed action says. */\r\n label?: React.ReactNode;\r\n /** Runs once the row has slid away, from a long swipe or a tap on the action. */\r\n onAction: () => void;\r\n disabled?: boolean;\r\n}\r\n\r\nconst SwipeRow = React.forwardRef<HTMLDivElement, SwipeRowProps>(\r\n ({ children, label = 'Delete', onAction, disabled, theme, className, ...props }, ref) => {\r\n const root = React.useRef<HTMLDivElement | null>(null);\r\n const content = React.useRef<HTMLDivElement | null>(null);\r\n const gesture = React.useRef<Gesture | null>(null);\r\n const swallowUntil = React.useRef(0);\r\n const [offset, setOffset] = React.useState(0);\r\n const [settling, setSettling] = React.useState(false);\r\n const [leaving, setLeaving] = React.useState(false);\r\n\r\n const setRoot = (el: HTMLDivElement | null) => {\r\n root.current = el;\r\n if (typeof ref === 'function') ref(el);\r\n else if (ref) ref.current = el;\r\n };\r\n\r\n const width = () => root.current?.offsetWidth || 320;\r\n\r\n const moveTo = (x: number) => {\r\n setOffset(x);\r\n const el = content.current;\r\n if (!el) return;\r\n if (x) el.style.transform = `translateX(${x}px)`;\r\n else el.style.removeProperty('transform');\r\n };\r\n\r\n // A row resting open closes when anything else on the page is touched.\r\n React.useEffect(() => {\r\n if (!offset || gesture.current || leaving) return undefined;\r\n const away = (e: PointerEvent) => {\r\n if (root.current?.contains(e.target as Node)) return;\r\n setSettling(true);\r\n moveTo(0);\r\n };\r\n document.addEventListener('pointerdown', away, true);\r\n return () => document.removeEventListener('pointerdown', away, true);\r\n }, [offset, leaving]);\r\n\r\n React.useEffect(() => {\r\n if (disabled && offset && !leaving) moveTo(0);\r\n }, [disabled, offset, leaving]);\r\n\r\n // The action that runs is the one current when the slide ends, not the one\r\n // the slide started under.\r\n const action = React.useRef(onAction);\r\n action.current = onAction;\r\n\r\n // The host removes the row on action; if it keeps it instead (a staple\r\n // marked out stays on its shelf), the row comes back to centre.\r\n React.useEffect(() => {\r\n if (!leaving) return undefined;\r\n const t = window.setTimeout(() => {\r\n action.current();\r\n setLeaving(false);\r\n setSettling(false);\r\n moveTo(0);\r\n }, LEAVE_MS);\r\n return () => window.clearTimeout(t);\r\n }, [leaving]);\r\n\r\n const commit = () => {\r\n setSettling(true);\r\n setLeaving(true);\r\n moveTo(-width());\r\n };\r\n\r\n const onPointerDown = (e: React.PointerEvent<HTMLDivElement>) => {\r\n props.onPointerDown?.(e);\r\n if (disabled || leaving || e.pointerType === 'mouse' || !e.isPrimary) return;\r\n // A drag inside a field moves its caret or selection; it is not a swipe.\r\n if ((e.target as Element).closest?.(FIELD_SELECTOR)) return;\r\n gesture.current = {\r\n x: e.clientX,\r\n y: e.clientY,\r\n base: offset,\r\n claimed: false,\r\n id: e.pointerId,\r\n };\r\n setSettling(false);\r\n };\r\n\r\n const onPointerMove = (e: React.PointerEvent<HTMLDivElement>) => {\r\n props.onPointerMove?.(e);\r\n const g = gesture.current;\r\n if (!g || e.pointerId !== g.id) return;\r\n const dx = e.clientX - g.x;\r\n const dy = e.clientY - g.y;\r\n if (!g.claimed) {\r\n if (Math.abs(dy) > DECIDE_PX && Math.abs(dy) > Math.abs(dx)) {\r\n gesture.current = null;\r\n return;\r\n }\r\n if (Math.abs(dx) < DECIDE_PX || Math.abs(dx) < Math.abs(dy) * 1.2) return;\r\n g.claimed = true;\r\n root.current?.setPointerCapture?.(e.pointerId);\r\n }\r\n moveTo(Math.min(0, g.base + dx));\r\n };\r\n\r\n const onPointerEnd = (e: React.PointerEvent<HTMLDivElement>) => {\r\n if (e.type === 'pointerup') props.onPointerUp?.(e);\r\n else props.onPointerCancel?.(e);\r\n const g = gesture.current;\r\n gesture.current = null;\r\n if (!g || e.pointerId !== g.id) return;\r\n if (!g.claimed) {\r\n // A plain tap on a row resting open closes it rather than opening it.\r\n if (g.base) {\r\n swallowUntil.current = performance.now() + SWALLOW_MS;\r\n setSettling(true);\r\n moveTo(0);\r\n }\r\n return;\r\n }\r\n swallowUntil.current = performance.now() + SWALLOW_MS;\r\n setSettling(true);\r\n if (e.type !== 'pointercancel' && offset < -width() * COMMIT_SHARE) commit();\r\n else moveTo(offset < -OPEN_AT_PX ? -REST_PX : 0);\r\n };\r\n\r\n // The click a swipe ends with belongs to the swipe, not to the row under it.\r\n // ⚠️ Time-boxed, not a flag: a drag usually produces NO click, and a flag\r\n // left standing ate the next real tap — the one on the action itself.\r\n const onClickCapture = (e: React.MouseEvent<HTMLDivElement>) => {\r\n props.onClickCapture?.(e);\r\n if (performance.now() > swallowUntil.current) return;\r\n swallowUntil.current = 0;\r\n e.stopPropagation();\r\n e.preventDefault();\r\n };\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={setRoot}\r\n className={cn(swipeRowVariants({ theme }), className)}\r\n data-slot={'swipe-row'}\r\n data-open={offset ? '' : undefined}\r\n data-settling={settling ? '' : undefined}\r\n data-leaving={leaving ? '' : undefined}\r\n onPointerDown={onPointerDown}\r\n onPointerMove={onPointerMove}\r\n onPointerUp={onPointerEnd}\r\n onPointerCancel={onPointerEnd}\r\n onClickCapture={onClickCapture}\r\n >\r\n {offset ? (\r\n <button\r\n type={'button'}\r\n className={s['swipe-row__action']}\r\n data-slot={'swipe-row-action'}\r\n data-armed={offset < -width() * COMMIT_SHARE ? '' : undefined}\r\n onPointerDown={e => e.stopPropagation()}\r\n onClick={e => {\r\n e.stopPropagation();\r\n if (!leaving) commit();\r\n }}\r\n >\r\n {label}\r\n </button>\r\n ) : null}\r\n <div\r\n ref={content}\r\n className={s['swipe-row__content']}\r\n data-slot={'swipe-row-content'}\r\n onTransitionEnd={() => setSettling(false)}\r\n >\r\n {children}\r\n </div>\r\n </div>\r\n );\r\n },\r\n);\r\nSwipeRow.displayName = 'SwipeRow';\r\n\r\nexport { SwipeRow };\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAMA;;;;;;;;;;;;;;;;;;;;AAoBG;AACH,MAAM,SAAS,GAAG,CAAC;AAGnB,MAAM,YAAY,GAAG,GAAG;AACxB,MAAM,QAAQ,GAAG,GAAG;AACpB,MAAM,UAAU,GAAG,GAAG;AACtB,MAAM,cAAc,GAAG,2EAA2E;AAgBlG,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACtF,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACpC,IAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7C,IAAA,MAAM,CAAC,QAAQ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,CAAC,WAAW,GAAG,UAAU;;"}
1
+ {"version":3,"file":"swipe-row.js","sources":["../../../src/ui/SwipeRow/swipe-row.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { swipeRowVariants } from './swipe-row-variants';\nimport s from './swipe-row.module.scss';\n\n/*\n * Swipe left to act on a row, the way a phone's own lists do.\n *\n * Short swipe: the row rests open on its action, and a tap on the action does\n * it. Long swipe, past half the row: it is done on release. A tap anywhere\n * else on an open row only closes it, so a swipe cannot also open what the row\n * opens.\n *\n * Touch and pen only. A mouse drag is how text gets selected, and a desktop\n * already has the row's own button one click away. A swipe row is an\n * accelerator, never the only way to the action.\n *\n * ⚠️ No transform at rest. A transformed ancestor becomes the containing block\n * for `position: fixed` children, so a card that lifts out of its row would\n * centre itself in the row instead of on the screen. The offset is written\n * only while the row is off centre and removed at zero.\n *\n * ⚠️ `touch-action: pan-y` gives vertical scrolling to the browser and leaves\n * horizontal movement to us. A gesture is not claimed until it has clearly\n * gone sideways, so a slightly diagonal scroll still scrolls.\n */\nconst DECIDE_PX = 8;\nconst REST_PX = 88;\nconst OPEN_AT_PX = 56;\nconst COMMIT_SHARE = 0.5;\nconst LEAVE_MS = 160;\nconst SWALLOW_MS = 350;\nconst FIELD_SELECTOR = 'input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])';\n\ntype Gesture = { x: number; y: number; base: number; claimed: boolean; id: number };\n\nexport interface SwipeRowProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>,\n VariantProps<typeof swipeRowVariants> {\n children: React.ReactNode;\n /** What the revealed action says. */\n label?: React.ReactNode;\n /** Runs once the row has slid away, from a long swipe or a tap on the action. */\n onAction: () => void;\n disabled?: boolean;\n}\n\nconst SwipeRow = React.forwardRef<HTMLDivElement, SwipeRowProps>(\n ({ children, label = 'Delete', onAction, disabled, theme, className, ...props }, ref) => {\n const root = React.useRef<HTMLDivElement | null>(null);\n const content = React.useRef<HTMLDivElement | null>(null);\n const gesture = React.useRef<Gesture | null>(null);\n const swallowUntil = React.useRef(0);\n const [offset, setOffset] = React.useState(0);\n const [settling, setSettling] = React.useState(false);\n const [leaving, setLeaving] = React.useState(false);\n\n const setRoot = (el: HTMLDivElement | null) => {\n root.current = el;\n if (typeof ref === 'function') ref(el);\n else if (ref) ref.current = el;\n };\n\n const width = () => root.current?.offsetWidth || 320;\n\n const moveTo = (x: number) => {\n setOffset(x);\n const el = content.current;\n if (!el) return;\n if (x) el.style.transform = `translateX(${x}px)`;\n else el.style.removeProperty('transform');\n };\n\n // A row resting open closes when anything else on the page is touched.\n React.useEffect(() => {\n if (!offset || gesture.current || leaving) return undefined;\n const away = (e: PointerEvent) => {\n if (root.current?.contains(e.target as Node)) return;\n setSettling(true);\n moveTo(0);\n };\n document.addEventListener('pointerdown', away, true);\n return () => document.removeEventListener('pointerdown', away, true);\n }, [offset, leaving]);\n\n React.useEffect(() => {\n if (disabled && offset && !leaving) moveTo(0);\n }, [disabled, offset, leaving]);\n\n // The action that runs is the one current when the slide ends, not the one\n // the slide started under.\n const action = React.useRef(onAction);\n action.current = onAction;\n\n // The host removes the row on action; if it keeps it instead (a staple\n // marked out stays on its shelf), the row comes back to centre.\n React.useEffect(() => {\n if (!leaving) return undefined;\n const t = window.setTimeout(() => {\n action.current();\n setLeaving(false);\n setSettling(false);\n moveTo(0);\n }, LEAVE_MS);\n return () => window.clearTimeout(t);\n }, [leaving]);\n\n const commit = () => {\n setSettling(true);\n setLeaving(true);\n moveTo(-width());\n };\n\n const onPointerDown = (e: React.PointerEvent<HTMLDivElement>) => {\n props.onPointerDown?.(e);\n if (disabled || leaving || e.pointerType === 'mouse' || !e.isPrimary) return;\n // A drag inside a field moves its caret or selection; it is not a swipe.\n if ((e.target as Element).closest?.(FIELD_SELECTOR)) return;\n gesture.current = {\n x: e.clientX,\n y: e.clientY,\n base: offset,\n claimed: false,\n id: e.pointerId,\n };\n setSettling(false);\n };\n\n const onPointerMove = (e: React.PointerEvent<HTMLDivElement>) => {\n props.onPointerMove?.(e);\n const g = gesture.current;\n if (!g || e.pointerId !== g.id) return;\n const dx = e.clientX - g.x;\n const dy = e.clientY - g.y;\n if (!g.claimed) {\n if (Math.abs(dy) > DECIDE_PX && Math.abs(dy) > Math.abs(dx)) {\n gesture.current = null;\n return;\n }\n if (Math.abs(dx) < DECIDE_PX || Math.abs(dx) < Math.abs(dy) * 1.2) return;\n g.claimed = true;\n root.current?.setPointerCapture?.(e.pointerId);\n }\n moveTo(Math.min(0, g.base + dx));\n };\n\n const onPointerEnd = (e: React.PointerEvent<HTMLDivElement>) => {\n if (e.type === 'pointerup') props.onPointerUp?.(e);\n else props.onPointerCancel?.(e);\n const g = gesture.current;\n gesture.current = null;\n if (!g || e.pointerId !== g.id) return;\n if (!g.claimed) {\n // A plain tap on a row resting open closes it rather than opening it.\n if (g.base) {\n swallowUntil.current = performance.now() + SWALLOW_MS;\n setSettling(true);\n moveTo(0);\n }\n return;\n }\n swallowUntil.current = performance.now() + SWALLOW_MS;\n setSettling(true);\n if (e.type !== 'pointercancel' && offset < -width() * COMMIT_SHARE) commit();\n else moveTo(offset < -OPEN_AT_PX ? -REST_PX : 0);\n };\n\n // The click a swipe ends with belongs to the swipe, not to the row under it.\n // ⚠️ Time-boxed, not a flag: a drag usually produces NO click, and a flag\n // left standing ate the next real tap — the one on the action itself.\n const onClickCapture = (e: React.MouseEvent<HTMLDivElement>) => {\n props.onClickCapture?.(e);\n if (performance.now() > swallowUntil.current) return;\n swallowUntil.current = 0;\n e.stopPropagation();\n e.preventDefault();\n };\n\n return (\n <div\n {...props}\n ref={setRoot}\n className={cn(swipeRowVariants({ theme }), className)}\n data-slot={'swipe-row'}\n data-open={offset ? '' : undefined}\n data-settling={settling ? '' : undefined}\n data-leaving={leaving ? '' : undefined}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerEnd}\n onPointerCancel={onPointerEnd}\n onClickCapture={onClickCapture}\n >\n {offset ? (\n <button\n type={'button'}\n className={s['swipe-row__action']}\n data-slot={'swipe-row-action'}\n data-armed={offset < -width() * COMMIT_SHARE ? '' : undefined}\n onPointerDown={e => e.stopPropagation()}\n onClick={e => {\n e.stopPropagation();\n if (!leaving) commit();\n }}\n >\n {label}\n </button>\n ) : null}\n <div\n ref={content}\n className={s['swipe-row__content']}\n data-slot={'swipe-row-content'}\n onTransitionEnd={() => setSettling(false)}\n >\n {children}\n </div>\n </div>\n );\n },\n);\nSwipeRow.displayName = 'SwipeRow';\n\nexport { SwipeRow };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAMA;;;;;;;;;;;;;;;;;;;;AAoBG;AACH,MAAM,SAAS,GAAG,CAAC;AAGnB,MAAM,YAAY,GAAG,GAAG;AACxB,MAAM,QAAQ,GAAG,GAAG;AACpB,MAAM,UAAU,GAAG,GAAG;AACtB,MAAM,cAAc,GAAG,2EAA2E;AAgBlG,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACtF,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACpC,IAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7C,IAAA,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AACrD,IAAA,MAAM,CAAC,OAAO,EA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ained" | "outlined" | null | undefined;
2
+ variant?: "outlined" | "ghost" | "contained" | null | undefined;
3
3
  theme?: "inherit" | "primary" | "secondary" | "destructive" | "warning" | "success" | "info" | "slate" | null | undefined;
4
4
  size?: "sm" | "md" | "lg" | "xs" | null | undefined;
5
5
  iconOnly?: boolean | null | undefined;
package/dist/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { a as Alert, b as AlertBanner, c as AlertBannerProps, d as AlertDescription, f as AlertProps, g as AlertProvider, i as AlertTitle, j as Avatar, k as AvatarFallback, l as AvatarFallbackProps, m as AvatarImage, n as AvatarImageProps, o as AvatarProps, C as Chip, p as ChipProps, q as ChipSelect, r as ChipSelectOption, s as ChipSelectProps, t as CodeBlock, u as CodeBlockProps, D as DevIndicator, v as DevIndicatorProps, w as Dialog, x as DialogClose, y as DialogCloseProps, z as DialogContent, B as DialogContentProps, E as DialogDescription, F as DialogFooter, G as DialogHeader, H as DialogOverlay, I as DialogPortal, J as DialogProps, K as DialogTitle, L as DialogTrigger, M as DialogTriggerProps, N as EmptyState, O as EmptyStateProps, P as Icon, Q as IconProps, R as List, T as ListItem, U as ListItemProps, V as ListProps, W as Pagination, Y as ProgressBar, Z as ProgressBarProps, $ as Separator, a0 as SeparatorProps, a3 as StatCard, a4 as StatCardDirection, a5 as StatCardProps, a6 as StatCardSize, a7 as StatCardTheme, a8 as StatCardVariant, a9 as StatusDot, aa as StatusDotProps, ab as Step, ac as StepProgress, ad as StepProgressProps, ae as SwipeRow, af as SwipeRowProps, ag as Switch, ah as SwitchProps, ai as Table, aj as TableActionCell, ak as TableActionCellProps, al as TableActionItem, am as TableBody, an as TableBodyProps, ao as TableCard, ap as TableCell, aq as TableFooter, ar as TableHead, as as TableHeader, at as TableRow, au as TableSortableHeader, av as TableSortableHeaderProps, aw as TableToolbar, ax as TableToolbarProps, ay as Toggle, az as ToggleGroup, aA as ToggleGroupProps, aB as ToggleProps, aC as TrendDirection, aD as persistAlert, aE as statusDotVariants } from './index-BG8HSyxu.js';
2
- export { B as Button, a as ButtonProps, T as Tooltip, b as TooltipContent, c as TooltipContentProps, d as TooltipProps, e as TooltipProvider, f as TooltipTrigger, g as TooltipTriggerProps } from './tooltip-BpAJwi3K.js';
1
+ export { a as Alert, b as AlertBanner, c as AlertBannerProps, d as AlertDescription, f as AlertProps, g as AlertProvider, i as AlertTitle, j as Avatar, k as AvatarFallback, l as AvatarFallbackProps, m as AvatarImage, n as AvatarImageProps, o as AvatarProps, C as Chip, p as ChipProps, q as ChipSelect, r as ChipSelectOption, s as ChipSelectProps, t as CodeBlock, u as CodeBlockProps, D as DevIndicator, v as DevIndicatorProps, w as Dialog, x as DialogClose, y as DialogCloseProps, z as DialogContent, B as DialogContentProps, E as DialogDescription, F as DialogFooter, G as DialogHeader, H as DialogOverlay, I as DialogPortal, J as DialogProps, K as DialogTitle, L as DialogTrigger, M as DialogTriggerProps, N as EmptyState, O as EmptyStateProps, P as Icon, Q as IconProps, R as List, T as ListItem, U as ListItemProps, V as ListProps, W as Pagination, Y as ProgressBar, Z as ProgressBarProps, $ as Separator, a0 as SeparatorProps, a3 as StatCard, a4 as StatCardDirection, a5 as StatCardProps, a6 as StatCardSize, a7 as StatCardTheme, a8 as StatCardVariant, a9 as StatusDot, aa as StatusDotProps, ab as Step, ac as StepProgress, ad as StepProgressProps, ae as SwipeRow, af as SwipeRowProps, ag as Switch, ah as SwitchProps, ai as Table, aj as TableActionCell, ak as TableActionCellProps, al as TableActionItem, am as TableBody, an as TableBodyProps, ao as TableCard, ap as TableCell, aq as TableFooter, ar as TableHead, as as TableHeader, at as TableRow, au as TableSortableHeader, av as TableSortableHeaderProps, aw as TableToolbar, ax as TableToolbarProps, ay as Toggle, az as ToggleGroup, aA as ToggleGroupProps, aB as ToggleProps, aC as TrendDirection, aD as persistAlert, aE as statusDotVariants } from './index-B0UMInYo.js';
2
+ export { B as Button, a as ButtonProps, T as Tooltip, b as TooltipContent, c as TooltipContentProps, d as TooltipProps, e as TooltipProvider, f as TooltipTrigger, g as TooltipTriggerProps } from './tooltip-Dtoq3bn_.js';
3
3
  import 'class-variance-authority';
4
4
  import 'react';
5
5
  import 'class-variance-authority/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kismet-ux/constellation",
3
- "version": "1.14.0",
3
+ "version": "1.15.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",