@flipdish/ui-library 0.22.0 → 0.24.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.
- package/dist/components/atoms/Badge/index.cjs +16 -3
- package/dist/components/atoms/Badge/index.cjs.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +13 -24
- package/dist/components/atoms/Badge/index.d.ts.map +1 -1
- package/dist/components/atoms/Badge/index.js +16 -3
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Dot/Dot.styles.cjs +51 -0
- package/dist/components/atoms/Dot/Dot.styles.cjs.map +1 -0
- package/dist/components/atoms/Dot/Dot.styles.d.ts +109 -0
- package/dist/components/atoms/Dot/Dot.styles.d.ts.map +1 -0
- package/dist/components/atoms/Dot/Dot.styles.js +49 -0
- package/dist/components/atoms/Dot/Dot.styles.js.map +1 -0
- package/dist/components/atoms/Dot/index.cjs +5 -14
- package/dist/components/atoms/Dot/index.cjs.map +1 -1
- package/dist/components/atoms/Dot/index.d.ts +11 -3
- package/dist/components/atoms/Dot/index.d.ts.map +1 -1
- package/dist/components/atoms/Dot/index.js +5 -14
- package/dist/components/atoms/Dot/index.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs +3 -3
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts +6 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js +3 -3
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.cjs +4 -2
- package/dist/components/molecules/Breadcrumbs/index.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.d.ts +7 -6
- package/dist/components/molecules/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.js +5 -3
- package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
- package/dist/components/molecules/Carousel/index.cjs +1 -1
- package/dist/components/molecules/Carousel/index.cjs.map +1 -1
- package/dist/components/molecules/Carousel/index.js +1 -1
- package/dist/components/molecules/Carousel/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/index.cjs +2 -1
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +3 -2
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.cjs +2 -1
- package/dist/components/molecules/Select/components/multi-select.cjs.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.d.ts.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.js +3 -2
- package/dist/components/molecules/Select/components/multi-select.js.map +1 -1
- package/dist/components/molecules/Tabs/index.cjs +7 -4
- package/dist/components/molecules/Tabs/index.cjs.map +1 -1
- package/dist/components/molecules/Tabs/index.d.ts +12 -2
- package/dist/components/molecules/Tabs/index.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/index.js +6 -5
- package/dist/components/molecules/Tabs/index.js.map +1 -1
- package/dist/components/molecules/Tags/index.cjs +1 -1
- package/dist/components/molecules/Tags/index.cjs.map +1 -1
- package/dist/components/molecules/Tags/index.js +1 -1
- package/dist/components/molecules/Tags/index.js.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.cjs +1 -1
- package/dist/components/organisms/ActivityFeed/index.cjs.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.js +1 -1
- package/dist/components/organisms/ActivityFeed/index.js.map +1 -1
- package/dist/components/organisms/CommandMenu/index.cjs +2 -9
- package/dist/components/organisms/CommandMenu/index.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/index.js +3 -10
- package/dist/components/organisms/CommandMenu/index.js.map +1 -1
- package/dist/components/organisms/PageHeader/components/page-header-tab-nav.cjs +25 -0
- package/dist/components/organisms/PageHeader/components/page-header-tab-nav.cjs.map +1 -0
- package/dist/components/organisms/PageHeader/components/page-header-tab-nav.d.ts +19 -0
- package/dist/components/organisms/PageHeader/components/page-header-tab-nav.d.ts.map +1 -0
- package/dist/components/organisms/PageHeader/components/page-header-tab-nav.js +23 -0
- package/dist/components/organisms/PageHeader/components/page-header-tab-nav.js.map +1 -0
- package/dist/components/organisms/PageHeader/index.cjs +38 -3
- package/dist/components/organisms/PageHeader/index.cjs.map +1 -1
- package/dist/components/organisms/PageHeader/index.d.ts +78 -3
- package/dist/components/organisms/PageHeader/index.d.ts.map +1 -1
- package/dist/components/organisms/PageHeader/index.js +40 -1
- package/dist/components/organisms/PageHeader/index.js.map +1 -1
- package/dist/components/templates/PageLayout/index.cjs +8 -10
- package/dist/components/templates/PageLayout/index.cjs.map +1 -1
- package/dist/components/templates/PageLayout/index.d.ts +7 -5
- package/dist/components/templates/PageLayout/index.d.ts.map +1 -1
- package/dist/components/templates/PageLayout/index.js +8 -10
- package/dist/components/templates/PageLayout/index.js.map +1 -1
- package/dist/native/components/atoms/Dot/Dot.styles.d.ts +109 -0
- package/dist/native/components/atoms/Dot/Dot.styles.d.ts.map +1 -0
- package/dist/native/components/atoms/Dot/Dot.styles.js +49 -0
- package/dist/native/components/atoms/Dot/Dot.styles.js.map +1 -0
- package/dist/native/components/atoms/Dot/index.d.ts +24 -8
- package/dist/native/components/atoms/Dot/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Dot/index.js +25 -0
- package/dist/native/components/atoms/Dot/index.js.map +1 -0
- package/dist/utilities/__internal__/childrenUtils/children.utils.cjs +22 -0
- package/dist/utilities/__internal__/childrenUtils/children.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/childrenUtils/children.utils.d.ts +12 -0
- package/dist/utilities/__internal__/childrenUtils/children.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/childrenUtils/children.utils.js +20 -0
- package/dist/utilities/__internal__/childrenUtils/children.utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/organisms/PageHeader/components/page-header-simple.cjs +0 -16
- package/dist/components/organisms/PageHeader/components/page-header-simple.cjs.map +0 -1
- package/dist/components/organisms/PageHeader/components/page-header-simple.d.ts +0 -26
- package/dist/components/organisms/PageHeader/components/page-header-simple.d.ts.map +0 -1
- package/dist/components/organisms/PageHeader/components/page-header-simple.js +0 -14
- package/dist/components/organisms/PageHeader/components/page-header-simple.js.map +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `Dot` style config, read by both `index.tsx` and `index.native.tsx`.
|
|
3
|
+
*
|
|
4
|
+
* `sizes` holds the circle geometry in pixels — `wh` is the bounding box, `c` the SVG centre
|
|
5
|
+
* (web only), `r` the radius. Numbers rather than Tailwind classes because the native
|
|
6
|
+
* implementation needs them as `style` values: React Native has no SVG host element, so it
|
|
7
|
+
* draws the circle as a `View` with a half-width `borderRadius`.
|
|
8
|
+
*
|
|
9
|
+
* `colors` maps each semantic name to the utility its platform needs. Web fills an SVG via
|
|
10
|
+
* `currentColor`, so it takes a `text-*` utility; React Native fills a `View`, which ignores
|
|
11
|
+
* `color` entirely and needs `bg-*`. Both strings are listed per colour rather than derived by
|
|
12
|
+
* swapping the prefix: utilities are generated from property-specific token namespaces (see the
|
|
13
|
+
* header comment in `ui-tokens/src/tokens.css`), so a name present in one is not guaranteed in
|
|
14
|
+
* another. `brand-solid` is exactly that case — `bg-brand-solid` exists but `text-brand-solid`
|
|
15
|
+
* generates no utility at all, so web pairs it with `text-fg-brand-primary`. Both resolve to
|
|
16
|
+
* `--color-brand-600` in light mode; in dark mode `fg-brand-primary` is brand-500 against
|
|
17
|
+
* `bg-brand-solid`'s brand-600, a divergence to revisit if dark mode ships.
|
|
18
|
+
*
|
|
19
|
+
* Complete literal class names, never template literals — Tailwind scans source for whole
|
|
20
|
+
* candidates and will not generate a class assembled at runtime.
|
|
21
|
+
*/
|
|
22
|
+
export declare const styles: {
|
|
23
|
+
sizes: {
|
|
24
|
+
sm: {
|
|
25
|
+
wh: number;
|
|
26
|
+
c: number;
|
|
27
|
+
r: number;
|
|
28
|
+
};
|
|
29
|
+
md: {
|
|
30
|
+
wh: number;
|
|
31
|
+
c: number;
|
|
32
|
+
r: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
colors: {
|
|
36
|
+
'brand-solid': {
|
|
37
|
+
web: string;
|
|
38
|
+
native: string;
|
|
39
|
+
};
|
|
40
|
+
'fg-primary': {
|
|
41
|
+
web: string;
|
|
42
|
+
native: string;
|
|
43
|
+
};
|
|
44
|
+
'fg-quaternary': {
|
|
45
|
+
web: string;
|
|
46
|
+
native: string;
|
|
47
|
+
};
|
|
48
|
+
'fg-success-secondary': {
|
|
49
|
+
web: string;
|
|
50
|
+
native: string;
|
|
51
|
+
};
|
|
52
|
+
'border-primary': {
|
|
53
|
+
web: string;
|
|
54
|
+
native: string;
|
|
55
|
+
};
|
|
56
|
+
'utility-neutral-500': {
|
|
57
|
+
web: string;
|
|
58
|
+
native: string;
|
|
59
|
+
};
|
|
60
|
+
'utility-brand-500': {
|
|
61
|
+
web: string;
|
|
62
|
+
native: string;
|
|
63
|
+
};
|
|
64
|
+
'utility-red-500': {
|
|
65
|
+
web: string;
|
|
66
|
+
native: string;
|
|
67
|
+
};
|
|
68
|
+
'utility-yellow-500': {
|
|
69
|
+
web: string;
|
|
70
|
+
native: string;
|
|
71
|
+
};
|
|
72
|
+
'utility-green-500': {
|
|
73
|
+
web: string;
|
|
74
|
+
native: string;
|
|
75
|
+
};
|
|
76
|
+
'utility-slate-500': {
|
|
77
|
+
web: string;
|
|
78
|
+
native: string;
|
|
79
|
+
};
|
|
80
|
+
'utility-sky-500': {
|
|
81
|
+
web: string;
|
|
82
|
+
native: string;
|
|
83
|
+
};
|
|
84
|
+
'utility-blue-500': {
|
|
85
|
+
web: string;
|
|
86
|
+
native: string;
|
|
87
|
+
};
|
|
88
|
+
'utility-indigo-500': {
|
|
89
|
+
web: string;
|
|
90
|
+
native: string;
|
|
91
|
+
};
|
|
92
|
+
'utility-purple-500': {
|
|
93
|
+
web: string;
|
|
94
|
+
native: string;
|
|
95
|
+
};
|
|
96
|
+
'utility-pink-500': {
|
|
97
|
+
web: string;
|
|
98
|
+
native: string;
|
|
99
|
+
};
|
|
100
|
+
'utility-orange-500': {
|
|
101
|
+
web: string;
|
|
102
|
+
native: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type DotSize = keyof typeof styles.sizes;
|
|
107
|
+
export type DotColor = keyof typeof styles.colors;
|
|
108
|
+
export declare const dotColorNames: DotColor[];
|
|
109
|
+
//# sourceMappingURL=Dot.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dot.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dot/Dot.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBlB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;AAChD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC;AAElD,eAAO,MAAM,aAAa,EAAiC,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `Dot` style config, read by both `index.tsx` and `index.native.tsx`.
|
|
3
|
+
*
|
|
4
|
+
* `sizes` holds the circle geometry in pixels — `wh` is the bounding box, `c` the SVG centre
|
|
5
|
+
* (web only), `r` the radius. Numbers rather than Tailwind classes because the native
|
|
6
|
+
* implementation needs them as `style` values: React Native has no SVG host element, so it
|
|
7
|
+
* draws the circle as a `View` with a half-width `borderRadius`.
|
|
8
|
+
*
|
|
9
|
+
* `colors` maps each semantic name to the utility its platform needs. Web fills an SVG via
|
|
10
|
+
* `currentColor`, so it takes a `text-*` utility; React Native fills a `View`, which ignores
|
|
11
|
+
* `color` entirely and needs `bg-*`. Both strings are listed per colour rather than derived by
|
|
12
|
+
* swapping the prefix: utilities are generated from property-specific token namespaces (see the
|
|
13
|
+
* header comment in `ui-tokens/src/tokens.css`), so a name present in one is not guaranteed in
|
|
14
|
+
* another. `brand-solid` is exactly that case — `bg-brand-solid` exists but `text-brand-solid`
|
|
15
|
+
* generates no utility at all, so web pairs it with `text-fg-brand-primary`. Both resolve to
|
|
16
|
+
* `--color-brand-600` in light mode; in dark mode `fg-brand-primary` is brand-500 against
|
|
17
|
+
* `bg-brand-solid`'s brand-600, a divergence to revisit if dark mode ships.
|
|
18
|
+
*
|
|
19
|
+
* Complete literal class names, never template literals — Tailwind scans source for whole
|
|
20
|
+
* candidates and will not generate a class assembled at runtime.
|
|
21
|
+
*/
|
|
22
|
+
const styles = {
|
|
23
|
+
sizes: {
|
|
24
|
+
sm: { wh: 8, c: 4, r: 2.5 },
|
|
25
|
+
md: { wh: 10, c: 5, r: 4 },
|
|
26
|
+
},
|
|
27
|
+
colors: {
|
|
28
|
+
'brand-solid': { web: 'text-fg-brand-primary', native: 'bg-brand-solid' },
|
|
29
|
+
'fg-primary': { web: 'text-fg-primary', native: 'bg-fg-primary' },
|
|
30
|
+
'fg-quaternary': { web: 'text-fg-quaternary', native: 'bg-fg-quaternary' },
|
|
31
|
+
'fg-success-secondary': { web: 'text-fg-success-secondary', native: 'bg-fg-success-secondary' },
|
|
32
|
+
'border-primary': { web: 'text-border-primary', native: 'bg-border-primary' },
|
|
33
|
+
'utility-neutral-500': { web: 'text-utility-neutral-500', native: 'bg-utility-neutral-500' },
|
|
34
|
+
'utility-brand-500': { web: 'text-utility-brand-500', native: 'bg-utility-brand-500' },
|
|
35
|
+
'utility-red-500': { web: 'text-utility-red-500', native: 'bg-utility-red-500' },
|
|
36
|
+
'utility-yellow-500': { web: 'text-utility-yellow-500', native: 'bg-utility-yellow-500' },
|
|
37
|
+
'utility-green-500': { web: 'text-utility-green-500', native: 'bg-utility-green-500' },
|
|
38
|
+
'utility-slate-500': { web: 'text-utility-slate-500', native: 'bg-utility-slate-500' },
|
|
39
|
+
'utility-sky-500': { web: 'text-utility-sky-500', native: 'bg-utility-sky-500' },
|
|
40
|
+
'utility-blue-500': { web: 'text-utility-blue-500', native: 'bg-utility-blue-500' },
|
|
41
|
+
'utility-indigo-500': { web: 'text-utility-indigo-500', native: 'bg-utility-indigo-500' },
|
|
42
|
+
'utility-purple-500': { web: 'text-utility-purple-500', native: 'bg-utility-purple-500' },
|
|
43
|
+
'utility-pink-500': { web: 'text-utility-pink-500', native: 'bg-utility-pink-500' },
|
|
44
|
+
'utility-orange-500': { web: 'text-utility-orange-500', native: 'bg-utility-orange-500' },
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { styles };
|
|
49
|
+
//# sourceMappingURL=Dot.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dot.styles.js","sources":["../../../../../../src/components/atoms/Dot/Dot.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AACI,MAAM,MAAM,GAAG;AACpB,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE;AAC3B,QAAA,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3B,KAAA;AACD,IAAA,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,EAAE,gBAAgB,EAAE;QACzE,YAAY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AAM,EAAE,uBAAuB,EAAE;AAC1F,KAAA;;;;;"}
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
+
import { type DotColor, type DotSize } from './Dot.styles';
|
|
2
|
+
export type { DotColor, DotSize } from './Dot.styles';
|
|
3
|
+
export interface DotProps {
|
|
4
|
+
size?: DotSize;
|
|
5
|
+
/**
|
|
6
|
+
* Semantic fill colour, resolved per platform (`Dot.styles.ts`). Takes the same values as
|
|
7
|
+
* web. Defaults to `fg-primary` because React Native cannot inherit a colour the way web's
|
|
8
|
+
* `currentColor` does — without a default the circle would render fully transparent.
|
|
9
|
+
*/
|
|
10
|
+
color?: DotColor;
|
|
11
|
+
/** Layout classes only. Colour goes through `color`, which a `View` needs as a `bg-*` utility. */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Overrides the generated `testID` (defaults to `fd-dot`). */
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
}
|
|
1
16
|
/**
|
|
2
|
-
* `Dot`
|
|
17
|
+
* React Native `Dot` — a filled circle drawn as a `View` with a half-width `borderRadius`,
|
|
18
|
+
* inside a fixed-size box matching web's SVG bounding box, since React Native has no SVG
|
|
19
|
+
* host element.
|
|
3
20
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* matching `index.js`, so Metro cannot bundle this module either.
|
|
21
|
+
* `View` `className` styling is confirmed working on-device (see `Avatar`'s root `View`),
|
|
22
|
+
* unlike the `Text` `className` bug, so colour stays token-driven here rather than falling
|
|
23
|
+
* back to a hardcoded hex.
|
|
8
24
|
*
|
|
9
|
-
*
|
|
10
|
-
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
25
|
+
* @summary status/list marker dot (React Native)
|
|
11
26
|
*/
|
|
12
|
-
export declare const
|
|
27
|
+
export declare const Dot: ({ size, color, className, "data-testid": dataTestId }: DotProps) => import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dot/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAU,MAAM,cAAc,CAAC;AAEnE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,GAAI,uDAA6E,QAAQ,gCASxG,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '../../../utilities/cx/index.js';
|
|
3
|
+
import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { styles } from './Dot.styles.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* React Native `Dot` — a filled circle drawn as a `View` with a half-width `borderRadius`,
|
|
9
|
+
* inside a fixed-size box matching web's SVG bounding box, since React Native has no SVG
|
|
10
|
+
* host element.
|
|
11
|
+
*
|
|
12
|
+
* `View` `className` styling is confirmed working on-device (see `Avatar`'s root `View`),
|
|
13
|
+
* unlike the `Text` `className` bug, so colour stays token-driven here rather than falling
|
|
14
|
+
* back to a hardcoded hex.
|
|
15
|
+
*
|
|
16
|
+
* @summary status/list marker dot (React Native)
|
|
17
|
+
*/
|
|
18
|
+
const Dot = ({ size = 'md', color = 'fg-primary', className, 'data-testid': dataTestId }) => {
|
|
19
|
+
const dotTestId = useResolvedTestId({ testId: dataTestId, segment: 'dot', rootName: 'dot' });
|
|
20
|
+
const { wh, r } = styles.sizes[size];
|
|
21
|
+
return (jsx(View, { testID: dotTestId, className: cx('items-center justify-center', className), style: { width: wh, height: wh }, children: jsx(View, { className: styles.colors[color].native, style: { width: r * 2, height: r * 2, borderRadius: r } }) }));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Dot };
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Dot/index.native.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;AAqBA;;;;;;;;;;AAUG;MACU,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,GAAG,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAY,KAAI;AAC3G,IAAA,MAAM,SAAS,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC5F,IAAA,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;AAEpC,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAA,QAAA,EAChHA,IAAC,IAAI,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,EAAA,CAAI,EAAA,CACpG;AAEX;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `Children.toArray` that also unwraps Fragments, so `<>...</>`-wrapped children are counted
|
|
7
|
+
* and inspected as their actual items. Pure JS, no DOM dependency — works on web and React
|
|
8
|
+
* Native. INTERNAL: import as `#internal/utilities/childrenUtils/children.utils`.
|
|
9
|
+
*
|
|
10
|
+
* Unwrapped items are re-keyed with the JSON-encoded path of Fragment keys above them, so
|
|
11
|
+
* siblings stay unique after flattening. Plain concatenation is ambiguous: Fragment `a` +
|
|
12
|
+
* child `b` and a sibling keyed `a.$b` would both produce `.$a.$b`.
|
|
13
|
+
*/
|
|
14
|
+
const flattenChildren = (children, keyPath = []) => React.Children.toArray(children).flatMap((child) => {
|
|
15
|
+
if (React.isValidElement(child) && child.type === React.Fragment) {
|
|
16
|
+
return flattenChildren(child.props.children, [...keyPath, String(child.key ?? '')]);
|
|
17
|
+
}
|
|
18
|
+
return keyPath.length && React.isValidElement(child) ? React.cloneElement(child, { key: JSON.stringify([...keyPath, String(child.key ?? '')]) }) : child;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
exports.flattenChildren = flattenChildren;
|
|
22
|
+
//# sourceMappingURL=children.utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.utils.cjs","sources":["../../../../src/utilities/__internal__/childrenUtils/children.utils.ts"],"sourcesContent":[null],"names":["Children","isValidElement","Fragment","cloneElement"],"mappings":";;;;AAEA;;;;;;;;AAQG;AACI,MAAM,eAAe,GAAG,CAAC,QAAmB,EAAE,OAAA,GAA6B,EAAE,KAClFA,cAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;IAC3C,IAAIC,oBAAc,CAA2B,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAKC,cAAQ,EAAE;QAC9E,OAAO,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IACrF;AACA,IAAA,OAAO,OAAO,CAAC,MAAM,IAAID,oBAAc,CAAC,KAAK,CAAC,GAAGE,kBAAY,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK;AAC9I,CAAC;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `Children.toArray` that also unwraps Fragments, so `<>...</>`-wrapped children are counted
|
|
4
|
+
* and inspected as their actual items. Pure JS, no DOM dependency — works on web and React
|
|
5
|
+
* Native. INTERNAL: import as `#internal/utilities/childrenUtils/children.utils`.
|
|
6
|
+
*
|
|
7
|
+
* Unwrapped items are re-keyed with the JSON-encoded path of Fragment keys above them, so
|
|
8
|
+
* siblings stay unique after flattening. Plain concatenation is ambiguous: Fragment `a` +
|
|
9
|
+
* child `b` and a sibling keyed `a.$b` would both produce `.$a.$b`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const flattenChildren: (children: ReactNode, keyPath?: readonly string[]) => ReactNode[];
|
|
12
|
+
//# sourceMappingURL=children.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/childrenUtils/children.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,SAAS,EAAE,UAAS,SAAS,MAAM,EAAO,KAAG,SAAS,EAM5F,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Children, isValidElement, Fragment, cloneElement } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `Children.toArray` that also unwraps Fragments, so `<>...</>`-wrapped children are counted
|
|
5
|
+
* and inspected as their actual items. Pure JS, no DOM dependency — works on web and React
|
|
6
|
+
* Native. INTERNAL: import as `#internal/utilities/childrenUtils/children.utils`.
|
|
7
|
+
*
|
|
8
|
+
* Unwrapped items are re-keyed with the JSON-encoded path of Fragment keys above them, so
|
|
9
|
+
* siblings stay unique after flattening. Plain concatenation is ambiguous: Fragment `a` +
|
|
10
|
+
* child `b` and a sibling keyed `a.$b` would both produce `.$a.$b`.
|
|
11
|
+
*/
|
|
12
|
+
const flattenChildren = (children, keyPath = []) => Children.toArray(children).flatMap((child) => {
|
|
13
|
+
if (isValidElement(child) && child.type === Fragment) {
|
|
14
|
+
return flattenChildren(child.props.children, [...keyPath, String(child.key ?? '')]);
|
|
15
|
+
}
|
|
16
|
+
return keyPath.length && isValidElement(child) ? cloneElement(child, { key: JSON.stringify([...keyPath, String(child.key ?? '')]) }) : child;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { flattenChildren };
|
|
20
|
+
//# sourceMappingURL=children.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.utils.js","sources":["../../../../src/utilities/__internal__/childrenUtils/children.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;AAQG;AACI,MAAM,eAAe,GAAG,CAAC,QAAmB,EAAE,OAAA,GAA6B,EAAE,KAClF,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;IAC3C,IAAI,cAAc,CAA2B,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC9E,OAAO,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IACrF;AACA,IAAA,OAAO,OAAO,CAAC,MAAM,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK;AAC9I,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
-
var Button = require('@flipdish/ui-library/components/atoms/Button');
|
|
6
|
-
var Input = require('@flipdish/ui-library/components/atoms/Input');
|
|
7
|
-
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
8
|
-
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
|
-
|
|
10
|
-
const PageHeaderSimple = ({ title, description, breadcrumbs, backLabel, backHref = '#', actions, showSearch = false, withDivider = false, className, 'data-testid': dataTestId, }) => {
|
|
11
|
-
const pageHeaderTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'page-header-simple', rootName: 'page-header-simple' });
|
|
12
|
-
return (jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: pageHeaderTestId, children: jsxRuntime.jsxs("div", { "data-testid": pageHeaderTestId, className: cx.cx('relative flex w-full max-w-container flex-col gap-4 bg-primary px-md lg:px-2xl', className), children: [breadcrumbs && jsxRuntime.jsx("div", { className: "max-lg:hidden", children: breadcrumbs }), backLabel && (jsxRuntime.jsx("div", { className: "flex lg:hidden", children: jsxRuntime.jsx(Button.Button, { href: backHref, color: "link-gray", size: "xs", iconLeading: uiIcons.ArrowLeft, children: backLabel }) })), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-col gap-4 lg:flex-row', withDivider && 'border-b border-secondary pb-4'), children: [jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col gap-0.5", children: [title && jsxRuntime.jsx("h1", { className: "text-xl font-semibold text-primary", children: title }), description && jsxRuntime.jsx("p", { className: "text-md text-tertiary", children: description })] }), actions && jsxRuntime.jsx("div", { className: "flex items-start gap-3", children: actions }), showSearch && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Input.Input, { className: "w-full md:hidden", size: "md", "aria-label": "Search", placeholder: "Search", icon: uiIcons.SearchLg, "data-testid": testIdUtils.joinTestId(pageHeaderTestId, 'search-mobile') }), jsxRuntime.jsx(Input.Input, { shortcut: true, className: "w-full max-w-70 max-md:hidden", size: "sm", "aria-label": "Search", placeholder: "Search", icon: uiIcons.SearchLg, "data-testid": testIdUtils.joinTestId(pageHeaderTestId, 'search-desktop') })] }))] })] }) }));
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
exports.PageHeaderSimple = PageHeaderSimple;
|
|
16
|
-
//# sourceMappingURL=page-header-simple.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-header-simple.cjs","sources":["../../../../../src/components/organisms/PageHeader/components/page-header-simple.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsx","TestIdProvider","_jsxs","cx","Button","ArrowLeft","_Fragment","Input","SearchLg","joinTestId"],"mappings":";;;;;;;;;AA+BO,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,GAAG,GAAG,EACd,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,KAAK,EACnB,SAAS,EACT,aAAa,EAAE,UAAU,GACH,KAAI;AAC1B,IAAA,MAAM,gBAAgB,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB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,EAAA,aAAA,EACDC,sBAAU,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAAA,CAC1D,EAGFT,eAACO,WAAK,EAAA,EACJ,QAAQ,EAAA,IAAA,EACR,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,IAAI,gBACE,QAAQ,EACnB,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAEC,gBAAQ,EAAA,aAAA,EACDC,sBAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GAC3D,CAAA,EAAA,CACD,CACJ,IACG,CAAA,EAAA,CACF,EAAA,CACS;AAErB;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export interface PageHeaderSimpleProps {
|
|
3
|
-
/** Page title (rendered as the `h1`). */
|
|
4
|
-
title?: string;
|
|
5
|
-
/** Supporting text shown beneath the title. */
|
|
6
|
-
description?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Breadcrumb trail shown on desktop — pass a complete `<Breadcrumbs>` element so the
|
|
9
|
-
* caller owns the items, divider and `type`. Hidden below the `lg` breakpoint.
|
|
10
|
-
*/
|
|
11
|
-
breadcrumbs?: ReactNode;
|
|
12
|
-
/** Mobile "back" link label. When set, a back link replaces the breadcrumbs below `lg`. */
|
|
13
|
-
backLabel?: string;
|
|
14
|
-
backHref?: string;
|
|
15
|
-
/** Action buttons rendered to the right of the title on desktop. */
|
|
16
|
-
actions?: ReactNode;
|
|
17
|
-
/** Render the search inputs (mobile + desktop). */
|
|
18
|
-
showSearch?: boolean;
|
|
19
|
-
/** Render the divider beneath the title row. */
|
|
20
|
-
withDivider?: boolean;
|
|
21
|
-
className?: string;
|
|
22
|
-
/** Overrides the `data-testid` (defaults to `fd-page-header-simple`). */
|
|
23
|
-
'data-testid'?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const PageHeaderSimple: ({ title, description, breadcrumbs, backLabel, backHref, actions, showSearch, withDivider, className, "data-testid": dataTestId, }: PageHeaderSimpleProps) => import("react").JSX.Element;
|
|
26
|
-
//# sourceMappingURL=page-header-simple.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-header-simple.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/PageHeader/components/page-header-simple.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,GAAI,mIAW9B,qBAAqB,gCAoDvB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { ArrowLeft, SearchLg } from '@flipdish/ui-icons';
|
|
3
|
-
import { Button } from '@flipdish/ui-library/components/atoms/Button';
|
|
4
|
-
import { Input } from '@flipdish/ui-library/components/atoms/Input';
|
|
5
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
6
|
-
import { useResolvedTestId, TestIdProvider, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
|
-
|
|
8
|
-
const PageHeaderSimple = ({ title, description, breadcrumbs, backLabel, backHref = '#', actions, showSearch = false, withDivider = false, className, 'data-testid': dataTestId, }) => {
|
|
9
|
-
const pageHeaderTestId = useResolvedTestId({ testId: dataTestId, segment: 'page-header-simple', rootName: 'page-header-simple' });
|
|
10
|
-
return (jsx(TestIdProvider, { value: pageHeaderTestId, children: jsxs("div", { "data-testid": pageHeaderTestId, className: cx('relative flex w-full max-w-container flex-col gap-4 bg-primary px-md lg:px-2xl', className), children: [breadcrumbs && jsx("div", { className: "max-lg:hidden", children: breadcrumbs }), backLabel && (jsx("div", { className: "flex lg:hidden", children: jsx(Button, { href: backHref, color: "link-gray", size: "xs", iconLeading: ArrowLeft, children: backLabel }) })), jsxs("div", { className: cx('flex flex-col gap-4 lg:flex-row', withDivider && 'border-b border-secondary pb-4'), children: [jsxs("div", { className: "flex flex-1 flex-col gap-0.5", children: [title && jsx("h1", { className: "text-xl font-semibold text-primary", children: title }), description && jsx("p", { className: "text-md text-tertiary", children: description })] }), actions && jsx("div", { className: "flex items-start gap-3", children: actions }), showSearch && (jsxs(Fragment, { children: [jsx(Input, { className: "w-full md:hidden", size: "md", "aria-label": "Search", placeholder: "Search", icon: SearchLg, "data-testid": joinTestId(pageHeaderTestId, 'search-mobile') }), jsx(Input, { shortcut: true, className: "w-full max-w-70 max-md:hidden", size: "sm", "aria-label": "Search", placeholder: "Search", icon: SearchLg, "data-testid": joinTestId(pageHeaderTestId, 'search-desktop') })] }))] })] }) }));
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { PageHeaderSimple };
|
|
14
|
-
//# sourceMappingURL=page-header-simple.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-header-simple.js","sources":["../../../../../src/components/organisms/PageHeader/components/page-header-simple.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;AA+BO,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,GAAG,GAAG,EACd,O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