@astryxdesign/core 0.4.4-canary.39d8a5a → 0.4.4-canary.eb069fd

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.
@@ -7,8 +7,7 @@
7
7
  * TextInput, NumberInput, TimeInput, DateInput, DateTimeInput,
8
8
  * DateRangeInput, Selector, MultiSelector, Typeahead, Tokenizer, FileInput —
9
9
  * routes it through here, so the glyph is themed in one place via the
10
- * `astryx-input-clear-icon` target and the button wrapper is themed via the
11
- * `astryx-input-clear-button` target.
10
+ * `astryx-input-clear-icon` target.
12
11
  */
13
12
  import type { ReactNode } from 'react';
14
13
  import * as stylex from '@stylexjs/stylex';
@@ -1 +1 @@
1
- {"version":3,"file":"InputClearButton.d.ts","sourceRoot":"","sources":["../../src/Field/InputClearButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAY3C,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IAC7B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,MAAM,EACN,aAAa,GACd,EAAE,qBAAqB,GAAG,SAAS,CA0BnC;yBA/Be,gBAAgB"}
1
+ {"version":3,"file":"InputClearButton.d.ts","sourceRoot":"","sources":["../../src/Field/InputClearButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAY3C,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IAC7B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,MAAM,EACN,aAAa,GACd,EAAE,qBAAqB,GAAG,SAAS,CAwBnC;yBA7Be,gBAAgB"}
@@ -11,8 +11,7 @@
11
11
  * TextInput, NumberInput, TimeInput, DateInput, DateTimeInput,
12
12
  * DateRangeInput, Selector, MultiSelector, Typeahead, Tokenizer, FileInput —
13
13
  * routes it through here, so the glyph is themed in one place via the
14
- * `astryx-input-clear-icon` target and the button wrapper is themed via the
15
- * `astryx-input-clear-button` target.
14
+ * `astryx-input-clear-icon` target.
16
15
  */
17
16
  import * as stylex from '@stylexjs/stylex';
18
17
  import { Button } from "../Button/index.js";
@@ -35,14 +34,10 @@ export function InputClearButton({
35
34
  const {
36
35
  className: iconTargetClassName
37
36
  } = themeProps('input-clear-icon');
38
- const {
39
- className: buttonTargetClassName
40
- } = themeProps('input-clear-button');
41
37
  return /*#__PURE__*/_jsx(Button, {
42
38
  variant: "ghost",
43
39
  size: "sm",
44
40
  label: label,
45
- className: buttonTargetClassName,
46
41
  icon: /*#__PURE__*/_jsx(Icon, {
47
42
  icon: "close",
48
43
  size: "sm",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.4.4-canary.39d8a5a",
3
+ "version": "0.4.4-canary.eb069fd",
4
4
  "displayName": "Astryx Core",
5
5
  "description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
6
6
  "author": "Meta Open Source",
@@ -656,7 +656,7 @@
656
656
  "react-dom": ">=19.0.0"
657
657
  },
658
658
  "devDependencies": {
659
- "@astryxdesign/cli": "0.4.4-canary.39d8a5a",
659
+ "@astryxdesign/cli": "0.4.4-canary.eb069fd",
660
660
  "@babel/cli": "^8.0.4",
661
661
  "@babel/core": "^7.29.7",
662
662
  "@babel/preset-react": "^8.0.1",
@@ -34,7 +34,6 @@ export const docs = {
34
34
  className: 'astryx-input-status-icon',
35
35
  visualProps: ['size', 'status'],
36
36
  },
37
- {className: 'astryx-input-clear-button'},
38
37
  {className: 'astryx-input-clear-icon'},
39
38
  ],
40
39
  vars: [
@@ -114,29 +114,4 @@ describe('InputClearButton', () => {
114
114
  expect(css).toContain('.astryx-input-clear-icon:hover {');
115
115
  expect(css).toContain('color: var(--color-icon-primary)');
116
116
  });
117
-
118
- it('renders the astryx-input-clear-button target on the button wrapper', () => {
119
- render(<InputClearButton label="Clear" onClick={() => {}} />);
120
- const button = screen.getByRole('button', {name: 'Clear'});
121
- expect(button).toHaveClass('astryx-input-clear-button');
122
- });
123
-
124
- it('exposes input-clear-button so a theme controls the button size and hover', () => {
125
- const theme = defineTheme({
126
- name: 'input-clear-button-test',
127
- components: {
128
- 'input-clear-button': {
129
- base: {
130
- height: '28px',
131
- ':hover': {backgroundImage: 'none'},
132
- },
133
- },
134
- },
135
- });
136
- const css = generateThemeTestCSS(theme);
137
- expect(css).toContain('.astryx-input-clear-button {');
138
- expect(css).toContain('height: 28px');
139
- expect(css).toContain('.astryx-input-clear-button:hover {');
140
- expect(css).toContain('background-image: none');
141
- });
142
117
  });
@@ -11,8 +11,7 @@
11
11
  * TextInput, NumberInput, TimeInput, DateInput, DateTimeInput,
12
12
  * DateRangeInput, Selector, MultiSelector, Typeahead, Tokenizer, FileInput —
13
13
  * routes it through here, so the glyph is themed in one place via the
14
- * `astryx-input-clear-icon` target and the button wrapper is themed via the
15
- * `astryx-input-clear-button` target.
14
+ * `astryx-input-clear-icon` target.
16
15
  */
17
16
 
18
17
  import type {ReactNode} from 'react';
@@ -49,13 +48,11 @@ export function InputClearButton({
49
48
  iconClassName,
50
49
  }: InputClearButtonProps): ReactNode {
51
50
  const {className: iconTargetClassName} = themeProps('input-clear-icon');
52
- const {className: buttonTargetClassName} = themeProps('input-clear-button');
53
51
  return (
54
52
  <Button
55
53
  variant="ghost"
56
54
  size="sm"
57
55
  label={label}
58
- className={buttonTargetClassName}
59
56
  icon={
60
57
  <Icon
61
58
  icon="close"