@lssm/lib.presentation-runtime-react 8.0.2 → 8.0.4
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/WorkflowStepRenderer.d.ts +1 -0
- package/dist/WorkflowStepRenderer.d.ts.map +1 -1
- package/dist/WorkflowStepRenderer.js +1 -2
- package/dist/WorkflowStepRenderer.js.map +1 -1
- package/dist/WorkflowStepper.d.ts +1 -0
- package/dist/WorkflowStepper.d.ts.map +1 -1
- package/dist/WorkflowStepper.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/useWorkflow.d.ts +2 -0
- package/dist/useWorkflow.d.ts.map +1 -1
- package/package.json +15 -5
- package/dist/_virtual/rolldown_runtime.js +0 -22
- package/dist/design-system/src/components/atoms/EmptyState.js +0 -15
- package/dist/design-system/src/components/atoms/EmptyState.js.map +0 -1
- package/dist/design-system/src/components/atoms/LoaderCircular.js +0 -45
- package/dist/design-system/src/components/atoms/LoaderCircular.js.map +0 -1
- package/dist/design-system/src/components/atoms/Stepper.js +0 -15
- package/dist/design-system/src/components/atoms/Stepper.js.map +0 -1
- package/dist/design-system/src/components/molecules/LoaderBlock.js +0 -26
- package/dist/design-system/src/components/molecules/LoaderBlock.js.map +0 -1
- package/dist/ui-kit-web/dist/ui/empty-state.js +0 -44
- package/dist/ui-kit-web/dist/ui/empty-state.js.map +0 -1
- package/dist/ui-kit-web/dist/ui/form.js +0 -17
- package/dist/ui-kit-web/dist/ui/form.js.map +0 -1
- package/dist/ui-kit-web/dist/ui/stack.js +0 -159
- package/dist/ui-kit-web/dist/ui/stack.js.map +0 -1
- package/dist/ui-kit-web/dist/ui/stepper.js +0 -38
- package/dist/ui-kit-web/dist/ui/stepper.js.map +0 -1
- package/dist/ui-kit-web/dist/ui/utils.js +0 -14
- package/dist/ui-kit-web/dist/ui/utils.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { FormRef, Step, StepExecution, WorkflowSpec, WorkflowState } from "@lssm/lib.contracts/workflow";
|
|
3
4
|
|
|
4
5
|
//#region src/WorkflowStepRenderer.d.ts
|
|
5
6
|
interface WorkflowStepRendererProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowStepRenderer.d.ts","names":[],"sources":["../src/WorkflowStepRenderer.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkflowStepRenderer.d.ts","names":[],"sources":["../src/WorkflowStepRenderer.tsx"],"sourcesContent":[],"mappings":";;;;;UAUiB,yBAAA;QACT;SACC;EAFQ,SAAA,CAAA,EAAA,MAAA;EACT,eAAA,CAAA,EAAA,CAAA,IAAA,EAGmB,OAHnB,EAAA,IAAA,EAGkC,IAHlC,EAAA,GAG2C,KAAA,CAAM,SAHjD;EACC,oBAAA,CAAA,EAAA,CAAA,IAAA,EAGuB,IAHvB,EAAA,GAGgC,KAAA,CAAM,SAHtC;EAEkB,kBAAA,CAAA,EAAA,CAAA,IAAA,EAEG,IAFH,EAAA,GAEY,KAAA,CAAM,SAFlB;EAAe,eAAA,CAAA,EAGtB,KAAA,CAAM,SAHgB;EAAS,iBAAM,CAAA,EAInC,KAAA,CAAM,SAJ6B;EACzB,iBAAA,CAAA,EAIV,KAAA,CAAM,SAJI;EAAS,cAAM,CAAA,EAAA,CAAA,KAAA,EAMpC,aANoC,EAAA,IAAA,EAOrC,aAPqC,GAAA,SAAA,EAAA,GAQxC,KAAA,CAAM,SARkC;;AACF,iBAU7B,oBAAA,CAV6B;EAAA,IAAA;EAAA,KAAA;EAAA,SAAA;EAAA,eAAA;EAAA,oBAAA;EAAA,kBAAA;EAAA,eAAA;EAAA,iBAAA;EAAA,iBAAA;EAAA;AAAA,CAAA,EAqB1C,yBArB0C,CAAA,EAqBjB,kBAAA,CAAA,GAAA,CAAA,OArBiB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EmptyState } from "./design-system/src/components/atoms/EmptyState.js";
|
|
2
|
-
import { LoaderBlock } from "./design-system/src/components/molecules/LoaderBlock.js";
|
|
3
1
|
import "react";
|
|
2
|
+
import { EmptyState, LoaderBlock } from "@lssm/lib.design-system";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
|
|
6
5
|
//#region src/WorkflowStepRenderer.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowStepRenderer.js","names":[],"sources":["../src/WorkflowStepRenderer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EmptyState, LoaderBlock } from '@lssm/lib.design-system';\nimport type {\n FormRef,\n Step,\n WorkflowSpec,\n WorkflowState,\n StepExecution,\n} from '@lssm/lib.contracts/workflow';\n\nexport interface WorkflowStepRendererProps {\n spec: WorkflowSpec;\n state: WorkflowState | null;\n className?: string;\n renderHumanStep?: (form: FormRef, step: Step) => React.ReactNode;\n renderAutomationStep?: (step: Step) => React.ReactNode;\n renderDecisionStep?: (step: Step) => React.ReactNode;\n loadingFallback?: React.ReactNode;\n completedFallback?: React.ReactNode;\n cancelledFallback?: React.ReactNode;\n failedFallback?: (\n state: WorkflowState,\n last: StepExecution | undefined\n ) => React.ReactNode;\n}\n\nexport function WorkflowStepRenderer({\n spec,\n state,\n className,\n renderHumanStep,\n renderAutomationStep,\n renderDecisionStep,\n loadingFallback,\n completedFallback,\n cancelledFallback,\n failedFallback,\n}: WorkflowStepRendererProps) {\n const steps = spec.definition.steps;\n if (!steps.length) {\n return (\n <div className={className}>\n <EmptyState\n title=\"No steps defined\"\n description=\"Add at least one step to this workflow to render it.\"\n />\n </div>\n );\n }\n\n if (!state) {\n return (\n <div className={className}>\n {loadingFallback ?? (\n <LoaderBlock\n label=\"Loading workflow\"\n description=\"Fetching workflow state...\"\n />\n )}\n </div>\n );\n }\n\n const lastExecution = state.history.at(-1);\n\n if (state.status === 'failed') {\n return (\n <div className={className}>\n {failedFallback?.(state, lastExecution) ?? (\n <EmptyState\n title=\"Workflow failed\"\n description={\n lastExecution?.error ??\n 'Fix the underlying issue and retry the step.'\n }\n />\n )}\n </div>\n );\n }\n\n if (state.status === 'cancelled') {\n return (\n <div className={className}>\n {cancelledFallback ?? (\n <EmptyState\n title=\"Workflow cancelled\"\n description=\"This workflow has been cancelled. Restart it to resume.\"\n />\n )}\n </div>\n );\n }\n\n if (state.status === 'completed') {\n return (\n <div className={className}>\n {completedFallback ?? (\n <EmptyState\n title=\"Workflow complete\"\n description=\"All steps have been executed successfully.\"\n />\n )}\n </div>\n );\n }\n\n const activeStep =\n steps.find((step) => step.id === state.currentStep) ?? steps[0];\n\n if (!activeStep) {\n return (\n <div className={className}>\n <EmptyState\n title=\"No active step\"\n description=\"This workflow has no active step.\"\n />\n </div>\n );\n }\n\n switch (activeStep.type) {\n case 'human': {\n const form = activeStep.action?.form;\n if (form && renderHumanStep) {\n return (\n <div className={className}>{renderHumanStep(form, activeStep)}</div>\n );\n }\n return (\n <div className={className}>\n <EmptyState\n title=\"Form renderer missing\"\n description=\"Provide renderHumanStep to render this human step's form.\"\n />\n </div>\n );\n }\n case 'automation': {\n if (renderAutomationStep) {\n return (\n <div className={className}>{renderAutomationStep(activeStep)}</div>\n );\n }\n return (\n <div className={className}>\n <EmptyState\n title=\"Automation step in progress\"\n description={`Waiting for automation \"${activeStep.label}\" to finish.`}\n />\n </div>\n );\n }\n case 'decision': {\n if (renderDecisionStep) {\n return (\n <div className={className}>{renderDecisionStep(activeStep)}</div>\n );\n }\n return (\n <div className={className}>\n <EmptyState\n title=\"Decision step awaiting input\"\n description=\"Provide a custom decision renderer via renderDecisionStep.\"\n />\n </div>\n );\n }\n default:\n return (\n <div className={className}>\n <EmptyState\n title=\"Unknown step type\"\n description={`Step \"${activeStep.id}\" has an unsupported type.`}\n />\n </div>\n );\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkflowStepRenderer.js","names":[],"sources":["../src/WorkflowStepRenderer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EmptyState, LoaderBlock } from '@lssm/lib.design-system';\nimport type {\n FormRef,\n Step,\n WorkflowSpec,\n WorkflowState,\n StepExecution,\n} from '@lssm/lib.contracts/workflow';\n\nexport interface WorkflowStepRendererProps {\n spec: WorkflowSpec;\n state: WorkflowState | null;\n className?: string;\n renderHumanStep?: (form: FormRef, step: Step) => React.ReactNode;\n renderAutomationStep?: (step: Step) => React.ReactNode;\n renderDecisionStep?: (step: Step) => React.ReactNode;\n loadingFallback?: React.ReactNode;\n completedFallback?: React.ReactNode;\n cancelledFallback?: React.ReactNode;\n failedFallback?: (\n state: WorkflowState,\n last: StepExecution | undefined\n ) => React.ReactNode;\n}\n\nexport function WorkflowStepRenderer({\n spec,\n state,\n className,\n renderHumanStep,\n renderAutomationStep,\n renderDecisionStep,\n loadingFallback,\n completedFallback,\n cancelledFallback,\n failedFallback,\n}: WorkflowStepRendererProps) {\n const steps = spec.definition.steps;\n if (!steps.length) {\n return (\n <div className={className}>\n <EmptyState\n title=\"No steps defined\"\n description=\"Add at least one step to this workflow to render it.\"\n />\n </div>\n );\n }\n\n if (!state) {\n return (\n <div className={className}>\n {loadingFallback ?? (\n <LoaderBlock\n label=\"Loading workflow\"\n description=\"Fetching workflow state...\"\n />\n )}\n </div>\n );\n }\n\n const lastExecution = state.history.at(-1);\n\n if (state.status === 'failed') {\n return (\n <div className={className}>\n {failedFallback?.(state, lastExecution) ?? (\n <EmptyState\n title=\"Workflow failed\"\n description={\n lastExecution?.error ??\n 'Fix the underlying issue and retry the step.'\n }\n />\n )}\n </div>\n );\n }\n\n if (state.status === 'cancelled') {\n return (\n <div className={className}>\n {cancelledFallback ?? (\n <EmptyState\n title=\"Workflow cancelled\"\n description=\"This workflow has been cancelled. Restart it to resume.\"\n />\n )}\n </div>\n );\n }\n\n if (state.status === 'completed') {\n return (\n <div className={className}>\n {completedFallback ?? (\n <EmptyState\n title=\"Workflow complete\"\n description=\"All steps have been executed successfully.\"\n />\n )}\n </div>\n );\n }\n\n const activeStep =\n steps.find((step) => step.id === state.currentStep) ?? steps[0];\n\n if (!activeStep) {\n return (\n <div className={className}>\n <EmptyState\n title=\"No active step\"\n description=\"This workflow has no active step.\"\n />\n </div>\n );\n }\n\n switch (activeStep.type) {\n case 'human': {\n const form = activeStep.action?.form;\n if (form && renderHumanStep) {\n return (\n <div className={className}>{renderHumanStep(form, activeStep)}</div>\n );\n }\n return (\n <div className={className}>\n <EmptyState\n title=\"Form renderer missing\"\n description=\"Provide renderHumanStep to render this human step's form.\"\n />\n </div>\n );\n }\n case 'automation': {\n if (renderAutomationStep) {\n return (\n <div className={className}>{renderAutomationStep(activeStep)}</div>\n );\n }\n return (\n <div className={className}>\n <EmptyState\n title=\"Automation step in progress\"\n description={`Waiting for automation \"${activeStep.label}\" to finish.`}\n />\n </div>\n );\n }\n case 'decision': {\n if (renderDecisionStep) {\n return (\n <div className={className}>{renderDecisionStep(activeStep)}</div>\n );\n }\n return (\n <div className={className}>\n <EmptyState\n title=\"Decision step awaiting input\"\n description=\"Provide a custom decision renderer via renderDecisionStep.\"\n />\n </div>\n );\n }\n default:\n return (\n <div className={className}>\n <EmptyState\n title=\"Unknown step type\"\n description={`Step \"${activeStep.id}\" has an unsupported type.`}\n />\n </div>\n );\n }\n}\n"],"mappings":";;;;;AA0BA,SAAgB,qBAAqB,EACnC,MACA,OACA,WACA,iBACA,sBACA,oBACA,iBACA,mBACA,mBACA,kBAC4B;CAC5B,MAAM,QAAQ,KAAK,WAAW;AAC9B,KAAI,CAAC,MAAM,OACT,QACE,oBAAC;EAAe;YACd,oBAAC;GACC,OAAM;GACN,aAAY;IACZ;GACE;AAIV,KAAI,CAAC,MACH,QACE,oBAAC;EAAe;YACb,mBACC,oBAAC;GACC,OAAM;GACN,aAAY;IACZ;GAEA;CAIV,MAAM,gBAAgB,MAAM,QAAQ,GAAG,GAAG;AAE1C,KAAI,MAAM,WAAW,SACnB,QACE,oBAAC;EAAe;YACb,iBAAiB,OAAO,cAAc,IACrC,oBAAC;GACC,OAAM;GACN,aACE,eAAe,SACf;IAEF;GAEA;AAIV,KAAI,MAAM,WAAW,YACnB,QACE,oBAAC;EAAe;YACb,qBACC,oBAAC;GACC,OAAM;GACN,aAAY;IACZ;GAEA;AAIV,KAAI,MAAM,WAAW,YACnB,QACE,oBAAC;EAAe;YACb,qBACC,oBAAC;GACC,OAAM;GACN,aAAY;IACZ;GAEA;CAIV,MAAM,aACJ,MAAM,MAAM,SAAS,KAAK,OAAO,MAAM,YAAY,IAAI,MAAM;AAE/D,KAAI,CAAC,WACH,QACE,oBAAC;EAAe;YACd,oBAAC;GACC,OAAM;GACN,aAAY;IACZ;GACE;AAIV,SAAQ,WAAW,MAAnB;EACE,KAAK,SAAS;GACZ,MAAM,OAAO,WAAW,QAAQ;AAChC,OAAI,QAAQ,gBACV,QACE,oBAAC;IAAe;cAAY,gBAAgB,MAAM,WAAW;KAAO;AAGxE,UACE,oBAAC;IAAe;cACd,oBAAC;KACC,OAAM;KACN,aAAY;MACZ;KACE;;EAGV,KAAK;AACH,OAAI,qBACF,QACE,oBAAC;IAAe;cAAY,qBAAqB,WAAW;KAAO;AAGvE,UACE,oBAAC;IAAe;cACd,oBAAC;KACC,OAAM;KACN,aAAa,2BAA2B,WAAW,MAAM;MACzD;KACE;EAGV,KAAK;AACH,OAAI,mBACF,QACE,oBAAC;IAAe;cAAY,mBAAmB,WAAW;KAAO;AAGrE,UACE,oBAAC;IAAe;cACd,oBAAC;KACC,OAAM;KACN,aAAY;MACZ;KACE;EAGV,QACE,QACE,oBAAC;GAAe;aACd,oBAAC;IACC,OAAM;IACN,aAAa,SAAS,WAAW,GAAG;KACpC;IACE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowStepper.d.ts","names":[],"sources":["../src/WorkflowStepper.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkflowStepper.d.ts","names":[],"sources":["../src/WorkflowStepper.tsx"],"sourcesContent":[],"mappings":";;;;UAIiB,oBAAA;QACT;SACC;EAFQ,SAAA,CAAA,EAAA,MAAA;EAOD,UAAA,CAAA,EAAA,OAAe;;AAE7B,iBAFc,eAAA,CAEd;EAAA,IAAA;EAAA,KAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAGC,oBAHD,CAAA,EAGqB,kBAAA,CAAA,GAAA,CAAA,OAHrB"}
|
package/dist/WorkflowStepper.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { WorkflowStepper } from "./WorkflowStepper.js";
|
|
|
3
3
|
import { UseWorkflowOptions, UseWorkflowResult, useWorkflow } from "./useWorkflow.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { DefaultValues, Resolver, UseFormReturn } from "react-hook-form";
|
|
6
|
+
import { ListFetcher, ListState } from "@lssm/lib.presentation-runtime-core";
|
|
6
7
|
|
|
7
8
|
//#region src/index.d.ts
|
|
8
9
|
interface UsePresentationControllerOpts<TFilters extends Record<string, unknown>, TVars, TItem> {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useForm } from "./ui-kit-web/dist/ui/form.js";
|
|
2
1
|
import { WorkflowStepRenderer } from "./WorkflowStepRenderer.js";
|
|
3
2
|
import { WorkflowStepper } from "./WorkflowStepper.js";
|
|
4
3
|
import { useWorkflow } from "./useWorkflow.js";
|
|
5
4
|
import * as React from "react";
|
|
5
|
+
import { useForm } from "@lssm/lib.ui-kit-web/ui/form";
|
|
6
6
|
|
|
7
7
|
//#region src/index.ts
|
|
8
8
|
function usePresentationController({ defaults, form: formOpts, toVariables, fetcher, toChips, useUrlState, replace }) {
|
package/dist/useWorkflow.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWorkflow.d.ts","names":[],"sources":["../src/useWorkflow.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useWorkflow.d.ts","names":[],"sources":["../src/useWorkflow.ts"],"sourcesContent":[],"mappings":";;;UAMiB,kBAAA;;EAAA,MAAA,EAEP,cAFyB;EAOlB,WAAA,CAAA,EAAA,OAAiB;EACzB,iBAAA,CAAA,EAAA,MAAA;;AAIQ,UALA,iBAAA,CAKA;EACmB,KAAA,EAL3B,aAK2B,GAAA,IAAA;EACpB,SAAA,EAAA,OAAA;EAAO,KAAA,EAJd,KAIc,GAAA,IAAA;EAGP,WAAA,EAAA,OAAW;EACzB,OAAA,EAAA,GAAA,GANe,OAMf,CAAA,IAAA,CAAA;EACA,WAAA,EAAA,CAAA,KAAA,CAAA,EAAA,OAAA,EAAA,GANkC,OAMlC,CAAA,IAAA,CAAA;EACA,MAAA,EAAA,GAAA,GANc,OAMd,CAAA,IAAA,CAAA;;AAEC,iBALa,WAAA,CAKb;EAAA,UAAA;EAAA,MAAA;EAAA,WAAA;EAAA;AAAA,CAAA,EAAA,kBAAA,CAAA,EAAqB,iBAArB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.presentation-runtime-react",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"react": "^19.1.0",
|
|
20
20
|
"react-hook-form": "7.66.0",
|
|
21
21
|
"zod": "^4.1.5",
|
|
22
|
-
"@lssm/lib.presentation-runtime-core": "^1.7.
|
|
22
|
+
"@lssm/lib.presentation-runtime-core": "^1.7.4"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@lssm/lib.presentation-runtime-core": "^1.7.
|
|
26
|
-
"@lssm/lib.contracts": "^1.7.
|
|
27
|
-
"@lssm/lib.design-system": "^1.7.
|
|
25
|
+
"@lssm/lib.presentation-runtime-core": "^1.7.4",
|
|
26
|
+
"@lssm/lib.contracts": "^1.7.4",
|
|
27
|
+
"@lssm/lib.design-system": "^1.7.4",
|
|
28
|
+
"@lssm/lib.ui-kit-web": "^1.7.4"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"dist",
|
|
@@ -36,5 +37,14 @@
|
|
|
36
37
|
"./WorkflowStepper": "./dist/WorkflowStepper.js",
|
|
37
38
|
"./WorkflowStepRenderer": "./dist/WorkflowStepRenderer.js",
|
|
38
39
|
"./*": "./*"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"exports": {
|
|
43
|
+
".": "./dist/index.js",
|
|
44
|
+
"./useWorkflow": "./dist/useWorkflow.js",
|
|
45
|
+
"./WorkflowStepper": "./dist/WorkflowStepper.js",
|
|
46
|
+
"./WorkflowStepRenderer": "./dist/WorkflowStepRenderer.js",
|
|
47
|
+
"./*": "./*"
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __esm = (fn, res) => function() {
|
|
7
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
-
get: ((k) => from[k]).bind(null, key),
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { __esm };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { EmptyState } from "../../../../ui-kit-web/dist/ui/empty-state.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
//#region ../design-system/src/components/atoms/EmptyState.tsx
|
|
9
|
-
function EmptyState$1(props) {
|
|
10
|
-
return /* @__PURE__ */ jsx(EmptyState, { ...props });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { EmptyState$1 as EmptyState };
|
|
15
|
-
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.js","names":["EmptyState","WebEmptyState"],"sources":["../../../../../../design-system/src/components/atoms/EmptyState.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n EmptyState as WebEmptyState,\n type EmptyStateProps,\n} from '@lssm/lib.ui-kit-web/ui/empty-state';\n\nexport function EmptyState(props: EmptyStateProps) {\n return <WebEmptyState {...props} />;\n}\n"],"mappings":";;;;;;;;AAQA,SAAgBA,aAAW,OAAwB;AACjD,QAAO,oBAACC,cAAc,GAAI,QAAS"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "../../../../ui-kit-web/dist/ui/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import { Loader2 } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
//#region ../design-system/src/components/atoms/LoaderCircular.tsx
|
|
8
|
-
init_utils();
|
|
9
|
-
const spinnerVariants = cva("animate-spin", {
|
|
10
|
-
variants: {
|
|
11
|
-
size: {
|
|
12
|
-
sm: "h-4 w-4",
|
|
13
|
-
md: "h-5 w-5",
|
|
14
|
-
lg: "h-6 w-6"
|
|
15
|
-
},
|
|
16
|
-
tone: {
|
|
17
|
-
default: "text-foreground",
|
|
18
|
-
muted: "text-muted-foreground"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
size: "md",
|
|
23
|
-
tone: "muted"
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
function LoaderCircular({ size, tone, label, className,...props }) {
|
|
27
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
28
|
-
className: cn("inline-flex items-center gap-2", className),
|
|
29
|
-
role: "status",
|
|
30
|
-
"aria-live": "polite",
|
|
31
|
-
"aria-busy": true,
|
|
32
|
-
...props,
|
|
33
|
-
children: [/* @__PURE__ */ jsx(Loader2, { className: cn(spinnerVariants({
|
|
34
|
-
size,
|
|
35
|
-
tone
|
|
36
|
-
})) }), label ? /* @__PURE__ */ jsx("span", {
|
|
37
|
-
className: "text-muted-foreground text-base",
|
|
38
|
-
children: label
|
|
39
|
-
}) : null]
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { LoaderCircular };
|
|
45
|
-
//# sourceMappingURL=LoaderCircular.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoaderCircular.js","names":[],"sources":["../../../../../../design-system/src/components/atoms/LoaderCircular.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Loader2 } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@lssm/lib.ui-kit-web/ui/utils';\n\nconst spinnerVariants = cva('animate-spin', {\n variants: {\n size: {\n sm: 'h-4 w-4',\n md: 'h-5 w-5',\n lg: 'h-6 w-6',\n },\n tone: {\n default: 'text-foreground',\n muted: 'text-muted-foreground',\n },\n },\n defaultVariants: { size: 'md', tone: 'muted' },\n});\n\nexport type LoaderCircularProps = React.HTMLAttributes<HTMLDivElement> &\n VariantProps<typeof spinnerVariants> & {\n label?: React.ReactNode;\n };\n\nexport function LoaderCircular({\n size,\n tone,\n label,\n className,\n ...props\n}: LoaderCircularProps) {\n return (\n <div\n className={cn('inline-flex items-center gap-2', className)}\n role=\"status\"\n aria-live=\"polite\"\n aria-busy\n {...props}\n >\n <Loader2 className={cn(spinnerVariants({ size, tone }))} />\n {label ? (\n <span className=\"text-muted-foreground text-base\">{label}</span>\n ) : null}\n </div>\n );\n}\n\nexport default LoaderCircular;\n"],"mappings":";;;;;;;YAGmD;AAEnD,MAAM,kBAAkB,IAAI,gBAAgB;CAC1C,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,MAAM;GACJ,SAAS;GACT,OAAO;GACR;EACF;CACD,iBAAiB;EAAE,MAAM;EAAM,MAAM;EAAS;CAC/C,CAAC;AAOF,SAAgB,eAAe,EAC7B,MACA,MACA,OACA,UACA,GAAG,SACmB;AACtB,QACE,qBAAC;EACC,WAAW,GAAG,kCAAkC,UAAU;EAC1D,MAAK;EACL,aAAU;EACV;EACA,GAAI;aAEJ,oBAAC,WAAQ,WAAW,GAAG,gBAAgB;GAAE;GAAM;GAAM,CAAC,CAAC,GAAI,EAC1D,QACC,oBAAC;GAAK,WAAU;aAAmC;IAAa,GAC9D;GACA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { Stepper } from "../../../../ui-kit-web/dist/ui/stepper.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
//#region ../design-system/src/components/atoms/Stepper.tsx
|
|
9
|
-
function Stepper$1(props) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Stepper, { ...props });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { Stepper$1 as Stepper };
|
|
15
|
-
//# sourceMappingURL=Stepper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","names":["Stepper","WebStepper"],"sources":["../../../../../../design-system/src/components/atoms/Stepper.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n Stepper as WebStepper,\n type StepperProps,\n} from '@lssm/lib.ui-kit-web/ui/stepper';\n\nexport function Stepper(props: StepperProps) {\n return <WebStepper {...props} />;\n}\n"],"mappings":";;;;;;;;AAQA,SAAgBA,UAAQ,OAAqB;AAC3C,QAAO,oBAACC,WAAW,GAAI,QAAS"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "../../../../ui-kit-web/dist/ui/utils.js";
|
|
2
|
-
import { LoaderCircular } from "../atoms/LoaderCircular.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region ../design-system/src/components/molecules/LoaderBlock.tsx
|
|
7
|
-
init_utils();
|
|
8
|
-
function LoaderBlock({ label, description, className, size = "md" }) {
|
|
9
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className: cn("flex items-center justify-center p-6", className),
|
|
11
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
12
|
-
className: "inline-flex items-center gap-3",
|
|
13
|
-
children: [/* @__PURE__ */ jsx(LoaderCircular, {
|
|
14
|
-
size,
|
|
15
|
-
label
|
|
16
|
-
}), description ? /* @__PURE__ */ jsx("span", {
|
|
17
|
-
className: "text-muted-foreground text-base",
|
|
18
|
-
children: description
|
|
19
|
-
}) : null]
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
export { LoaderBlock };
|
|
26
|
-
//# sourceMappingURL=LoaderBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoaderBlock.js","names":[],"sources":["../../../../../../design-system/src/components/molecules/LoaderBlock.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@lssm/lib.ui-kit-web/ui/utils';\nimport { LoaderCircular } from '../atoms/LoaderCircular';\n\nexport interface LoaderBlockProps {\n label?: React.ReactNode;\n description?: React.ReactNode;\n className?: string;\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport function LoaderBlock({\n label,\n description,\n className,\n size = 'md',\n}: LoaderBlockProps) {\n return (\n <div className={cn('flex items-center justify-center p-6', className)}>\n <div className=\"inline-flex items-center gap-3\">\n <LoaderCircular size={size} label={label} />\n {description ? (\n <span className=\"text-muted-foreground text-base\">{description}</span>\n ) : null}\n </div>\n </div>\n );\n}\n\nexport default LoaderBlock;\n"],"mappings":";;;;;;YACmD;AAUnD,SAAgB,YAAY,EAC1B,OACA,aACA,WACA,OAAO,QACY;AACnB,QACE,oBAAC;EAAI,WAAW,GAAG,wCAAwC,UAAU;YACnE,qBAAC;GAAI,WAAU;cACb,oBAAC;IAAqB;IAAa;KAAS,EAC3C,cACC,oBAAC;IAAK,WAAU;cAAmC;KAAmB,GACpE;IACA;GACF"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "./utils.js";
|
|
2
|
-
import { VStack } from "./stack.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
|
-
|
|
7
|
-
//#region ../ui-kit-web/dist/ui/empty-state.js
|
|
8
|
-
init_utils();
|
|
9
|
-
const containerVariants = cva("items-center text-center", {
|
|
10
|
-
variants: { density: {
|
|
11
|
-
compact: "gap-3 p-6",
|
|
12
|
-
default: "gap-4 p-8"
|
|
13
|
-
} },
|
|
14
|
-
defaultVariants: { density: "default" }
|
|
15
|
-
});
|
|
16
|
-
function EmptyState({ icon, title, description, primaryAction, secondaryAction, className, density }) {
|
|
17
|
-
return /* @__PURE__ */ jsxs(VStack, {
|
|
18
|
-
className: cn(containerVariants({ density }), className),
|
|
19
|
-
children: [
|
|
20
|
-
icon ? /* @__PURE__ */ jsx("div", {
|
|
21
|
-
className: "bg-muted flex h-12 w-12 items-center justify-center rounded-full",
|
|
22
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
23
|
-
className: "text-muted-foreground flex items-center justify-center",
|
|
24
|
-
children: icon
|
|
25
|
-
})
|
|
26
|
-
}) : null,
|
|
27
|
-
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
28
|
-
className: "font-medium",
|
|
29
|
-
children: title
|
|
30
|
-
}), description ? /* @__PURE__ */ jsx("p", {
|
|
31
|
-
className: "text-muted-foreground text-base",
|
|
32
|
-
children: description
|
|
33
|
-
}) : null] }),
|
|
34
|
-
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", {
|
|
35
|
-
className: "flex items-center justify-center gap-2",
|
|
36
|
-
children: [primaryAction, secondaryAction]
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { EmptyState };
|
|
44
|
-
//# sourceMappingURL=empty-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","names":[],"sources":["../../../../../ui-kit-web/dist/ui/empty-state.js"],"sourcesContent":["import { cn } from \"./utils.js\";\nimport { VStack } from \"./stack.js\";\nimport \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { cva } from \"class-variance-authority\";\n\n//#region ui/empty-state.tsx\nconst containerVariants = cva(\"items-center text-center\", {\n\tvariants: { density: {\n\t\tcompact: \"gap-3 p-6\",\n\t\tdefault: \"gap-4 p-8\"\n\t} },\n\tdefaultVariants: { density: \"default\" }\n});\nfunction EmptyState({ icon, title, description, primaryAction, secondaryAction, className, density }) {\n\treturn /* @__PURE__ */ jsxs(VStack, {\n\t\tclassName: cn(containerVariants({ density }), className),\n\t\tchildren: [\n\t\t\ticon ? /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\tclassName: \"bg-muted flex h-12 w-12 items-center justify-center rounded-full\",\n\t\t\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\tclassName: \"text-muted-foreground flex items-center justify-center\",\n\t\t\t\t\tchildren: icon\n\t\t\t\t})\n\t\t\t}) : null,\n\t\t\t/* @__PURE__ */ jsxs(\"div\", { children: [/* @__PURE__ */ jsx(\"h3\", {\n\t\t\t\tclassName: \"font-medium\",\n\t\t\t\tchildren: title\n\t\t\t}), description ? /* @__PURE__ */ jsx(\"p\", {\n\t\t\t\tclassName: \"text-muted-foreground text-base\",\n\t\t\t\tchildren: description\n\t\t\t}) : null] }),\n\t\t\t(primaryAction || secondaryAction) && /* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\tclassName: \"flex items-center justify-center gap-2\",\n\t\t\t\tchildren: [primaryAction, secondaryAction]\n\t\t\t})\n\t\t]\n\t});\n}\n\n//#endregion\nexport { EmptyState };\n//# sourceMappingURL=empty-state.js.map"],"mappings":";;;;;;;YAAgC;AAOhC,MAAM,oBAAoB,IAAI,4BAA4B;CACzD,UAAU,EAAE,SAAS;EACpB,SAAS;EACT,SAAS;EACT,EAAE;CACH,iBAAiB,EAAE,SAAS,WAAW;CACvC,CAAC;AACF,SAAS,WAAW,EAAE,MAAM,OAAO,aAAa,eAAe,iBAAiB,WAAW,WAAW;AACrG,QAAuB,qBAAK,QAAQ;EACnC,WAAW,GAAG,kBAAkB,EAAE,SAAS,CAAC,EAAE,UAAU;EACxD,UAAU;GACT,OAAuB,oBAAI,OAAO;IACjC,WAAW;IACX,UAA0B,oBAAI,OAAO;KACpC,WAAW;KACX,UAAU;KACV,CAAC;IACF,CAAC,GAAG;GACW,qBAAK,OAAO,EAAE,UAAU,CAAiB,oBAAI,MAAM;IAClE,WAAW;IACX,UAAU;IACV,CAAC,EAAE,cAA8B,oBAAI,KAAK;IAC1C,WAAW;IACX,UAAU;IACV,CAAC,GAAG,KAAK,EAAE,CAAC;IACZ,iBAAiB,oBAAoC,qBAAK,OAAO;IACjE,WAAW;IACX,UAAU,CAAC,eAAe,gBAAgB;IAC1C,CAAC;GACF;EACD,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as React$1 from "react";
|
|
5
|
-
import { useForm } from "react-hook-form";
|
|
6
|
-
import "@hookform/resolvers/zod";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import "@radix-ui/react-label";
|
|
9
|
-
import "@radix-ui/react-slot";
|
|
10
|
-
|
|
11
|
-
//#region ../ui-kit-web/dist/ui/form.js
|
|
12
|
-
const FormFieldContext = React$1.createContext({});
|
|
13
|
-
const FormItemContext = React$1.createContext({});
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
export { useForm };
|
|
17
|
-
//# sourceMappingURL=form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":[],"sources":["../../../../../ui-kit-web/dist/ui/form.js"],"sourcesContent":["'use client';\n\n\nimport { cn } from \"./utils.js\";\nimport { Label } from \"./label.js\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport \"@radix-ui/react-label\";\nimport { Controller, FormProvider, useFieldArray, useForm, useFormContext, useFormState } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\n\n//#region ui/form.tsx\nconst Form = FormProvider;\nconst FormFieldContext = React$1.createContext({});\nconst FormField = ({ ...props }) => {\n\treturn /* @__PURE__ */ jsx(FormFieldContext.Provider, {\n\t\tvalue: { name: props.name },\n\t\tchildren: /* @__PURE__ */ jsx(Controller, { ...props })\n\t});\n};\nconst useFormField = () => {\n\tconst fieldContext = React$1.useContext(FormFieldContext);\n\tconst itemContext = React$1.useContext(FormItemContext);\n\tconst { getFieldState } = useFormContext();\n\tconst formState = useFormState({ name: fieldContext.name });\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\tif (!fieldContext) throw new Error(\"useFormField should be used within <FormField>\");\n\tconst { id } = itemContext;\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState\n\t};\n};\nconst FormItemContext = React$1.createContext({});\nfunction FormItem({ className,...props }) {\n\tconst id = React$1.useId();\n\treturn /* @__PURE__ */ jsx(FormItemContext.Provider, {\n\t\tvalue: { id },\n\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\"data-slot\": \"form-item\",\n\t\t\tclassName: cn(\"grid gap-2\", className),\n\t\t\t...props\n\t\t})\n\t});\n}\nfunction FormLabel({ className,...props }) {\n\tconst { error, formItemId } = useFormField();\n\treturn /* @__PURE__ */ jsx(Label, {\n\t\t\"data-slot\": \"form-label\",\n\t\t\"data-error\": !!error,\n\t\tclassName: cn(\"data-[error=true]:text-destructive\", className),\n\t\thtmlFor: formItemId,\n\t\t...props\n\t});\n}\nfunction FormControl({ ...props }) {\n\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\treturn /* @__PURE__ */ jsx(Slot, {\n\t\t\"data-slot\": \"form-control\",\n\t\tid: formItemId,\n\t\t\"aria-describedby\": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,\n\t\t\"aria-invalid\": !!error,\n\t\t...props\n\t});\n}\nfunction FormDescription({ className,...props }) {\n\tconst { formDescriptionId } = useFormField();\n\treturn /* @__PURE__ */ jsx(\"p\", {\n\t\t\"data-slot\": \"form-description\",\n\t\tid: formDescriptionId,\n\t\tclassName: cn(\"text-muted-foreground text-sm\", className),\n\t\t...props\n\t});\n}\nfunction FormMessage({ className,...props }) {\n\tconst { error, formMessageId } = useFormField();\n\tconst body = error ? String(error?.message ?? \"\") : props.children;\n\tif (!body) return null;\n\treturn /* @__PURE__ */ jsx(\"p\", {\n\t\t\"data-slot\": \"form-message\",\n\t\tid: formMessageId,\n\t\tclassName: cn(\"text-destructive text-sm\", className),\n\t\t...props,\n\t\tchildren: body\n\t});\n}\n\n//#endregion\nexport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFieldArray, useForm, useFormField, zodResolver };\n//# sourceMappingURL=form.js.map"],"mappings":";;;;;;;;;;;AAcA,MAAM,mBAAmB,QAAQ,cAAc,EAAE,CAAC;AAwBlD,MAAM,kBAAkB,QAAQ,cAAc,EAAE,CAAC"}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "./utils.js";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
|
|
6
|
-
//#region ../ui-kit-web/dist/ui/stack.js
|
|
7
|
-
init_utils();
|
|
8
|
-
const vStackVariants = cva("flex flex-col", {
|
|
9
|
-
variants: {
|
|
10
|
-
gap: {
|
|
11
|
-
none: "gap-0",
|
|
12
|
-
xs: "gap-1",
|
|
13
|
-
sm: "gap-2",
|
|
14
|
-
md: "gap-3",
|
|
15
|
-
lg: "gap-4",
|
|
16
|
-
xl: "gap-6",
|
|
17
|
-
"2xl": "gap-8"
|
|
18
|
-
},
|
|
19
|
-
align: {
|
|
20
|
-
start: "items-start",
|
|
21
|
-
center: "items-center",
|
|
22
|
-
end: "items-end",
|
|
23
|
-
stretch: "items-stretch"
|
|
24
|
-
},
|
|
25
|
-
justify: {
|
|
26
|
-
start: "justify-start",
|
|
27
|
-
center: "justify-center",
|
|
28
|
-
end: "justify-end",
|
|
29
|
-
between: "justify-between",
|
|
30
|
-
around: "justify-around",
|
|
31
|
-
evenly: "justify-evenly"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
gap: "md",
|
|
36
|
-
align: "stretch",
|
|
37
|
-
justify: "start"
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const VStack = React$1.forwardRef(({ className, gap, align, justify, as = "div",...props }, ref) => {
|
|
41
|
-
return /* @__PURE__ */ jsx(as, {
|
|
42
|
-
ref,
|
|
43
|
-
className: cn(vStackVariants({
|
|
44
|
-
gap,
|
|
45
|
-
align,
|
|
46
|
-
justify
|
|
47
|
-
}), className),
|
|
48
|
-
...props
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
VStack.displayName = "VStack";
|
|
52
|
-
const hStackVariants = cva("flex flex-row", {
|
|
53
|
-
variants: {
|
|
54
|
-
gap: {
|
|
55
|
-
none: "gap-0",
|
|
56
|
-
xs: "gap-1",
|
|
57
|
-
sm: "gap-2",
|
|
58
|
-
md: "gap-3",
|
|
59
|
-
lg: "gap-4",
|
|
60
|
-
xl: "gap-6",
|
|
61
|
-
"2xl": "gap-8"
|
|
62
|
-
},
|
|
63
|
-
align: {
|
|
64
|
-
start: "items-start",
|
|
65
|
-
center: "items-center",
|
|
66
|
-
end: "items-end",
|
|
67
|
-
stretch: "items-stretch",
|
|
68
|
-
baseline: "items-baseline"
|
|
69
|
-
},
|
|
70
|
-
justify: {
|
|
71
|
-
start: "justify-start",
|
|
72
|
-
center: "justify-center",
|
|
73
|
-
end: "justify-end",
|
|
74
|
-
between: "justify-between",
|
|
75
|
-
around: "justify-around",
|
|
76
|
-
evenly: "justify-evenly"
|
|
77
|
-
},
|
|
78
|
-
wrap: {
|
|
79
|
-
nowrap: "flex-nowrap",
|
|
80
|
-
wrap: "flex-wrap",
|
|
81
|
-
wrapReverse: "flex-wrap-reverse"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
defaultVariants: {
|
|
85
|
-
gap: "md",
|
|
86
|
-
align: "center",
|
|
87
|
-
justify: "start",
|
|
88
|
-
wrap: "wrap"
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const HStack = React$1.forwardRef(({ className, gap, align, justify, wrap, as = "div",...props }, ref) => {
|
|
92
|
-
return /* @__PURE__ */ jsx(as, {
|
|
93
|
-
ref,
|
|
94
|
-
className: cn(hStackVariants({
|
|
95
|
-
gap,
|
|
96
|
-
align,
|
|
97
|
-
justify,
|
|
98
|
-
wrap
|
|
99
|
-
}), className),
|
|
100
|
-
...props
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
HStack.displayName = "HStack";
|
|
104
|
-
const boxVariants = cva("flex flex-row", {
|
|
105
|
-
variants: {
|
|
106
|
-
gap: {
|
|
107
|
-
none: "gap-0",
|
|
108
|
-
xs: "gap-1",
|
|
109
|
-
sm: "gap-2",
|
|
110
|
-
md: "gap-3",
|
|
111
|
-
lg: "gap-4",
|
|
112
|
-
xl: "gap-6",
|
|
113
|
-
"2xl": "gap-8"
|
|
114
|
-
},
|
|
115
|
-
align: {
|
|
116
|
-
start: "items-start",
|
|
117
|
-
center: "items-center",
|
|
118
|
-
end: "items-end",
|
|
119
|
-
stretch: "items-stretch",
|
|
120
|
-
baseline: "items-baseline"
|
|
121
|
-
},
|
|
122
|
-
justify: {
|
|
123
|
-
start: "justify-start",
|
|
124
|
-
center: "justify-center",
|
|
125
|
-
end: "justify-end",
|
|
126
|
-
between: "justify-between",
|
|
127
|
-
around: "justify-around",
|
|
128
|
-
evenly: "justify-evenly"
|
|
129
|
-
},
|
|
130
|
-
wrap: {
|
|
131
|
-
nowrap: "flex-nowrap",
|
|
132
|
-
wrap: "flex-wrap",
|
|
133
|
-
wrapReverse: "flex-wrap-reverse"
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
defaultVariants: {
|
|
137
|
-
gap: "md",
|
|
138
|
-
align: "center",
|
|
139
|
-
justify: "center",
|
|
140
|
-
wrap: "nowrap"
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
const Box = React$1.forwardRef(({ className, gap, align, justify, wrap, as = "div",...props }, ref) => {
|
|
144
|
-
return /* @__PURE__ */ jsx(as, {
|
|
145
|
-
ref,
|
|
146
|
-
className: cn(boxVariants({
|
|
147
|
-
gap,
|
|
148
|
-
align,
|
|
149
|
-
justify,
|
|
150
|
-
wrap
|
|
151
|
-
}), className),
|
|
152
|
-
...props
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
Box.displayName = "Box";
|
|
156
|
-
|
|
157
|
-
//#endregion
|
|
158
|
-
export { HStack, VStack };
|
|
159
|
-
//# sourceMappingURL=stack.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stack.js","names":[],"sources":["../../../../../ui-kit-web/dist/ui/stack.js"],"sourcesContent":["import { cn } from \"./utils.js\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { cva } from \"class-variance-authority\";\n\n//#region ui/stack.tsx\nconst vStackVariants = cva(\"flex flex-col\", {\n\tvariants: {\n\t\tgap: {\n\t\t\tnone: \"gap-0\",\n\t\t\txs: \"gap-1\",\n\t\t\tsm: \"gap-2\",\n\t\t\tmd: \"gap-3\",\n\t\t\tlg: \"gap-4\",\n\t\t\txl: \"gap-6\",\n\t\t\t\"2xl\": \"gap-8\"\n\t\t},\n\t\talign: {\n\t\t\tstart: \"items-start\",\n\t\t\tcenter: \"items-center\",\n\t\t\tend: \"items-end\",\n\t\t\tstretch: \"items-stretch\"\n\t\t},\n\t\tjustify: {\n\t\t\tstart: \"justify-start\",\n\t\t\tcenter: \"justify-center\",\n\t\t\tend: \"justify-end\",\n\t\t\tbetween: \"justify-between\",\n\t\t\taround: \"justify-around\",\n\t\t\tevenly: \"justify-evenly\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tgap: \"md\",\n\t\talign: \"stretch\",\n\t\tjustify: \"start\"\n\t}\n});\nconst VStack = React$1.forwardRef(({ className, gap, align, justify, as = \"div\",...props }, ref) => {\n\treturn /* @__PURE__ */ jsx(as, {\n\t\tref,\n\t\tclassName: cn(vStackVariants({\n\t\t\tgap,\n\t\t\talign,\n\t\t\tjustify\n\t\t}), className),\n\t\t...props\n\t});\n});\nVStack.displayName = \"VStack\";\nconst hStackVariants = cva(\"flex flex-row\", {\n\tvariants: {\n\t\tgap: {\n\t\t\tnone: \"gap-0\",\n\t\t\txs: \"gap-1\",\n\t\t\tsm: \"gap-2\",\n\t\t\tmd: \"gap-3\",\n\t\t\tlg: \"gap-4\",\n\t\t\txl: \"gap-6\",\n\t\t\t\"2xl\": \"gap-8\"\n\t\t},\n\t\talign: {\n\t\t\tstart: \"items-start\",\n\t\t\tcenter: \"items-center\",\n\t\t\tend: \"items-end\",\n\t\t\tstretch: \"items-stretch\",\n\t\t\tbaseline: \"items-baseline\"\n\t\t},\n\t\tjustify: {\n\t\t\tstart: \"justify-start\",\n\t\t\tcenter: \"justify-center\",\n\t\t\tend: \"justify-end\",\n\t\t\tbetween: \"justify-between\",\n\t\t\taround: \"justify-around\",\n\t\t\tevenly: \"justify-evenly\"\n\t\t},\n\t\twrap: {\n\t\t\tnowrap: \"flex-nowrap\",\n\t\t\twrap: \"flex-wrap\",\n\t\t\twrapReverse: \"flex-wrap-reverse\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tgap: \"md\",\n\t\talign: \"center\",\n\t\tjustify: \"start\",\n\t\twrap: \"wrap\"\n\t}\n});\nconst HStack = React$1.forwardRef(({ className, gap, align, justify, wrap, as = \"div\",...props }, ref) => {\n\treturn /* @__PURE__ */ jsx(as, {\n\t\tref,\n\t\tclassName: cn(hStackVariants({\n\t\t\tgap,\n\t\t\talign,\n\t\t\tjustify,\n\t\t\twrap\n\t\t}), className),\n\t\t...props\n\t});\n});\nHStack.displayName = \"HStack\";\nconst boxVariants = cva(\"flex flex-row\", {\n\tvariants: {\n\t\tgap: {\n\t\t\tnone: \"gap-0\",\n\t\t\txs: \"gap-1\",\n\t\t\tsm: \"gap-2\",\n\t\t\tmd: \"gap-3\",\n\t\t\tlg: \"gap-4\",\n\t\t\txl: \"gap-6\",\n\t\t\t\"2xl\": \"gap-8\"\n\t\t},\n\t\talign: {\n\t\t\tstart: \"items-start\",\n\t\t\tcenter: \"items-center\",\n\t\t\tend: \"items-end\",\n\t\t\tstretch: \"items-stretch\",\n\t\t\tbaseline: \"items-baseline\"\n\t\t},\n\t\tjustify: {\n\t\t\tstart: \"justify-start\",\n\t\t\tcenter: \"justify-center\",\n\t\t\tend: \"justify-end\",\n\t\t\tbetween: \"justify-between\",\n\t\t\taround: \"justify-around\",\n\t\t\tevenly: \"justify-evenly\"\n\t\t},\n\t\twrap: {\n\t\t\tnowrap: \"flex-nowrap\",\n\t\t\twrap: \"flex-wrap\",\n\t\t\twrapReverse: \"flex-wrap-reverse\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tgap: \"md\",\n\t\talign: \"center\",\n\t\tjustify: \"center\",\n\t\twrap: \"nowrap\"\n\t}\n});\nconst Box = React$1.forwardRef(({ className, gap, align, justify, wrap, as = \"div\",...props }, ref) => {\n\treturn /* @__PURE__ */ jsx(as, {\n\t\tref,\n\t\tclassName: cn(boxVariants({\n\t\t\tgap,\n\t\t\talign,\n\t\t\tjustify,\n\t\t\twrap\n\t\t}), className),\n\t\t...props\n\t});\n});\nBox.displayName = \"Box\";\n\n//#endregion\nexport { Box, HStack, VStack, boxVariants, hStackVariants, vStackVariants };\n//# sourceMappingURL=stack.js.map"],"mappings":";;;;;;YAAgC;AAMhC,MAAM,iBAAiB,IAAI,iBAAiB;CAC3C,UAAU;EACT,KAAK;GACJ,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,OAAO;GACP;EACD,OAAO;GACN,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT;EACD,SAAS;GACR,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;GACR;EACD;CACD,iBAAiB;EAChB,KAAK;EACL,OAAO;EACP,SAAS;EACT;CACD,CAAC;AACF,MAAM,SAAS,QAAQ,YAAY,EAAE,WAAW,KAAK,OAAO,SAAS,KAAK,MAAM,GAAG,SAAS,QAAQ;AACnG,QAAuB,oBAAI,IAAI;EAC9B;EACA,WAAW,GAAG,eAAe;GAC5B;GACA;GACA;GACA,CAAC,EAAE,UAAU;EACd,GAAG;EACH,CAAC;EACD;AACF,OAAO,cAAc;AACrB,MAAM,iBAAiB,IAAI,iBAAiB;CAC3C,UAAU;EACT,KAAK;GACJ,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,OAAO;GACP;EACD,OAAO;GACN,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;GACV;EACD,SAAS;GACR,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;GACR;EACD,MAAM;GACL,QAAQ;GACR,MAAM;GACN,aAAa;GACb;EACD;CACD,iBAAiB;EAChB,KAAK;EACL,OAAO;EACP,SAAS;EACT,MAAM;EACN;CACD,CAAC;AACF,MAAM,SAAS,QAAQ,YAAY,EAAE,WAAW,KAAK,OAAO,SAAS,MAAM,KAAK,MAAM,GAAG,SAAS,QAAQ;AACzG,QAAuB,oBAAI,IAAI;EAC9B;EACA,WAAW,GAAG,eAAe;GAC5B;GACA;GACA;GACA;GACA,CAAC,EAAE,UAAU;EACd,GAAG;EACH,CAAC;EACD;AACF,OAAO,cAAc;AACrB,MAAM,cAAc,IAAI,iBAAiB;CACxC,UAAU;EACT,KAAK;GACJ,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,OAAO;GACP;EACD,OAAO;GACN,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;GACV;EACD,SAAS;GACR,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;GACR;EACD,MAAM;GACL,QAAQ;GACR,MAAM;GACN,aAAa;GACb;EACD;CACD,iBAAiB;EAChB,KAAK;EACL,OAAO;EACP,SAAS;EACT,MAAM;EACN;CACD,CAAC;AACF,MAAM,MAAM,QAAQ,YAAY,EAAE,WAAW,KAAK,OAAO,SAAS,MAAM,KAAK,MAAM,GAAG,SAAS,QAAQ;AACtG,QAAuB,oBAAI,IAAI;EAC9B;EACA,WAAW,GAAG,YAAY;GACzB;GACA;GACA;GACA;GACA,CAAC,EAAE,UAAU;EACd,GAAG;EACH,CAAC;EACD;AACF,IAAI,cAAc"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { cn, init_utils } from "./utils.js";
|
|
2
|
-
import { HStack } from "./stack.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
|
-
|
|
7
|
-
//#region ../ui-kit-web/dist/ui/stepper.js
|
|
8
|
-
init_utils();
|
|
9
|
-
const dotVariants = cva("h-2 w-2 rounded-full", {
|
|
10
|
-
variants: {
|
|
11
|
-
state: {
|
|
12
|
-
active: "bg-primary",
|
|
13
|
-
inactive: "bg-muted-foreground/20"
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
sm: "",
|
|
17
|
-
md: "h-2.5 w-2.5"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
state: "inactive",
|
|
22
|
-
size: "md"
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
function Stepper({ current, total, size, className }) {
|
|
26
|
-
const items = Array.from({ length: Math.max(0, total) });
|
|
27
|
-
return /* @__PURE__ */ jsx(HStack, {
|
|
28
|
-
className: cn("items-center gap-2", className),
|
|
29
|
-
children: items.map((_, idx) => /* @__PURE__ */ jsx("span", { className: cn(dotVariants({
|
|
30
|
-
state: idx + 1 === current ? "active" : "inactive",
|
|
31
|
-
size
|
|
32
|
-
})) }, idx))
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
export { Stepper };
|
|
38
|
-
//# sourceMappingURL=stepper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","names":[],"sources":["../../../../../ui-kit-web/dist/ui/stepper.js"],"sourcesContent":["import { cn } from \"./utils.js\";\nimport { HStack } from \"./stack.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { cva } from \"class-variance-authority\";\n\n//#region ui/stepper.tsx\nconst dotVariants = cva(\"h-2 w-2 rounded-full\", {\n\tvariants: {\n\t\tstate: {\n\t\t\tactive: \"bg-primary\",\n\t\t\tinactive: \"bg-muted-foreground/20\"\n\t\t},\n\t\tsize: {\n\t\t\tsm: \"\",\n\t\t\tmd: \"h-2.5 w-2.5\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tstate: \"inactive\",\n\t\tsize: \"md\"\n\t}\n});\nfunction Stepper({ current, total, size, className }) {\n\tconst items = Array.from({ length: Math.max(0, total) });\n\treturn /* @__PURE__ */ jsx(HStack, {\n\t\tclassName: cn(\"items-center gap-2\", className),\n\t\tchildren: items.map((_, idx) => /* @__PURE__ */ jsx(\"span\", { className: cn(dotVariants({\n\t\t\tstate: idx + 1 === current ? \"active\" : \"inactive\",\n\t\t\tsize\n\t\t})) }, idx))\n\t});\n}\n\n//#endregion\nexport { Stepper };\n//# sourceMappingURL=stepper.js.map"],"mappings":";;;;;;;YAAgC;AAOhC,MAAM,cAAc,IAAI,wBAAwB;CAC/C,UAAU;EACT,OAAO;GACN,QAAQ;GACR,UAAU;GACV;EACD,MAAM;GACL,IAAI;GACJ,IAAI;GACJ;EACD;CACD,iBAAiB;EAChB,OAAO;EACP,MAAM;EACN;CACD,CAAC;AACF,SAAS,QAAQ,EAAE,SAAS,OAAO,MAAM,aAAa;CACrD,MAAM,QAAQ,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,MAAM,EAAE,CAAC;AACxD,QAAuB,oBAAI,QAAQ;EAClC,WAAW,GAAG,sBAAsB,UAAU;EAC9C,UAAU,MAAM,KAAK,GAAG,QAAwB,oBAAI,QAAQ,EAAE,WAAW,GAAG,YAAY;GACvF,OAAO,MAAM,MAAM,UAAU,WAAW;GACxC;GACA,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC;EACZ,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { __esm } from "../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { twMerge } from "tailwind-merge";
|
|
4
|
-
|
|
5
|
-
//#region ../ui-kit-web/dist/ui/utils.js
|
|
6
|
-
function cn(...inputs) {
|
|
7
|
-
return twMerge(clsx(inputs));
|
|
8
|
-
}
|
|
9
|
-
var init_utils = __esm({ "../ui-kit-web/dist/ui/utils.js": (() => {}) });
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
init_utils();
|
|
13
|
-
export { cn, init_utils };
|
|
14
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../ui-kit-web/dist/ui/utils.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ui/utils.ts\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\n\n//#endregion\nexport { cn };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;;AAIA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC"}
|