@opengovsg/oui 0.0.0-snapshot-20250319030133 → 0.0.0-snapshot-20250319074238
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/dist/cjs/tag-field/tag-field-tag-list.cjs +3 -2
- package/dist/esm/tag-field/tag-field-tag-list.js +3 -2
- package/dist/types/tag-field/tag-field-state-context.d.ts +1 -2
- package/dist/types/tag-field/tag-field-state-context.d.ts.map +1 -1
- package/dist/types/tag-field/tag-field-tag-list.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -15,7 +15,8 @@ const TagFieldTagList = ({
|
|
|
15
15
|
getSelectedItemProps,
|
|
16
16
|
removeSelectedItem,
|
|
17
17
|
isDisabled,
|
|
18
|
-
isReadOnly
|
|
18
|
+
isReadOnly,
|
|
19
|
+
itemToText
|
|
19
20
|
} = react.useContext(tagFieldStateContext.TagFieldStateContext);
|
|
20
21
|
const handleRemoveSelectedItem = react.useCallback(
|
|
21
22
|
(item) => () => {
|
|
@@ -49,7 +50,7 @@ const TagFieldTagList = ({
|
|
|
49
50
|
className: classNames?.tag,
|
|
50
51
|
...itemProps,
|
|
51
52
|
children: [
|
|
52
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: classNames?.tagText, children: selectedItem
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: classNames?.tagText, children: itemToText(selectedItem) }),
|
|
53
54
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
54
55
|
x.default,
|
|
55
56
|
{
|
|
@@ -13,7 +13,8 @@ const TagFieldTagList = ({
|
|
|
13
13
|
getSelectedItemProps,
|
|
14
14
|
removeSelectedItem,
|
|
15
15
|
isDisabled,
|
|
16
|
-
isReadOnly
|
|
16
|
+
isReadOnly,
|
|
17
|
+
itemToText
|
|
17
18
|
} = useContext(TagFieldStateContext);
|
|
18
19
|
const handleRemoveSelectedItem = useCallback(
|
|
19
20
|
(item) => () => {
|
|
@@ -47,7 +48,7 @@ const TagFieldTagList = ({
|
|
|
47
48
|
className: classNames?.tag,
|
|
48
49
|
...itemProps,
|
|
49
50
|
children: [
|
|
50
|
-
/* @__PURE__ */ jsx("span", { className: classNames?.tagText, children: selectedItem
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: classNames?.tagText, children: itemToText(selectedItem) }),
|
|
51
52
|
/* @__PURE__ */ jsx(
|
|
52
53
|
X,
|
|
53
54
|
{
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { UseComboboxReturnValue, UseMultipleSelectionReturnValue } from "downshift";
|
|
2
2
|
import type { TagFieldVariantProps } from "@opengovsg/oui-theme";
|
|
3
3
|
import type { TagFieldState } from "./use-tag-field-state";
|
|
4
|
-
interface TagFieldStateContextValue<T> extends TagFieldState<T>, Pick<UseComboboxReturnValue<T>, "getItemProps" | "highlightedIndex">, Pick<UseMultipleSelectionReturnValue<T>, "getSelectedItemProps" | "removeSelectedItem">, TagFieldVariantProps {
|
|
4
|
+
export interface TagFieldStateContextValue<T> extends TagFieldState<T>, Pick<UseComboboxReturnValue<T>, "getItemProps" | "highlightedIndex">, Pick<UseMultipleSelectionReturnValue<T>, "getSelectedItemProps" | "removeSelectedItem">, TagFieldVariantProps {
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
isInvalid: boolean;
|
|
7
7
|
isDisabled: boolean;
|
|
8
8
|
isReadOnly: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const TagFieldStateContext: import("react").Context<TagFieldStateContextValue<any> | null>;
|
|
11
|
-
export {};
|
|
12
11
|
//# sourceMappingURL=tag-field-state-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-field-state-context.d.ts","sourceRoot":"","sources":["../../../src/tag-field/tag-field-state-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,+BAA+B,EAChC,MAAM,WAAW,CAAA;AAGlB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE1D,
|
|
1
|
+
{"version":3,"file":"tag-field-state-context.d.ts","sourceRoot":"","sources":["../../../src/tag-field/tag-field-state-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,+BAA+B,EAChC,MAAM,WAAW,CAAA;AAGlB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE1D,MAAM,WAAW,yBAAyB,CAAC,CAAC,CAC1C,SAAQ,aAAa,CAAC,CAAC,CAAC,EACtB,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,cAAc,GAAG,kBAAkB,CAAC,EACpE,IAAI,CACF,+BAA+B,CAAC,CAAC,CAAC,EAClC,sBAAsB,GAAG,oBAAoB,CAC9C,EACD,oBAAoB;IACtB,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,eAAO,MAAM,oBAAoB,gEAE2B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-field-tag-list.d.ts","sourceRoot":"","sources":["../../../src/tag-field/tag-field-tag-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"tag-field-tag-list.d.ts","sourceRoot":"","sources":["../../../src/tag-field/tag-field-tag-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAA;AAKhE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAKzE,UAAU,0BAA0B,CAAC,CAAC;IACpC,IAAI,EAAE,CAAC,CAAA;IACP,SAAS,EAAE,UAAU,CACnB,+BAA+B,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAC3D,CAAA;IACD,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM;IACpD,UAAU,CAAC,EAAE,IAAI,CACf,cAAc,CAAC,aAAa,CAAC,EAC7B,KAAK,GAAG,SAAS,GAAG,SAAS,CAC9B,CAAA;IACD,QAAQ,CAAC,EACL,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;CACjE;AAED,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,MAAM,4BAG7C,oBAAoB,CAAC,CAAC,CAAC,iwBAyDzB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengovsg/oui",
|
|
3
|
-
"version": "0.0.0-snapshot-
|
|
3
|
+
"version": "0.0.0-snapshot-20250319074238",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"prettier": "^3.5.0",
|
|
48
48
|
"tsx": "^4.19.2",
|
|
49
49
|
"typescript": "5.7.3",
|
|
50
|
-
"@opengovsg/oui-theme": "0.0.
|
|
50
|
+
"@opengovsg/oui-theme": "0.0.6",
|
|
51
51
|
"@oui/chromatic": "0.0.0",
|
|
52
|
-
"@oui/eslint-config": "0.0.0",
|
|
53
52
|
"@oui/prettier-config": "0.0.0",
|
|
53
|
+
"@oui/eslint-config": "0.0.0",
|
|
54
54
|
"@oui/typescript-config": "0.0.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"motion": ">=11.12.0 || >=12.0.0-alpha.1",
|
|
80
80
|
"react-aria-components": "^1.7.1",
|
|
81
|
-
"@opengovsg/oui-theme": "0.0.
|
|
81
|
+
"@opengovsg/oui-theme": "0.0.6"
|
|
82
82
|
},
|
|
83
83
|
"prettier": "@oui/prettier-config",
|
|
84
84
|
"scripts": {
|