@atomic-ui/ui-react 0.1.7 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js.map +1 -1
  2. package/package.json +10 -4
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * React bindings for `@impkt/ui`.\n *\n * ## Why a wrapper exists at all\n *\n * React 18 sets everything it does not recognise as an HTML *attribute*, which\n * means a prop holding an array or an object arrives at a custom element as\n * the string `[object Object]`. `impkt-radio-group`'s options are an array, so\n * without this the component that most needs structured data is the one that\n * cannot receive it. React 19 fixed that, and the wrapper stays regardless for\n * the second reason: custom events. `@lit/react` maps `impkt-change` onto an\n * `onUinChange` prop with a type, rather than leaving every consumer to reach\n * for a ref and `addEventListener`.\n *\n * ## Why these are written out rather than generated\n *\n * Generation needs a machine-readable description of each component, and that\n * is the Custom Elements Manifest the CMS palette will also be built from\n * (phase 2 of [the plan](../../../docs/SITE-BUILDER.md)). Until that pipeline\n * exists, generating from nothing would mean inventing a second source of\n * truth about the components. Eleven explicit calls are cheap, and they get\n * replaced wholesale when the manifest arrives.\n */\nimport * as React from 'react';\nimport { createComponent, type EventName } from '@lit/react';\nimport {\n ImpktButton,\n ImpktTextInput,\n ImpktSelect,\n ImpktCheckbox,\n ImpktRadioGroup,\n ImpktAlert,\n ImpktStack,\n ImpktCard,\n ImpktHeading,\n ImpktText,\n ImpktGrid,\n ImpktHelp,\n} from '@impkt/ui';\n\n/** What a control reports when its value changes. */\nexport type ImpktChangeEvent = CustomEvent<{ value: string }>;\n\nconst changeEvents = { onChange: 'impkt-change' as EventName<ImpktChangeEvent> };\n\nexport const Button = createComponent({\n react: React,\n tagName: 'impkt-button',\n elementClass: ImpktButton,\n events: { onClick: 'click' as EventName<MouseEvent> },\n});\n\nexport const TextInput = createComponent({\n react: React,\n tagName: 'impkt-text-input',\n elementClass: ImpktTextInput,\n events: changeEvents,\n});\n\nexport const Select = createComponent({\n react: React,\n tagName: 'impkt-select',\n elementClass: ImpktSelect,\n events: changeEvents,\n});\n\nexport const Checkbox = createComponent({\n react: React,\n tagName: 'impkt-checkbox',\n elementClass: ImpktCheckbox,\n events: changeEvents,\n});\n\nexport const RadioGroup = createComponent({\n react: React,\n tagName: 'impkt-radio-group',\n elementClass: ImpktRadioGroup,\n events: changeEvents,\n});\n\nexport const Alert = createComponent({ react: React, tagName: 'impkt-alert', elementClass: ImpktAlert });\nexport const Stack = createComponent({ react: React, tagName: 'impkt-stack', elementClass: ImpktStack });\nexport const Card = createComponent({ react: React, tagName: 'impkt-card', elementClass: ImpktCard });\nexport const Heading = createComponent({ react: React, tagName: 'impkt-heading', elementClass: ImpktHeading });\nexport const Text = createComponent({ react: React, tagName: 'impkt-text', elementClass: ImpktText });\n\nexport type { RadioOption, SelectOption, AlertTone, HelpKind } from '@impkt/ui';\n\nexport const Grid = createComponent({ react: React, tagName: 'impkt-grid', elementClass: ImpktGrid });\n\nexport const Help = createComponent({ react: React, tagName: 'impkt-help', elementClass: ImpktHelp });\n"],"mappings":";AAuBA,YAAY,WAAW;AACvB,SAAS,uBAAuC;AAChD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,IAAM,eAAe,EAAE,UAAU,eAA8C;AAExE,IAAM,SAAS,gBAAgB;AAAA,EACpC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ,EAAE,SAAS,QAAiC;AACtD,CAAC;AAEM,IAAM,YAAY,gBAAgB;AAAA,EACvC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,SAAS,gBAAgB;AAAA,EACpC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,WAAW,gBAAgB;AAAA,EACtC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,aAAa,gBAAgB;AAAA,EACxC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,QAAQ,gBAAgB,EAAE,OAAO,OAAO,SAAS,eAAe,cAAc,WAAW,CAAC;AAChG,IAAM,QAAQ,gBAAgB,EAAE,OAAO,OAAO,SAAS,eAAe,cAAc,WAAW,CAAC;AAChG,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;AAC7F,IAAM,UAAU,gBAAgB,EAAE,OAAO,OAAO,SAAS,iBAAiB,cAAc,aAAa,CAAC;AACtG,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;AAI7F,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;AAE7F,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * React bindings for `@atomic-ui/ui`.\n *\n * ## Why a wrapper exists at all\n *\n * React 18 sets everything it does not recognise as an HTML *attribute*, which\n * means a prop holding an array or an object arrives at a custom element as\n * the string `[object Object]`. `impkt-radio-group`'s options are an array, so\n * without this the component that most needs structured data is the one that\n * cannot receive it. React 19 fixed that, and the wrapper stays regardless for\n * the second reason: custom events. `@lit/react` maps `impkt-change` onto an\n * `onUinChange` prop with a type, rather than leaving every consumer to reach\n * for a ref and `addEventListener`.\n *\n * ## Why these are written out rather than generated\n *\n * Generation needs a machine-readable description of each component, and that\n * is the Custom Elements Manifest the CMS palette will also be built from\n * (phase 2 of [the plan](https://github.com/matthill8286/strata/blob/main/docs/SITE-BUILDER.md)). Until that pipeline\n * exists, generating from nothing would mean inventing a second source of\n * truth about the components. Eleven explicit calls are cheap, and they get\n * replaced wholesale when the manifest arrives.\n */\nimport * as React from 'react';\nimport { createComponent, type EventName } from '@lit/react';\nimport {\n ImpktButton,\n ImpktTextInput,\n ImpktSelect,\n ImpktCheckbox,\n ImpktRadioGroup,\n ImpktAlert,\n ImpktStack,\n ImpktCard,\n ImpktHeading,\n ImpktText,\n ImpktGrid,\n ImpktHelp,\n} from '@atomic-ui/ui';\n\n/** What a control reports when its value changes. */\nexport type ImpktChangeEvent = CustomEvent<{ value: string }>;\n\nconst changeEvents = { onChange: 'impkt-change' as EventName<ImpktChangeEvent> };\n\nexport const Button = createComponent({\n react: React,\n tagName: 'impkt-button',\n elementClass: ImpktButton,\n events: { onClick: 'click' as EventName<MouseEvent> },\n});\n\nexport const TextInput = createComponent({\n react: React,\n tagName: 'impkt-text-input',\n elementClass: ImpktTextInput,\n events: changeEvents,\n});\n\nexport const Select = createComponent({\n react: React,\n tagName: 'impkt-select',\n elementClass: ImpktSelect,\n events: changeEvents,\n});\n\nexport const Checkbox = createComponent({\n react: React,\n tagName: 'impkt-checkbox',\n elementClass: ImpktCheckbox,\n events: changeEvents,\n});\n\nexport const RadioGroup = createComponent({\n react: React,\n tagName: 'impkt-radio-group',\n elementClass: ImpktRadioGroup,\n events: changeEvents,\n});\n\nexport const Alert = createComponent({ react: React, tagName: 'impkt-alert', elementClass: ImpktAlert });\nexport const Stack = createComponent({ react: React, tagName: 'impkt-stack', elementClass: ImpktStack });\nexport const Card = createComponent({ react: React, tagName: 'impkt-card', elementClass: ImpktCard });\nexport const Heading = createComponent({ react: React, tagName: 'impkt-heading', elementClass: ImpktHeading });\nexport const Text = createComponent({ react: React, tagName: 'impkt-text', elementClass: ImpktText });\n\nexport type { RadioOption, SelectOption, AlertTone, HelpKind } from '@atomic-ui/ui';\n\nexport const Grid = createComponent({ react: React, tagName: 'impkt-grid', elementClass: ImpktGrid });\n\nexport const Help = createComponent({ react: React, tagName: 'impkt-help', elementClass: ImpktHelp });\n"],"mappings":";AAuBA,YAAY,WAAW;AACvB,SAAS,uBAAuC;AAChD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,IAAM,eAAe,EAAE,UAAU,eAA8C;AAExE,IAAM,SAAS,gBAAgB;AAAA,EACpC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ,EAAE,SAAS,QAAiC;AACtD,CAAC;AAEM,IAAM,YAAY,gBAAgB;AAAA,EACvC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,SAAS,gBAAgB;AAAA,EACpC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,WAAW,gBAAgB;AAAA,EACtC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,aAAa,gBAAgB;AAAA,EACxC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;AAEM,IAAM,QAAQ,gBAAgB,EAAE,OAAO,OAAO,SAAS,eAAe,cAAc,WAAW,CAAC;AAChG,IAAM,QAAQ,gBAAgB,EAAE,OAAO,OAAO,SAAS,eAAe,cAAc,WAAW,CAAC;AAChG,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;AAC7F,IAAM,UAAU,gBAAgB,EAAE,OAAO,OAAO,SAAS,iBAAiB,cAAc,aAAa,CAAC;AACtG,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;AAI7F,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;AAE7F,IAAM,OAAO,gBAAgB,EAAE,OAAO,OAAO,SAAS,cAAc,cAAc,UAAU,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@atomic-ui/ui-react",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "React bindings for @atomic-ui/ui: typed props, typed events, and the attribute handling React 18 does not do for custom elements.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/matthill8286/impkt-design-system.git",
8
+ "directory": "packages/ui-react"
9
+ },
5
10
  "type": "module",
6
11
  "main": "./dist/index.js",
7
12
  "types": "./dist/index.d.ts",
@@ -13,7 +18,7 @@
13
18
  },
14
19
  "dependencies": {
15
20
  "@lit/react": "^1.0.8",
16
- "@atomic-ui/ui": "0.1.7"
21
+ "@atomic-ui/ui": "^0.2.0"
17
22
  },
18
23
  "peerDependencies": {
19
24
  "react": "^18.3.0 || ^19.0.0"
@@ -28,11 +33,12 @@
28
33
  "README.md"
29
34
  ],
30
35
  "publishConfig": {
36
+ "registry": "https://registry.npmjs.org",
31
37
  "access": "public"
32
38
  },
33
39
  "scripts": {
34
40
  "build": "tsc -p tsconfig.json",
35
41
  "typecheck": "tsc -p tsconfig.json",
36
- "test": "echo \"(covered by @impkt/ui; wrappers are generated shape, not behaviour)\""
42
+ "test": "echo \"(covered by @atomic-ui/ui; wrappers are generated shape, not behaviour)\""
37
43
  }
38
- }
44
+ }