@ornikar/bumper 3.11.0 → 3.12.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/definitions/index.d.ts +2 -0
  3. package/dist/definitions/index.d.ts.map +1 -1
  4. package/dist/definitions/system/dataDisplays/Sticker/Sticker.d.ts +18 -0
  5. package/dist/definitions/system/dataDisplays/Sticker/Sticker.d.ts.map +1 -0
  6. package/dist/definitions/system/dataDisplays/Sticker/components/StickerLabel.d.ts +7 -0
  7. package/dist/definitions/system/dataDisplays/Sticker/components/StickerLabel.d.ts.map +1 -0
  8. package/dist/definitions/system/dataDisplays/Sticker/context.d.ts +3 -0
  9. package/dist/definitions/system/dataDisplays/Sticker/context.d.ts.map +1 -0
  10. package/dist/definitions/system/dataDisplays/Sticker/types.d.ts +24 -0
  11. package/dist/definitions/system/dataDisplays/Sticker/types.d.ts.map +1 -0
  12. package/dist/definitions/system/layout/divider/Divider.d.ts.map +1 -1
  13. package/dist/definitions/system/types.d.ts +10 -9
  14. package/dist/definitions/system/types.d.ts.map +1 -1
  15. package/dist/index-metro.es.android.js +146 -9
  16. package/dist/index-metro.es.android.js.map +1 -1
  17. package/dist/index-metro.es.ios.js +146 -9
  18. package/dist/index-metro.es.ios.js.map +1 -1
  19. package/dist/index-node-22.22.cjs.js +145 -6
  20. package/dist/index-node-22.22.cjs.js.map +1 -1
  21. package/dist/index-node-22.22.cjs.web.js +145 -6
  22. package/dist/index-node-22.22.cjs.web.js.map +1 -1
  23. package/dist/index-node-22.22.es.mjs +145 -7
  24. package/dist/index-node-22.22.es.mjs.map +1 -1
  25. package/dist/index-node-22.22.es.web.mjs +145 -7
  26. package/dist/index-node-22.22.es.web.mjs.map +1 -1
  27. package/dist/index.es.js +141 -9
  28. package/dist/index.es.js.map +1 -1
  29. package/dist/index.es.web.js +141 -9
  30. package/dist/index.es.web.js.map +1 -1
  31. package/dist/tsbuildinfo +1 -1
  32. package/docs/migration/Sticker.md +222 -0
  33. package/package.json +1 -1
  34. package/src/index.ts +2 -0
  35. package/src/system/dataDisplays/Sticker/Sticker.features.stories.tsx +50 -0
  36. package/src/system/dataDisplays/Sticker/Sticker.mdx +38 -0
  37. package/src/system/dataDisplays/Sticker/Sticker.stories.tsx +49 -0
  38. package/src/system/dataDisplays/Sticker/Sticker.tsx +52 -0
  39. package/src/system/dataDisplays/Sticker/__snapshots__/Sticker.features.stories.tsx.snap +747 -0
  40. package/src/system/dataDisplays/Sticker/__snapshots__/Sticker.stories.tsx.snap +52 -0
  41. package/src/system/dataDisplays/Sticker/__snapshots_web__/Sticker.features.stories.tsx.snap +294 -0
  42. package/src/system/dataDisplays/Sticker/__snapshots_web__/Sticker.stories.tsx.snap +35 -0
  43. package/src/system/dataDisplays/Sticker/components/StickerLabel.tsx +33 -0
  44. package/src/system/dataDisplays/Sticker/context.ts +10 -0
  45. package/src/system/dataDisplays/Sticker/types.ts +61 -0
  46. package/src/system/layout/divider/Divider.tsx +7 -2
  47. package/src/system/layout/divider/__snapshots_web__/Divider.features.stories.tsx.snap +7 -0
  48. package/src/system/layout/divider/__snapshots_web__/Divider.stories.tsx.snap +1 -0
  49. package/src/system/types.ts +26 -14
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.12.0](https://github.com/ornikar/kitt/compare/@ornikar/bumper@3.11.0...@ornikar/bumper@3.12.0) (2026-04-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * **bumper:** add Sticker component - OSE-24569 ([#2990](https://github.com/ornikar/kitt/issues/2990)) ([2e5ebaa](https://github.com/ornikar/kitt/commit/2e5ebaac2c43cd046a0644d3d07259e8ecc586e3))
12
+ * **bumper:** improve PropsToTamaguiVariants generics [no-issue] ([#2995](https://github.com/ornikar/kitt/issues/2995)) ([dfb5029](https://github.com/ornikar/kitt/commit/dfb5029562aca091cec4a1f5c4f3548c7d943360))
13
+ * **bumper:** wrap Divider with useProps to flatten media props [no-issue] ([#2999](https://github.com/ornikar/kitt/issues/2999)) ([80a6a0c](https://github.com/ornikar/kitt/commit/80a6a0c077502b1d29133f6fdffea8d0f1aac260))
14
+
15
+
16
+
6
17
  ## [3.11.0](https://github.com/ornikar/kitt/compare/@ornikar/bumper@3.10.1...@ornikar/bumper@3.11.0) (2026-04-23)
7
18
 
8
19
 
@@ -21,6 +21,8 @@ export type { TypographyIconProps } from './system/content/typography/Typography
21
21
  export type { TypographyLinkProps } from './system/content/typography/TypographyLink';
22
22
  export type { BadgeProps } from './system/dataDisplays/Badge/Badge';
23
23
  export { Badge } from './system/dataDisplays/Badge/Badge';
24
+ export { Sticker } from './system/dataDisplays/Sticker/Sticker';
25
+ export type { StickerProps } from './system/dataDisplays/Sticker/types';
24
26
  export { useBreakpointValue } from './system/core/breakpoints/hooks/useBreakpointValue';
25
27
  export { useCurrentBreakpointName } from './system/core/breakpoints/hooks/useCurrentBreakpointName';
26
28
  export { useWindowSize } from './system/core/breakpoints/hooks/useWindowSize';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,YAAY,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MA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tF,YAAY,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,YAAY,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AAGzF,YAAY,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { InternalStickerWithoutMediaProps, StickerProps } from './types';
3
+ export declare const InternalStickerFrame: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
4
+ color?: "pink" | "orange" | "gold" | "lightning" | "blue" | "green" | "red" | "linen" | "greenDark" | "blueDark" | "cream" | "lightningDark" | undefined;
5
+ size?: "small" | "medium" | "large" | undefined;
6
+ label?: undefined;
7
+ }, import("@tamagui/core").StaticConfigPublic>;
8
+ export declare const InternalSticker: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
9
+ color?: "pink" | "orange" | "gold" | "lightning" | "blue" | "green" | "red" | "linen" | "greenDark" | "blueDark" | "cream" | "lightningDark" | undefined;
10
+ size?: "small" | "medium" | "large" | undefined;
11
+ label?: undefined;
12
+ }>, "$base" | "$small" | "$medium" | "$large" | "$wide" | import("@tamagui/core").GroupMediaKeys | "$theme-light" | "$platform-native" | "$platform-web" | "$platform-android" | "$platform-ios" | keyof InternalStickerWithoutMediaProps> & import("../../types").PropsWithoutMediaStyles<InternalStickerWithoutMediaProps> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").PropsWithoutMediaStyles<InternalStickerWithoutMediaProps>>, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & import("../../types").PropsWithoutMediaStyles<InternalStickerWithoutMediaProps> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").PropsWithoutMediaStyles<InternalStickerWithoutMediaProps>>, import("@tamagui/core").StackStyleBase, {
13
+ color?: "pink" | "orange" | "gold" | "lightning" | "blue" | "green" | "red" | "linen" | "greenDark" | "blueDark" | "cream" | "lightningDark" | undefined;
14
+ size?: "small" | "medium" | "large" | undefined;
15
+ label?: undefined;
16
+ }, import("@tamagui/core").StaticConfigPublic>;
17
+ export declare function Sticker(props: StickerProps): ReactNode;
18
+ //# sourceMappingURL=Sticker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sticker.d.ts","sourceRoot":"","sources":["../../../../../src/system/dataDisplays/Sticker/Sticker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,gCAAgC,EAAgB,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5F,eAAO,MAAM,oBAAoB;;;;8CA0B/B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;8CAQ1B,CAAC;AAEH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAEtD"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ interface InternalStickerLabelProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare function InternalStickerLabel({ children }: InternalStickerLabelProps): ReactNode;
6
+ export {};
7
+ //# sourceMappingURL=StickerLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StickerLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/system/dataDisplays/Sticker/components/StickerLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,UAAU,yBAAyB;IACjC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAQD,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,yBAAyB,GAAG,SAAS,CAevF"}
@@ -0,0 +1,3 @@
1
+ import type { InternalStickerWithoutMediaProps } from './types';
2
+ export declare const context: import("@tamagui/core").StyledContext<Required<Pick<InternalStickerWithoutMediaProps, "color" | "size" | "disabled">>>;
3
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/system/dataDisplays/Sticker/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAIhE,eAAO,MAAM,OAAO,wHAIlB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { ColorTokens } from '@tamagui/core';
2
+ import type { ReactNode } from 'react';
3
+ import type { TamaguiMediaProps } from '../../types';
4
+ export declare const STICKER_COLORS_LIST: readonly ["green", "greenDark", "blue", "blueDark", "red", "orange", "pink", "gold", "cream", "linen", "lightning", "lightningDark"];
5
+ export type StickerColor = (typeof STICKER_COLORS_LIST)[number];
6
+ export declare const STICKER_SIZES_LIST: readonly ["small", "medium", "large"];
7
+ export type StickerSize = (typeof STICKER_SIZES_LIST)[number];
8
+ interface StickerColorStyle {
9
+ background: ColorTokens;
10
+ text: ColorTokens;
11
+ }
12
+ type InternalStickerColor = StickerColor | 'disabled';
13
+ export declare const STICKER_COLORS: Record<InternalStickerColor, StickerColorStyle>;
14
+ export interface InternalStickerWithoutMediaProps {
15
+ label: ReactNode;
16
+ color?: StickerColor;
17
+ size?: StickerSize;
18
+ disabled?: boolean;
19
+ }
20
+ export interface InternalStickerLabelWithoutMediaProps extends InternalStickerWithoutMediaProps {
21
+ }
22
+ export type StickerProps = TamaguiMediaProps<InternalStickerWithoutMediaProps>;
23
+ export {};
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/system/dataDisplays/Sticker/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,sIAatB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB,uCAAwC,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,UAAU,iBAAiB;IACzB,UAAU,EAAE,WAAW,CAAC;IACxB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,KAAK,oBAAoB,GAAG,YAAY,GAAG,UAAU,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,oBAAoB,EAAE,iBAAiB,CAc1E,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qCAAsC,SAAQ,gCAAgC;CAAG;AAElG,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC,gCAAgC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../../src/system/layout/divider/Divider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7E,UAAU,gCAAgC;IACxC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAqCD,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC,gCAAgC,CAAC,CAAC;AAE/E,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAEtD"}
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../../src/system/layout/divider/Divider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7E,UAAU,gCAAgC;IACxC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAoCD,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC,gCAAgC,CAAC,CAAC;AAO/E,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAEtD"}
@@ -1,4 +1,5 @@
1
1
  import type { PropsWithoutMediaStyles as InternalPropsWithoutMediaStyles, TokensParsed, WithMediaProps } from '@tamagui/core';
2
+ import type { ReactNode } from 'react';
2
3
  /**
3
4
  * Rewrite of Tamagui PropsWithoutMediaStyles to make all responsive props optionnal.
4
5
  * @internal Do not use directly, use TamaguiMediaProps instead.
@@ -20,14 +21,14 @@ export type TamaguiMediaProps<A> = PropsWithoutMediaStyles<A> & WithMediaProps<I
20
21
  */
21
22
  export type DefaultIgnoredKeys = 'children';
22
23
  /**
23
- * Maps a component's variant-prop interface `T` to a Tamagui `variants` config whose entries produce
24
- * style objects of type `V`.
24
+ * Maps a component's variant-prop interface `VariantProps` to a Tamagui `variants` config whose
25
+ * entries produce style objects of type `StyleProps`.
25
26
  *
26
- * For each key `K` of `T`, the entry must be either:
27
+ * For each key `K` of `VariantProps`, the entry must be either:
27
28
  * - a record keyed by the prop's literal values (with `boolean` props normalised to `'true' | 'false'`),
28
- * where each value is a style `V` or a function returning `V`, or
29
+ * where each value is a `StyleProps` or a function returning `StyleProps`, or
29
30
  * - a function that receives the raw prop value and a {@link VariantGoodiesParams} context and returns
30
- * a style `V` (or `undefined`).
31
+ * a `StyleProps` (or `undefined`).
31
32
  *
32
33
  * Pass a union of keys as `IgnoredKeys` to skip props that should never be variants (e.g.
33
34
  * event handlers). Ignored keys are stripped only from both the top-level map, not from `params.props`.
@@ -36,8 +37,8 @@ export type DefaultIgnoredKeys = 'children';
36
37
  * config is inferred `as const` while still being checked against the component's prop types, e.g.
37
38
  * `{ ... } as const satisfies PropsToTamaguiVariants<MyVariantProps, ViewProps, 'size'>`.
38
39
  */
39
- export type PropsToTamaguiVariants<T, V, IgnoredKeys extends keyof T = never> = {
40
- [K in keyof T as K extends IgnoredKeys | Extract<keyof T, DefaultIgnoredKeys> ? never : K]: NonNullable<T[K]> extends boolean ? Record<'true' | 'false', V | ((value: boolean | string | number, params: VariantGoodiesParams<T>) => V)> : NonNullable<T[K]> extends PropertyKey ? Record<NonNullable<T[K]>, V> | ((value: NonNullable<T[K]>, params: VariantGoodiesParams<T>) => V | undefined) : never;
40
+ export type PropsToTamaguiVariants<VariantProps, StyleProps, IgnoredKeys extends keyof VariantProps = never> = {
41
+ [K in keyof VariantProps as K extends IgnoredKeys | Extract<keyof VariantProps, DefaultIgnoredKeys> ? never : K]: NonNullable<VariantProps[K]> extends boolean ? Record<'true' | 'false', StyleProps | ((value: boolean | string | number, params: VariantGoodiesParams<VariantProps & StyleProps>) => StyleProps)> : NonNullable<VariantProps[K]> extends PropertyKey ? Record<NonNullable<VariantProps[K]>, StyleProps> | ((value: NonNullable<VariantProps[K]>, params: VariantGoodiesParams<VariantProps & StyleProps>) => StyleProps | undefined) : NonNullable<VariantProps[K]> extends ReactNode ? StyleProps : never;
41
42
  };
42
43
  /**
43
44
  * Second argument passed to function-form variants declared via {@link PropsToTamaguiVariants}.
@@ -46,8 +47,8 @@ export type PropsToTamaguiVariants<T, V, IgnoredKeys extends keyof T = never> =
46
47
  * props (e.g. read `disabled` or `isOnContrasted` while resolving `type`).
47
48
  * - `tokens`: Tamagui's parsed token map, for resolving design tokens from inside the variant.
48
49
  */
49
- interface VariantGoodiesParams<T> {
50
- props: T;
50
+ interface VariantGoodiesParams<Props> {
51
+ props: Props;
51
52
  tokens: TokensParsed;
52
53
  }
53
54
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/system/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,uBAAuB,IAAI,+BAA+B,EAC1D,YAAY,EACZ,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI;KACtC,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,SAAS,IAAI,MAAM,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;CACnE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnH;;;GAGG;AACH,MAAM,MAAM,kBAAkB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;GAMG;AACH,UAAU,oBAAoB,CAAC,KAAK;IAClC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;CACtB"}
@@ -476,7 +476,7 @@ const Center = styled(View, {
476
476
  alignItems: 'center'
477
477
  });
478
478
 
479
- const _excluded = ["as"];
479
+ const _excluded$1 = ["as"];
480
480
  /**
481
481
  * A polymorphic Pressable component that can render as any Tamagui primitive.
482
482
  */
@@ -484,7 +484,7 @@ function Pressable(_ref) {
484
484
  let {
485
485
  as
486
486
  } = _ref,
487
- rest = _objectWithoutProperties(_ref, _excluded);
487
+ rest = _objectWithoutProperties(_ref, _excluded$1);
488
488
  const Component = styled(as !== null && as !== void 0 ? as : View, {
489
489
  name: 'Pressable',
490
490
  role: 'button',
@@ -834,7 +834,7 @@ function Icon(props) {
834
834
  return /*#__PURE__*/jsx(InternalIcon, _objectSpread({}, props));
835
835
  }
836
836
 
837
- const context = createStyledContext({
837
+ const context$1 = createStyledContext({
838
838
  size: 'large',
839
839
  type: 'secondary',
840
840
  isOnContrasted: false,
@@ -866,7 +866,7 @@ function ButtonIcon({
866
866
  type,
867
867
  disabled,
868
868
  isOnContrasted
869
- } = context.useStyledContext();
869
+ } = context$1.useStyledContext();
870
870
  const color = getButtonContentColor(type, disabled, isOnContrasted);
871
871
  return /*#__PURE__*/jsx(Icon, {
872
872
  icon: icon,
@@ -953,7 +953,7 @@ function ButtonText({
953
953
  size,
954
954
  disabled,
955
955
  isOnContrasted
956
- } = context.useStyledContext();
956
+ } = context$1.useStyledContext();
957
957
  const color = getButtonContentColor(type, disabled, isOnContrasted);
958
958
  return /*#__PURE__*/jsxs(VStack, {
959
959
  children: [/*#__PURE__*/jsx(Typography.Text, {
@@ -970,7 +970,7 @@ function ButtonText({
970
970
 
971
971
  const InternalButtonFrame = styled(HStack, {
972
972
  name: 'Button',
973
- context,
973
+ context: context$1,
974
974
  role: 'button',
975
975
  alignItems: 'center',
976
976
  justifyContent: 'center',
@@ -991,7 +991,7 @@ const InternalButtonFrame = styled(HStack, {
991
991
  const {
992
992
  isOnContrasted,
993
993
  disabled
994
- } = context.useStyledContext();
994
+ } = context$1.useStyledContext();
995
995
  const commonTypeStyle = {
996
996
  backgroundColor: `$button.bg.${type}${isOnContrasted ? '.onContrasted' : ''}.default`,
997
997
  hoverStyle: {
@@ -1112,7 +1112,7 @@ const Button = withStaticProperties(InternalButton, {
1112
1112
 
1113
1113
  const InternalIconButtonFrame = styled(InternalButton, {
1114
1114
  name: 'IconButton',
1115
- context,
1115
+ context: context$1,
1116
1116
  variants: {
1117
1117
  size: {
1118
1118
  small: {
@@ -1138,6 +1138,143 @@ const IconButton = withStaticProperties(InternalIconButton, {
1138
1138
  Badge: ButtonBadge
1139
1139
  });
1140
1140
 
1141
+ const context = createStyledContext({
1142
+ color: 'green',
1143
+ size: 'small',
1144
+ disabled: false
1145
+ });
1146
+
1147
+ /* eslint-disable @ornikar/kitt/prefer-semantic-tokens --
1148
+ * Sticker intentionally exposes 12 palette-level decorative colors agreed with design.
1149
+ */
1150
+ const STICKER_COLORS = {
1151
+ green: {
1152
+ background: '$palette.rainbow.green-grass',
1153
+ text: '$palette.rainbow.green-apple'
1154
+ },
1155
+ greenDark: {
1156
+ background: '$palette.rainbow.green-pine',
1157
+ text: '$palette.rainbow.blue-sky'
1158
+ },
1159
+ blue: {
1160
+ background: '$palette.rainbow.blue-sky',
1161
+ text: '$palette.rainbow.green-pine'
1162
+ },
1163
+ blueDark: {
1164
+ background: '$palette.rainbow.blue-electric',
1165
+ text: '$palette.beige.3'
1166
+ },
1167
+ red: {
1168
+ background: '$palette.rainbow.brick',
1169
+ text: '$palette.rainbow.sun'
1170
+ },
1171
+ orange: {
1172
+ background: '$palette.rainbow.orange',
1173
+ text: '$palette.beige.2'
1174
+ },
1175
+ pink: {
1176
+ background: '$palette.rainbow.pink',
1177
+ text: '$palette.rainbow.brick'
1178
+ },
1179
+ gold: {
1180
+ background: '$palette.rainbow.gold',
1181
+ text: '$palette.beige.1'
1182
+ },
1183
+ cream: {
1184
+ background: '$palette.beige.1',
1185
+ text: '$palette.rainbow.brick'
1186
+ },
1187
+ linen: {
1188
+ background: '$palette.beige.3',
1189
+ text: '$palette.deepPurple.8'
1190
+ },
1191
+ lightning: {
1192
+ background: '$palette.lightning.5',
1193
+ text: '$palette.lightning.9'
1194
+ },
1195
+ lightningDark: {
1196
+ background: '$palette.lightning.9',
1197
+ text: '$palette.lightning.5'
1198
+ },
1199
+ disabled: {
1200
+ background: '$bg.disabled.hi',
1201
+ text: '$content.disabled.onContrasted'
1202
+ }
1203
+ };
1204
+
1205
+ const TYPOGRAPHY_VARIANT_BY_SIZE = {
1206
+ small: 'content-caps-xs',
1207
+ medium: 'content-caps-m',
1208
+ large: 'content-caps-l'
1209
+ };
1210
+ function InternalStickerLabel({
1211
+ children
1212
+ }) {
1213
+ const {
1214
+ color,
1215
+ size,
1216
+ disabled
1217
+ } = context.useStyledContext();
1218
+ const textColor = STICKER_COLORS[disabled ? 'disabled' : color].text;
1219
+ return /*#__PURE__*/jsx(InternalTypography, {
1220
+ variant: TYPOGRAPHY_VARIANT_BY_SIZE[size],
1221
+ color: textColor,
1222
+ numberOfLines: 1,
1223
+ ellipsizeMode: "tail",
1224
+ children: children
1225
+ });
1226
+ }
1227
+
1228
+ const _excluded = ["label"];
1229
+ const InternalStickerFrame = styled(View, {
1230
+ name: 'Sticker',
1231
+ context,
1232
+ alignSelf: 'flex-start',
1233
+ maxWidth: '100%',
1234
+ padding: '$space.4',
1235
+ variants: {
1236
+ label: {},
1237
+ size: {
1238
+ small: {
1239
+ borderRadius: '$radius.s'
1240
+ },
1241
+ medium: {
1242
+ borderRadius: '$radius.m'
1243
+ },
1244
+ large: {
1245
+ borderRadius: '$radius.m'
1246
+ }
1247
+ },
1248
+ color: color => {
1249
+ const {
1250
+ disabled
1251
+ } = context.useStyledContext();
1252
+ return {
1253
+ backgroundColor: STICKER_COLORS[disabled ? 'disabled' : color].background
1254
+ };
1255
+ }
1256
+ },
1257
+ defaultVariants: {
1258
+ size: 'small',
1259
+ color: 'green'
1260
+ }
1261
+ });
1262
+ const InternalSticker = InternalStickerFrame.styleable(props => {
1263
+ const _useProps = useProps(props),
1264
+ {
1265
+ label
1266
+ } = _useProps,
1267
+ frameProps = _objectWithoutProperties(_useProps, _excluded);
1268
+ return /*#__PURE__*/jsx(InternalStickerFrame, _objectSpread(_objectSpread({}, frameProps), {}, {
1269
+ children: /*#__PURE__*/jsx(InternalStickerLabel, {
1270
+ children: label
1271
+ })
1272
+ }));
1273
+ });
1274
+ function Sticker(props) {
1275
+ return /*#__PURE__*/jsx(InternalSticker, _objectSpread({}, props));
1276
+ }
1277
+
1141
1278
  function getValueForBreakpoint(breakpoint, {
1142
1279
  base,
1143
1280
  small,
@@ -1190,5 +1327,5 @@ function SwitchBreakpoints(values) {
1190
1327
  return getValueForBreakpoint(breakpoint, values);
1191
1328
  }
1192
1329
 
1193
- export { Badge, BumperProvider, Button, Center, HStack, IconButton, Loader, Pressable, SwitchBreakpoints, Typography, VStack, getValueForBreakpoint, useBreakpointValue, useCurrentBreakpointName };
1330
+ export { Badge, BumperProvider, Button, Center, HStack, IconButton, Loader, Pressable, Sticker, SwitchBreakpoints, Typography, VStack, getValueForBreakpoint, useBreakpointValue, useCurrentBreakpointName };
1194
1331
  //# sourceMappingURL=index-metro.es.android.js.map