@spark-web/text-input 4.0.0-rc.19 → 4.0.0-rc.20

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @spark-web/text-input
2
2
 
3
+ ## 4.0.0-rc.20
4
+
5
+ ### Minor Changes
6
+
7
+ - Support for component-level theming; button-level theming
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @spark-web/field@4.0.0-rc.20
13
+ - @spark-web/theme@4.0.0-rc.20
14
+ - @spark-web/utils@2.0.0-rc.20
15
+ - @spark-web/a11y@2.0.0-rc.20
16
+ - @spark-web/text@2.0.0-rc.20
17
+ - @spark-web/box@2.0.0-rc.20
18
+
3
19
  ## 4.0.0-rc.19
4
20
 
5
21
  ### Major Changes
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLXRleHQtaW5wdXQuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
1
+ export * from "../src/index";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLXRleHQtaW5wdXQuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
@@ -1,7 +1,16 @@
1
- 'use strict';
1
+ "use strict";
2
+ // this file might look strange and you might be wondering what it's for
3
+ // it's lets you import your source files by importing this entrypoint
4
+ // as you would import it if it was built with preconstruct build
5
+ // this file is slightly different to some others though
6
+ // it has a require hook which compiles your code with Babel
7
+ // this means that you don't have to set up @babel/register or anything like that
8
+ // but you can still require this module and it'll be compiled
2
9
 
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./spark-web-text-input.cjs.prod.js");
5
- } else {
6
- module.exports = require("./spark-web-text-input.cjs.dev.js");
7
- }
10
+ // this bit of code imports the require hook and registers it
11
+ let unregister = require("../../../node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", "..");
12
+
13
+ // this re-exports the source file
14
+ module.exports = require("../src/index.ts");
15
+
16
+ unregister();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/text-input",
3
- "version": "4.0.0-rc.19",
3
+ "version": "4.0.0-rc.20",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,19 +17,19 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.25.0",
19
19
  "@emotion/react": "^11.14.0",
20
- "@spark-web/a11y": "^2.0.0-rc.19",
21
- "@spark-web/box": "^2.0.0-rc.19",
22
- "@spark-web/text": "^2.0.0-rc.19",
23
- "@spark-web/theme": "^4.0.0-rc.19",
24
- "@spark-web/utils": "^2.0.0-rc.19"
20
+ "@spark-web/a11y": "^2.0.0-rc.20",
21
+ "@spark-web/box": "^2.0.0-rc.20",
22
+ "@spark-web/text": "^2.0.0-rc.20",
23
+ "@spark-web/theme": "^4.0.0-rc.20",
24
+ "@spark-web/utils": "^2.0.0-rc.20"
25
25
  },
26
26
  "devDependencies": {
27
- "@spark-web/field": "^4.0.0-rc.19",
27
+ "@spark-web/field": "^4.0.0-rc.20",
28
28
  "@types/react": "^18.2.0",
29
29
  "react": "^18.2.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@spark-web/field": "^4.0.0-rc.19",
32
+ "@spark-web/field": "^4.0.0-rc.20",
33
33
  "react": ">=17.0.2"
34
34
  },
35
35
  "engines": {
@@ -1,12 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { InputAdornmentProps } from "./input-adornment.js";
3
- export declare type AdornmentChild = ReactElement<InputAdornmentProps> | null | undefined;
4
- export declare type AdornmentsAsChildren = AdornmentChild | [AdornmentChild, AdornmentChild];
5
- /**
6
- * Map children for placement within the `TextInput` flex container. Ensures that
7
- * placeholders are provided for unused placements.
8
- */
9
- export declare const childrenToAdornments: (children?: AdornmentsAsChildren) => {
10
- startAdornment: ReactElement<InputAdornmentProps> | null;
11
- endAdornment: ReactElement<InputAdornmentProps> | null;
12
- };
@@ -1,6 +0,0 @@
1
- export { InputAdornment } from "./input-adornment.js";
2
- export { InputContainer } from "./input-container.js";
3
- export { TextInput, useInputStyles } from "./text-input.js";
4
- export type { AdornmentChild } from "./children-to-adornments.js";
5
- export type { InputContainerProps } from "./input-container.js";
6
- export type { TextInputProps, UseInputStylesProps } from "./text-input.js";
@@ -1,46 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- declare type InputAdornmentContextType = {
3
- placement: PlacementType;
4
- };
5
- export declare const useInputAdornmentContext: () => InputAdornmentContextType | null;
6
- declare const placementToPadding: {
7
- readonly start: {
8
- readonly paddingLeft: "medium";
9
- readonly paddingRight: "xsmall";
10
- };
11
- readonly end: {
12
- readonly paddingLeft: "xsmall";
13
- readonly paddingRight: "medium";
14
- };
15
- };
16
- declare type PlacementType = keyof typeof placementToPadding;
17
- export declare type InputAdornmentProps = {
18
- children: ReactElement;
19
- /**
20
- * When using another input component as an adornment, you may optionally
21
- * override the parent field label.
22
- */
23
- fieldLabel?: string;
24
- /** Where to place the adornment. */
25
- placement: PlacementType;
26
- /**
27
- * By default, the adornment element will be wrapped to provide alignment and
28
- * spacing, use the "raw" property to opt-out of this behaviour.
29
- */
30
- raw?: boolean;
31
- };
32
- /**
33
- * Places an element at the "start" or "end" of the input, only one adornment
34
- * may be provided for each placement. By default, the adornment element will be
35
- * wrapped to provide alignment and spacing, use the "raw" property to opt-out
36
- * of this behaviour.
37
- *
38
- * @example
39
- * <TextInput>
40
- * <InputAdornment placement="start">
41
- * <Text tone="placeholder">$</Text>
42
- * </InputAdornment>
43
- * </TextInput>
44
- */
45
- export declare const InputAdornment: ({ children, fieldLabel, placement, raw, }: InputAdornmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
46
- export {};
@@ -1,10 +0,0 @@
1
- import type { BoxProps } from '@spark-web/box';
2
- import type { ReactElement } from 'react';
3
- import type { InputAdornmentProps } from "./input-adornment.js";
4
- export declare type InputContainerProps = {
5
- /** Slot to start render adornment. */
6
- startAdornment?: ReactElement<InputAdornmentProps> | null;
7
- /** Slot to end render adornment. */
8
- endAdornment?: ReactElement<InputAdornmentProps> | null;
9
- } & Omit<BoxProps, 'background' | 'position'>;
10
- export declare const InputContainer: ({ children, startAdornment, endAdornment, ...boxProps }: InputContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;