vpt-sebraeds 0.0.103 → 0.0.105

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.
@@ -74,6 +74,7 @@ import NavigationItemV2 from 'vpt-sebraeds/components/NavigationItem/V2';
74
74
  | `accessibilityHint` | `string` | `'Abrir item'` com `onPress`; nenhuma sem | Rótulo do navigationIcon no handoff. |
75
75
  | `style` | `ViewStyle` | — | Ex.: largura definida pelo contexto. |
76
76
  | `testID` | `string` | — | Container; conteúdo pressionável `${testID}-main`; chevron `${testID}-navigation-icon`. |
77
+ | `navigationIcon` | `string` | `'arrow-right-s-line'` | Nome do ícone Remix do navigationIcon (ex.: `'external-link-line'` para links externos). |
77
78
 
78
79
  Demais subcomponentes: `Leading { icon?, custom?, alt?, children?, style?, testID? }`, `Content { children, style? }`, `Title { children, style? }`, `Description { children, style? }`, `AssistText { children, testID? }`, `Points { children, testID? }`, `Actions { children, testID? }`, `Action { children, onPress?, accessibilityLabel?, testID? }`.
79
80
 
@@ -199,6 +199,8 @@ const ORIENTATIONS = ['horizontal', 'vertical'];
199
199
  * como filhos diretos.
200
200
  * @param {string} [props.testID] - Identificador do container; o conteúdo pressionável recebe
201
201
  * `${testID}-main` e o navigationIcon `${testID}-navigation-icon`.
202
+ * @param {string} [props.navigationIcon='arrow-right-s-line'] - Nome do ícone Remix do navigationIcon
203
+ * (ex.: `'external-link-line'` para links externos).
202
204
  * @returns {React.ReactElement} O NavigationItemV2.
203
205
  */
204
206
  const Root = ({
@@ -212,6 +214,7 @@ const Root = ({
212
214
  style,
213
215
  children,
214
216
  testID,
217
+ navigationIcon: navigationIconName = tokens.layout.trailing.iconName,
215
218
  }) => {
216
219
  const [isPressed, setIsPressed] = useState(false);
217
220
  const { focus, blur, focusedStyle } = useFocus();
@@ -299,7 +302,7 @@ const Root = ({
299
302
  importantForAccessibility="no-hide-descendants"
300
303
  >
301
304
  <BaseIcon
302
- name={tokens.layout.trailing.iconName}
305
+ name={navigationIconName}
303
306
  size={tokens.layout.trailing.iconSize}
304
307
  color={tokens.colors.navigationIcon}
305
308
  />
@@ -64,9 +64,11 @@ import tokens from './tokens';
64
64
  * como filhos diretos.
65
65
  * @param {string} [props.testID] - Identificador do container; o conteúdo pressionável recebe
66
66
  * `${testID}-main` e o navigationIcon `${testID}-navigation-icon`.
67
+ * @param {string} [props.navigationIcon='arrow-right-s-line'] - Nome do ícone Remix do navigationIcon
68
+ * (ex.: `'external-link-line'` para links externos).
67
69
  * @returns {React.ReactElement} O NavigationItemV2.
68
70
  */
69
- declare function Root({ variant, orientation, stateModifier, onPress, accessibilityRole, accessibilityLabel, accessibilityHint, style, children, testID, }: {
71
+ declare function Root({ variant, orientation, stateModifier, onPress, accessibilityRole, accessibilityLabel, accessibilityHint, style, children, testID, navigationIcon: navigationIconName, }: {
70
72
  variant?: "default" | "outline" | "fullBleed" | undefined;
71
73
  orientation?: "horizontal" | "vertical" | undefined;
72
74
  stateModifier?: "press" | "rest" | undefined;
@@ -77,5 +79,6 @@ declare function Root({ variant, orientation, stateModifier, onPress, accessibil
77
79
  style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
78
80
  children?: React.ReactNode;
79
81
  testID?: string | undefined;
82
+ navigationIcon?: string | undefined;
80
83
  }): React.ReactElement;
81
84
  //# sourceMappingURL=Root.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../../components/NavigationItem/V2/Root.jsx"],"names":[],"mappings":"AAMA,+DAAsE;AAc/D,8CATM;IACR,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC7C,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,OAAO,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IACjD,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE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,yCAHI,KAAK,CAAC,SAAS,GACb,MAAM,GAAG,SAAS,CAU9B;AAgBM,0CAJI,KAAK,CAAC,SAAS,cACf,MAAM,GACJ,KAAK,CAAC,SAAS,EAAE,CAgBtB;;kBAhG0D,OAAO;mBAItD,UAAU;AAkK7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,gMAvBG;IAAoD,OAAO;IAEjB,WAAW;IAEpB,aAAa;IAGnB,OAAO,UAApB,IAAI;IACgB,iBAAiB;IAE5B,kBAAkB;IAClB,iBAAiB;IAE2C,KAAK,GAAhF,OAAO,cAAc,EAAE,SAAS,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC;IAE1C,QAAQ,GAAhC,KAAK,CAAC,SAAS;IAEA,MAAM;IAEN,cAAc;CAErC,GAAU,KAAK,CAAC,YAAY,CAuK9B"}
@@ -185,9 +185,11 @@ const ORIENTATIONS = ['horizontal', 'vertical'];
185
185
  * como filhos diretos.
186
186
  * @param {string} [props.testID] - Identificador do container; o conteúdo pressionável recebe
187
187
  * `${testID}-main` e o navigationIcon `${testID}-navigation-icon`.
188
+ * @param {string} [props.navigationIcon='arrow-right-s-line'] - Nome do ícone Remix do navigationIcon
189
+ * (ex.: `'external-link-line'` para links externos).
188
190
  * @returns {React.ReactElement} O NavigationItemV2.
189
191
  */
190
- const Root = ({ variant = 'default', orientation = 'horizontal', stateModifier = 'rest', onPress, accessibilityRole, accessibilityLabel, accessibilityHint, style, children, testID, }) => {
192
+ const Root = ({ variant = 'default', orientation = 'horizontal', stateModifier = 'rest', onPress, accessibilityRole, accessibilityLabel, accessibilityHint, style, children, testID, navigationIcon: navigationIconName = tokens.layout.trailing.iconName, }) => {
191
193
  const [isPressed, setIsPressed] = useState(false);
192
194
  const { focus, blur, focusedStyle } = useFocus();
193
195
  const resolvedVariant = VARIANTS.includes(variant) ? variant : 'default';
@@ -242,7 +244,7 @@ const Root = ({ variant = 'default', orientation = 'horizontal', stateModifier =
242
244
  {regions.supplement}
243
245
  </View>) : null;
244
246
  const navigationIcon = (<View style={styles.trailing} testID={testID ? `${testID}-navigation-icon` : undefined} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
245
- <BaseIcon name={tokens.layout.trailing.iconName} size={tokens.layout.trailing.iconSize} color={tokens.colors.navigationIcon}/>
247
+ <BaseIcon name={navigationIconName} size={tokens.layout.trailing.iconSize} color={tokens.colors.navigationIcon}/>
246
248
  </View>);
247
249
  return (<NavigationItemV2Context.Provider value={contextValue}>
248
250
  <View style={[
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "description": "Biblioteca de componentes React Native do Sebrae",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",