@box/blueprint-web 12.116.2 → 12.118.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.
@@ -83,6 +83,7 @@ const RootInner = ({
83
83
  endComboboxIcon,
84
84
  idForLabel,
85
85
  displaySingleSelectionAsChip = multiselect,
86
+ autoComplete,
86
87
  ...comboboxProps
87
88
  } = rest;
88
89
  const isInput = useMemo(() => as === 'input', [as]);
@@ -339,6 +340,14 @@ const RootInner = ({
339
340
  const ariaDescribedBy = clsx(rest['aria-describedby'], {
340
341
  [inlineErrorId]: hasError
341
342
  });
343
+ // Ariakit sets autoComplete="off" by default on the input element.
344
+ // We need to force update it if the user provided a custom value.
345
+ useEffect(() => {
346
+ const element = inputRef.current;
347
+ if (element && autoComplete) {
348
+ element.setAttribute('autocomplete', autoComplete);
349
+ }
350
+ }, [autoComplete]);
342
351
  const inputComponent = isInput ? jsxs(Fragment, {
343
352
  children: [jsx(Label, {
344
353
  className: clsx(styles.label, {
@@ -241,6 +241,12 @@ export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends b
241
241
  * @default false
242
242
  */
243
243
  selectOnEnterOrTab?: boolean;
244
+ /**
245
+ * If `off`, the combobox disables autofill suggestions from the browser.
246
+ *
247
+ * @default none
248
+ */
249
+ autoComplete?: string;
244
250
  }
245
251
  export type ComboboxTextArea = Pick<TextAreaProps, 'maxRows' | 'minRows' | 'maxLength' | 'aria-describedby'> & {
246
252
  as: 'textarea';
@@ -7528,6 +7528,12 @@
7528
7528
  height:var(--icon-toogle-button-xsmall-size);
7529
7529
  width:var(--icon-toogle-button-xsmall-size);
7530
7530
  }
7531
+ .bp_inline_notice_list_item_module_inlineNoticeListItem--0833c{
7532
+ width:100%;
7533
+ }
7534
+ .bp_inline_notice_list_item_module_inlineNoticeListItem--0833c .bp_inline_notice_list_item_module_contentContainer--0833c{
7535
+ align-items:center;
7536
+ }
7531
7537
  table.bp_inline_table_module_inlineTable--fc100[data-modern=false]{
7532
7538
  --table-background:var(--gray-white);
7533
7539
  --table-border:var(--border-1) solid var(--gray-10);
@@ -29,6 +29,7 @@ export * from './grid-list-v2';
29
29
  export * from './guided-tooltip';
30
30
  export * from './icon-dual-state-button';
31
31
  export * from './icon-toggle-button';
32
+ export * from './inline-notice-list-item';
32
33
  export * from './inline-notice/inline-notice';
33
34
  export * from './inline-table/inline-table';
34
35
  export * from './input-chip';
@@ -37,6 +37,7 @@ export { GuidedTooltip } from './guided-tooltip/guided-tooltip.js';
37
37
  export { GuidedTooltipContext } from './guided-tooltip/utils/guided-tooltip-context.js';
38
38
  export { IconDualStateButton } from './icon-dual-state-button/icon-dual-state-button.js';
39
39
  export { IconToggleButton } from './icon-toggle-button/icon-toggle-button.js';
40
+ export { InlineNoticeListItem } from './inline-notice-list-item/index.js';
40
41
  export { InlineNotice } from './inline-notice/inline-notice.js';
41
42
  export { InlineTable } from './inline-table/inline-table.js';
42
43
  export { InputChip } from './input-chip/input-chip.js';
@@ -0,0 +1,9 @@
1
+ import { TertiaryAction, PrimaryAction } from '../primitives/base-inline-notice/base-inline-notice-actions.js';
2
+ import { InlineNoticeListItem as InlineNoticeListItem$1 } from './inline-notice-list-item.js';
3
+
4
+ const InlineNoticeListItem = Object.assign(InlineNoticeListItem$1, {
5
+ PrimaryAction,
6
+ TertiaryAction
7
+ });
8
+
9
+ export { InlineNoticeListItem };
@@ -0,0 +1,51 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { BaseInlineNotice } from '../primitives/base-inline-notice/index.js';
4
+ import { Text } from '../text/text.js';
5
+ import styles from './inline-notice-list-item.module.js';
6
+
7
+ const InlineNoticeListItem = /*#__PURE__*/forwardRef(function InlineNoticeListItem(props, forwardedRef) {
8
+ const {
9
+ children,
10
+ icon,
11
+ iconAriaLabel,
12
+ subtitle,
13
+ text,
14
+ title
15
+ } = props;
16
+ return jsxs(BaseInlineNotice, {
17
+ ref: forwardedRef,
18
+ backgroundColor: "backgroundWhite",
19
+ className: styles.inlineNoticeListItem,
20
+ children: [jsxs(BaseInlineNotice.ContentContainer, {
21
+ className: styles.contentContainer,
22
+ children: [icon && iconAriaLabel && jsx(BaseInlineNotice.Icon, {
23
+ icon: icon,
24
+ iconAriaLabel: iconAriaLabel
25
+ }), jsxs(BaseInlineNotice.Content, {
26
+ children: [jsxs("div", {
27
+ children: [jsx(Text, {
28
+ as: "span",
29
+ color: "textOnLightDefault",
30
+ variant: "bodyDefaultBold",
31
+ children: title
32
+ }), subtitle && jsx(Text, {
33
+ as: "span",
34
+ color: "textOnLightDefault",
35
+ children: subtitle
36
+ })]
37
+ }), text && jsx(BaseInlineNotice.Content.Body, {
38
+ children: jsx(Text, {
39
+ as: "span",
40
+ color: "textOnLightSecondary",
41
+ children: text
42
+ })
43
+ })]
44
+ })]
45
+ }), !!children && jsx(BaseInlineNotice.Actions, {
46
+ children: children
47
+ })]
48
+ });
49
+ });
50
+
51
+ export { InlineNoticeListItem };
@@ -0,0 +1,4 @@
1
+ import '../index.css';
2
+ var styles = {"inlineNoticeListItem":"bp_inline_notice_list_item_module_inlineNoticeListItem--0833c","contentContainer":"bp_inline_notice_list_item_module_contentContainer--0833c"};
3
+
4
+ export { styles as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "12.116.2",
3
+ "version": "12.118.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@ariakit/react": "0.4.15",
49
49
  "@ariakit/react-core": "0.4.15",
50
- "@box/blueprint-web-assets": "^4.93.3",
50
+ "@box/blueprint-web-assets": "^4.93.5",
51
51
  "@internationalized/date": "^3.7.0",
52
52
  "@radix-ui/react-accordion": "1.1.2",
53
53
  "@radix-ui/react-checkbox": "1.0.4",
@@ -77,7 +77,7 @@
77
77
  "type-fest": "^3.2.0"
78
78
  },
79
79
  "devDependencies": {
80
- "@box/storybook-utils": "^0.16.1",
80
+ "@box/storybook-utils": "^0.16.3",
81
81
  "@types/react": "^18.0.0",
82
82
  "@types/react-dom": "^18.0.0",
83
83
  "react": "^18.3.0",