@accelint/design-system 0.11.4 → 0.12.0
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/README.md +12 -6
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/ladle/actions.js.map +1 -1
- package/dist/styles/surfaces.css.d.ts +1 -1
- package/dist/test/setup.js +8 -8
- package/dist/test/setup.js.map +1 -1
- package/dist/utils/validators/index.d.ts +7 -7
- package/dist/utils/validators/index.js +1 -1
- package/dist/utils/validators/index.js.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -44,19 +44,25 @@ This design system is built on a number of concepts with which you may not be fa
|
|
|
44
44
|
|
|
45
45
|
## Getting started
|
|
46
46
|
|
|
47
|
-
Check out what exists. You can review the components, tokens and primitives available in the system using the Ladle stories for each element: [Stories](https://gohypergiant.github.io/
|
|
47
|
+
Check out what exists. You can review the components, tokens and primitives available in the system using the Ladle stories for each element: [Stories](https://gohypergiant.github.io/accelint-ds-deprecated).
|
|
48
48
|
|
|
49
|
-
From the root of the
|
|
49
|
+
From the root of the project, run:
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
pnpm i
|
|
53
53
|
|
|
54
|
-
pnpm --filter=@accelint/design-system preview
|
|
54
|
+
pnpm run preview:design-system # pnpm --filter=@accelint/design-system preview
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
If you run into errors, try running
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
If you run into errors, install the dependencies, then try running:
|
|
58
|
+
|
|
59
|
+
```shell
|
|
60
|
+
pnpm --filter=@accelint/design-system build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then run the preview command again.
|
|
64
|
+
|
|
65
|
+
If you don't have pnpm enabled then you can enable it with the command [`corepack enable pnpm`](https://pnpm.io/installation#using-corepack).
|
|
60
66
|
|
|
61
67
|
### Implementation
|
|
62
68
|
|
|
@@ -12,8 +12,9 @@ declare const TextField: (props: {
|
|
|
12
12
|
children?: react.ReactNode | ((values: TextFieldRenderProps & {
|
|
13
13
|
defaultChildren: react.ReactNode | undefined;
|
|
14
14
|
}) => react.ReactNode);
|
|
15
|
-
value?: string | undefined;
|
|
16
15
|
type?: "text" | "search" | "url" | "tel" | "email" | "password" | (string & {}) | undefined;
|
|
16
|
+
pattern?: string | undefined;
|
|
17
|
+
value?: string | undefined;
|
|
17
18
|
hidden?: boolean | undefined | undefined;
|
|
18
19
|
translate?: "yes" | "no" | undefined | undefined;
|
|
19
20
|
slot?: string | null | undefined;
|
|
@@ -126,7 +127,6 @@ declare const TextField: (props: {
|
|
|
126
127
|
autoComplete?: string | undefined;
|
|
127
128
|
maxLength?: number | undefined;
|
|
128
129
|
minLength?: number | undefined;
|
|
129
|
-
pattern?: string | undefined;
|
|
130
130
|
} & {
|
|
131
131
|
classNames?: TextFieldClassNames;
|
|
132
132
|
mapping?: Partial<TextFieldMapping>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@ladle+react@4.1.2_@swc+helpers@0.5.17_@types+node@24.2.0_@types+react@19.1.9_acorn@8.1_6ff39e1e721d442b059118618a41a0c4/node_modules/@ladle/react/lib/app/exports.ts","../../src/ladle/actions.ts"],"names":[],"mappings":";;;;;;AA+CO,IAAM,MAAA,GAAS,CAAC,IAAA,KAAiB;AACtC,EAAA,MAAM,WAAY,MAAA,CACf,aAAA;AACH,EAAA,OAAO,CAAC,KAAA,GAAa,MAAA,KACnB,QAAA,CAAS;AAAA,IACP,MAAM,UAAA,CAAW,YAAA;AAAA,IACjB,KAAA,EAAO,EAAE,IAAA,EAAM,KAAA,EAAM;AAAA,IACrB,KAAA,EAAO;AAAA,GACR,CAAA;AACL,CAAA;;;ACtDO,SAAS,WAAc,IAAA,EAA+B;AAC3D,EAAA,OAAO,IAAA,CAAK,MAAA,CAAmB,CAAC,GAAA,EAAK,GAAA,KAAQ;AAC3C,IAAA,GAAA,CAAI,GAAG,CAAA,GAAI,MAAA,CAAO,GAAa,CAAA;AAE/B,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAAE,CAAA;AACP","file":"actions.js","sourcesContent":["import type * as React from \"react\";\nimport { useLadleContext } from \"./src/context\";\nimport {\n StoryDecorator,\n ActionType,\n GlobalState,\n ThemeState,\n ModeState,\n GlobalAction,\n Config,\n KnownMeta,\n MetaJson as BaseMetaJson,\n MetaJsonStory as BaseMetaJsonStory,\n} from \"../shared/types\";\n\nimport * as msw from \"msw\";\nexport { msw };\n\nexport type { UserConfig } from \"../shared/types\";\nexport { useMDXComponents } from \"@mdx-js/react\";\nexport const Story = (props: any) => props.children;\nexport const Meta = (props: any) => props.children;\nexport const Description = (props: any) => props.children;\n\ntype ReactNodeWithoutObject =\n | React.ReactElement\n | string\n | number\n | boolean\n | null\n | undefined;\n\nexport { useLadleContext, ActionType, ThemeState, ModeState };\nexport type { StoryDecorator };\n\n// deprecated, linkTo is just easier to use\nexport const useLink = () => {\n const { dispatch } = useLadleContext();\n return (value: string) => dispatch({ type: ActionType.UpdateStory, value });\n};\n\nexport const linkTo = (value: string) => {\n const dispatch = (window as any)\n .ladleDispatch as React.Dispatch<GlobalAction>;\n return () => dispatch({ type: ActionType.UpdateStory, value });\n};\n\nexport const action = (name: string) => {\n const dispatch = (window as any)\n .ladleDispatch as React.Dispatch<GlobalAction>;\n return (event: any = undefined) =>\n dispatch({\n type: ActionType.UpdateAction,\n value: { name, event },\n clear: false,\n });\n};\n\nexport type GlobalProvider = React.FC<{\n globalState: GlobalState;\n dispatch: React.Dispatch<GlobalAction>;\n config: Config;\n children: ReactNodeWithoutObject;\n storyMeta?: Meta;\n}>;\n\nexport type SourceHeader = React.FC<{\n path: string;\n locStart: number;\n locEnd: number;\n}>;\n\nexport interface StoryDefault<P = {}> {\n args?: Args<P>;\n argTypes?: ArgTypes<P>;\n decorators?: StoryDecorator<P>[];\n meta?: Meta;\n title?: string;\n msw?: msw.RequestHandler[];\n parameters?: { [key: string]: any };\n}\n\nexport interface Story<P = {}> extends React.FC<P> {\n args?: Args<P>;\n argTypes?: ArgTypes<P>;\n decorators?: StoryDecorator<P>[];\n meta?: Meta;\n storyName?: string;\n msw?: msw.RequestHandler[];\n parameters?: { [key: string]: any };\n}\n\nexport type Args<\n P = {\n [key: string]: any;\n },\n> = Partial<P>;\n\nexport type ControlType =\n | \"select\"\n | \"multi-select\"\n | \"radio\"\n | \"inline-radio\"\n | \"check\"\n | \"inline-check\"\n | \"background\"\n | \"color\"\n | \"date\"\n | \"number\"\n | \"text\"\n | \"boolean\"\n | \"range\";\n\nexport interface ArgType<K = any> {\n control?: {\n name?: string;\n labels?: { [key: string]: string };\n type: ControlType;\n min?: number;\n max?: number;\n step?: number;\n [key: string]: any;\n };\n mapping?: { [key: string | number]: any };\n options?: K[] | unknown;\n defaultValue?: K;\n description?: string;\n name?: string;\n action?: string;\n [key: string]: any;\n}\n\nexport type ArgTypes<\n P = {\n [key: string]: any;\n },\n> = {\n [key in keyof P]?: ArgType<P[key]>;\n};\n\nexport interface Meta extends KnownMeta {\n [key: string]: any;\n}\n\nexport type MetaJson = BaseMetaJson<Meta>;\nexport type MetaJsonStory = BaseMetaJsonStory<Meta>;\n","import { action } from '@ladle/react';\n\nexport function actions<T>(...keys: (keyof T)[]): Partial<T> {\n return keys.reduce<Partial<T>>((acc, key) => {\n acc[key] = action(key as string) as T[keyof T];\n\n return acc;\n }, {});\n}\n"]}
|
package/dist/test/setup.js
CHANGED
|
@@ -25,7 +25,7 @@ import { parseSingleStack } from '@vitest/utils/source-map.js';
|
|
|
25
25
|
import { fn, spyOn, mocks, isMockFunction } from '@vitest/spy.js';
|
|
26
26
|
import 'std-env.js';
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// ../node_modules/.pnpm/@testing-library+jest-dom@6.6.3/node_modules/@testing-library/jest-dom/dist/matchers.mjs
|
|
29
29
|
var matchers_exports = {};
|
|
30
30
|
__export(matchers_exports, {
|
|
31
31
|
toBeChecked: () => toBeChecked,
|
|
@@ -3879,7 +3879,7 @@ typeof document !== "undefined" && document.body ? getQueriesForElement(document
|
|
|
3879
3879
|
return helpers;
|
|
3880
3880
|
}, initialValue);
|
|
3881
3881
|
|
|
3882
|
-
//
|
|
3882
|
+
// ../node_modules/.pnpm/@testing-library+react@16.3.0_@testing-library+dom@10.4.0_@types+react-dom@19.1.7_@type_006cfc0e867fe4fbd2eb85bf6bc961ee/node_modules/@testing-library/react/dist/@testing-library/react.esm.js
|
|
3883
3883
|
var reactAct = typeof React.act === "function" ? React.act : DeprecatedReactTestUtils.act;
|
|
3884
3884
|
function getGlobalThis() {
|
|
3885
3885
|
if (typeof globalThis !== "undefined") {
|
|
@@ -4025,7 +4025,7 @@ if (typeof process === "undefined" || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
|
|
|
4025
4025
|
}
|
|
4026
4026
|
}
|
|
4027
4027
|
|
|
4028
|
-
//
|
|
4028
|
+
// ../node_modules/.pnpm/vitest@2.1.3_@types+node@24.2.0_jsdom@25.0.1_lightningcss@1.30.1_msw@2.10.4_@types+node_bd31f00d24f7de9d4c3dd1b1abef4a27/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.js
|
|
4029
4029
|
function getWorkerState() {
|
|
4030
4030
|
const workerState = globalThis.__vitest_worker__;
|
|
4031
4031
|
if (!workerState) {
|
|
@@ -4039,7 +4039,7 @@ function getCurrentEnvironment() {
|
|
|
4039
4039
|
return state?.environment.name;
|
|
4040
4040
|
}
|
|
4041
4041
|
|
|
4042
|
-
//
|
|
4042
|
+
// ../node_modules/.pnpm/vitest@2.1.3_@types+node@24.2.0_jsdom@25.0.1_lightningcss@1.30.1_msw@2.10.4_@types+node_bd31f00d24f7de9d4c3dd1b1abef4a27/node_modules/vitest/dist/chunks/index.CxRxs566.js
|
|
4043
4043
|
function getRunMode() {
|
|
4044
4044
|
return getWorkerState().config.mode;
|
|
4045
4045
|
}
|
|
@@ -4047,7 +4047,7 @@ function isRunningInBenchmark() {
|
|
|
4047
4047
|
return getRunMode() === "benchmark";
|
|
4048
4048
|
}
|
|
4049
4049
|
|
|
4050
|
-
//
|
|
4050
|
+
// ../node_modules/.pnpm/vitest@2.1.3_@types+node@24.2.0_jsdom@25.0.1_lightningcss@1.30.1_msw@2.10.4_@types+node_bd31f00d24f7de9d4c3dd1b1abef4a27/node_modules/vitest/dist/chunks/benchmark.C8CRJYG4.js
|
|
4051
4051
|
var benchFns = /* @__PURE__ */ new WeakMap();
|
|
4052
4052
|
var benchOptsMap = /* @__PURE__ */ new WeakMap();
|
|
4053
4053
|
var bench = createBenchmark(function(name, fn2 = noop, options = {}) {
|
|
@@ -4076,7 +4076,7 @@ function formatName(name) {
|
|
|
4076
4076
|
return typeof name === "string" ? name : name instanceof Function ? name.name || "<anonymous>" : String(name);
|
|
4077
4077
|
}
|
|
4078
4078
|
|
|
4079
|
-
//
|
|
4079
|
+
// ../node_modules/.pnpm/vitest@2.1.3_@types+node@24.2.0_jsdom@25.0.1_lightningcss@1.30.1_msw@2.10.4_@types+node_bd31f00d24f7de9d4c3dd1b1abef4a27/node_modules/vitest/dist/chunks/run-once.Sxe67Wng.js
|
|
4080
4080
|
var filesCount = /* @__PURE__ */ new Map();
|
|
4081
4081
|
var cache = /* @__PURE__ */ new Map();
|
|
4082
4082
|
function runOnce(fn2, key) {
|
|
@@ -4099,7 +4099,7 @@ function isFirstRun() {
|
|
|
4099
4099
|
return firstRun;
|
|
4100
4100
|
}
|
|
4101
4101
|
|
|
4102
|
-
//
|
|
4102
|
+
// ../node_modules/.pnpm/vitest@2.1.3_@types+node@24.2.0_jsdom@25.0.1_lightningcss@1.30.1_msw@2.10.4_@types+node_bd31f00d24f7de9d4c3dd1b1abef4a27/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
|
|
4103
4103
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
4104
4104
|
function getDefaultExportFromCjs(x) {
|
|
4105
4105
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -4111,7 +4111,7 @@ function isChildProcess() {
|
|
|
4111
4111
|
return typeof process !== "undefined" && !!process.send;
|
|
4112
4112
|
}
|
|
4113
4113
|
|
|
4114
|
-
//
|
|
4114
|
+
// ../node_modules/.pnpm/vitest@2.1.3_@types+node@24.2.0_jsdom@25.0.1_lightningcss@1.30.1_msw@2.10.4_@types+node_bd31f00d24f7de9d4c3dd1b1abef4a27/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
|
|
4115
4115
|
var RealDate = Date;
|
|
4116
4116
|
var now = null;
|
|
4117
4117
|
var MockDate = class _MockDate extends RealDate {
|