@impulse-ui-native/select 2.9.0 → 4.0.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.
|
@@ -3,11 +3,17 @@ import { memo } from "react";
|
|
|
3
3
|
import { Icon } from "@impulse-ui-native/icon/components/icon";
|
|
4
4
|
import { CheckIcon } from "@impulse-ui-native/icon/icons/check";
|
|
5
5
|
import { Pressable, Typography, View } from "@impulse-ui-native/primitives";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
getSelectionItemStateTokens,
|
|
8
|
+
useComponentsTokens
|
|
9
|
+
} from "@impulse-ui-native/theme";
|
|
7
10
|
const Option = memo(function Option2(props) {
|
|
8
11
|
const { label, selected, ...rest } = props;
|
|
9
12
|
const tokens = useComponentsTokens();
|
|
10
13
|
const optionTokens = tokens.select.option;
|
|
14
|
+
const appearanceTokens = getSelectionItemStateTokens(optionTokens.states, {
|
|
15
|
+
selected
|
|
16
|
+
});
|
|
11
17
|
return /* @__PURE__ */ jsx(Pressable, { ...rest, children: /* @__PURE__ */ jsxs(
|
|
12
18
|
View,
|
|
13
19
|
{
|
|
@@ -21,8 +27,8 @@ const Option = memo(function Option2(props) {
|
|
|
21
27
|
Icon,
|
|
22
28
|
{
|
|
23
29
|
icon: CheckIcon,
|
|
24
|
-
color:
|
|
25
|
-
opacity:
|
|
30
|
+
color: appearanceTokens.iconColor,
|
|
31
|
+
opacity: appearanceTokens.iconOpacity
|
|
26
32
|
}
|
|
27
33
|
)
|
|
28
34
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/option.tsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Icon } from \"@impulse-ui-native/icon/components/icon\";\nimport { CheckIcon } from \"@impulse-ui-native/icon/icons/check\";\nimport { Pressable, Typography, View } from \"@impulse-ui-native/primitives\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/option.tsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Icon } from \"@impulse-ui-native/icon/components/icon\";\nimport { CheckIcon } from \"@impulse-ui-native/icon/icons/check\";\nimport { Pressable, Typography, View } from \"@impulse-ui-native/primitives\";\nimport {\n getSelectionItemStateTokens,\n useComponentsTokens,\n} from \"@impulse-ui-native/theme\";\n\nimport { OptionProps } from \"../types\";\n\nexport const Option = memo(function Option(props: OptionProps) {\n const { label, selected, ...rest } = props;\n\n const tokens = useComponentsTokens();\n const optionTokens = tokens.select.option;\n const appearanceTokens = getSelectionItemStateTokens(optionTokens.states, {\n selected,\n });\n\n return (\n <Pressable {...rest}>\n <View\n padding={optionTokens.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n >\n <Typography.Body>{label}</Typography.Body>\n\n <Icon\n icon={CheckIcon}\n color={appearanceTokens.iconColor}\n opacity={appearanceTokens.iconOpacity}\n />\n </View>\n </Pressable>\n );\n});\n"],"mappings":"AAuBM,SAME,KANF;AAvBN,SAAS,YAAY;AAErB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,YAAY,YAAY;AAC5C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAIA,MAAM,SAAS,KAAK,SAASA,QAAO,OAAoB;AAC7D,QAAM,EAAE,OAAO,UAAU,GAAG,KAAK,IAAI;AAErC,QAAM,SAAS,oBAAoB;AACnC,QAAM,eAAe,OAAO,OAAO;AACnC,QAAM,mBAAmB,4BAA4B,aAAa,QAAQ;AAAA,IACxE;AAAA,EACF,CAAC;AAED,SACE,oBAAC,aAAW,GAAG,MACb;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,aAAa;AAAA,MACtB,eAAc;AAAA,MACd,YAAW;AAAA,MACX,gBAAe;AAAA,MAEf;AAAA,4BAAC,WAAW,MAAX,EAAiB,iBAAM;AAAA,QAExB;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,iBAAiB;AAAA,YACxB,SAAS,iBAAiB;AAAA;AAAA,QAC5B;AAAA;AAAA;AAAA,EACF,GACF;AAEJ,CAAC;","names":["Option"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const Temp = "";
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Temp };
|
package/dist/constants/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/constants/index.ts"],"sourcesContent":["export const
|
|
1
|
+
{"version":3,"sources":["../../src/constants/index.ts"],"sourcesContent":["export const Temp = \"\";\n"],"mappings":"AAAO,MAAM,OAAO;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulse-ui-native/select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Accessible select and option picker components for ImpulseUI Native applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
],
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@impulse-ui-native/theme": "
|
|
32
|
-
"@impulse-ui-native/input": "
|
|
33
|
-
"@impulse-ui-native/
|
|
34
|
-
"@impulse-ui-native/
|
|
35
|
-
"@impulse-ui-native/
|
|
36
|
-
"@impulse-ui-native/flyout": "
|
|
37
|
-
"@impulse-ui-native/portal": "
|
|
31
|
+
"@impulse-ui-native/theme": "4.0.0",
|
|
32
|
+
"@impulse-ui-native/input": "4.0.0",
|
|
33
|
+
"@impulse-ui-native/icon": "4.0.0",
|
|
34
|
+
"@impulse-ui-native/core": "4.0.0",
|
|
35
|
+
"@impulse-ui-native/primitives": "4.0.0",
|
|
36
|
+
"@impulse-ui-native/flyout": "4.0.0",
|
|
37
|
+
"@impulse-ui-native/portal": "4.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@shopify/flash-list": "2.0.2",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"react-native": "0.86.2",
|
|
46
46
|
"typescript": "~6.0.3",
|
|
47
47
|
"@impulse-ui-native/eslint-config": "1.0.0",
|
|
48
|
-
"@impulse-ui-native/
|
|
49
|
-
"@impulse-ui-native/
|
|
48
|
+
"@impulse-ui-native/tsconfig": "1.0.0",
|
|
49
|
+
"@impulse-ui-native/prettier-config": "1.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">=18",
|