@simpleapps-com/augur-web 2.4.0 → 2026.11.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.
- package/EXPORTS.md +18 -189
- package/README.md +18 -364
- package/dist/accordion.cjs.map +1 -1
- package/dist/accordion.d.ts +4 -5
- package/dist/accordion.d.ts.map +1 -0
- package/dist/add-to-cart-button.cjs.map +1 -1
- package/dist/add-to-cart-button.d.ts +5 -8
- package/dist/add-to-cart-button.d.ts.map +1 -0
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.d.ts +5 -7
- package/dist/breadcrumb.d.ts.map +1 -0
- package/dist/breadcrumbs.cjs.map +1 -1
- package/dist/breadcrumbs.d.ts +4 -4
- package/dist/breadcrumbs.d.ts.map +1 -0
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.ts +7 -9
- package/dist/button.d.ts.map +1 -0
- package/dist/card.cjs.map +1 -1
- package/dist/card.d.ts +3 -4
- package/dist/card.d.ts.map +1 -0
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.d.ts +3 -4
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/chunk-32XB3REY.cjs.map +1 -1
- package/dist/chunk-5VMEEKZ5.cjs.map +1 -1
- package/dist/chunk-5ZITWMV4.cjs.map +1 -1
- package/dist/chunk-76RSVRGB.cjs.map +1 -1
- package/dist/chunk-7EXXNELX.cjs.map +1 -1
- package/dist/chunk-BXMTQGKV.cjs.map +1 -1
- package/dist/chunk-EEJYDSXR.cjs +220 -0
- package/dist/chunk-EEJYDSXR.cjs.map +1 -0
- package/dist/chunk-GSR6SMQ2.cjs.map +1 -1
- package/dist/{chunk-OJ5G4BLS.js → chunk-JWTTXZDS.js} +15 -18
- package/dist/chunk-JWTTXZDS.js.map +1 -0
- package/dist/chunk-JXW4XE2P.cjs.map +1 -1
- package/dist/chunk-MAENILZP.cjs.map +1 -1
- package/dist/chunk-NEY26NNF.cjs.map +1 -1
- package/dist/{chunk-I5NVZORX.cjs → chunk-OQV27VC5.cjs} +15 -18
- package/dist/chunk-OQV27VC5.cjs.map +1 -0
- package/dist/{chunk-DCXYO3RB.js → chunk-PFEPE5UE.js} +7 -3
- package/dist/chunk-PFEPE5UE.js.map +1 -0
- package/dist/chunk-T52J3SHP.cjs.map +1 -1
- package/dist/chunk-UFL6PVLI.cjs.map +1 -1
- package/dist/chunk-VI2IE6RC.js +220 -0
- package/dist/chunk-VI2IE6RC.js.map +1 -0
- package/dist/chunk-VL6L4GDA.cjs.map +1 -1
- package/dist/chunk-WJUDOEVB.cjs.map +1 -1
- package/dist/chunk-XGKBDPGD.cjs.map +1 -1
- package/dist/{chunk-AE4GLYJE.cjs → chunk-YTBB63IE.cjs} +7 -3
- package/dist/chunk-YTBB63IE.cjs.map +1 -0
- package/dist/chunk-Z57QBVUC.cjs.map +1 -1
- package/dist/command.cjs +1 -0
- package/dist/command.cjs.map +1 -1
- package/dist/command.d.ts +13 -15
- package/dist/command.d.ts.map +1 -0
- package/dist/command.js +1 -0
- package/dist/command.js.map +1 -1
- package/dist/confirm-dialog.cjs.map +1 -1
- package/dist/confirm-dialog.d.ts +4 -6
- package/dist/confirm-dialog.d.ts.map +1 -0
- package/dist/data-table.cjs +35 -23
- package/dist/data-table.cjs.map +1 -1
- package/dist/data-table.d.ts +9 -11
- package/dist/data-table.d.ts.map +1 -0
- package/dist/data-table.js +34 -22
- package/dist/data-table.js.map +1 -1
- package/dist/detail-panel.cjs.map +1 -1
- package/dist/detail-panel.d.ts +6 -8
- package/dist/detail-panel.d.ts.map +1 -0
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.d.ts +6 -8
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dropdown-menu.cjs.map +1 -1
- package/dist/dropdown-menu.d.ts +5 -7
- package/dist/dropdown-menu.d.ts.map +1 -0
- package/dist/financing-widget.cjs +1 -3
- package/dist/financing-widget.cjs.map +1 -1
- package/dist/financing-widget.d.ts +5 -6
- package/dist/financing-widget.d.ts.map +1 -0
- package/dist/financing-widget.js +1 -3
- package/dist/financing-widget.js.map +1 -1
- package/dist/form-field.cjs.map +1 -1
- package/dist/form-field.d.ts +4 -5
- package/dist/form-field.d.ts.map +1 -0
- package/dist/form-input.cjs.map +1 -1
- package/dist/form-input.d.ts +4 -5
- package/dist/form-input.d.ts.map +1 -0
- package/dist/form-select.cjs.map +1 -1
- package/dist/form-select.d.ts +4 -5
- package/dist/form-select.d.ts.map +1 -0
- package/dist/form-textarea.cjs.map +1 -1
- package/dist/form-textarea.d.ts +4 -5
- package/dist/form-textarea.d.ts.map +1 -0
- package/dist/gtm.cjs +3 -2
- package/dist/gtm.cjs.map +1 -1
- package/dist/gtm.d.ts +12 -15
- package/dist/gtm.d.ts.map +1 -0
- package/dist/gtm.js +2 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.ts +4 -5
- package/dist/input.d.ts.map +1 -0
- package/dist/label.cjs.map +1 -1
- package/dist/label.d.ts +5 -7
- package/dist/label.d.ts.map +1 -0
- package/dist/list-view.cjs.map +1 -1
- package/dist/list-view.d.ts +5 -7
- package/dist/list-view.d.ts.map +1 -0
- package/dist/mdx-components.cjs +5 -2
- package/dist/mdx-components.cjs.map +1 -1
- package/dist/mdx-components.d.ts +11 -6
- package/dist/mdx-components.d.ts.map +1 -0
- package/dist/mdx-components.js +5 -2
- package/dist/mdx-components.js.map +1 -1
- package/dist/navigation-menu.cjs.map +1 -1
- package/dist/navigation-menu.d.ts +5 -7
- package/dist/navigation-menu.d.ts.map +1 -0
- package/dist/pagination.cjs +3 -2
- package/dist/pagination.cjs.map +1 -1
- package/dist/pagination.d.ts +10 -14
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +2 -1
- package/dist/payment-modal.cjs +20 -19
- package/dist/payment-modal.cjs.map +1 -1
- package/dist/payment-modal.d.ts +5 -7
- package/dist/payment-modal.d.ts.map +1 -0
- package/dist/payment-modal.js +19 -18
- package/dist/payment-modal.js.map +1 -1
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.d.ts +4 -5
- package/dist/popover.d.ts.map +1 -0
- package/dist/price-format.cjs.map +1 -1
- package/dist/price-format.d.ts +4 -5
- package/dist/price-format.d.ts.map +1 -0
- package/dist/price.cjs +4 -1
- package/dist/price.cjs.map +1 -1
- package/dist/price.d.ts +8 -22
- package/dist/price.d.ts.map +1 -0
- package/dist/price.js +4 -1
- package/dist/price.js.map +1 -1
- package/dist/provider.cjs +4 -2
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.ts +7 -10
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +3 -1
- package/dist/provider.js.map +1 -1
- package/dist/quantity-input.cjs +27 -40
- package/dist/quantity-input.cjs.map +1 -1
- package/dist/quantity-input.d.ts +4 -5
- package/dist/quantity-input.d.ts.map +1 -0
- package/dist/quantity-input.js +27 -40
- package/dist/quantity-input.js.map +1 -1
- package/dist/radio-group.cjs.map +1 -1
- package/dist/radio-group.d.ts +3 -4
- package/dist/radio-group.d.ts.map +1 -0
- package/dist/resource-tabs.cjs +1 -0
- package/dist/resource-tabs.cjs.map +1 -1
- package/dist/resource-tabs.d.ts +6 -8
- package/dist/resource-tabs.d.ts.map +1 -0
- package/dist/resource-tabs.js +1 -0
- package/dist/resource-tabs.js.map +1 -1
- package/dist/rules.d.ts +210 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.ts +4 -5
- package/dist/select.d.ts.map +1 -0
- package/dist/separator.cjs.map +1 -1
- package/dist/separator.d.ts +3 -4
- package/dist/separator.d.ts.map +1 -0
- package/dist/session-replay.cjs +4 -2
- package/dist/session-replay.cjs.map +1 -1
- package/dist/session-replay.d.ts +4 -5
- package/dist/session-replay.d.ts.map +1 -0
- package/dist/session-replay.js +4 -2
- package/dist/session-replay.js.map +1 -1
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.d.ts +2 -4
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/spinner.cjs.map +1 -1
- package/dist/spinner.d.ts +2 -4
- package/dist/spinner.d.ts.map +1 -0
- package/dist/stock-label.cjs +14 -12
- package/dist/stock-label.cjs.map +1 -1
- package/dist/stock-label.d.ts +7 -7
- package/dist/stock-label.d.ts.map +1 -0
- package/dist/stock-label.js +14 -12
- package/dist/stock-label.js.map +1 -1
- package/dist/table.cjs.map +1 -1
- package/dist/table.d.ts +3 -4
- package/dist/table.d.ts.map +1 -0
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.d.ts +4 -5
- package/dist/tabs.d.ts.map +1 -0
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.d.ts +4 -5
- package/dist/textarea.d.ts.map +1 -0
- package/llms.txt +23 -38
- package/package.json +26 -17
- package/dist/accordion.d.cts +0 -9
- package/dist/add-to-cart-button.d.cts +0 -14
- package/dist/breadcrumb.d.cts +0 -22
- package/dist/breadcrumbs.d.cts +0 -31
- package/dist/button.d.cts +0 -27
- package/dist/card.d.cts +0 -10
- package/dist/checkbox.d.cts +0 -6
- package/dist/chunk-AE4GLYJE.cjs.map +0 -1
- package/dist/chunk-DCXYO3RB.js.map +0 -1
- package/dist/chunk-I5NVZORX.cjs.map +0 -1
- package/dist/chunk-OJ5G4BLS.js.map +0 -1
- package/dist/command.d.cts +0 -87
- package/dist/confirm-dialog.d.cts +0 -35
- package/dist/data-table.d.cts +0 -55
- package/dist/detail-panel.d.cts +0 -59
- package/dist/dialog.d.cts +0 -22
- package/dist/dropdown-menu.d.cts +0 -30
- package/dist/financing-widget.d.cts +0 -45
- package/dist/form-field.d.cts +0 -14
- package/dist/form-input.d.cts +0 -19
- package/dist/form-select.d.cts +0 -34
- package/dist/form-textarea.d.cts +0 -12
- package/dist/gtm.d.cts +0 -69
- package/dist/input.d.cts +0 -6
- package/dist/label.d.cts +0 -8
- package/dist/list-view.d.cts +0 -18
- package/dist/mdx-components.d.cts +0 -20
- package/dist/navigation-menu.d.cts +0 -15
- package/dist/pagination.d.cts +0 -50
- package/dist/payment-modal.d.cts +0 -30
- package/dist/popover.d.cts +0 -9
- package/dist/price-format.d.cts +0 -21
- package/dist/price.d.cts +0 -90
- package/dist/provider.d.cts +0 -47
- package/dist/quantity-input.d.cts +0 -33
- package/dist/radio-group.d.cts +0 -7
- package/dist/resource-tabs.d.cts +0 -33
- package/dist/select.d.cts +0 -15
- package/dist/separator.d.cts +0 -6
- package/dist/session-replay.d.cts +0 -44
- package/dist/skeleton.d.cts +0 -5
- package/dist/spinner.d.cts +0 -10
- package/dist/stock-label.d.cts +0 -47
- package/dist/table.d.cts +0 -12
- package/dist/tabs.d.cts +0 -9
- package/dist/textarea.d.cts +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-replay.d.ts","sourceRoot":"","sources":["../src/session-replay.tsx"],"names":[],"mappings":"AASA,0CAA0C;AAC1C,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,wBAAwB;IACvC,+BAA+B;IAC/B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;QAClC,WAAW,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9C;CACF;AAmDD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,EACN,UAAc,EACd,QAAgB,GACjB,EAAE,wBAAwB,QAmB1B"}
|
package/dist/session-replay.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
+
import {
|
|
4
|
+
replaySampled
|
|
5
|
+
} from "./chunk-VI2IE6RC.js";
|
|
3
6
|
|
|
4
7
|
// src/session-replay.tsx
|
|
5
8
|
import { useEffect, useRef } from "react";
|
|
@@ -41,8 +44,7 @@ function SessionReplayScript({
|
|
|
41
44
|
}) {
|
|
42
45
|
const injectedRef = useRef(false);
|
|
43
46
|
useEffect(() => {
|
|
44
|
-
if (disabled
|
|
45
|
-
if (sampleRate < 1 && Math.random() > sampleRate) return;
|
|
47
|
+
if (!replaySampled(disabled, injectedRef.current, sampleRate, Math.random())) return;
|
|
46
48
|
injectedRef.current = true;
|
|
47
49
|
const inject = injectors[provider];
|
|
48
50
|
if (typeof requestIdleCallback === "function") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/session-replay.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Supported session replay providers. */\nexport type SessionReplayProvider = \"mouseflow\" | \"hotjar\";\n\nexport interface SessionReplayScriptProps {\n /** Session replay provider. */\n provider: SessionReplayProvider;\n /** Project/site ID from the provider. */\n siteId: string;\n /** Sampling rate (0-1). 1 = all sessions, 0.5 = 50%. Default: 1. */\n sampleRate?: number;\n /** Disable in development. Default: false. */\n disabled?: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Globals\n// ---------------------------------------------------------------------------\n\ndeclare global {\n interface Window {\n _mfq?: unknown[];\n hj?: (...args: unknown[]) => void;\n _hjSettings?: { hjid: string; hjsv: number };\n }\n}\n\n// ---------------------------------------------------------------------------\n// Script injectors\n// ---------------------------------------------------------------------------\n\nfunction injectMouseflow(siteId: string): void {\n
|
|
1
|
+
{"version":3,"sources":["../src/session-replay.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\nimport { replaySampled } from \"./rules\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Supported session replay providers. */\nexport type SessionReplayProvider = \"mouseflow\" | \"hotjar\";\n\nexport interface SessionReplayScriptProps {\n /** Session replay provider. */\n provider: SessionReplayProvider;\n /** Project/site ID from the provider. */\n siteId: string;\n /** Sampling rate (0-1). 1 = all sessions, 0.5 = 50%. Default: 1. */\n sampleRate?: number;\n /** Disable in development. Default: false. */\n disabled?: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Globals\n// ---------------------------------------------------------------------------\n\ndeclare global {\n interface Window {\n _mfq?: unknown[];\n hj?: (...args: unknown[]) => void;\n _hjSettings?: { hjid: string; hjsv: number };\n }\n}\n\n// ---------------------------------------------------------------------------\n// Script injectors\n// ---------------------------------------------------------------------------\n\n// The injectors run from an idle callback or timer, by which time the page may have gone.\nfunction injectMouseflow(siteId: string): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(\"mouseflow-script\")) return;\n\n window._mfq = window._mfq || [];\n\n const script = document.createElement(\"script\");\n script.id = \"mouseflow-script\";\n script.src = `https://cdn.mouseflow.com/projects/${encodeURIComponent(siteId)}.js`;\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n}\n\nfunction injectHotjar(siteId: string): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(\"hotjar-script\")) return;\n\n window._hjSettings = { hjid: siteId, hjsv: 6 };\n window.hj =\n window.hj ||\n function hjQueue(...args: unknown[]) {\n (window.hj as unknown as { q: unknown[] }).q =\n (window.hj as unknown as { q: unknown[] }).q || [];\n (window.hj as unknown as { q: unknown[] }).q.push(args);\n };\n\n const script = document.createElement(\"script\");\n script.id = \"hotjar-script\";\n script.src = `https://static.hotjar.com/c/hotjar-${encodeURIComponent(siteId)}.js?sv=6`;\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n}\n\nconst injectors: Record<SessionReplayProvider, (siteId: string) => void> = {\n mouseflow: injectMouseflow,\n hotjar: injectHotjar,\n};\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\n/**\n * Loads a session replay script with `lazyOnload` behavior.\n * Renders nothing — this is a side-effect-only leaf component.\n *\n * Session replay tools require main thread DOM access (MutationObserver)\n * and cannot run in web workers.\n *\n * @example\n * ```tsx\n * // In layout.tsx\n * <SessionReplayScript provider=\"mouseflow\" siteId=\"88d79cd5-...\" />\n *\n * // With 50% sampling\n * <SessionReplayScript provider=\"mouseflow\" siteId=\"...\" sampleRate={0.5} />\n *\n * // Disabled in dev\n * <SessionReplayScript provider=\"hotjar\" siteId=\"...\" disabled={isDev} />\n * ```\n */\nexport function SessionReplayScript({\n provider,\n siteId,\n sampleRate = 1,\n disabled = false,\n}: SessionReplayScriptProps) {\n const injectedRef = useRef(false);\n\n useEffect(() => {\n if (!replaySampled(disabled, injectedRef.current, sampleRate, Math.random())) return;\n\n injectedRef.current = true;\n\n const inject = injectors[provider];\n\n // Load during idle time (lazyOnload behavior)\n if (typeof requestIdleCallback === \"function\") {\n requestIdleCallback(() => inject(siteId));\n } else {\n setTimeout(() => inject(siteId), 0);\n }\n }, [provider, siteId, sampleRate, disabled]);\n\n return null;\n}\n"],"mappings":";;;;;;;AAEA,SAAS,WAAW,cAAc;AAsClC,SAAS,gBAAgB,QAAsB;AAC7C,MAAI,OAAO,aAAa,YAAa;AACrC,MAAI,SAAS,eAAe,kBAAkB,EAAG;AAEjD,SAAO,OAAO,OAAO,QAAQ,CAAC;AAE9B,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,KAAK;AACZ,SAAO,MAAM,sCAAsC,mBAAmB,MAAM,CAAC;AAC7E,SAAO,QAAQ;AACf,SAAO,QAAQ;AACf,WAAS,KAAK,YAAY,MAAM;AAClC;AAEA,SAAS,aAAa,QAAsB;AAC1C,MAAI,OAAO,aAAa,YAAa;AACrC,MAAI,SAAS,eAAe,eAAe,EAAG;AAE9C,SAAO,cAAc,EAAE,MAAM,QAAQ,MAAM,EAAE;AAC7C,SAAO,KACL,OAAO,MACP,SAAS,WAAW,MAAiB;AACnC,IAAC,OAAO,GAAmC,IACxC,OAAO,GAAmC,KAAK,CAAC;AACnD,IAAC,OAAO,GAAmC,EAAE,KAAK,IAAI;AAAA,EACxD;AAEF,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,KAAK;AACZ,SAAO,MAAM,sCAAsC,mBAAmB,MAAM,CAAC;AAC7E,SAAO,QAAQ;AACf,SAAO,QAAQ;AACf,WAAS,KAAK,YAAY,MAAM;AAClC;AAEA,IAAM,YAAqE;AAAA,EACzE,WAAW;AAAA,EACX,QAAQ;AACV;AAyBO,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,WAAW;AACb,GAA6B;AAC3B,QAAM,cAAc,OAAO,KAAK;AAEhC,YAAU,MAAM;AACd,QAAI,CAAC,cAAc,UAAU,YAAY,SAAS,YAAY,KAAK,OAAO,CAAC,EAAG;AAE9E,gBAAY,UAAU;AAEtB,UAAM,SAAS,UAAU,QAAQ;AAGjC,QAAI,OAAO,wBAAwB,YAAY;AAC7C,0BAAoB,MAAM,OAAO,MAAM,CAAC;AAAA,IAC1C,OAAO;AACL,iBAAW,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,UAAU,QAAQ,YAAY,QAAQ,CAAC;AAE3C,SAAO;AACT;","names":[]}
|
package/dist/skeleton.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/skeleton.cjs","../src/skeleton.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACA;ACDA,sDAAmB;AAGV,+CAAA;AADT,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,MAAM,CAAA,EAAyC;AAC/E,EAAA,uBAAO,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAW,qBAAA,mCAAG,EAAqC,SAAS,CAAA,EAAI,GAAG,MAAA,CAAO,CAAA;AACxF;ADGA;AACE;AACF,4BAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/skeleton.cjs","sourcesContent":[null,"/** Animated placeholder for loading states. */\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn(\"bg-muted animate-pulse rounded-md\", className)} {...props} />;\n}\n\nexport { Skeleton };\n"]}
|
package/dist/skeleton.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
4
|
-
|
|
1
|
+
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
5
2
|
export { Skeleton };
|
|
3
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../src/skeleton.tsx"],"names":[],"mappings":"AAGA,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,+BAE9E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/spinner.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/spinner.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,4CAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/spinner.cjs"}
|
package/dist/spinner.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
1
|
interface SpinnerProps {
|
|
4
2
|
className?: string;
|
|
5
3
|
size?: "sm" | "md" | "lg";
|
|
6
4
|
}
|
|
7
5
|
/** Animated SVG loading spinner. Sizes: `sm` (12px), `md` (16px), `lg` (24px). */
|
|
8
|
-
declare const Spinner: ({ className, size }: SpinnerProps) =>
|
|
9
|
-
|
|
6
|
+
declare const Spinner: ({ className, size }: SpinnerProps) => import("react").JSX.Element;
|
|
10
7
|
export { Spinner };
|
|
8
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../src/spinner.tsx"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAQD,kFAAkF;AAClF,QAAA,MAAM,OAAO,GAAI,qBAA4B,YAAY,gCAgBxD,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/stock-label.cjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkEEJYDSXRcjs = require('./chunk-EEJYDSXR.cjs');
|
|
7
|
+
|
|
4
8
|
// src/stock-label.tsx
|
|
5
9
|
var _web = require('@simpleapps-com/augur-utils/web');
|
|
6
10
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -54,26 +58,24 @@ function createStockLabel(config = {}) {
|
|
|
54
58
|
classNames: instanceClassNames
|
|
55
59
|
} = props;
|
|
56
60
|
const slots = mergeClassNames(instanceClassNames);
|
|
57
|
-
|
|
61
|
+
const view = _chunkEEJYDSXRcjs.stockViewOf.call(void 0, false, isInStock, isLowStock);
|
|
62
|
+
if (view === "out-of-stock") {
|
|
58
63
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _web.cn.call(void 0, "text-red-600", slots.outOfStock, className), children: outOfStockLabel });
|
|
59
64
|
}
|
|
60
|
-
|
|
65
|
+
const quantity = _chunkEEJYDSXRcjs.showStockQuantity.call(void 0, view, displayQuantity != null) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _web.cn.call(void 0, "ml-1", slots.quantity), children: [
|
|
66
|
+
"(",
|
|
67
|
+
displayQuantity,
|
|
68
|
+
")"
|
|
69
|
+
] });
|
|
70
|
+
if (view === "low-stock") {
|
|
61
71
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _web.cn.call(void 0, "text-orange-500", slots.lowStock, className), children: [
|
|
62
72
|
lowStockLabel,
|
|
63
|
-
|
|
64
|
-
"(",
|
|
65
|
-
displayQuantity,
|
|
66
|
-
")"
|
|
67
|
-
] })
|
|
73
|
+
quantity
|
|
68
74
|
] });
|
|
69
75
|
}
|
|
70
76
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _web.cn.call(void 0, "text-green-600", slots.inStock, className), children: [
|
|
71
77
|
inStockLabel,
|
|
72
|
-
|
|
73
|
-
"(",
|
|
74
|
-
displayQuantity,
|
|
75
|
-
")"
|
|
76
|
-
] })
|
|
78
|
+
quantity
|
|
77
79
|
] });
|
|
78
80
|
}
|
|
79
81
|
StockLabel.displayName = "StockLabel";
|
package/dist/stock-label.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/stock-label.cjs","../src/stock-label.tsx"],"names":["slots"],"mappings":"AAAA,ylBAAY;AACZ,YAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACLA,sDAAmB;AA4FX,+CAAA;AApCR,IAAM,SAAA,EAAW;AAAA,EACf,YAAA,EAAc,UAAA;AAAA,EACd,aAAA,EAAe,WAAA;AAAA,EACf,eAAA,EAAiB;AACnB,CAAA;AAEO,SAAS,gBAAA,CAAiB,OAAA,EAA2B,CAAC,CAAA,EAA2B;AACtF,EAAA,MAAM;AAAA,IACJ,YAAA;AAAA,IACA,aAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA,EAAY;AAAA,EACd,EAAA,EAAI,EAAE,GAAG,QAAA,EAAU,GAAG,OAAO,CAAA;AAE7B,EAAA,MAAM,SAAA,EAA2C;AAAA,IAC/C,SAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,EACF,CAAA;AAEA,EAAA,SAAS,eAAA,CAAgB,QAAA,EAAuD;AAC9E,IAAA,GAAA,CAAI,CAAC,kBAAA,GAAqB,CAAC,QAAA,EAAU,OAAO,CAAC,CAAA;AAC7C,IAAA,MAAM,OAAA,EAA+B,CAAC,CAAA;AACtC,IAAA,IAAA,CAAA,MAAW,IAAA,GAAO,QAAA,EAAU;AAC1B,MAAA,MAAM,OAAA,EAAS,qBAAA,gBAAG,iBAAA,0BAAA,CAAoB,GAAG,GAAA,kBAAG,QAAA,4BAAA,CAAW,GAAG,GAAC,CAAA;AAC3D,MAAA,GAAA,CAAI,MAAA,EAAQ,MAAA,CAAO,GAAG,EAAA,EAAI,MAAA;AAAA,IAC5B;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,SAAS,UAAA,CAAW,KAAA,EAAwB;AAC1C,IAAA,GAAA,CAAI,UAAA,GAAa,MAAA,GAAS,KAAA,CAAM,OAAA,EAAS;AACvC,MAAA,MAAMA,OAAAA,EAAQ,eAAA,CAAgB,KAAA,CAAM,UAAU,CAAA;AAC9C,MAAA,uBACE,6BAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,qBAAA;AAAA,YACT,sDAAA;AAAA,YACAA,MAAAA,CAAM,QAAA;AAAA,YACN,KAAA,CAAM;AAAA,UACR;AAAA,QAAA;AAAA,MACF,CAAA;AAAA,IAEJ;AAEA,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,WAAA,EAAa,KAAA;AAAA,MACb,eAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,EAAY;AAAA,IACd,EAAA,EAAI,KAAA;AAEJ,IAAA,MAAM,MAAA,EAAQ,eAAA,CAAgB,kBAAkB,CAAA;AAEhD,IAAA,MAAM,KAAA,EAAO,2CAAA,KAAY,EAAO,SAAA,EAAW,UAAU,CAAA;AAErD,IAAA,GAAA,CAAI,KAAA,IAAS,cAAA,EAAgB;AAC3B,MAAA,uBACE,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,qBAAA,cAAG,EAAgB,KAAA,CAAM,UAAA,EAAY,SAAS,CAAA,EAAI,QAAA,EAAA,gBAAA,CAAgB,CAAA;AAAA,IAEvF;AAEA,IAAA,MAAM,SAAA,EAAW,iDAAA,IAAkB,EAAM,gBAAA,GAAmB,IAAI,EAAA,mBAC9D,8BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,qBAAA,MAAG,EAAQ,KAAA,CAAM,QAAQ,CAAA,EAAG,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MAAE,eAAA;AAAA,MAAgB;AAAA,IAAA,EAAA,CAAC,CAAA;AAGlE,IAAA,GAAA,CAAI,KAAA,IAAS,WAAA,EAAa;AACxB,MAAA,uBACE,8BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,qBAAA,iBAAG,EAAmB,KAAA,CAAM,QAAA,EAAU,SAAS,CAAA,EAC7D,QAAA,EAAA;AAAA,QAAA,aAAA;AAAA,QACA;AAAA,MAAA,EAAA,CACH,CAAA;AAAA,IAEJ;AAEA,IAAA,uBACE,8BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,qBAAA,gBAAG,EAAkB,KAAA,CAAM,OAAA,EAAS,SAAS,CAAA,EAC3D,QAAA,EAAA;AAAA,MAAA,YAAA;AAAA,MACA;AAAA,IAAA,EAAA,CACH,CAAA;AAAA,EAEJ;AAEA,EAAA,UAAA,CAAW,YAAA,EAAc,YAAA;AAEzB,EAAA,OAAO,EAAE,WAAW,CAAA;AACtB;AD/DA;AACE;AACF,4CAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/stock-label.cjs","sourcesContent":[null,"\"use client\";\n\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\nimport { showStockQuantity, stockViewOf } from \"./rules\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface StockLabelClassNames {\n /** In-stock text. */\n inStock?: string;\n /** Low-stock text. */\n lowStock?: string;\n /** Out-of-stock text. */\n outOfStock?: string;\n /** The loading skeleton. */\n skeleton?: string;\n /** The quantity parenthetical. */\n quantity?: string;\n}\n\nexport interface StockLabelConfig {\n /** Label for in-stock state. Default: `\"In stock\"`. */\n inStockLabel?: string;\n /** Label for low-stock state. Default: `\"Low stock\"`. */\n lowStockLabel?: string;\n /** Label for out-of-stock state. Default: `\"Out of stock\"`. */\n outOfStockLabel?: string;\n /** Default class names for sub-elements. */\n classNames?: StockLabelClassNames;\n}\n\ntype StockLabelPropsBase = {\n /** Whether the item is in stock. */\n isInStock: boolean;\n /** Whether the item has low stock. */\n isLowStock?: boolean;\n /** Quantity to display in parentheses (shown only when in stock or low stock). */\n displayQuantity?: number | null;\n /** Additional class names for the root element. */\n className?: string;\n /** Class names for sub-elements, merged with factory defaults. */\n classNames?: StockLabelClassNames;\n};\n\nexport type StockLabelProps =\n | (StockLabelPropsBase & { loading?: false })\n | { loading: true; className?: string; classNames?: StockLabelClassNames };\n\nexport interface CreateStockLabelResult {\n StockLabel: React.FC<StockLabelProps>;\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\nconst defaults = {\n inStockLabel: \"In stock\",\n lowStockLabel: \"Low stock\",\n outOfStockLabel: \"Out of stock\",\n} as const;\n\nexport function createStockLabel(config: StockLabelConfig = {}): CreateStockLabelResult {\n const {\n inStockLabel,\n lowStockLabel,\n outOfStockLabel,\n classNames: factoryClassNames,\n } = { ...defaults, ...config };\n\n const slotKeys: (keyof StockLabelClassNames)[] = [\n \"inStock\",\n \"lowStock\",\n \"outOfStock\",\n \"skeleton\",\n \"quantity\",\n ];\n\n function mergeClassNames(instance?: StockLabelClassNames): StockLabelClassNames {\n if (!factoryClassNames && !instance) return {};\n const result: StockLabelClassNames = {};\n for (const key of slotKeys) {\n const merged = cn(factoryClassNames?.[key], instance?.[key]);\n if (merged) result[key] = merged;\n }\n return result;\n }\n\n function StockLabel(props: StockLabelProps) {\n if (\"loading\" in props && props.loading) {\n const slots = mergeClassNames(props.classNames);\n return (\n <span\n className={cn(\n \"bg-muted inline-block h-4 w-16 animate-pulse rounded\",\n slots.skeleton,\n props.className,\n )}\n />\n );\n }\n\n const {\n isInStock,\n isLowStock = false,\n displayQuantity,\n className,\n classNames: instanceClassNames,\n } = props as StockLabelPropsBase;\n\n const slots = mergeClassNames(instanceClassNames);\n // The loading skeleton is rendered above, so the view here is never \"loading\".\n const view = stockViewOf(false, isInStock, isLowStock);\n\n if (view === \"out-of-stock\") {\n return (\n <span className={cn(\"text-red-600\", slots.outOfStock, className)}>{outOfStockLabel}</span>\n );\n }\n\n const quantity = showStockQuantity(view, displayQuantity != null) && (\n <span className={cn(\"ml-1\", slots.quantity)}>({displayQuantity})</span>\n );\n\n if (view === \"low-stock\") {\n return (\n <span className={cn(\"text-orange-500\", slots.lowStock, className)}>\n {lowStockLabel}\n {quantity}\n </span>\n );\n }\n\n return (\n <span className={cn(\"text-green-600\", slots.inStock, className)}>\n {inStockLabel}\n {quantity}\n </span>\n );\n }\n\n StockLabel.displayName = \"StockLabel\";\n\n return { StockLabel };\n}\n"]}
|
package/dist/stock-label.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface StockLabelClassNames {
|
|
1
|
+
export interface StockLabelClassNames {
|
|
2
2
|
/** In-stock text. */
|
|
3
3
|
inStock?: string;
|
|
4
4
|
/** Low-stock text. */
|
|
@@ -10,7 +10,7 @@ interface StockLabelClassNames {
|
|
|
10
10
|
/** The quantity parenthetical. */
|
|
11
11
|
quantity?: string;
|
|
12
12
|
}
|
|
13
|
-
interface StockLabelConfig {
|
|
13
|
+
export interface StockLabelConfig {
|
|
14
14
|
/** Label for in-stock state. Default: `"In stock"`. */
|
|
15
15
|
inStockLabel?: string;
|
|
16
16
|
/** Label for low-stock state. Default: `"Low stock"`. */
|
|
@@ -32,16 +32,16 @@ type StockLabelPropsBase = {
|
|
|
32
32
|
/** Class names for sub-elements, merged with factory defaults. */
|
|
33
33
|
classNames?: StockLabelClassNames;
|
|
34
34
|
};
|
|
35
|
-
type StockLabelProps = (StockLabelPropsBase & {
|
|
35
|
+
export type StockLabelProps = (StockLabelPropsBase & {
|
|
36
36
|
loading?: false;
|
|
37
37
|
}) | {
|
|
38
38
|
loading: true;
|
|
39
39
|
className?: string;
|
|
40
40
|
classNames?: StockLabelClassNames;
|
|
41
41
|
};
|
|
42
|
-
interface CreateStockLabelResult {
|
|
42
|
+
export interface CreateStockLabelResult {
|
|
43
43
|
StockLabel: React.FC<StockLabelProps>;
|
|
44
44
|
}
|
|
45
|
-
declare function createStockLabel(config?: StockLabelConfig): CreateStockLabelResult;
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
export declare function createStockLabel(config?: StockLabelConfig): CreateStockLabelResult;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=stock-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stock-label.d.ts","sourceRoot":"","sources":["../src/stock-label.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,oBAAoB;IACnC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,oBAAoB,CAAC;CACnC;AAED,KAAK,mBAAmB,GAAG;IACzB,oCAAoC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,oBAAoB,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB,CAAC,mBAAmB,GAAG;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,GAC3C;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAE7E,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;CACvC;AAYD,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,gBAAqB,GAAG,sBAAsB,CAkFtF"}
|
package/dist/stock-label.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
+
import {
|
|
4
|
+
showStockQuantity,
|
|
5
|
+
stockViewOf
|
|
6
|
+
} from "./chunk-VI2IE6RC.js";
|
|
3
7
|
|
|
4
8
|
// src/stock-label.tsx
|
|
5
9
|
import { cn } from "@simpleapps-com/augur-utils/web";
|
|
@@ -54,26 +58,24 @@ function createStockLabel(config = {}) {
|
|
|
54
58
|
classNames: instanceClassNames
|
|
55
59
|
} = props;
|
|
56
60
|
const slots = mergeClassNames(instanceClassNames);
|
|
57
|
-
|
|
61
|
+
const view = stockViewOf(false, isInStock, isLowStock);
|
|
62
|
+
if (view === "out-of-stock") {
|
|
58
63
|
return /* @__PURE__ */ jsx("span", { className: cn("text-red-600", slots.outOfStock, className), children: outOfStockLabel });
|
|
59
64
|
}
|
|
60
|
-
|
|
65
|
+
const quantity = showStockQuantity(view, displayQuantity != null) && /* @__PURE__ */ jsxs("span", { className: cn("ml-1", slots.quantity), children: [
|
|
66
|
+
"(",
|
|
67
|
+
displayQuantity,
|
|
68
|
+
")"
|
|
69
|
+
] });
|
|
70
|
+
if (view === "low-stock") {
|
|
61
71
|
return /* @__PURE__ */ jsxs("span", { className: cn("text-orange-500", slots.lowStock, className), children: [
|
|
62
72
|
lowStockLabel,
|
|
63
|
-
|
|
64
|
-
"(",
|
|
65
|
-
displayQuantity,
|
|
66
|
-
")"
|
|
67
|
-
] })
|
|
73
|
+
quantity
|
|
68
74
|
] });
|
|
69
75
|
}
|
|
70
76
|
return /* @__PURE__ */ jsxs("span", { className: cn("text-green-600", slots.inStock, className), children: [
|
|
71
77
|
inStockLabel,
|
|
72
|
-
|
|
73
|
-
"(",
|
|
74
|
-
displayQuantity,
|
|
75
|
-
")"
|
|
76
|
-
] })
|
|
78
|
+
quantity
|
|
77
79
|
] });
|
|
78
80
|
}
|
|
79
81
|
StockLabel.displayName = "StockLabel";
|
package/dist/stock-label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/stock-label.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface StockLabelClassNames {\n /** In-stock text. */\n inStock?: string;\n /** Low-stock text. */\n lowStock?: string;\n /** Out-of-stock text. */\n outOfStock?: string;\n /** The loading skeleton. */\n skeleton?: string;\n /** The quantity parenthetical. */\n quantity?: string;\n}\n\nexport interface StockLabelConfig {\n /** Label for in-stock state. Default: `\"In stock\"`. */\n inStockLabel?: string;\n /** Label for low-stock state. Default: `\"Low stock\"`. */\n lowStockLabel?: string;\n /** Label for out-of-stock state. Default: `\"Out of stock\"`. */\n outOfStockLabel?: string;\n /** Default class names for sub-elements. */\n classNames?: StockLabelClassNames;\n}\n\ntype StockLabelPropsBase = {\n /** Whether the item is in stock. */\n isInStock: boolean;\n /** Whether the item has low stock. */\n isLowStock?: boolean;\n /** Quantity to display in parentheses (shown only when in stock or low stock). */\n displayQuantity?: number | null;\n /** Additional class names for the root element. */\n className?: string;\n /** Class names for sub-elements, merged with factory defaults. */\n classNames?: StockLabelClassNames;\n};\n\nexport type StockLabelProps =\n | (StockLabelPropsBase & { loading?: false })\n | { loading: true; className?: string; classNames?: StockLabelClassNames };\n\nexport interface CreateStockLabelResult {\n StockLabel: React.FC<StockLabelProps>;\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\nconst defaults = {\n inStockLabel: \"In stock\",\n lowStockLabel: \"Low stock\",\n outOfStockLabel: \"Out of stock\",\n} as const;\n\nexport function createStockLabel(config: StockLabelConfig = {}): CreateStockLabelResult {\n const {\n inStockLabel,\n lowStockLabel,\n outOfStockLabel,\n classNames: factoryClassNames,\n } = { ...defaults, ...config };\n\n const slotKeys: (keyof StockLabelClassNames)[] = [\n \"inStock\",\n \"lowStock\",\n \"outOfStock\",\n \"skeleton\",\n \"quantity\",\n ];\n\n function mergeClassNames(instance?: StockLabelClassNames): StockLabelClassNames {\n if (!factoryClassNames && !instance) return {};\n const result: StockLabelClassNames = {};\n for (const key of slotKeys) {\n const merged = cn(factoryClassNames?.[key], instance?.[key]);\n if (merged) result[key] = merged;\n }\n return result;\n }\n\n function StockLabel(props: StockLabelProps) {\n if (\"loading\" in props && props.loading) {\n const slots = mergeClassNames(props.classNames);\n return (\n <span\n className={cn(\n \"bg-muted inline-block h-4 w-16 animate-pulse rounded\",\n slots.skeleton,\n props.className,\n )}\n />\n );\n }\n\n const {\n isInStock,\n isLowStock = false,\n displayQuantity,\n className,\n classNames: instanceClassNames,\n } = props as StockLabelPropsBase;\n\n const slots = mergeClassNames(instanceClassNames);\n\n
|
|
1
|
+
{"version":3,"sources":["../src/stock-label.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"@simpleapps-com/augur-utils/web\";\nimport { showStockQuantity, stockViewOf } from \"./rules\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface StockLabelClassNames {\n /** In-stock text. */\n inStock?: string;\n /** Low-stock text. */\n lowStock?: string;\n /** Out-of-stock text. */\n outOfStock?: string;\n /** The loading skeleton. */\n skeleton?: string;\n /** The quantity parenthetical. */\n quantity?: string;\n}\n\nexport interface StockLabelConfig {\n /** Label for in-stock state. Default: `\"In stock\"`. */\n inStockLabel?: string;\n /** Label for low-stock state. Default: `\"Low stock\"`. */\n lowStockLabel?: string;\n /** Label for out-of-stock state. Default: `\"Out of stock\"`. */\n outOfStockLabel?: string;\n /** Default class names for sub-elements. */\n classNames?: StockLabelClassNames;\n}\n\ntype StockLabelPropsBase = {\n /** Whether the item is in stock. */\n isInStock: boolean;\n /** Whether the item has low stock. */\n isLowStock?: boolean;\n /** Quantity to display in parentheses (shown only when in stock or low stock). */\n displayQuantity?: number | null;\n /** Additional class names for the root element. */\n className?: string;\n /** Class names for sub-elements, merged with factory defaults. */\n classNames?: StockLabelClassNames;\n};\n\nexport type StockLabelProps =\n | (StockLabelPropsBase & { loading?: false })\n | { loading: true; className?: string; classNames?: StockLabelClassNames };\n\nexport interface CreateStockLabelResult {\n StockLabel: React.FC<StockLabelProps>;\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\nconst defaults = {\n inStockLabel: \"In stock\",\n lowStockLabel: \"Low stock\",\n outOfStockLabel: \"Out of stock\",\n} as const;\n\nexport function createStockLabel(config: StockLabelConfig = {}): CreateStockLabelResult {\n const {\n inStockLabel,\n lowStockLabel,\n outOfStockLabel,\n classNames: factoryClassNames,\n } = { ...defaults, ...config };\n\n const slotKeys: (keyof StockLabelClassNames)[] = [\n \"inStock\",\n \"lowStock\",\n \"outOfStock\",\n \"skeleton\",\n \"quantity\",\n ];\n\n function mergeClassNames(instance?: StockLabelClassNames): StockLabelClassNames {\n if (!factoryClassNames && !instance) return {};\n const result: StockLabelClassNames = {};\n for (const key of slotKeys) {\n const merged = cn(factoryClassNames?.[key], instance?.[key]);\n if (merged) result[key] = merged;\n }\n return result;\n }\n\n function StockLabel(props: StockLabelProps) {\n if (\"loading\" in props && props.loading) {\n const slots = mergeClassNames(props.classNames);\n return (\n <span\n className={cn(\n \"bg-muted inline-block h-4 w-16 animate-pulse rounded\",\n slots.skeleton,\n props.className,\n )}\n />\n );\n }\n\n const {\n isInStock,\n isLowStock = false,\n displayQuantity,\n className,\n classNames: instanceClassNames,\n } = props as StockLabelPropsBase;\n\n const slots = mergeClassNames(instanceClassNames);\n // The loading skeleton is rendered above, so the view here is never \"loading\".\n const view = stockViewOf(false, isInStock, isLowStock);\n\n if (view === \"out-of-stock\") {\n return (\n <span className={cn(\"text-red-600\", slots.outOfStock, className)}>{outOfStockLabel}</span>\n );\n }\n\n const quantity = showStockQuantity(view, displayQuantity != null) && (\n <span className={cn(\"ml-1\", slots.quantity)}>({displayQuantity})</span>\n );\n\n if (view === \"low-stock\") {\n return (\n <span className={cn(\"text-orange-500\", slots.lowStock, className)}>\n {lowStockLabel}\n {quantity}\n </span>\n );\n }\n\n return (\n <span className={cn(\"text-green-600\", slots.inStock, className)}>\n {inStockLabel}\n {quantity}\n </span>\n );\n }\n\n StockLabel.displayName = \"StockLabel\";\n\n return { StockLabel };\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,UAAU;AA4FX,cA6BF,YA7BE;AApCR,IAAM,WAAW;AAAA,EACf,cAAc;AAAA,EACd,eAAe;AAAA,EACf,iBAAiB;AACnB;AAEO,SAAS,iBAAiB,SAA2B,CAAC,GAA2B;AACtF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,IAAI,EAAE,GAAG,UAAU,GAAG,OAAO;AAE7B,QAAM,WAA2C;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,WAAS,gBAAgB,UAAuD;AAC9E,QAAI,CAAC,qBAAqB,CAAC,SAAU,QAAO,CAAC;AAC7C,UAAM,SAA+B,CAAC;AACtC,eAAW,OAAO,UAAU;AAC1B,YAAM,SAAS,GAAG,oBAAoB,GAAG,GAAG,WAAW,GAAG,CAAC;AAC3D,UAAI,OAAQ,QAAO,GAAG,IAAI;AAAA,IAC5B;AACA,WAAO;AAAA,EACT;AAEA,WAAS,WAAW,OAAwB;AAC1C,QAAI,aAAa,SAAS,MAAM,SAAS;AACvC,YAAMA,SAAQ,gBAAgB,MAAM,UAAU;AAC9C,aACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACAA,OAAM;AAAA,YACN,MAAM;AAAA,UACR;AAAA;AAAA,MACF;AAAA,IAEJ;AAEA,UAAM;AAAA,MACJ;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,YAAY;AAAA,IACd,IAAI;AAEJ,UAAM,QAAQ,gBAAgB,kBAAkB;AAEhD,UAAM,OAAO,YAAY,OAAO,WAAW,UAAU;AAErD,QAAI,SAAS,gBAAgB;AAC3B,aACE,oBAAC,UAAK,WAAW,GAAG,gBAAgB,MAAM,YAAY,SAAS,GAAI,2BAAgB;AAAA,IAEvF;AAEA,UAAM,WAAW,kBAAkB,MAAM,mBAAmB,IAAI,KAC9D,qBAAC,UAAK,WAAW,GAAG,QAAQ,MAAM,QAAQ,GAAG;AAAA;AAAA,MAAE;AAAA,MAAgB;AAAA,OAAC;AAGlE,QAAI,SAAS,aAAa;AACxB,aACE,qBAAC,UAAK,WAAW,GAAG,mBAAmB,MAAM,UAAU,SAAS,GAC7D;AAAA;AAAA,QACA;AAAA,SACH;AAAA,IAEJ;AAEA,WACE,qBAAC,UAAK,WAAW,GAAG,kBAAkB,MAAM,SAAS,SAAS,GAC3D;AAAA;AAAA,MACA;AAAA,OACH;AAAA,EAEJ;AAEA,aAAW,cAAc;AAEzB,SAAO,EAAE,WAAW;AACtB;","names":["slots"]}
|
package/dist/table.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/table.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2YAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/table.cjs"}
|
package/dist/table.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
3
2
|
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
4
3
|
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
4
|
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -8,5 +7,5 @@ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTM
|
|
|
8
7
|
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
8
|
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
10
9
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
11
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,QAAA,MAAM,KAAK,iHAMV,CAAC;AAGF,QAAA,MAAM,WAAW,+HAKf,CAAC;AAGH,QAAA,MAAM,SAAS,+HAKb,CAAC;AAGH,QAAA,MAAM,WAAW,+HASf,CAAC;AAGH,QAAA,MAAM,QAAQ,uHAWb,CAAC;AAGF,QAAA,MAAM,SAAS,2HAYb,CAAC;AAGH,QAAA,MAAM,SAAS,2HAYb,CAAC;AAGH,QAAA,MAAM,YAAY,+HAKhB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/tabs.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/tabs.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,+LAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/tabs.cjs"}
|
package/dist/tabs.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as TabsPrimitive from
|
|
3
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
3
|
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
4
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
5
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
6
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
8
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAGtD,QAAA,MAAM,IAAI,gGAAqB,CAAC;AAEhC,QAAA,MAAM,QAAQ,uJAYZ,CAAC;AAGH,QAAA,MAAM,WAAW,gKAYf,CAAC;AAGH,QAAA,MAAM,WAAW,0JAYf,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/textarea.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/
|
|
1
|
+
{"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/textarea.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,8CAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-web/dist/textarea.cjs"}
|
package/dist/textarea.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
|
|
3
|
-
type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
4
3
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export { Textarea };
|
|
5
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../src/textarea.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAE9E,QAAA,MAAM,QAAQ,2FAab,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/llms.txt
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
# Augur Platform Packages
|
|
2
2
|
|
|
3
3
|
This package is part of the @simpleapps-com/augur-* platform.
|
|
4
|
-
|
|
5
|
-
The
|
|
6
|
-
Pure transform utilities bridge user-facing types to SDK params without breaking proxy type safety.
|
|
4
|
+
Each package releases on its own CalVer version; nothing requires them to share one.
|
|
5
|
+
The docs are at https://augur.build/docs/packages (the API reference lists every export).
|
|
7
6
|
|
|
8
7
|
## Sibling packages
|
|
9
8
|
|
|
10
|
-
- @simpleapps-com/augur-config - Shared tooling configuration presets for Augur ecommerce sites
|
|
11
9
|
- @simpleapps-com/augur-core - Universal foundation for Augur packages — proxy infrastructure, cache keys, method classification, shared types
|
|
10
|
+
- @simpleapps-com/augur-utils - Shared types, cache configuration, and utility functions for Augur ecommerce sites
|
|
12
11
|
- @simpleapps-com/augur-hooks - Cross-platform React Query hooks and Zustand stores for Augur ecommerce sites
|
|
13
|
-
- @simpleapps-com/augur-mobile - React Native/Expo adapters for Augur ecommerce apps (offline sync, biometrics, push)
|
|
14
12
|
- @simpleapps-com/augur-server - Server-side utilities for Augur ecommerce sites (Redis caching, SDK helpers, auth)
|
|
15
|
-
- @simpleapps-com/augur-tailwind - Shared Tailwind CSS v4 theme with HSL variables for Augur ecommerce sites
|
|
16
|
-
- @simpleapps-com/augur-utils - Shared types, cache configuration, and utility functions for Augur ecommerce sites
|
|
17
13
|
- @simpleapps-com/augur-web (this package) - Shared React UI components for Augur ecommerce sites (Radix + Tailwind)
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
- @simpleapps-com/augur-mobile - React Native/Expo adapters for Augur ecommerce apps (offline sync, biometrics, push)
|
|
15
|
+
- @simpleapps-com/augur-tailwind - Shared Tailwind CSS v4 theme with HSL variables for Augur ecommerce sites
|
|
16
|
+
- @simpleapps-com/augur-config - Shared tooling configuration presets for Augur ecommerce sites
|
|
20
17
|
|
|
21
18
|
---
|
|
22
19
|
|
|
@@ -24,8 +21,6 @@ Each package ships its own llms.txt with exports and usage patterns.
|
|
|
24
21
|
|
|
25
22
|
> Shared React UI components for Augur ecommerce sites (Radix + Tailwind)
|
|
26
23
|
|
|
27
|
-
Version: 2.2.29
|
|
28
|
-
|
|
29
24
|
## @simpleapps-com/augur-web/accordion
|
|
30
25
|
|
|
31
26
|
- component: Accordion
|
|
@@ -66,11 +61,10 @@ import Link from "next/link";
|
|
|
66
61
|
/>
|
|
67
62
|
```
|
|
68
63
|
|
|
69
|
-
|
|
70
64
|
## @simpleapps-com/augur-web/button
|
|
71
65
|
|
|
72
66
|
- component: Button - Styled button with variant/size props. Supports polymorphism via `asChild`.
|
|
73
|
-
- const: buttonVariants - CVA variants for the Button. Variants: default, destructive, outline,
|
|
67
|
+
- const: buttonVariants - CVA variants for the Button. Variants: default, destructive, outline, secondary, ghost, link. Sizes: default, sm, lg, icon.
|
|
74
68
|
- type: ButtonProps
|
|
75
69
|
|
|
76
70
|
### Examples
|
|
@@ -81,7 +75,6 @@ Button:
|
|
|
81
75
|
<Button asChild><Link href="/shop">Browse</Link></Button>
|
|
82
76
|
```
|
|
83
77
|
|
|
84
|
-
|
|
85
78
|
## @simpleapps-com/augur-web/card
|
|
86
79
|
|
|
87
80
|
- component: Card
|
|
@@ -110,6 +103,7 @@ Button:
|
|
|
110
103
|
|
|
111
104
|
## @simpleapps-com/augur-web/pagination
|
|
112
105
|
|
|
106
|
+
- function: getPageNumbers - Build an array of page numbers and ellipsis markers for pagination UI.
|
|
113
107
|
- const: ListPagination
|
|
114
108
|
- const: Pagination
|
|
115
109
|
- component: PaginationContent
|
|
@@ -118,16 +112,15 @@ Button:
|
|
|
118
112
|
- const: PaginationLink
|
|
119
113
|
- const: PaginationNext
|
|
120
114
|
- const: PaginationPrevious
|
|
121
|
-
- function: getPageNumbers - Build an array of page numbers and ellipsis markers for pagination UI.
|
|
122
115
|
|
|
123
116
|
## @simpleapps-com/augur-web/price
|
|
124
117
|
|
|
125
|
-
-
|
|
126
|
-
- value: PriceFormatConfig
|
|
127
|
-
- function: createPrice - Factory that creates a `Price` component and a `formatPrice` function
|
|
118
|
+
- function: createPrice - Factory that creates a `Price` component and a `formatPrice` function pre-configured with site-level currency/locale/precision.
|
|
128
119
|
- type: CreatePriceResult
|
|
120
|
+
- type: FormatPriceOptions
|
|
129
121
|
- type: PriceClassNames
|
|
130
122
|
- type: PriceConfig
|
|
123
|
+
- type: PriceFormatConfig
|
|
131
124
|
- type: PriceProps
|
|
132
125
|
|
|
133
126
|
### Examples
|
|
@@ -145,10 +138,9 @@ export const { Price, formatPrice } = createPrice({
|
|
|
145
138
|
<Price value={item.price1} uom={item.default_selling_unit} />
|
|
146
139
|
```
|
|
147
140
|
|
|
148
|
-
|
|
149
141
|
## @simpleapps-com/augur-web/price-format
|
|
150
142
|
|
|
151
|
-
- function: createFormatPrice - Create a pure price-formatting function. Server-safe (no React dependency).
|
|
143
|
+
- function: createFormatPrice - Create a pure price-formatting function. Server-safe (no React dependency). Use {@link createPrice} in client components for the full Price component.
|
|
152
144
|
- type: FormatPriceOptions
|
|
153
145
|
- type: PriceFormatConfig
|
|
154
146
|
|
|
@@ -175,7 +167,6 @@ ResourceTabs:
|
|
|
175
167
|
/>
|
|
176
168
|
```
|
|
177
169
|
|
|
178
|
-
|
|
179
170
|
## @simpleapps-com/augur-web/select
|
|
180
171
|
|
|
181
172
|
- component: Select
|
|
@@ -248,20 +239,19 @@ ConfirmDialog:
|
|
|
248
239
|
/>
|
|
249
240
|
```
|
|
250
241
|
|
|
251
|
-
|
|
252
242
|
## @simpleapps-com/augur-web/data-table
|
|
253
243
|
|
|
254
244
|
- function: DataTable
|
|
255
|
-
- value: RowSelectionState
|
|
256
|
-
- value: SortingState
|
|
257
|
-
- value: VisibilityState
|
|
258
245
|
- type: ColumnDef
|
|
259
246
|
- type: DataTablePagination
|
|
260
247
|
- type: DataTableProps
|
|
248
|
+
- type: RowSelectionState
|
|
249
|
+
- type: SortingState
|
|
250
|
+
- type: VisibilityState
|
|
261
251
|
|
|
262
252
|
## @simpleapps-com/augur-web/detail-panel
|
|
263
253
|
|
|
264
|
-
- function: DetailPanel - Read/edit toggle panel for a single record. Renders field values in read
|
|
254
|
+
- function: DetailPanel - Read/edit toggle panel for a single record. Renders field values in read mode, and form inputs in edit mode based on field definitions.
|
|
265
255
|
- type: DetailPanelProps
|
|
266
256
|
- type: FieldDef
|
|
267
257
|
|
|
@@ -278,7 +268,6 @@ const fields: FieldDef<Brand>[] = [
|
|
|
278
268
|
<DetailPanel fields={fields} data={brand} onSave={handleSave} />
|
|
279
269
|
```
|
|
280
270
|
|
|
281
|
-
|
|
282
271
|
## @simpleapps-com/augur-web/dialog
|
|
283
272
|
|
|
284
273
|
- component: Dialog
|
|
@@ -319,8 +308,8 @@ const fields: FieldDef<Brand>[] = [
|
|
|
319
308
|
- component: NavigationMenuLink
|
|
320
309
|
- component: NavigationMenuList
|
|
321
310
|
- component: NavigationMenuTrigger
|
|
322
|
-
- component: NavigationMenuViewport
|
|
323
311
|
- const: navigationMenuTriggerStyle
|
|
312
|
+
- component: NavigationMenuViewport
|
|
324
313
|
|
|
325
314
|
## @simpleapps-com/augur-web/popover
|
|
326
315
|
|
|
@@ -354,7 +343,6 @@ FormInput:
|
|
|
354
343
|
<FormInput label="Email" name="email" type="email" required error={errors.email} />
|
|
355
344
|
```
|
|
356
345
|
|
|
357
|
-
|
|
358
346
|
## @simpleapps-com/augur-web/form-select
|
|
359
347
|
|
|
360
348
|
- component: FormSelect - Labeled select dropdown with error display. Composes FormField + Select.
|
|
@@ -373,7 +361,6 @@ FormSelect:
|
|
|
373
361
|
/>
|
|
374
362
|
```
|
|
375
363
|
|
|
376
|
-
|
|
377
364
|
## @simpleapps-com/augur-web/form-textarea
|
|
378
365
|
|
|
379
366
|
- component: FormTextarea - Labeled textarea with error display. Composes FormField + Textarea.
|
|
@@ -381,7 +368,7 @@ FormSelect:
|
|
|
381
368
|
|
|
382
369
|
## @simpleapps-com/augur-web/financing-widget
|
|
383
370
|
|
|
384
|
-
- function: FinancingWidget - Loads a financing widget script on the pages where it's needed.
|
|
371
|
+
- function: FinancingWidget - Loads a financing widget script on the pages where it's needed. Renders nothing — this is a side-effect-only leaf component.
|
|
385
372
|
- type: FinancingProvider
|
|
386
373
|
- type: FinancingWidgetProps
|
|
387
374
|
- type: UseFinancingResult
|
|
@@ -401,7 +388,6 @@ FinancingWidget:
|
|
|
401
388
|
/>
|
|
402
389
|
```
|
|
403
390
|
|
|
404
|
-
|
|
405
391
|
## @simpleapps-com/augur-web/gtm
|
|
406
392
|
|
|
407
393
|
- function: AnalyticsNoscript
|
|
@@ -417,12 +403,13 @@ FinancingWidget:
|
|
|
417
403
|
|
|
418
404
|
## @simpleapps-com/augur-web/mdx-components
|
|
419
405
|
|
|
420
|
-
- function: getMDXComponents - Returns a map of HTML element names to styled React components
|
|
406
|
+
- function: getMDXComponents - Returns a map of HTML element names to styled React components for use with MDX content rendering.
|
|
407
|
+
- type: HtmlComponents
|
|
421
408
|
|
|
422
409
|
## @simpleapps-com/augur-web/payment-modal
|
|
423
410
|
|
|
411
|
+
- function: extractBin - Extract a card BIN from a postMessage payload. Handles multiple formats returned by Element/Unified iframes: - URL-encoded string with Bin= parameter - Object with Bin, bin, CardBIN, or cardBin property - Nested data.Bin structure
|
|
424
412
|
- function: PaymentModal
|
|
425
|
-
- function: extractBin - Extract a card BIN from a postMessage payload.
|
|
426
413
|
- type: PaymentModalProps
|
|
427
414
|
|
|
428
415
|
## @simpleapps-com/augur-web/quantity-input
|
|
@@ -437,10 +424,9 @@ QuantityInput:
|
|
|
437
424
|
<QuantityInput value={qty} onChange={setQty} min={1} step={1} />
|
|
438
425
|
```
|
|
439
426
|
|
|
440
|
-
|
|
441
427
|
## @simpleapps-com/augur-web/session-replay
|
|
442
428
|
|
|
443
|
-
- function: SessionReplayScript - Loads a session replay script with `lazyOnload` behavior.
|
|
429
|
+
- function: SessionReplayScript - Loads a session replay script with `lazyOnload` behavior. Renders nothing — this is a side-effect-only leaf component.
|
|
444
430
|
- type: SessionReplayProvider
|
|
445
431
|
- type: SessionReplayScriptProps
|
|
446
432
|
|
|
@@ -458,7 +444,6 @@ SessionReplayScript:
|
|
|
458
444
|
<SessionReplayScript provider="hotjar" siteId="..." disabled={isDev} />
|
|
459
445
|
```
|
|
460
446
|
|
|
461
|
-
|
|
462
447
|
## @simpleapps-com/augur-web/stock-label
|
|
463
448
|
|
|
464
449
|
- function: createStockLabel
|
|
@@ -469,5 +454,5 @@ SessionReplayScript:
|
|
|
469
454
|
|
|
470
455
|
## @simpleapps-com/augur-web/provider
|
|
471
456
|
|
|
472
|
-
- function: AugurSiteProvider - Unified site provider that composes AugurHooksProvider with analytics
|
|
457
|
+
- function: AugurSiteProvider - Unified site provider that composes AugurHooksProvider with analytics based on the site config.
|
|
473
458
|
- type: AugurSiteProviderProps
|