@handijitcom/ui 3.6.1 → 3.8.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 (200) hide show
  1. package/README.md +275 -36
  2. package/build/chat.cjs +3 -3
  3. package/build/chat.cjs.map +1 -1
  4. package/build/chat.css +1 -1
  5. package/build/chat.js +168 -160
  6. package/build/chat.js.map +1 -1
  7. package/build/components/AddToCart/index.cjs +2 -0
  8. package/build/components/AddToCart/index.cjs.map +1 -0
  9. package/build/components/AddToCart/index.d.cts +31 -0
  10. package/build/components/AddToCart/index.d.ts +31 -0
  11. package/build/components/AddToCart/index.js +62 -0
  12. package/build/components/AddToCart/index.js.map +1 -0
  13. package/build/components/AddToCart/style.css +1 -0
  14. package/build/components/Alert/index.cjs +1 -1
  15. package/build/components/Alert/index.cjs.map +1 -1
  16. package/build/components/Alert/index.d.cts +7 -0
  17. package/build/components/Alert/index.d.ts +7 -0
  18. package/build/components/Alert/index.js +32 -19
  19. package/build/components/Alert/index.js.map +1 -1
  20. package/build/components/Alert/style.css +1 -1
  21. package/build/components/AppShell/style.css +1 -1
  22. package/build/components/AppliedFilters/style.css +1 -1
  23. package/build/components/CodeText/index.cjs.map +1 -1
  24. package/build/components/CodeText/index.js +11 -11
  25. package/build/components/CodeText/index.js.map +1 -1
  26. package/build/components/CommandPalette/style.css +1 -1
  27. package/build/components/Directory/style.css +1 -1
  28. package/build/components/EmptyState/style.css +1 -1
  29. package/build/components/FacetSection/index.cjs +1 -1
  30. package/build/components/FacetSection/index.cjs.map +1 -1
  31. package/build/components/FacetSection/index.js +145 -138
  32. package/build/components/FacetSection/index.js.map +1 -1
  33. package/build/components/FacetSection/style.css +1 -1
  34. package/build/components/FacetSidebar/index.cjs +1 -1
  35. package/build/components/FacetSidebar/index.cjs.map +1 -1
  36. package/build/components/FacetSidebar/index.js +22 -29
  37. package/build/components/FacetSidebar/index.js.map +1 -1
  38. package/build/components/Heading/index.cjs +2 -0
  39. package/build/components/Heading/index.cjs.map +1 -0
  40. package/build/components/Heading/index.d.cts +34 -0
  41. package/build/components/Heading/index.d.ts +34 -0
  42. package/build/components/Heading/index.js +44 -0
  43. package/build/components/Heading/index.js.map +1 -0
  44. package/build/components/Heading/style.css +1 -0
  45. package/build/components/MegaMenu/index.cjs +1 -1
  46. package/build/components/MegaMenu/index.cjs.map +1 -1
  47. package/build/components/MegaMenu/index.d.cts +5 -1
  48. package/build/components/MegaMenu/index.d.ts +5 -1
  49. package/build/components/MegaMenu/index.js +131 -111
  50. package/build/components/MegaMenu/index.js.map +1 -1
  51. package/build/components/MegaMenu/style.css +1 -1
  52. package/build/components/Modal/style.css +1 -1
  53. package/build/components/NotificationCenter/style.css +1 -1
  54. package/build/components/PageHeader/style.css +1 -1
  55. package/build/components/PartNumberList/index.cjs +2 -0
  56. package/build/components/PartNumberList/index.cjs.map +1 -0
  57. package/build/components/PartNumberList/index.d.cts +30 -0
  58. package/build/components/PartNumberList/index.d.ts +30 -0
  59. package/build/components/PartNumberList/index.js +36 -0
  60. package/build/components/PartNumberList/index.js.map +1 -0
  61. package/build/components/PartNumberList/style.css +1 -0
  62. package/build/components/Price/index.cjs +1 -1
  63. package/build/components/Price/index.cjs.map +1 -1
  64. package/build/components/Price/index.d.cts +5 -1
  65. package/build/components/Price/index.d.ts +5 -1
  66. package/build/components/Price/index.js +31 -32
  67. package/build/components/Price/index.js.map +1 -1
  68. package/build/components/Price/style.css +1 -1
  69. package/build/components/ProductCard/index.cjs +2 -0
  70. package/build/components/ProductCard/index.cjs.map +1 -0
  71. package/build/components/ProductCard/index.d.cts +55 -0
  72. package/build/components/ProductCard/index.d.ts +55 -0
  73. package/build/components/ProductCard/index.js +58 -0
  74. package/build/components/ProductCard/index.js.map +1 -0
  75. package/build/components/ProductCard/style.css +1 -0
  76. package/build/components/ProductRow/columns.cjs +2 -0
  77. package/build/components/ProductRow/columns.cjs.map +1 -0
  78. package/build/components/ProductRow/columns.d.cts +27 -0
  79. package/build/components/ProductRow/columns.d.ts +27 -0
  80. package/build/components/ProductRow/columns.js +83 -0
  81. package/build/components/ProductRow/columns.js.map +1 -0
  82. package/build/components/ProductRow/index.cjs +2 -0
  83. package/build/components/ProductRow/index.cjs.map +1 -0
  84. package/build/components/ProductRow/index.d.cts +25 -0
  85. package/build/components/ProductRow/index.d.ts +25 -0
  86. package/build/components/ProductRow/index.js +43 -0
  87. package/build/components/ProductRow/index.js.map +1 -0
  88. package/build/components/ProductRow/parts.cjs +2 -0
  89. package/build/components/ProductRow/parts.cjs.map +1 -0
  90. package/build/components/ProductRow/parts.d.cts +32 -0
  91. package/build/components/ProductRow/parts.d.ts +32 -0
  92. package/build/components/ProductRow/parts.js +31 -0
  93. package/build/components/ProductRow/parts.js.map +1 -0
  94. package/build/components/ProductRow/style.css +1 -0
  95. package/build/components/QuantityStepper/index.cjs +1 -1
  96. package/build/components/QuantityStepper/index.cjs.map +1 -1
  97. package/build/components/QuantityStepper/index.js +28 -28
  98. package/build/components/QuantityStepper/index.js.map +1 -1
  99. package/build/components/Radio/style.css +1 -1
  100. package/build/components/SectionHeader/style.css +1 -1
  101. package/build/components/SpecTable/index.cjs +2 -0
  102. package/build/components/SpecTable/index.cjs.map +1 -0
  103. package/build/components/SpecTable/index.d.cts +25 -0
  104. package/build/components/SpecTable/index.d.ts +25 -0
  105. package/build/components/SpecTable/index.js +25 -0
  106. package/build/components/SpecTable/index.js.map +1 -0
  107. package/build/components/SpecTable/style.css +1 -0
  108. package/build/components/Stat/index.cjs +1 -1
  109. package/build/components/Stat/index.cjs.map +1 -1
  110. package/build/components/Stat/index.d.cts +7 -3
  111. package/build/components/Stat/index.d.ts +7 -3
  112. package/build/components/Stat/index.js +61 -66
  113. package/build/components/Stat/index.js.map +1 -1
  114. package/build/components/StatCard/StatDelta.cjs +2 -0
  115. package/build/components/StatCard/StatDelta.cjs.map +1 -0
  116. package/build/components/StatCard/StatDelta.d.cts +17 -0
  117. package/build/components/StatCard/StatDelta.d.ts +17 -0
  118. package/build/components/StatCard/StatDelta.js +45 -0
  119. package/build/components/StatCard/StatDelta.js.map +1 -0
  120. package/build/components/StatCard/index.cjs +2 -0
  121. package/build/components/StatCard/index.cjs.map +1 -0
  122. package/build/components/StatCard/index.d.cts +36 -0
  123. package/build/components/StatCard/index.d.ts +36 -0
  124. package/build/components/StatCard/index.js +60 -0
  125. package/build/components/StatCard/index.js.map +1 -0
  126. package/build/components/StatCard/style.css +1 -0
  127. package/build/components/StatusCell/index.cjs +2 -0
  128. package/build/components/StatusCell/index.cjs.map +1 -0
  129. package/build/components/StatusCell/index.d.cts +28 -0
  130. package/build/components/StatusCell/index.d.ts +28 -0
  131. package/build/components/StatusCell/index.js +24 -0
  132. package/build/components/StatusCell/index.js.map +1 -0
  133. package/build/components/StatusCell/style.css +1 -0
  134. package/build/components/StockStatus/index.cjs +2 -0
  135. package/build/components/StockStatus/index.cjs.map +1 -0
  136. package/build/components/StockStatus/index.d.cts +28 -0
  137. package/build/components/StockStatus/index.d.ts +28 -0
  138. package/build/components/StockStatus/index.js +36 -0
  139. package/build/components/StockStatus/index.js.map +1 -0
  140. package/build/components/StockStatus/style.css +1 -0
  141. package/build/components/Table/style.css +1 -1
  142. package/build/components/Tabs/index.cjs +1 -1
  143. package/build/components/Tabs/index.cjs.map +1 -1
  144. package/build/components/Tabs/index.d.cts +26 -1
  145. package/build/components/Tabs/index.d.ts +26 -1
  146. package/build/components/Tabs/index.js +140 -112
  147. package/build/components/Tabs/index.js.map +1 -1
  148. package/build/components/Tabs/style.css +1 -1
  149. package/build/components/Text/index.cjs +2 -0
  150. package/build/components/Text/index.cjs.map +1 -0
  151. package/build/components/Text/index.d.cts +49 -0
  152. package/build/components/Text/index.d.ts +49 -0
  153. package/build/components/Text/index.js +47 -0
  154. package/build/components/Text/index.js.map +1 -0
  155. package/build/components/Text/style.css +1 -0
  156. package/build/components/Tooltip/index.cjs +1 -1
  157. package/build/components/Tooltip/index.cjs.map +1 -1
  158. package/build/components/Tooltip/index.js +27 -27
  159. package/build/components/Tooltip/index.js.map +1 -1
  160. package/build/components/VehicleTypeList/index.cjs +2 -0
  161. package/build/components/VehicleTypeList/index.cjs.map +1 -0
  162. package/build/components/VehicleTypeList/index.d.cts +17 -0
  163. package/build/components/VehicleTypeList/index.d.ts +17 -0
  164. package/build/components/VehicleTypeList/index.js +47 -0
  165. package/build/components/VehicleTypeList/index.js.map +1 -0
  166. package/build/components/VehicleTypeList/style.css +1 -0
  167. package/build/design/index.cjs +12 -2
  168. package/build/design/index.cjs.map +1 -1
  169. package/build/design/index.d.cts +1 -5
  170. package/build/design/index.d.mts +1 -5
  171. package/build/design/index.mjs +12 -2
  172. package/build/design/index.mjs.map +1 -1
  173. package/build/design/index.umd.cjs +1 -1
  174. package/build/design/index.umd.cjs.map +1 -1
  175. package/build/design/tokens.css +29 -4
  176. package/build/design/tokens.json +42 -2
  177. package/build/design/tokens.scss +55 -0
  178. package/build/helpers/text.helper.cjs +1 -1
  179. package/build/helpers/text.helper.cjs.map +1 -1
  180. package/build/helpers/text.helper.d.cts +5 -0
  181. package/build/helpers/text.helper.d.ts +5 -0
  182. package/build/helpers/text.helper.js +3 -2
  183. package/build/helpers/text.helper.js.map +1 -1
  184. package/build/index.cjs +1 -1
  185. package/build/index.d.cts +13 -2
  186. package/build/index.d.ts +13 -2
  187. package/build/index.js +203 -179
  188. package/build/index.js.map +1 -1
  189. package/build/scss/_mixins.scss +101 -13
  190. package/build/scss/_variables.scss +5 -1
  191. package/build/styles.css +43 -17
  192. package/build/types/chat/DescriptionList/index.d.cts +6 -0
  193. package/build/types/chat/DescriptionList/index.d.ts +6 -0
  194. package/build/types/stat.type.d.cts +2 -0
  195. package/build/types/stat.type.d.ts +2 -0
  196. package/build/types/theme.type.d.cts +25 -0
  197. package/build/types/theme.type.d.ts +25 -0
  198. package/build/types/types/theme.type.d.cts +25 -0
  199. package/build/types/types/theme.type.d.ts +25 -0
  200. package/package.json +111 -1
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { DataTableColumn } from '../DataTable/index.cjs';
3
+ import { ProductField, ProductRowData } from './parts.cjs';
4
+ export type ProductColumnsOptions<T> = {
5
+ /** The product of a row. */
6
+ product: (row: T) => ProductRowData;
7
+ /**
8
+ * A visitor's table: the stock and price columns become ONE column with this cell ("Fiyat ve
9
+ * stok için giriş yapın"). Leave it out for a dealer.
10
+ */
11
+ signIn?: (row: T) => ReactNode;
12
+ /** The last column: an `AddToCart size="sm"`. */
13
+ action?: (row: T) => ReactNode;
14
+ /** Headings instead of `labels.product`. */
15
+ labels?: Partial<Record<ProductField, string>>;
16
+ /** Columns to leave out ("brand" in a one-brand catalogue). */
17
+ omit?: readonly ProductField[];
18
+ };
19
+ /**
20
+ * productColumns (3.8) — the B2B product table's columns for `DataTable`: image 40px · part number
21
+ * (mono, copyable, never hidden) · name and vehicle types · brand · stock · price (end, tabular) ·
22
+ * add to cart. With `signIn` (a visitor) stock and price merge into one sign-in column, so a
23
+ * visitor and a dealer see the same table.
24
+ * @example <DataTable rows={items} rowKey={item => item.id} columns={productColumns({ product: toRow, action: item => <AddToCart size="sm" onAdd={…} /> })} />
25
+ */
26
+ declare const productColumns: <T>({ product, signIn, action, labels, omit, }: ProductColumnsOptions<T>) => DataTableColumn<T>[];
27
+ export default productColumns;
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { DataTableColumn } from '../DataTable/index.js';
3
+ import { ProductField, ProductRowData } from './parts.js';
4
+ export type ProductColumnsOptions<T> = {
5
+ /** The product of a row. */
6
+ product: (row: T) => ProductRowData;
7
+ /**
8
+ * A visitor's table: the stock and price columns become ONE column with this cell ("Fiyat ve
9
+ * stok için giriş yapın"). Leave it out for a dealer.
10
+ */
11
+ signIn?: (row: T) => ReactNode;
12
+ /** The last column: an `AddToCart size="sm"`. */
13
+ action?: (row: T) => ReactNode;
14
+ /** Headings instead of `labels.product`. */
15
+ labels?: Partial<Record<ProductField, string>>;
16
+ /** Columns to leave out ("brand" in a one-brand catalogue). */
17
+ omit?: readonly ProductField[];
18
+ };
19
+ /**
20
+ * productColumns (3.8) — the B2B product table's columns for `DataTable`: image 40px · part number
21
+ * (mono, copyable, never hidden) · name and vehicle types · brand · stock · price (end, tabular) ·
22
+ * add to cart. With `signIn` (a visitor) stock and price merge into one sign-in column, so a
23
+ * visitor and a dealer see the same table.
24
+ * @example <DataTable rows={items} rowKey={item => item.id} columns={productColumns({ product: toRow, action: item => <AddToCart size="sm" onAdd={…} /> })} />
25
+ */
26
+ declare const productColumns: <T>({ product, signIn, action, labels, omit, }: ProductColumnsOptions<T>) => DataTableColumn<T>[];
27
+ export default productColumns;
@@ -0,0 +1,83 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import t from "../CodeText/index.js";
3
+ const a = {"row":"ui-row-hRssp","row__main":"ui-row__main-9U8-X","row__brand":"ui-row__brand-FPANJ","row__stock":"ui-row__stock-R0vkG","row__price":"ui-row__price-Xc0rY","row__access":"ui-row__access-90GUv","row__action":"ui-row__action-BLUhd","thumb":"ui-thumb-keewu","identity":"ui-identity-KJkMD","identity__name":"ui-identity__name-HOwle","truncate":"ui-truncate-5ux8b","column__image":"ui-column__image-80B8g","column__code":"ui-column__code-WqdqI","column__name":"ui-column__name-XArN-","column__brand":"ui-column__brand-kZOvm","column__stock":"ui-column__stock-TFp2x","column__price":"ui-column__price-O6HlG","column__access":"ui-column__access-anXj-","column__action":"ui-column__action-v67xi","srOnly":"ui-srOnly-tMxZI"};
4
+ import { ProductThumb as d, ProductIdentity as u, ProductColumnLabel as b } from "./parts.js";
5
+ const y = ({
6
+ product: r,
7
+ signIn: m,
8
+ action: n,
9
+ labels: i = {},
10
+ omit: o = []
11
+ }) => {
12
+ const l = (e, c = !1) => /* @__PURE__ */ s(b, { field: e, text: i[e], isHidden: c });
13
+ return [
14
+ {
15
+ field: "image",
16
+ key: "image",
17
+ label: l("image", !0),
18
+ className: a.column__image,
19
+ render: (e) => /* @__PURE__ */ s(d, { image: r(e).image })
20
+ },
21
+ {
22
+ field: "partNumber",
23
+ key: "partNumber",
24
+ label: l("partNumber"),
25
+ isAlwaysVisible: !0,
26
+ className: a.column__code,
27
+ render: (e) => /* @__PURE__ */ s(t, { code: r(e).partNumber, isCopyable: !0, size: "sm" })
28
+ },
29
+ {
30
+ field: "name",
31
+ key: "name",
32
+ label: l("name"),
33
+ className: a.column__name,
34
+ render: (e) => /* @__PURE__ */ s(u, { ...r(e) })
35
+ },
36
+ {
37
+ field: "brand",
38
+ key: "brand",
39
+ label: l("brand"),
40
+ className: a.column__brand,
41
+ render: (e) => /* @__PURE__ */ s("span", { className: a.truncate, children: r(e).brand })
42
+ },
43
+ ...m ? [
44
+ {
45
+ field: "access",
46
+ key: "access",
47
+ label: l("access"),
48
+ className: a.column__access,
49
+ render: (e) => m(e)
50
+ }
51
+ ] : [
52
+ {
53
+ field: "stock",
54
+ key: "stock",
55
+ label: l("stock"),
56
+ className: a.column__stock,
57
+ render: (e) => r(e).stock
58
+ },
59
+ {
60
+ field: "price",
61
+ key: "price",
62
+ label: l("price"),
63
+ isNumeric: !0,
64
+ className: a.column__price,
65
+ render: (e) => r(e).price
66
+ }
67
+ ],
68
+ ...n ? [
69
+ {
70
+ field: "action",
71
+ key: "action",
72
+ label: l("action", !0),
73
+ align: "end",
74
+ className: a.column__action,
75
+ render: (e) => n(e)
76
+ }
77
+ ] : []
78
+ ].filter((e) => !o.includes(e.field)).map(({ field: e, ...c }) => c);
79
+ };
80
+ export {
81
+ y as default
82
+ };
83
+ //# sourceMappingURL=columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columns.js","sources":["../../../src/components/ProductRow/columns.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nimport CodeText from '../CodeText';\nimport type { DataTableColumn } from '../DataTable';\n\nimport styles from './index.module.scss';\nimport {\n type ProductField,\n ProductColumnLabel,\n ProductIdentity,\n type ProductRowData,\n ProductThumb,\n} from './parts';\n\nexport type ProductColumnsOptions<T> = {\n /** The product of a row. */\n product: (row: T) => ProductRowData;\n /**\n * A visitor's table: the stock and price columns become ONE column with this cell (\"Fiyat ve\n * stok için giriş yapın\"). Leave it out for a dealer.\n */\n signIn?: (row: T) => ReactNode;\n /** The last column: an `AddToCart size=\"sm\"`. */\n action?: (row: T) => ReactNode;\n /** Headings instead of `labels.product`. */\n labels?: Partial<Record<ProductField, string>>;\n /** Columns to leave out (\"brand\" in a one-brand catalogue). */\n omit?: readonly ProductField[];\n};\n\n/**\n * productColumns (3.8) — the B2B product table's columns for `DataTable`: image 40px · part number\n * (mono, copyable, never hidden) · name and vehicle types · brand · stock · price (end, tabular) ·\n * add to cart. With `signIn` (a visitor) stock and price merge into one sign-in column, so a\n * visitor and a dealer see the same table.\n * @example <DataTable rows={items} rowKey={item => item.id} columns={productColumns({ product: toRow, action: item => <AddToCart size=\"sm\" onAdd={…} /> })} />\n */\nconst productColumns = <T,>({\n product,\n signIn,\n action,\n labels = {},\n omit = [],\n}: ProductColumnsOptions<T>): DataTableColumn<T>[] => {\n const heading = (field: ProductField, isHidden = false) => (\n <ProductColumnLabel field={field} text={labels[field]} isHidden={isHidden} />\n );\n\n const columns: (DataTableColumn<T> & { field: ProductField })[] = [\n {\n field: 'image',\n key: 'image',\n label: heading('image', true),\n className: styles.column__image,\n render: row => <ProductThumb image={product(row).image} />,\n },\n {\n field: 'partNumber',\n key: 'partNumber',\n label: heading('partNumber'),\n isAlwaysVisible: true,\n className: styles.column__code,\n render: row => <CodeText code={product(row).partNumber} isCopyable size=\"sm\" />,\n },\n {\n field: 'name',\n key: 'name',\n label: heading('name'),\n className: styles.column__name,\n render: row => <ProductIdentity {...product(row)} />,\n },\n {\n field: 'brand',\n key: 'brand',\n label: heading('brand'),\n className: styles.column__brand,\n render: row => <span className={styles.truncate}>{product(row).brand}</span>,\n },\n ...(signIn\n ? [\n {\n field: 'access' as const,\n key: 'access',\n label: heading('access'),\n className: styles.column__access,\n render: (row: T) => signIn(row),\n },\n ]\n : [\n {\n field: 'stock' as const,\n key: 'stock',\n label: heading('stock'),\n className: styles.column__stock,\n render: (row: T) => product(row).stock,\n },\n {\n field: 'price' as const,\n key: 'price',\n label: heading('price'),\n isNumeric: true,\n className: styles.column__price,\n render: (row: T) => product(row).price,\n },\n ]),\n ...(action\n ? [\n {\n field: 'action' as const,\n key: 'action',\n label: heading('action', true),\n align: 'end' as const,\n className: styles.column__action,\n render: (row: T) => action(row),\n },\n ]\n : []),\n ];\n\n return columns\n .filter(column => !omit.includes(column.field))\n .map(({ field: _field, ...column }) => column);\n};\n\nexport default productColumns;\n"],"names":["productColumns","product","signIn","action","labels","omit","heading","field","isHidden","jsx","ProductColumnLabel","styles","ProductThumb","row","CodeText","ProductIdentity","column","_field"],"mappings":";;;;AAqCA,MAAMA,IAAiB,CAAK;AAAA,EAC1B,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS,CAAA;AAAA,EACT,MAAAC,IAAO,CAAA;AACT,MAAsD;AACpD,QAAMC,IAAU,CAACC,GAAqBC,IAAW,OAC/C,gBAAAC,EAACC,GAAA,EAAmB,OAAAH,GAAc,MAAMH,EAAOG,CAAK,GAAG,UAAAC,EAAA,CAAoB;AA0E7E,SAvEkE;AAAA,IAChE;AAAA,MACE,OAAO;AAAA,MACP,KAAK;AAAA,MACL,OAAOF,EAAQ,SAAS,EAAI;AAAA,MAC5B,WAAWK,EAAO;AAAA,MAClB,QAAQ,OAAO,gBAAAF,EAACG,GAAA,EAAa,OAAOX,EAAQY,CAAG,EAAE,MAAA,CAAO;AAAA,IAAA;AAAA,IAE1D;AAAA,MACE,OAAO;AAAA,MACP,KAAK;AAAA,MACL,OAAOP,EAAQ,YAAY;AAAA,MAC3B,iBAAiB;AAAA,MACjB,WAAWK,EAAO;AAAA,MAClB,QAAQ,CAAAE,MAAO,gBAAAJ,EAACK,GAAA,EAAS,MAAMb,EAAQY,CAAG,EAAE,YAAY,YAAU,IAAC,MAAK,KAAA,CAAK;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C,IAEF,CAAA;AAAA,EAAC,EAIJ,OAAO,CAAAG,MAAU,CAACX,EAAK,SAASW,EAAO,KAAK,CAAC,EAC7C,IAAI,CAAC,EAAE,OAAOC,GAAQ,GAAGD,EAAA,MAAaA,CAAM;AACjD;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),h=require("react"),a=require("../../helpers/class-name.helper.cjs"),w=require("../../helpers/component.helper.cjs"),q=require("../CodeText/index.cjs"),s={default:{"row":"ui-row-hRssp","row__main":"ui-row__main-9U8-X","row__brand":"ui-row__brand-FPANJ","row__stock":"ui-row__stock-R0vkG","row__price":"ui-row__price-Xc0rY","row__access":"ui-row__access-90GUv","row__action":"ui-row__action-BLUhd","thumb":"ui-thumb-keewu","identity":"ui-identity-KJkMD","identity__name":"ui-identity__name-HOwle","truncate":"ui-truncate-5ux8b","column__image":"ui-column__image-80B8g","column__code":"ui-column__code-WqdqI","column__name":"ui-column__name-XArN-","column__brand":"ui-column__brand-kZOvm","column__stock":"ui-column__stock-TFp2x","column__price":"ui-column__price-O6HlG","column__access":"ui-column__access-anXj-","column__action":"ui-column__action-v67xi","srOnly":"ui-srOnly-tMxZI"}},c=require("./parts.cjs"),N=require("./columns.cjs"),b=({name:o,href:d,linkProps:n,partNumber:l,image:u,brand:i,vehicleTypes:m,stock:_,price:x,signIn:r,action:t,as:p="article",className:j,testId:f})=>e.jsxs(p,{className:a.cx(s.default.row,j),"data-testid":f,children:[e.jsx(c.ProductThumb,{image:u}),e.jsxs("span",{className:s.default.row__main,children:[e.jsx(q.default,{code:l,isCopyable:!0,size:"sm",isMuted:!0}),e.jsx(c.ProductIdentity,{name:o,href:d,linkProps:n,vehicleTypes:m})]}),e.jsx("span",{className:a.cx(s.default.row__brand,s.default.truncate),children:i}),r===void 0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:s.default.row__stock,children:_}),e.jsx("span",{className:s.default.row__price,children:x})]}):e.jsx("span",{className:s.default.row__access,children:r}),t&&e.jsx("span",{className:s.default.row__action,children:t})]}),P=h.memo(w.named(b,"ProductRow"));exports.productColumns=N.default;exports.default=P;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/ProductRow/index.tsx"],"sourcesContent":["import { memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport CodeText from '../CodeText';\n\nimport styles from './index.module.scss';\nimport { ProductIdentity, type ProductRowData, ProductThumb } from './parts';\n\nexport type { ProductRowData } from './parts';\nexport { default as productColumns, type ProductColumnsOptions } from './columns';\nexport type { ProductField } from './parts';\n\ntype Props = ProductRowData & {\n /** A visitor's row: this replaces the stock and the price (\"Fiyat için giriş yapın\"). */\n signIn?: ReactNode;\n /** The row's end: an `AddToCart size=\"sm\"`. */\n action?: ReactNode;\n /** The element: `li` inside a list (default `article`). */\n as?: 'article' | 'li' | 'div';\n className?: string;\n testId?: string;\n};\n\n/**\n * ProductRow (3.8) — one product on one line outside a table (equivalents, a cart on a phone, a\n * quick order list): image 40px · part number and name with its vehicle types · brand · stock ·\n * price · add to cart, in the columns of `productColumns`. A visitor's row puts `signIn` where the\n * stock and price are. On a phone the row stacks under its image.\n * @example <ProductRow as=\"li\" name=\"Fren balatası\" href=\"/parca/fren\" partNumber=\"2995815\" stock={<StockStatus … />} price={<Price value=\"845,00\" />} action={<AddToCart size=\"sm\" onAdd={add} />} />\n */\nconst ProductRow = ({\n name,\n href,\n linkProps,\n partNumber,\n image,\n brand,\n vehicleTypes,\n stock,\n price,\n signIn,\n action,\n as: Tag = 'article',\n className,\n testId,\n}: Props) => (\n <Tag className={cx(styles.row, className)} data-testid={testId}>\n <ProductThumb image={image} />\n <span className={styles.row__main}>\n <CodeText code={partNumber} isCopyable size=\"sm\" isMuted />\n <ProductIdentity name={name} href={href} linkProps={linkProps} vehicleTypes={vehicleTypes} />\n </span>\n <span className={cx(styles.row__brand, styles.truncate)}>{brand}</span>\n {signIn === undefined ? (\n <>\n <span className={styles.row__stock}>{stock}</span>\n <span className={styles.row__price}>{price}</span>\n </>\n ) : (\n <span className={styles.row__access}>{signIn}</span>\n )}\n {action && <span className={styles.row__action}>{action}</span>}\n </Tag>\n);\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(ProductRow, 'ProductRow'),\n) as typeof ProductRow;\n"],"names":["ProductRow","name","href","linkProps","partNumber","image","brand","vehicleTypes","stock","price","signIn","action","Tag","className","testId","jsxs","cx","styles","jsx","ProductThumb","CodeText","ProductIdentity","Fragment","index","memo","named"],"mappings":"iYA+BMA,EAAa,CAAC,CAClB,KAAAC,EACA,KAAAC,EACA,UAAAC,EACA,WAAAC,EACA,MAAAC,EACA,MAAAC,EACA,aAAAC,EACA,MAAAC,EACA,MAAAC,EACA,OAAAC,EACA,OAAAC,EACA,GAAIC,EAAM,UACV,UAAAC,EACA,OAAAC,CACF,IACEC,OAACH,GAAI,UAAWI,EAAAA,GAAGC,EAAAA,QAAO,IAAKJ,CAAS,EAAG,cAAaC,EACtD,SAAA,CAAAI,MAACC,EAAAA,cAAa,MAAAd,EAAc,EAC5BU,EAAAA,KAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,UACtB,SAAA,CAAAC,EAAAA,IAACE,EAAAA,QAAA,CAAS,KAAMhB,EAAY,WAAU,GAAC,KAAK,KAAK,QAAO,EAAA,CAAC,EACzDc,EAAAA,IAACG,EAAAA,gBAAA,CAAgB,KAAApB,EAAY,KAAAC,EAAY,UAAAC,EAAsB,aAAAI,CAAA,CAA4B,CAAA,EAC7F,EACAW,EAAAA,IAAC,QAAK,UAAWF,EAAAA,GAAGC,EAAAA,QAAO,WAAYA,EAAAA,QAAO,QAAQ,EAAI,SAAAX,CAAA,CAAM,EAC/DI,IAAW,OACVK,EAAAA,KAAAO,EAAAA,SAAA,CACE,SAAA,CAAAJ,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,WAAa,SAAAT,EAAM,EAC3CU,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,WAAa,SAAAR,CAAA,CAAM,CAAA,EAC7C,EAEAS,MAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,YAAc,SAAAP,EAAO,EAE9CC,GAAUO,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,YAAc,SAAAN,CAAA,CAAO,CAAA,EAC1D,EAGFY,EAA6BC,EAAAA,KACbC,EAAAA,MAAMzB,EAAY,YAAY,CAC9C"}
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from 'react';
2
+ import { ProductRowData } from './parts.cjs';
3
+ export type { ProductRowData } from './parts.cjs';
4
+ export { default as productColumns, type ProductColumnsOptions } from './columns.cjs';
5
+ export type { ProductField } from './parts.cjs';
6
+ type Props = ProductRowData & {
7
+ /** A visitor's row: this replaces the stock and the price ("Fiyat için giriş yapın"). */
8
+ signIn?: ReactNode;
9
+ /** The row's end: an `AddToCart size="sm"`. */
10
+ action?: ReactNode;
11
+ /** The element: `li` inside a list (default `article`). */
12
+ as?: 'article' | 'li' | 'div';
13
+ className?: string;
14
+ testId?: string;
15
+ };
16
+ /**
17
+ * ProductRow (3.8) — one product on one line outside a table (equivalents, a cart on a phone, a
18
+ * quick order list): image 40px · part number and name with its vehicle types · brand · stock ·
19
+ * price · add to cart, in the columns of `productColumns`. A visitor's row puts `signIn` where the
20
+ * stock and price are. On a phone the row stacks under its image.
21
+ * @example <ProductRow as="li" name="Fren balatası" href="/parca/fren" partNumber="2995815" stock={<StockStatus … />} price={<Price value="845,00" />} action={<AddToCart size="sm" onAdd={add} />} />
22
+ */
23
+ declare const ProductRow: ({ name, href, linkProps, partNumber, image, brand, vehicleTypes, stock, price, signIn, action, as: Tag, className, testId, }: Props) => import("react").JSX.Element;
24
+ declare const _default: typeof ProductRow;
25
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from 'react';
2
+ import { ProductRowData } from './parts.js';
3
+ export type { ProductRowData } from './parts.js';
4
+ export { default as productColumns, type ProductColumnsOptions } from './columns.js';
5
+ export type { ProductField } from './parts.js';
6
+ type Props = ProductRowData & {
7
+ /** A visitor's row: this replaces the stock and the price ("Fiyat için giriş yapın"). */
8
+ signIn?: ReactNode;
9
+ /** The row's end: an `AddToCart size="sm"`. */
10
+ action?: ReactNode;
11
+ /** The element: `li` inside a list (default `article`). */
12
+ as?: 'article' | 'li' | 'div';
13
+ className?: string;
14
+ testId?: string;
15
+ };
16
+ /**
17
+ * ProductRow (3.8) — one product on one line outside a table (equivalents, a cart on a phone, a
18
+ * quick order list): image 40px · part number and name with its vehicle types · brand · stock ·
19
+ * price · add to cart, in the columns of `productColumns`. A visitor's row puts `signIn` where the
20
+ * stock and price are. On a phone the row stacks under its image.
21
+ * @example <ProductRow as="li" name="Fren balatası" href="/parca/fren" partNumber="2995815" stock={<StockStatus … />} price={<Price value="845,00" />} action={<AddToCart size="sm" onAdd={add} />} />
22
+ */
23
+ declare const ProductRow: ({ name, href, linkProps, partNumber, image, brand, vehicleTypes, stock, price, signIn, action, as: Tag, className, testId, }: Props) => import("react").JSX.Element;
24
+ declare const _default: typeof ProductRow;
25
+ export default _default;
@@ -0,0 +1,43 @@
1
+ import { jsxs as e, jsx as r, Fragment as x } from "react/jsx-runtime";
2
+ import { memo as N } from "react";
3
+ import { cx as t } from "../../helpers/class-name.helper.js";
4
+ import { named as P } from "../../helpers/component.helper.js";
5
+ import b from "../CodeText/index.js";
6
+ const o = {"row":"ui-row-hRssp","row__main":"ui-row__main-9U8-X","row__brand":"ui-row__brand-FPANJ","row__stock":"ui-row__stock-R0vkG","row__price":"ui-row__price-Xc0rY","row__access":"ui-row__access-90GUv","row__action":"ui-row__action-BLUhd","thumb":"ui-thumb-keewu","identity":"ui-identity-KJkMD","identity__name":"ui-identity__name-HOwle","truncate":"ui-truncate-5ux8b","column__image":"ui-column__image-80B8g","column__code":"ui-column__code-WqdqI","column__name":"ui-column__name-XArN-","column__brand":"ui-column__brand-kZOvm","column__stock":"ui-column__stock-TFp2x","column__price":"ui-column__price-O6HlG","column__access":"ui-column__access-anXj-","column__action":"ui-column__action-v67xi","srOnly":"ui-srOnly-tMxZI"};
7
+ import { ProductThumb as y, ProductIdentity as C } from "./parts.js";
8
+ import { default as B } from "./columns.js";
9
+ const j = ({
10
+ name: c,
11
+ href: m,
12
+ linkProps: d,
13
+ partNumber: i,
14
+ image: n,
15
+ brand: l,
16
+ vehicleTypes: p,
17
+ stock: u,
18
+ price: _,
19
+ signIn: s,
20
+ action: a,
21
+ as: f = "article",
22
+ className: h,
23
+ testId: w
24
+ }) => /* @__PURE__ */ e(f, { className: t(o.row, h), "data-testid": w, children: [
25
+ /* @__PURE__ */ r(y, { image: n }),
26
+ /* @__PURE__ */ e("span", { className: o.row__main, children: [
27
+ /* @__PURE__ */ r(b, { code: i, isCopyable: !0, size: "sm", isMuted: !0 }),
28
+ /* @__PURE__ */ r(C, { name: c, href: m, linkProps: d, vehicleTypes: p })
29
+ ] }),
30
+ /* @__PURE__ */ r("span", { className: t(o.row__brand, o.truncate), children: l }),
31
+ s === void 0 ? /* @__PURE__ */ e(x, { children: [
32
+ /* @__PURE__ */ r("span", { className: o.row__stock, children: u }),
33
+ /* @__PURE__ */ r("span", { className: o.row__price, children: _ })
34
+ ] }) : /* @__PURE__ */ r("span", { className: o.row__access, children: s }),
35
+ a && /* @__PURE__ */ r("span", { className: o.row__action, children: a })
36
+ ] }), g = /* @__PURE__ */ N(
37
+ /* @__PURE__ */ P(j, "ProductRow")
38
+ );
39
+ export {
40
+ g as default,
41
+ B as productColumns
42
+ };
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ProductRow/index.tsx"],"sourcesContent":["import { memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport CodeText from '../CodeText';\n\nimport styles from './index.module.scss';\nimport { ProductIdentity, type ProductRowData, ProductThumb } from './parts';\n\nexport type { ProductRowData } from './parts';\nexport { default as productColumns, type ProductColumnsOptions } from './columns';\nexport type { ProductField } from './parts';\n\ntype Props = ProductRowData & {\n /** A visitor's row: this replaces the stock and the price (\"Fiyat için giriş yapın\"). */\n signIn?: ReactNode;\n /** The row's end: an `AddToCart size=\"sm\"`. */\n action?: ReactNode;\n /** The element: `li` inside a list (default `article`). */\n as?: 'article' | 'li' | 'div';\n className?: string;\n testId?: string;\n};\n\n/**\n * ProductRow (3.8) — one product on one line outside a table (equivalents, a cart on a phone, a\n * quick order list): image 40px · part number and name with its vehicle types · brand · stock ·\n * price · add to cart, in the columns of `productColumns`. A visitor's row puts `signIn` where the\n * stock and price are. On a phone the row stacks under its image.\n * @example <ProductRow as=\"li\" name=\"Fren balatası\" href=\"/parca/fren\" partNumber=\"2995815\" stock={<StockStatus … />} price={<Price value=\"845,00\" />} action={<AddToCart size=\"sm\" onAdd={add} />} />\n */\nconst ProductRow = ({\n name,\n href,\n linkProps,\n partNumber,\n image,\n brand,\n vehicleTypes,\n stock,\n price,\n signIn,\n action,\n as: Tag = 'article',\n className,\n testId,\n}: Props) => (\n <Tag className={cx(styles.row, className)} data-testid={testId}>\n <ProductThumb image={image} />\n <span className={styles.row__main}>\n <CodeText code={partNumber} isCopyable size=\"sm\" isMuted />\n <ProductIdentity name={name} href={href} linkProps={linkProps} vehicleTypes={vehicleTypes} />\n </span>\n <span className={cx(styles.row__brand, styles.truncate)}>{brand}</span>\n {signIn === undefined ? (\n <>\n <span className={styles.row__stock}>{stock}</span>\n <span className={styles.row__price}>{price}</span>\n </>\n ) : (\n <span className={styles.row__access}>{signIn}</span>\n )}\n {action && <span className={styles.row__action}>{action}</span>}\n </Tag>\n);\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(ProductRow, 'ProductRow'),\n) as typeof ProductRow;\n"],"names":["ProductRow","name","href","linkProps","partNumber","image","brand","vehicleTypes","stock","price","signIn","action","Tag","className","testId","jsxs","cx","styles","jsx","ProductThumb","CodeText","ProductIdentity","Fragment","index","memo","named"],"mappings":";;;;;;;;AA+BA,MAAMA,IAAa,CAAC;AAAA,EAClB,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,IAAIC,IAAM;AAAA,EACV,WAAAC;AAAA,EACA,QAAAC;AACF,MACE,gBAAAC,EAACH,KAAI,WAAWI,EAAGC,EAAO,KAAKJ,CAAS,GAAG,eAAaC,GACtD,UAAA;AAAA,EAAA,gBAAAI,EAACC,KAAa,OAAAd,GAAc;AAAA,EAC5B,gBAAAU,EAAC,QAAA,EAAK,WAAWE,EAAO,WACtB,UAAA;AAAA,IAAA,gBAAAC,EAACE,GAAA,EAAS,MAAMhB,GAAY,YAAU,IAAC,MAAK,MAAK,SAAO,GAAA,CAAC;AAAA,IACzD,gBAAAc,EAACG,GAAA,EAAgB,MAAApB,GAAY,MAAAC,GAAY,WAAAC,GAAsB,cAAAI,EAAA,CAA4B;AAAA,EAAA,GAC7F;AAAA,EACA,gBAAAW,EAAC,UAAK,WAAWF,EAAGC,EAAO,YAAYA,EAAO,QAAQ,GAAI,UAAAX,EAAA,CAAM;AAAA,EAC/DI,MAAW,SACV,gBAAAK,EAAAO,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAJ,EAAC,QAAA,EAAK,WAAWD,EAAO,YAAa,UAAAT,GAAM;AAAA,IAC3C,gBAAAU,EAAC,QAAA,EAAK,WAAWD,EAAO,YAAa,UAAAR,EAAA,CAAM;AAAA,EAAA,GAC7C,IAEA,gBAAAS,EAAC,QAAA,EAAK,WAAWD,EAAO,aAAc,UAAAP,GAAO;AAAA,EAE9CC,KAAU,gBAAAO,EAAC,QAAA,EAAK,WAAWD,EAAO,aAAc,UAAAN,EAAA,CAAO;AAAA,GAC1D,GAGFY,IAA6B,gBAAAC;AAAA,EACb,gBAAAC,EAAMzB,GAAY,YAAY;AAC9C;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("../../helpers/class-name.helper.cjs"),i=require("../../helpers/label.helper.cjs"),d=require("../../theme/context.cjs"),a=require("../Link/index.cjs"),m=require("../VehicleTypeList/index.cjs"),n={default:{"row":"ui-row-hRssp","row__main":"ui-row__main-9U8-X","row__brand":"ui-row__brand-FPANJ","row__stock":"ui-row__stock-R0vkG","row__price":"ui-row__price-Xc0rY","row__access":"ui-row__access-90GUv","row__action":"ui-row__action-BLUhd","thumb":"ui-thumb-keewu","identity":"ui-identity-KJkMD","identity__name":"ui-identity__name-HOwle","truncate":"ui-truncate-5ux8b","column__image":"ui-column__image-80B8g","column__code":"ui-column__code-WqdqI","column__name":"ui-column__name-XArN-","column__brand":"ui-column__brand-kZOvm","column__stock":"ui-column__stock-TFp2x","column__price":"ui-column__price-O6HlG","column__access":"ui-column__access-anXj-","column__action":"ui-column__action-v67xi","srOnly":"ui-srOnly-tMxZI"}},h=({image:e})=>s.jsx("span",{"aria-hidden":!0,className:n.default.thumb,children:e}),p=({name:e,href:r,linkProps:c,vehicleTypes:t=[]})=>s.jsxs("span",{className:n.default.identity,children:[s.jsx(a.default,{...c,href:r,title:e,className:n.default.identity__name,children:e}),s.jsx(m.default,{types:t})]}),x=({field:e,text:r,isHidden:c})=>{var u;const{labels:t}=d.useUi(),l=i.resolveLabel(`productColumns.labels.${e}`,r,(u=t==null?void 0:t.product)==null?void 0:u[e]);return s.jsx("span",{className:o.cx(c&&n.default.srOnly),children:l})};exports.ProductColumnLabel=x;exports.ProductIdentity=p;exports.ProductThumb=h;
2
+ //# sourceMappingURL=parts.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.cjs","sources":["../../../src/components/ProductRow/parts.tsx"],"sourcesContent":["'use client';\n\nimport { type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\nimport VehicleTypeList from '../VehicleTypeList';\n\nimport styles from './index.module.scss';\n\n/** What a product row and a product table cell show of one product (3.8). */\nexport type ProductRowData = {\n name: string;\n href: string;\n linkProps?: UiLinkExtraProps;\n /** Mono and copyable. */\n partNumber: string;\n /** A 40px thumbnail: `<img alt=\"\">` or the framework's image. */\n image?: ReactNode;\n brand?: ReactNode;\n vehicleTypes?: readonly string[];\n /** A `StockStatus`, its breakdown in the tooltip. */\n stock?: ReactNode;\n /** A `Price`. */\n price?: ReactNode;\n};\n\n/** The 40px image box of a row: the photo drawn whole on a sunken ground. */\nexport const ProductThumb = ({ image }: { image?: ReactNode }) => (\n <span aria-hidden className={styles.thumb}>\n {image}\n </span>\n);\n\n/** The name (one line, its tooltip the full name) over the vehicle types. */\nexport const ProductIdentity = ({\n name,\n href,\n linkProps,\n vehicleTypes = [],\n}: Pick<ProductRowData, 'name' | 'href' | 'linkProps' | 'vehicleTypes'>) => (\n <span className={styles.identity}>\n <UiLink {...linkProps} href={href} title={name} className={styles.identity__name}>\n {name}\n </UiLink>\n <VehicleTypeList types={vehicleTypes} />\n </span>\n);\n\n/** The columns of a product table; each heading comes from `labels.product`. */\nexport type ProductField =\n 'image' | 'partNumber' | 'name' | 'brand' | 'stock' | 'price' | 'access' | 'action';\n\n/** A column heading read from the provider; `isHidden` keeps it for a screen reader only. */\nexport const ProductColumnLabel = ({\n field,\n text,\n isHidden,\n}: {\n field: ProductField;\n text?: string;\n isHidden: boolean;\n}) => {\n const { labels } = useUi();\n const label = resolveLabel(`productColumns.labels.${field}`, text, labels?.product?.[field]);\n\n return <span className={cx(isHidden && styles.srOnly)}>{label}</span>;\n};\n"],"names":["ProductThumb","image","jsx","styles","ProductIdentity","name","href","linkProps","vehicleTypes","jsxs","UiLink","VehicleTypeList","ProductColumnLabel","field","text","isHidden","labels","useUi","label","resolveLabel","_a","cx"],"mappings":"kXA8BaA,EAAe,CAAC,CAAE,MAAAC,KAC7BC,EAAAA,IAAC,OAAA,CAAK,cAAW,GAAC,UAAWC,EAAAA,QAAO,MACjC,SAAAF,CAAA,CACH,EAIWG,EAAkB,CAAC,CAC9B,KAAAC,EACA,KAAAC,EACA,UAAAC,EACA,aAAAC,EAAe,CAAA,CACjB,IACEC,EAAAA,KAAC,OAAA,CAAK,UAAWN,EAAAA,QAAO,SACtB,SAAA,CAAAD,EAAAA,IAACQ,EAAAA,QAAA,CAAQ,GAAGH,EAAW,KAAAD,EAAY,MAAOD,EAAM,UAAWF,EAAAA,QAAO,eAC/D,SAAAE,CAAA,CACH,EACAH,EAAAA,IAACS,EAAAA,QAAA,CAAgB,MAAOH,CAAA,CAAc,CAAA,CAAA,CACxC,EAQWI,EAAqB,CAAC,CACjC,MAAAC,EACA,KAAAC,EACA,SAAAC,CACF,IAIM,OACJ,KAAM,CAAE,OAAAC,CAAA,EAAWC,QAAA,EACbC,EAAQC,EAAAA,aAAa,yBAAyBN,CAAK,GAAIC,GAAMM,EAAAJ,GAAA,YAAAA,EAAQ,UAAR,YAAAI,EAAkBP,EAAM,EAE3F,OAAOX,MAAC,QAAK,UAAWmB,EAAAA,GAAGN,GAAYZ,EAAAA,QAAO,MAAM,EAAI,SAAAe,CAAA,CAAM,CAChE"}
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ import { UiLinkExtraProps } from '../../types/link.type.cjs';
3
+ /** What a product row and a product table cell show of one product (3.8). */
4
+ export type ProductRowData = {
5
+ name: string;
6
+ href: string;
7
+ linkProps?: UiLinkExtraProps;
8
+ /** Mono and copyable. */
9
+ partNumber: string;
10
+ /** A 40px thumbnail: `<img alt="">` or the framework's image. */
11
+ image?: ReactNode;
12
+ brand?: ReactNode;
13
+ vehicleTypes?: readonly string[];
14
+ /** A `StockStatus`, its breakdown in the tooltip. */
15
+ stock?: ReactNode;
16
+ /** A `Price`. */
17
+ price?: ReactNode;
18
+ };
19
+ /** The 40px image box of a row: the photo drawn whole on a sunken ground. */
20
+ export declare const ProductThumb: ({ image }: {
21
+ image?: ReactNode;
22
+ }) => import("react").JSX.Element;
23
+ /** The name (one line, its tooltip the full name) over the vehicle types. */
24
+ export declare const ProductIdentity: ({ name, href, linkProps, vehicleTypes, }: Pick<ProductRowData, "name" | "href" | "linkProps" | "vehicleTypes">) => import("react").JSX.Element;
25
+ /** The columns of a product table; each heading comes from `labels.product`. */
26
+ export type ProductField = 'image' | 'partNumber' | 'name' | 'brand' | 'stock' | 'price' | 'access' | 'action';
27
+ /** A column heading read from the provider; `isHidden` keeps it for a screen reader only. */
28
+ export declare const ProductColumnLabel: ({ field, text, isHidden, }: {
29
+ field: ProductField;
30
+ text?: string;
31
+ isHidden: boolean;
32
+ }) => import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ import { UiLinkExtraProps } from '../../types/link.type.js';
3
+ /** What a product row and a product table cell show of one product (3.8). */
4
+ export type ProductRowData = {
5
+ name: string;
6
+ href: string;
7
+ linkProps?: UiLinkExtraProps;
8
+ /** Mono and copyable. */
9
+ partNumber: string;
10
+ /** A 40px thumbnail: `<img alt="">` or the framework's image. */
11
+ image?: ReactNode;
12
+ brand?: ReactNode;
13
+ vehicleTypes?: readonly string[];
14
+ /** A `StockStatus`, its breakdown in the tooltip. */
15
+ stock?: ReactNode;
16
+ /** A `Price`. */
17
+ price?: ReactNode;
18
+ };
19
+ /** The 40px image box of a row: the photo drawn whole on a sunken ground. */
20
+ export declare const ProductThumb: ({ image }: {
21
+ image?: ReactNode;
22
+ }) => import("react").JSX.Element;
23
+ /** The name (one line, its tooltip the full name) over the vehicle types. */
24
+ export declare const ProductIdentity: ({ name, href, linkProps, vehicleTypes, }: Pick<ProductRowData, "name" | "href" | "linkProps" | "vehicleTypes">) => import("react").JSX.Element;
25
+ /** The columns of a product table; each heading comes from `labels.product`. */
26
+ export type ProductField = 'image' | 'partNumber' | 'name' | 'brand' | 'stock' | 'price' | 'access' | 'action';
27
+ /** A column heading read from the provider; `isHidden` keeps it for a screen reader only. */
28
+ export declare const ProductColumnLabel: ({ field, text, isHidden, }: {
29
+ field: ProductField;
30
+ text?: string;
31
+ isHidden: boolean;
32
+ }) => import("react").JSX.Element;
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
3
+ import { cx as l } from "../../helpers/class-name.helper.js";
4
+ import { resolveLabel as a } from "../../helpers/label.helper.js";
5
+ import { useUi as p } from "../../theme/context.js";
6
+ import d from "../Link/index.js";
7
+ import u from "../VehicleTypeList/index.js";
8
+ const o = {"row":"ui-row-hRssp","row__main":"ui-row__main-9U8-X","row__brand":"ui-row__brand-FPANJ","row__stock":"ui-row__stock-R0vkG","row__price":"ui-row__price-Xc0rY","row__access":"ui-row__access-90GUv","row__action":"ui-row__action-BLUhd","thumb":"ui-thumb-keewu","identity":"ui-identity-KJkMD","identity__name":"ui-identity__name-HOwle","truncate":"ui-truncate-5ux8b","column__image":"ui-column__image-80B8g","column__code":"ui-column__code-WqdqI","column__name":"ui-column__name-XArN-","column__brand":"ui-column__brand-kZOvm","column__stock":"ui-column__stock-TFp2x","column__price":"ui-column__price-O6HlG","column__access":"ui-column__access-anXj-","column__action":"ui-column__action-v67xi","srOnly":"ui-srOnly-tMxZI"};
9
+ const P = ({ image: t }) => /* @__PURE__ */ e("span", { "aria-hidden": !0, className: o.thumb, children: t }), j = ({
10
+ name: t,
11
+ href: s,
12
+ linkProps: i,
13
+ vehicleTypes: r = []
14
+ }) => /* @__PURE__ */ c("span", { className: o.identity, children: [
15
+ /* @__PURE__ */ e(d, { ...i, href: s, title: t, className: o.identity__name, children: t }),
16
+ /* @__PURE__ */ e(u, { types: r })
17
+ ] }), C = ({
18
+ field: t,
19
+ text: s,
20
+ isHidden: i
21
+ }) => {
22
+ var m;
23
+ const { labels: r } = p(), n = a(`productColumns.labels.${t}`, s, (m = r == null ? void 0 : r.product) == null ? void 0 : m[t]);
24
+ return /* @__PURE__ */ e("span", { className: l(i && o.srOnly), children: n });
25
+ };
26
+ export {
27
+ C as ProductColumnLabel,
28
+ j as ProductIdentity,
29
+ P as ProductThumb
30
+ };
31
+ //# sourceMappingURL=parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.js","sources":["../../../src/components/ProductRow/parts.tsx"],"sourcesContent":["'use client';\n\nimport { type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\nimport VehicleTypeList from '../VehicleTypeList';\n\nimport styles from './index.module.scss';\n\n/** What a product row and a product table cell show of one product (3.8). */\nexport type ProductRowData = {\n name: string;\n href: string;\n linkProps?: UiLinkExtraProps;\n /** Mono and copyable. */\n partNumber: string;\n /** A 40px thumbnail: `<img alt=\"\">` or the framework's image. */\n image?: ReactNode;\n brand?: ReactNode;\n vehicleTypes?: readonly string[];\n /** A `StockStatus`, its breakdown in the tooltip. */\n stock?: ReactNode;\n /** A `Price`. */\n price?: ReactNode;\n};\n\n/** The 40px image box of a row: the photo drawn whole on a sunken ground. */\nexport const ProductThumb = ({ image }: { image?: ReactNode }) => (\n <span aria-hidden className={styles.thumb}>\n {image}\n </span>\n);\n\n/** The name (one line, its tooltip the full name) over the vehicle types. */\nexport const ProductIdentity = ({\n name,\n href,\n linkProps,\n vehicleTypes = [],\n}: Pick<ProductRowData, 'name' | 'href' | 'linkProps' | 'vehicleTypes'>) => (\n <span className={styles.identity}>\n <UiLink {...linkProps} href={href} title={name} className={styles.identity__name}>\n {name}\n </UiLink>\n <VehicleTypeList types={vehicleTypes} />\n </span>\n);\n\n/** The columns of a product table; each heading comes from `labels.product`. */\nexport type ProductField =\n 'image' | 'partNumber' | 'name' | 'brand' | 'stock' | 'price' | 'access' | 'action';\n\n/** A column heading read from the provider; `isHidden` keeps it for a screen reader only. */\nexport const ProductColumnLabel = ({\n field,\n text,\n isHidden,\n}: {\n field: ProductField;\n text?: string;\n isHidden: boolean;\n}) => {\n const { labels } = useUi();\n const label = resolveLabel(`productColumns.labels.${field}`, text, labels?.product?.[field]);\n\n return <span className={cx(isHidden && styles.srOnly)}>{label}</span>;\n};\n"],"names":["ProductThumb","image","jsx","styles","ProductIdentity","name","href","linkProps","vehicleTypes","jsxs","UiLink","VehicleTypeList","ProductColumnLabel","field","text","isHidden","labels","useUi","label","resolveLabel","_a","cx"],"mappings":";;;;;;;;AA8BO,MAAMA,IAAe,CAAC,EAAE,OAAAC,QAC7B,gBAAAC,EAAC,QAAA,EAAK,eAAW,IAAC,WAAWC,EAAO,OACjC,UAAAF,EAAA,CACH,GAIWG,IAAkB,CAAC;AAAA,EAC9B,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC,IAAe,CAAA;AACjB,MACE,gBAAAC,EAAC,QAAA,EAAK,WAAWN,EAAO,UACtB,UAAA;AAAA,EAAA,gBAAAD,EAACQ,GAAA,EAAQ,GAAGH,GAAW,MAAAD,GAAY,OAAOD,GAAM,WAAWF,EAAO,gBAC/D,UAAAE,EAAA,CACH;AAAA,EACA,gBAAAH,EAACS,GAAA,EAAgB,OAAOH,EAAA,CAAc;AAAA,EAAA,CACxC,GAQWI,IAAqB,CAAC;AAAA,EACjC,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AACF,MAIM;;AACJ,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAQC,EAAa,yBAAyBN,CAAK,IAAIC,IAAMM,IAAAJ,KAAA,gBAAAA,EAAQ,YAAR,gBAAAI,EAAkBP,EAAM;AAE3F,SAAO,gBAAAX,EAAC,UAAK,WAAWmB,EAAGN,KAAYZ,EAAO,MAAM,GAAI,UAAAe,EAAA,CAAM;AAChE;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-row-hRssp{display:grid;grid-template-columns:40px minmax(0,3fr) minmax(0,1fr) minmax(0,1.25fr) minmax(7rem,auto) auto;grid-template-areas:"thumb main brand stock price action";align-items:center;gap:var(--hd-space-2) var(--hd-space-4);padding:var(--hd-space-3) var(--hd-space-4);border-block-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface);font-size:var(--hd-type-small-size)}.ui-row-hRssp:last-child{border-block-end:none}.ui-row__main-9U8-X{display:flex;grid-area:main;flex-direction:column;gap:2px;min-width:0}.ui-row__brand-FPANJ{grid-area:brand;color:var(--hd-text-2)}.ui-row__stock-R0vkG{grid-area:stock;min-width:0}.ui-row__price-Xc0rY{grid-area:price;justify-self:end;font-variant-numeric:tabular-nums}.ui-row__access-90GUv{grid-column:stock/price;min-width:0}.ui-row__action-BLUhd{grid-area:action;justify-self:end}@media (max-width: 640px){.ui-row-hRssp{grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"thumb main main" "thumb stock price" "thumb action action";align-items:start}.ui-row__brand-FPANJ{display:none}.ui-row__access-90GUv{grid-column:2/-1}.ui-row__action-BLUhd{justify-self:stretch}}.ui-thumb-keewu{display:inline-flex;grid-area:thumb;align-items:center;justify-content:center;width:40px;height:40px;overflow:hidden;border-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised)}.ui-thumb-keewu>img,.ui-thumb-keewu>picture,.ui-thumb-keewu>svg{width:100%;height:100%;object-fit:contain}.ui-identity-KJkMD{display:flex;flex-direction:column;gap:var(--hd-space-1);min-width:0}.ui-identity__name-HOwle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block;color:var(--hd-text);font-weight:var(--hd-font-weight-medium);text-decoration:none;border-radius:var(--hd-radius-xs)}.ui-identity__name-HOwle:hover{color:var(--hd-primary-text);text-decoration:underline;text-underline-offset:2px}.ui-identity__name-HOwle:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-truncate-5ux8b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block}.ui-column__image-80B8g{width:56px}.ui-column__code-WqdqI{white-space:nowrap}.ui-column__name-XArN-{width:100%;max-width:0;min-width:14rem}.ui-column__brand-kZOvm{max-width:10rem}.ui-column__stock-TFp2x,.ui-column__price-O6HlG,.ui-column__access-anXj-,.ui-column__action-v67xi{white-space:nowrap}.ui-srOnly-tMxZI{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),D=require("react"),k=require("react-bootstrap-icons"),A=require("../../helpers/class-name.helper.cjs"),b=require("../../helpers/label.helper.cjs"),B=require("../../theme/context.cjs"),c={default:{"stepper":"ui-stepper-8s5Ih","stepper__input":"ui-stepper__input-OQh5v","stepper__button":"ui-stepper__button-h6g7d","stepper--sm":"ui-stepper--sm-RvrBP","stepper--md":"ui-stepper--md-Cnjei"}},E=({value:r,onChange:i,label:M,decreaseLabel:S,increaseLabel:j,min:n=1,max:a=99,isDisabled:p,isReadOnly:u,size:x="md",id:L,required:N,"aria-describedby":w,"aria-invalid":P,className:Q,testId:v})=>{var m,h,q;const{labels:t}=B.useUi(),f=b.resolveLabel("QuantityStepper.label",M,(m=t==null?void 0:t.quantity)==null?void 0:m.label),[U,s]=D.useState(null),d=e=>Math.min(Math.max(e,n),a),y=Number.isFinite(a)?String(Math.floor(Math.abs(a))).length:15,g=e=>{if(s(null),u)return;const o=e.replace(/\D/g,"");o!==""&&i(d(Number(o)))};return l.jsxs("div",{className:A.cx(c.default.stepper,c.default[`stepper--${x}`],Q),role:"group","aria-label":f,"data-testid":v,children:[l.jsx("button",{type:"button",className:c.default.stepper__button,onClick:()=>i(Math.max(r-1,n)),disabled:p||u||r<=n,"aria-label":b.resolveLabel("QuantityStepper.decreaseLabel",S,(h=t==null?void 0:t.quantity)==null?void 0:h.decrease),children:l.jsx(k.DashLg,{"aria-hidden":!0})}),l.jsx("input",{id:L,className:c.default.stepper__input,value:U??String(r),onChange:e=>s(e.target.value.replace(/\D/g,"").slice(0,y)),style:{"--ui-stepper-digits":y},onBlur:e=>g(e.target.value),onKeyDown:e=>{if(u)return;const o=e.key==="ArrowUp"?1:e.key==="ArrowDown"?-1:0;if(o!==0){e.preventDefault(),s(null),i(d(r+o));return}const _=e.key==="PageUp"?10:e.key==="PageDown"?-10:0;if(_!==0){e.preventDefault(),s(null),i(d(r+_));return}if(e.key==="Home"||e.key==="End"){e.preventDefault(),s(null),i(e.key==="Home"?n:a);return}e.key==="Enter"&&(e.preventDefault(),g(e.target.value))},inputMode:"numeric",disabled:p,readOnly:u,"aria-readonly":u||void 0,"aria-required":N||void 0,"aria-invalid":P||void 0,"aria-describedby":w,role:"spinbutton","aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":a,"aria-label":f}),l.jsx("button",{type:"button",className:c.default.stepper__button,onClick:()=>i(Math.min(r+1,a)),disabled:p||u||r>=a,"aria-label":b.resolveLabel("QuantityStepper.increaseLabel",j,(q=t==null?void 0:t.quantity)==null?void 0:q.increase),children:l.jsx(k.PlusLg,{"aria-hidden":!0})})]})},H=D.memo(E);exports.default=H;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),S=require("react"),k=require("react-bootstrap-icons"),A=require("../../helpers/class-name.helper.cjs"),b=require("../../helpers/label.helper.cjs"),B=require("../../theme/context.cjs"),c={default:{"stepper":"ui-stepper-8s5Ih","stepper__input":"ui-stepper__input-OQh5v","stepper__button":"ui-stepper__button-h6g7d","stepper--sm":"ui-stepper--sm-RvrBP","stepper--md":"ui-stepper--md-Cnjei"}},E=({value:r,onChange:i,label:D,decreaseLabel:M,increaseLabel:j,min:n=1,max:a=99,isDisabled:p,isReadOnly:u,size:L="md",id:x,required:N,"aria-describedby":w,"aria-invalid":Q,className:P,testId:v})=>{var m,h,q;const{labels:t}=B.useUi(),f=b.resolveLabel("QuantityStepper.label",D,(m=t==null?void 0:t.quantity)==null?void 0:m.label),[U,s]=S.useState(null),d=e=>Math.min(Math.max(e,n),a),y=Number.isFinite(a)?String(Math.floor(Math.abs(a))).length:15,g=e=>{if(s(null),u)return;const o=e.replace(/\D/g,"");o!==""&&i(d(Number(o)))};return l.jsxs("div",{className:A.cx(c.default.stepper,c.default[`stepper--${L}`],P),role:"group","aria-label":f,"data-testid":v,children:[l.jsx("button",{type:"button",className:c.default.stepper__button,onClick:()=>i(Math.max(r-1,n)),disabled:p||u||r<=n,"aria-label":b.resolveLabel("QuantityStepper.decreaseLabel",M,(h=t==null?void 0:t.quantity)==null?void 0:h.decrease),children:l.jsx(k.DashLg,{"aria-hidden":!0})}),l.jsx("input",{id:x,className:c.default.stepper__input,value:U??String(r),onChange:e=>s(e.target.value.replace(/\D/g,"").slice(0,y)),style:{"--ui-stepper-digits":y},onBlur:e=>g(e.target.value),onKeyDown:e=>{if(u)return;const o=e.key==="ArrowUp"?1:e.key==="ArrowDown"?-1:0;if(o!==0){e.preventDefault(),s(null),i(d(r+o));return}const _=e.key==="PageUp"?10:e.key==="PageDown"?-10:0;if(_!==0){e.preventDefault(),s(null),i(d(r+_));return}if(e.key==="Home"||e.key==="End"){e.preventDefault(),s(null),i(e.key==="Home"?n:a);return}e.key==="Enter"&&(e.preventDefault(),g(e.target.value))},inputMode:"numeric",disabled:p,readOnly:u,"aria-readonly":u||void 0,"aria-required":N||void 0,"aria-invalid":Q||void 0,"aria-describedby":w,role:"spinbutton","aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":a,"aria-label":f}),l.jsx("button",{type:"button",className:c.default.stepper__button,onClick:()=>i(Math.min(r+1,a)),disabled:p||u||r>=a,"aria-label":b.resolveLabel("QuantityStepper.increaseLabel",j,(q=t==null?void 0:t.quantity)==null?void 0:q.increase),children:l.jsx(k.PlusLg,{"aria-hidden":!0})})]})},H=S.memo(E);exports.default=H;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/QuantityStepper/index.tsx"],"sourcesContent":["'use client';\n\nimport { type CSSProperties, type FC, memo, useState } from 'react';\n\nimport { DashLg, PlusLg } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n value: number;\n onChange: (value: number) => void;\n /** Grubun ve girdinin erişilebilir adı. */\n label?: string;\n /** Verilmezse `labels.quantity.decrease`. */\n decreaseLabel?: string;\n /** Verilmezse `labels.quantity.increase`. */\n increaseLabel?: string;\n min?: number;\n max?: number;\n isDisabled?: boolean;\n /**\n * Read-only (2.2): the number stays focusable and readable (`aria-readonly`); typing, the arrow\n * keys and the two buttons do not change it.\n */\n isReadOnly?: boolean;\n size?: 'sm' | 'md';\n /**\n * The id of the number box (2.2) — the `id` of `Field`'s `FieldChildProps`, so the field's label\n * and a form's focus reach the box.\n */\n id?: string;\n /** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi (2.2); `aria-required` on the box. */\n required?: boolean;\n /** On the number box (2.2), with the error and hint ids of `Field`. */\n 'aria-describedby'?: string;\n /** On the number box (2.2): `spinbutton` takes `aria-invalid`. */\n 'aria-invalid'?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Adet seçici. */\nconst QuantityStepper: FC<Props> = ({\n value,\n onChange,\n label,\n decreaseLabel,\n increaseLabel,\n min = 1,\n max = 99,\n isDisabled,\n isReadOnly,\n size = 'md',\n id,\n required,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n className,\n testId,\n}) => {\n const { labels } = useUi();\n const groupLabel = resolveLabel('QuantityStepper.label', label, labels?.quantity?.label);\n const [draft, setDraft] = useState<string | null>(null);\n\n const clamp = (next: number) => Math.min(Math.max(next, min), max);\n\n /*\n * How many digits the box takes: those of `max` (3.5.1, PD-18). It was a fixed `slice(0, 2)` with\n * fixed widths, so `max={100000}` turned a typed 100000 into 10. An unbounded `max` takes up to 15\n * digits (a safe integer). A typed value out of range is clamped on commit, not cut while typing.\n */\n const digitCount = Number.isFinite(max) ? String(Math.floor(Math.abs(max))).length : 15;\n\n const commit = (raw: string) => {\n setDraft(null);\n if (isReadOnly) return;\n\n /*\n * Onceki bicim `if (!parsed) return;` diyordu ve `0` falsy: `min={0}` ile kurulmus bir alanda\n * (stok duzeltme formu) kullanici `0` yazip alandan…\n * ⚠ BOSLUK KONTROLU HAM DIZEDEN yapilir, sayidan DEGIL.\n */\n const digits = raw.replace(/\\D/g, '');\n if (digits === '') return;\n\n onChange(clamp(Number(digits)));\n };\n\n return (\n <div\n className={cx(styles.stepper, styles[`stepper--${size}`], className)}\n role=\"group\"\n aria-label={groupLabel}\n data-testid={testId}\n >\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.max(value - 1, min))}\n disabled={isDisabled || isReadOnly || value <= min}\n aria-label={resolveLabel(\n 'QuantityStepper.decreaseLabel',\n decreaseLabel,\n labels?.quantity?.decrease,\n )}\n >\n <DashLg aria-hidden />\n </button>\n\n <input\n id={id}\n className={styles.stepper__input}\n value={draft ?? String(value)}\n onChange={event => setDraft(event.target.value.replace(/\\D/g, '').slice(0, digitCount))}\n /* The box grows with the digits `max` allows (`.stepper__input`). */\n style={{ '--ui-stepper-digits': digitCount } as CSSProperties}\n onBlur={event => commit(event.target.value)}\n /* ⚠ `spinbutton` ROLU BIR SOZ VERIR: */\n onKeyDown={event => {\n if (isReadOnly) return;\n\n const step = event.key === 'ArrowUp' ? 1 : event.key === 'ArrowDown' ? -1 : 0;\n\n if (step !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + step));\n return;\n }\n\n const page = event.key === 'PageUp' ? 10 : event.key === 'PageDown' ? -10 : 0;\n\n if (page !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + page));\n return;\n }\n\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n setDraft(null);\n onChange(event.key === 'Home' ? min : max);\n return;\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n commit((event.target as HTMLInputElement).value);\n }\n }}\n inputMode=\"numeric\"\n disabled={isDisabled}\n readOnly={isReadOnly}\n aria-readonly={isReadOnly || undefined}\n aria-required={required || undefined}\n aria-invalid={isInvalid || undefined}\n aria-describedby={describedBy}\n /* ⚠ ARALIK ETIKETE GOMULMEZ, ROLE ILE BILDIRILIR. */\n role=\"spinbutton\"\n aria-valuenow={value}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-label={groupLabel}\n />\n\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.min(value + 1, max))}\n disabled={isDisabled || isReadOnly || value >= max}\n aria-label={resolveLabel(\n 'QuantityStepper.increaseLabel',\n increaseLabel,\n labels?.quantity?.increase,\n )}\n >\n <PlusLg aria-hidden />\n </button>\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(QuantityStepper) as typeof QuantityStepper;\n"],"names":["QuantityStepper","value","onChange","label","decreaseLabel","increaseLabel","min","max","isDisabled","isReadOnly","size","id","required","describedBy","isInvalid","className","testId","labels","useUi","groupLabel","resolveLabel","_a","draft","setDraft","useState","clamp","next","digitCount","commit","raw","digits","jsxs","cx","styles","jsx","_b","DashLg","event","step","page","_c","PlusLg","index"],"mappings":"2XA6CMA,EAA6B,CAAC,CAClC,MAAAC,EACA,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,cAAAC,EACA,IAAAC,EAAM,EACN,IAAAC,EAAM,GACN,WAAAC,EACA,WAAAC,EACA,KAAAC,EAAO,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gCACAf,GACAmC,EAAAvB,GAAA,YAAAA,EAAQ,WAAR,YAAAuB,EAAkB,QAAA,EAGpB,SAAAN,EAAAA,IAACO,EAAAA,OAAA,CAAO,cAAW,EAAA,CAAC,CAAA,CAAA,CACtB,CAAA,CAAA,CAGN,EAEAC,SAAkC1C,CAAe"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/QuantityStepper/index.tsx"],"sourcesContent":["'use client';\n\nimport { type CSSProperties, type FC, memo, useState } from 'react';\n\nimport { DashLg, PlusLg } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n value: number;\n onChange: (value: number) => void;\n /** Grubun ve girdinin erişilebilir adı. */\n label?: string;\n /** Verilmezse `labels.quantity.decrease`. */\n decreaseLabel?: string;\n /** Verilmezse `labels.quantity.increase`. */\n increaseLabel?: string;\n min?: number;\n max?: number;\n isDisabled?: boolean;\n /**\n * Read-only (2.2): the number stays focusable and readable (`aria-readonly`); typing, the arrow\n * keys and the two buttons do not change it.\n */\n isReadOnly?: boolean;\n size?: 'sm' | 'md';\n /**\n * The id of the number box (2.2) — the `id` of `Field`'s `FieldChildProps`, so the field's label\n * and a form's focus reach the box.\n */\n id?: string;\n /** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi (2.2); `aria-required` on the box. */\n required?: boolean;\n /** On the number box (2.2), with the error and hint ids of `Field`. */\n 'aria-describedby'?: string;\n /** On the number box (2.2): `spinbutton` takes `aria-invalid`. */\n 'aria-invalid'?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Adet seçici. */\nconst QuantityStepper: FC<Props> = ({\n value,\n onChange,\n label,\n decreaseLabel,\n increaseLabel,\n min = 1,\n max = 99,\n isDisabled,\n isReadOnly,\n size = 'md',\n id,\n required,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n className,\n testId,\n}) => {\n const { labels } = useUi();\n const groupLabel = resolveLabel('QuantityStepper.label', label, labels?.quantity?.label);\n const [draft, setDraft] = useState<string | null>(null);\n\n const clamp = (next: number) => Math.min(Math.max(next, min), max);\n\n /*\n * How many digits the box takes: those of `max` (3.5.1, PD-18). It was a fixed `slice(0, 2)` with\n * fixed widths, so `max={100000}` turned a typed 100000 into 10. An unbounded `max` takes up to 15\n * digits (a safe integer). A typed value out of range is clamped on commit, not cut while typing.\n */\n const digitCount = Number.isFinite(max) ? String(Math.floor(Math.abs(max))).length : 15;\n\n const commit = (raw: string) => {\n setDraft(null);\n if (isReadOnly) return;\n\n /*\n * Onceki bicim `if (!parsed) return;` diyordu ve `0` falsy: `min={0}` ile kurulmus bir alanda\n * (stok duzeltme formu) kullanici `0` yazip alandan…\n * ⚠ BOSLUK KONTROLU HAM DIZEDEN yapilir, sayidan DEGIL.\n */\n const digits = raw.replace(/\\D/g, '');\n if (digits === '') return;\n\n onChange(clamp(Number(digits)));\n };\n\n return (\n <div\n className={cx(styles.stepper, styles[`stepper--${size}`], className)}\n role=\"group\"\n aria-label={groupLabel}\n data-testid={testId}\n >\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.max(value - 1, min))}\n disabled={isDisabled || isReadOnly || value <= min}\n aria-label={resolveLabel(\n 'QuantityStepper.decreaseLabel',\n decreaseLabel,\n labels?.quantity?.decrease,\n )}\n >\n <DashLg aria-hidden />\n </button>\n\n <input\n id={id}\n className={styles.stepper__input}\n value={draft ?? String(value)}\n onChange={event => setDraft(event.target.value.replace(/\\D/g, '').slice(0, digitCount))}\n /* The box grows with the digits `max` allows (`.stepper__input`). */\n style={{ '--ui-stepper-digits': digitCount } as CSSProperties}\n onBlur={event => commit(event.target.value)}\n /* ⚠ `spinbutton` ROLU BIR SOZ VERIR: */\n onKeyDown={event => {\n if (isReadOnly) return;\n\n const step = event.key === 'ArrowUp' ? 1 : event.key === 'ArrowDown' ? -1 : 0;\n\n if (step !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + step));\n return;\n }\n\n const page = event.key === 'PageUp' ? 10 : event.key === 'PageDown' ? -10 : 0;\n\n if (page !== 0) {\n event.preventDefault();\n setDraft(null);\n onChange(clamp(value + page));\n return;\n }\n\n if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n setDraft(null);\n onChange(event.key === 'Home' ? min : max);\n return;\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n commit((event.target as HTMLInputElement).value);\n }\n }}\n inputMode=\"numeric\"\n disabled={isDisabled}\n readOnly={isReadOnly}\n aria-readonly={isReadOnly || undefined}\n aria-required={required || undefined}\n aria-invalid={isInvalid || undefined}\n aria-describedby={describedBy}\n /* ⚠ ARALIK ETIKETE GOMULMEZ, ROLE ILE BILDIRILIR. */\n role=\"spinbutton\"\n aria-valuenow={value}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-label={groupLabel}\n />\n\n <button\n type=\"button\"\n className={styles.stepper__button}\n onClick={() => onChange(Math.min(value + 1, max))}\n disabled={isDisabled || isReadOnly || value >= max}\n aria-label={resolveLabel(\n 'QuantityStepper.increaseLabel',\n increaseLabel,\n labels?.quantity?.increase,\n )}\n >\n <PlusLg aria-hidden />\n </button>\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(QuantityStepper) as typeof QuantityStepper;\n"],"names":["QuantityStepper","value","onChange","label","decreaseLabel","increaseLabel","min","max","isDisabled","isReadOnly","size","id","required","describedBy","isInvalid","className","testId","labels","useUi","groupLabel","resolveLabel","_a","draft","setDraft","useState","clamp","next","digitCount","commit","raw","digits","jsxs","cx","styles","jsx","_b","DashLg","event","step","page","_c","PlusLg"],"mappings":"2XA6CMA,EAA6B,CAAC,CAClC,MAAAC,EACA,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,cAAAC,EACA,IAAAC,EAAM,EACN,IAAAC,EAAM,GACN,WAAAC,EACA,WAAAC,EACA,KAAAC,EAAO,KACP,GAAAC,EACA,SAAAC,EACA,mBAA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