@techsio/ui-kit 0.57.0 → 0.59.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/README.md +128 -133
- package/dist/atoms/action-icon.js +9 -8
- package/dist/atoms/button.js +114 -18
- package/dist/atoms/checkbox.js +77 -17
- package/dist/atoms/hotkeys.js +26 -7
- package/dist/atoms/icon.js +5 -5
- package/dist/atoms/image.js +118 -3
- package/dist/atoms/input.js +57 -9
- package/dist/atoms/label.js +13 -4
- package/dist/atoms/link-button.js +15 -12
- package/dist/atoms/link.js +18 -4
- package/dist/atoms/numeric-input.js +362 -84
- package/dist/atoms/rating.js +306 -73
- package/dist/atoms/skeleton.js +18 -14
- package/dist/atoms/status-text.js +31 -18
- package/dist/atoms/textarea.js +59 -12
- package/dist/atoms/tooltip.js +64 -43
- package/dist/hotkeys.js +1 -0
- package/dist/internal/choice-control.js +173 -0
- package/dist/internal/combobox-query-sync.js +11 -0
- package/dist/internal/date-picker-coordinator.js +56 -40
- package/dist/internal/date-picker-dom.js +44 -0
- package/dist/internal/date-picker-input.js +30 -0
- package/dist/internal/described-by.js +23 -18
- package/dist/internal/form-control-lifecycle.js +122 -0
- package/dist/internal/molecules/command.context.js +1 -0
- package/dist/internal/molecules/drawer.context.js +1 -0
- package/dist/internal/molecules/vertical-navigation.context.js +1 -0
- package/dist/internal/molecules/vertical-navigation.styles.js +9 -2
- package/dist/internal/numeric-input-editing.js +87 -0
- package/dist/internal/organisms/sidebar.context.js +1 -0
- package/dist/internal/organisms/sidebar.focus.js +1 -0
- package/dist/internal/overlay-portal.js +72 -0
- package/dist/internal/reduced-motion.js +1 -0
- package/dist/internal/use-effective-disabled.js +8 -0
- package/dist/molecules/accordion.js +44 -30
- package/dist/molecules/availability-status.js +1 -0
- package/dist/molecules/breadcrumb.js +11 -11
- package/dist/molecules/carousel.js +279 -97
- package/dist/molecules/cascade-select.js +327 -81
- package/dist/molecules/chart.js +427 -78
- package/dist/molecules/color-select.js +181 -62
- package/dist/molecules/combobox.js +537 -182
- package/dist/molecules/command.js +2 -1
- package/dist/molecules/date-picker.js +629 -119
- package/dist/molecules/dialog.js +89 -48
- package/dist/molecules/drawer.js +63 -6
- package/dist/molecules/file-upload.js +373 -37
- package/dist/molecules/form-checkbox.js +65 -22
- package/dist/molecules/form-error-summary.js +29 -5
- package/dist/molecules/form-input.js +26 -30
- package/dist/molecules/form-numeric-input.js +11 -9
- package/dist/molecules/form-textarea.js +26 -23
- package/dist/molecules/menu.js +170 -47
- package/dist/molecules/pagination.js +100 -28
- package/dist/molecules/phone-input.js +172 -37
- package/dist/molecules/popover.js +53 -26
- package/dist/molecules/price-block.js +1 -0
- package/dist/molecules/product-card.js +85 -23
- package/dist/molecules/quantity-field.js +4 -2
- package/dist/molecules/radio-card.js +102 -30
- package/dist/molecules/radio-group.js +108 -31
- package/dist/molecules/search-form.js +116 -13
- package/dist/molecules/select.js +226 -81
- package/dist/molecules/slider.js +141 -30
- package/dist/molecules/steps.js +181 -50
- package/dist/molecules/switch.js +86 -20
- package/dist/molecules/tabs.js +227 -31
- package/dist/molecules/toast.js +155 -53
- package/dist/molecules/totals-summary.js +2 -1
- package/dist/molecules/tour.js +9 -5
- package/dist/molecules/tree-view.js +255 -109
- package/dist/molecules/vertical-navigation.js +8 -4
- package/dist/organisms/data-table.fields.js +26 -5
- package/dist/organisms/data-table.helpers.js +6 -2
- package/dist/organisms/data-table.js +587 -154
- package/dist/organisms/footer.js +18 -11
- package/dist/organisms/gallery.js +61 -24
- package/dist/organisms/header.js +106 -32
- package/dist/organisms/line-item.js +1 -0
- package/dist/organisms/sidebar.js +1 -0
- package/dist/organisms/table.js +22 -7
- package/dist/src/atoms/action-icon.d.ts +10 -10
- package/dist/src/atoms/action-icon.d.ts.map +1 -1
- package/dist/src/atoms/badge.d.ts +3 -3
- package/dist/src/atoms/badge.d.ts.map +1 -1
- package/dist/src/atoms/button.d.ts +47 -24
- package/dist/src/atoms/button.d.ts.map +1 -1
- package/dist/src/atoms/checkbox.d.ts +6 -5
- package/dist/src/atoms/checkbox.d.ts.map +1 -1
- package/dist/src/atoms/hotkeys.d.ts +3 -2
- package/dist/src/atoms/hotkeys.d.ts.map +1 -1
- package/dist/src/atoms/icon.d.ts +18 -17
- package/dist/src/atoms/icon.d.ts.map +1 -1
- package/dist/src/atoms/image.d.ts +38 -7
- package/dist/src/atoms/image.d.ts.map +1 -1
- package/dist/src/atoms/input.d.ts +23 -14
- package/dist/src/atoms/input.d.ts.map +1 -1
- package/dist/src/atoms/label.d.ts +4 -4
- package/dist/src/atoms/label.d.ts.map +1 -1
- package/dist/src/atoms/link-button.d.ts +78 -31
- package/dist/src/atoms/link-button.d.ts.map +1 -1
- package/dist/src/atoms/link.d.ts +30 -9
- package/dist/src/atoms/link.d.ts.map +1 -1
- package/dist/src/atoms/numeric-input.d.ts +24 -19
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/atoms/rating.d.ts +54 -26
- package/dist/src/atoms/rating.d.ts.map +1 -1
- package/dist/src/atoms/skeleton.d.ts +9 -9
- package/dist/src/atoms/skeleton.d.ts.map +1 -1
- package/dist/src/atoms/status-text.d.ts +21 -13
- package/dist/src/atoms/status-text.d.ts.map +1 -1
- package/dist/src/atoms/textarea.d.ts +22 -20
- package/dist/src/atoms/textarea.d.ts.map +1 -1
- package/dist/src/atoms/tooltip.d.ts +5 -5
- package/dist/src/atoms/tooltip.d.ts.map +1 -1
- package/dist/src/hotkeys.d.ts +1 -1
- package/dist/src/hotkeys.d.ts.map +1 -1
- package/dist/src/internal/choice-control.d.ts +18 -0
- package/dist/src/internal/choice-control.d.ts.map +1 -0
- package/dist/src/internal/combobox-query-sync.d.ts +4 -0
- package/dist/src/internal/combobox-query-sync.d.ts.map +1 -0
- package/dist/src/internal/date-picker-coordinator.d.ts +7 -1
- package/dist/src/internal/date-picker-coordinator.d.ts.map +1 -1
- package/dist/src/internal/date-picker-dom.d.ts +10 -0
- package/dist/src/internal/date-picker-dom.d.ts.map +1 -0
- package/dist/src/internal/date-picker-input.d.ts +7 -0
- package/dist/src/internal/date-picker-input.d.ts.map +1 -0
- package/dist/src/internal/described-by.d.ts +7 -1
- package/dist/src/internal/described-by.d.ts.map +1 -1
- package/dist/src/internal/form-control-lifecycle.d.ts +22 -0
- package/dist/src/internal/form-control-lifecycle.d.ts.map +1 -0
- package/dist/src/internal/molecules/vertical-navigation.context.d.ts +1 -1
- package/dist/src/internal/molecules/vertical-navigation.context.d.ts.map +1 -1
- package/dist/src/internal/molecules/vertical-navigation.styles.d.ts +21 -0
- package/dist/src/internal/molecules/vertical-navigation.styles.d.ts.map +1 -1
- package/dist/src/internal/numeric-input-editing.d.ts +13 -0
- package/dist/src/internal/numeric-input-editing.d.ts.map +1 -0
- package/dist/src/internal/overlay-portal.d.ts +18 -0
- package/dist/src/internal/overlay-portal.d.ts.map +1 -0
- package/dist/src/internal/use-effective-disabled.d.ts +4 -0
- package/dist/src/internal/use-effective-disabled.d.ts.map +1 -0
- package/dist/src/molecules/accordion.d.ts +25 -19
- package/dist/src/molecules/accordion.d.ts.map +1 -1
- package/dist/src/molecules/availability-status.d.ts +4 -1
- package/dist/src/molecules/availability-status.d.ts.map +1 -1
- package/dist/src/molecules/breadcrumb.d.ts +2 -2
- package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
- package/dist/src/molecules/carousel.d.ts +51 -52
- package/dist/src/molecules/carousel.d.ts.map +1 -1
- package/dist/src/molecules/cascade-select.d.ts +23 -8
- package/dist/src/molecules/cascade-select.d.ts.map +1 -1
- package/dist/src/molecules/chart.d.ts +18 -1
- package/dist/src/molecules/chart.d.ts.map +1 -1
- package/dist/src/molecules/color-select.d.ts +19 -3
- package/dist/src/molecules/color-select.d.ts.map +1 -1
- package/dist/src/molecules/combobox.d.ts +27 -5
- package/dist/src/molecules/combobox.d.ts.map +1 -1
- package/dist/src/molecules/command.d.ts +1 -1
- package/dist/src/molecules/date-picker.d.ts +30 -4
- package/dist/src/molecules/date-picker.d.ts.map +1 -1
- package/dist/src/molecules/dialog.d.ts +17 -4
- package/dist/src/molecules/dialog.d.ts.map +1 -1
- package/dist/src/molecules/drawer.d.ts +4 -4
- package/dist/src/molecules/drawer.d.ts.map +1 -1
- package/dist/src/molecules/file-upload.d.ts +11 -6
- package/dist/src/molecules/file-upload.d.ts.map +1 -1
- package/dist/src/molecules/form-checkbox.d.ts +7 -2
- package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
- package/dist/src/molecules/form-error-summary.d.ts +4 -3
- package/dist/src/molecules/form-error-summary.d.ts.map +1 -1
- package/dist/src/molecules/form-input.d.ts +5 -6
- package/dist/src/molecules/form-input.d.ts.map +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +5 -5
- package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-textarea.d.ts +5 -6
- package/dist/src/molecules/form-textarea.d.ts.map +1 -1
- package/dist/src/molecules/menu.d.ts +17 -3
- package/dist/src/molecules/menu.d.ts.map +1 -1
- package/dist/src/molecules/pagination.d.ts +1 -1
- package/dist/src/molecules/pagination.d.ts.map +1 -1
- package/dist/src/molecules/phone-input.d.ts +4 -1
- package/dist/src/molecules/phone-input.d.ts.map +1 -1
- package/dist/src/molecules/popover.d.ts +7 -1
- package/dist/src/molecules/popover.d.ts.map +1 -1
- package/dist/src/molecules/price-block.d.ts +1 -1
- package/dist/src/molecules/price-block.d.ts.map +1 -1
- package/dist/src/molecules/product-card.d.ts +127 -27
- package/dist/src/molecules/product-card.d.ts.map +1 -1
- package/dist/src/molecules/quantity-field.d.ts +1 -1
- package/dist/src/molecules/quantity-field.d.ts.map +1 -1
- package/dist/src/molecules/radio-card.d.ts +10 -3
- package/dist/src/molecules/radio-card.d.ts.map +1 -1
- package/dist/src/molecules/radio-group.d.ts +15 -6
- package/dist/src/molecules/radio-group.d.ts.map +1 -1
- package/dist/src/molecules/search-form.d.ts +37 -12
- package/dist/src/molecules/search-form.d.ts.map +1 -1
- package/dist/src/molecules/select.d.ts +34 -29
- package/dist/src/molecules/select.d.ts.map +1 -1
- package/dist/src/molecules/slider.d.ts +23 -2
- package/dist/src/molecules/slider.d.ts.map +1 -1
- package/dist/src/molecules/steps.d.ts +30 -10
- package/dist/src/molecules/steps.d.ts.map +1 -1
- package/dist/src/molecules/switch.d.ts +54 -33
- package/dist/src/molecules/switch.d.ts.map +1 -1
- package/dist/src/molecules/tabs.d.ts +11 -11
- package/dist/src/molecules/tabs.d.ts.map +1 -1
- package/dist/src/molecules/toast.d.ts +38 -14
- package/dist/src/molecules/toast.d.ts.map +1 -1
- package/dist/src/molecules/totals-summary.d.ts +1 -1
- package/dist/src/molecules/totals-summary.d.ts.map +1 -1
- package/dist/src/molecules/tour.d.ts +1 -1
- package/dist/src/molecules/tour.d.ts.map +1 -1
- package/dist/src/molecules/tree-view.d.ts +16 -20
- package/dist/src/molecules/tree-view.d.ts.map +1 -1
- package/dist/src/molecules/vertical-navigation.d.ts +2 -2
- package/dist/src/molecules/vertical-navigation.d.ts.map +1 -1
- package/dist/src/organisms/data-table.d.ts +28 -3
- package/dist/src/organisms/data-table.d.ts.map +1 -1
- package/dist/src/organisms/data-table.fields.d.ts +4 -1
- package/dist/src/organisms/data-table.fields.d.ts.map +1 -1
- package/dist/src/organisms/data-table.helpers.d.ts +5 -12
- package/dist/src/organisms/data-table.helpers.d.ts.map +1 -1
- package/dist/src/organisms/footer.d.ts +5 -5
- package/dist/src/organisms/footer.d.ts.map +1 -1
- package/dist/src/organisms/gallery.d.ts +11 -9
- package/dist/src/organisms/gallery.d.ts.map +1 -1
- package/dist/src/organisms/header.d.ts +24 -22
- package/dist/src/organisms/header.d.ts.map +1 -1
- package/dist/src/organisms/table.d.ts +14 -14
- package/dist/src/organisms/table.d.ts.map +1 -1
- package/dist/src/templates/accordion.d.ts +8 -6
- package/dist/src/templates/accordion.d.ts.map +1 -1
- package/dist/src/templates/breadcrumb.d.ts +1 -1
- package/dist/src/templates/breadcrumb.d.ts.map +1 -1
- package/dist/src/templates/carousel.d.ts +3 -3
- package/dist/src/templates/carousel.d.ts.map +1 -1
- package/dist/src/templates/facet-filter-panel.d.ts +9 -3
- package/dist/src/templates/facet-filter-panel.d.ts.map +1 -1
- package/dist/src/templates/gallery.d.ts +2 -2
- package/dist/src/templates/gallery.d.ts.map +1 -1
- package/dist/src/templates/numeric-input.d.ts +1 -1
- package/dist/src/templates/numeric-input.d.ts.map +1 -1
- package/dist/src/templates/popover.d.ts +4 -2
- package/dist/src/templates/popover.d.ts.map +1 -1
- package/dist/src/templates/product-card.d.ts +12 -4
- package/dist/src/templates/product-card.d.ts.map +1 -1
- package/dist/src/templates/search-suggestions.d.ts +1 -1
- package/dist/src/templates/select.d.ts +7 -2
- package/dist/src/templates/select.d.ts.map +1 -1
- package/dist/src/templates/tabs.d.ts +8 -7
- package/dist/src/templates/tabs.d.ts.map +1 -1
- package/dist/src/theme/theme-config.d.ts +9 -16
- package/dist/src/theme/theme-config.d.ts.map +1 -1
- package/dist/src/theme/theme-provider.d.ts +16 -21
- package/dist/src/theme/theme-provider.d.ts.map +1 -1
- package/dist/src/theme/theme-toggle.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/templates/accordion.js +3 -1
- package/dist/templates/breadcrumb.js +11 -4
- package/dist/templates/carousel.js +3 -6
- package/dist/templates/facet-filter-panel.js +121 -52
- package/dist/templates/gallery.js +6 -2
- package/dist/templates/numeric-input.js +6 -1
- package/dist/templates/popover.js +6 -1
- package/dist/templates/product-card.js +52 -26
- package/dist/templates/select.js +6 -1
- package/dist/templates/tabs.js +4 -2
- package/dist/theme/theme-config.js +8 -16
- package/dist/theme/theme-provider.js +89 -63
- package/dist/theme/theme-toggle.js +17 -9
- package/dist/utils.js +11 -1
- package/package.json +9 -5
- package/src/tokens/_base.css +4 -3
- package/src/tokens/_business-atoms.css +96 -0
- package/src/tokens/_foundation-overrides.css +251 -0
- package/src/tokens/_reset.css +10 -10
- package/src/tokens/_scheme-scopes.css +4194 -0
- package/src/tokens/_semantic.css +1 -23
- package/src/tokens/_tokens-base.css +36 -32
- package/src/tokens/_typography.css +2 -1
- package/src/tokens/components/_form-control.css +149 -6
- package/src/tokens/components/_popup-surface.css +15 -29
- package/src/tokens/components/atoms/_action-icon.css +49 -0
- package/src/tokens/components/atoms/_button.css +77 -0
- package/src/tokens/components/atoms/_checkbox.css +47 -4
- package/src/tokens/components/atoms/_hotkeys.css +2 -0
- package/src/tokens/components/atoms/_icon.css +60 -7
- package/src/tokens/components/atoms/_image.css +18 -0
- package/src/tokens/components/atoms/_input.css +20 -0
- package/src/tokens/components/atoms/_label.css +3 -7
- package/src/tokens/components/atoms/_link.css +47 -5
- package/src/tokens/components/atoms/_numeric-input.css +121 -2
- package/src/tokens/components/atoms/_rating.css +55 -6
- package/src/tokens/components/atoms/_skeleton.css +12 -2
- package/src/tokens/components/atoms/_status-text.css +35 -5
- package/src/tokens/components/atoms/_textarea.css +32 -3
- package/src/tokens/components/atoms/_tooltip.css +25 -0
- package/src/tokens/components/molecules/_accordion.css +46 -5
- package/src/tokens/components/molecules/_breadcrumb.css +15 -4
- package/src/tokens/components/molecules/_carousel.css +67 -0
- package/src/tokens/components/molecules/_cascade-select.css +104 -0
- package/src/tokens/components/molecules/_chart.css +32 -16
- package/src/tokens/components/molecules/_color-select.css +21 -0
- package/src/tokens/components/molecules/_combobox.css +81 -0
- package/src/tokens/components/molecules/_command.css +1 -0
- package/src/tokens/components/molecules/_date-picker.css +66 -10
- package/src/tokens/components/molecules/_dialog.css +36 -4
- package/src/tokens/components/molecules/_drawer.css +39 -3
- package/src/tokens/components/molecules/_file-upload.css +16 -1
- package/src/tokens/components/molecules/_menu.css +17 -0
- package/src/tokens/components/molecules/_pagination.css +19 -0
- package/src/tokens/components/molecules/_phone-input.css +20 -5
- package/src/tokens/components/molecules/_popover.css +34 -0
- package/src/tokens/components/molecules/_product-card.css +70 -0
- package/src/tokens/components/molecules/_radio-card.css +35 -0
- package/src/tokens/components/molecules/_radio-group.css +8 -0
- package/src/tokens/components/molecules/_select.css +33 -0
- package/src/tokens/components/molecules/_slider.css +5 -0
- package/src/tokens/components/molecules/_steps.css +52 -0
- package/src/tokens/components/molecules/_switch.css +59 -10
- package/src/tokens/components/molecules/_tabs.css +61 -3
- package/src/tokens/components/molecules/_toast.css +60 -0
- package/src/tokens/components/molecules/_totals-summary.css +22 -22
- package/src/tokens/components/molecules/_tour.css +16 -1
- package/src/tokens/components/molecules/_tree-view.css +27 -3
- package/src/tokens/components/molecules/_vertical-navigation.css +21 -3
- package/src/tokens/components/organisms/_data-table.css +97 -0
- package/src/tokens/components/organisms/_footer.css +9 -0
- package/src/tokens/components/organisms/_gallery.css +11 -0
- package/src/tokens/components/organisms/_header.css +22 -0
- package/src/tokens/components/organisms/_sidebar.css +1 -1
- package/src/tokens/components/organisms/_table.css +31 -0
- package/src/tokens/components/templates/_facet-filter-panel.css +11 -1
- package/src/tokens/figma/akros/variables.css +15 -6
- package/src/tokens/figma/brand-overrides.css +171 -57
- package/src/tokens/figma/business/variables.css +15 -6
- package/src/tokens/figma/cyber/variables.css +115 -38
- package/src/tokens/figma/cyber-dark/variables.css +115 -38
- package/src/tokens/figma/dark/variables.css +13 -4
- package/src/tokens/figma/light/variables.css +62 -49
- package/src/tokens/figma/{neo → n1}/variables.css +123 -114
- package/src/tokens/figma/variables.css +658 -249
- package/src/tokens/theme.css +24 -4
- package/src/tokens/_colors.css +0 -5
- package/src/tokens/figma/neo-dark/variables.css +0 -457
|
@@ -2,19 +2,52 @@
|
|
|
2
2
|
* ProductCard — @techsio/ui-kit molecule.
|
|
3
3
|
*
|
|
4
4
|
* @component ProductCard
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.3.3
|
|
6
6
|
* @skill product-card-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
9
9
|
* Versioning is enforced at commit by scripts/check-skill-sync.mjs: @componentVersion must match
|
|
10
10
|
* the product-card-usage skill's component_version and a changelog entry. Bump all three together.
|
|
11
11
|
*/
|
|
12
|
-
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType, type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
12
|
+
import { type ComponentProps, type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType, type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
13
13
|
import type { VariantProps } from "tailwind-variants";
|
|
14
|
-
import
|
|
15
|
-
import { Image } from "../atoms/image.js";
|
|
14
|
+
import { Button as ButtonComponent } from "../atoms/button.js";
|
|
15
|
+
import { Image, type ImageProps } from "../atoms/image.js";
|
|
16
16
|
import { type RatingProps } from "../atoms/rating.js";
|
|
17
17
|
declare const productCardVariants: import("tailwind-variants").TVReturnType<{
|
|
18
|
+
presentation: {
|
|
19
|
+
default: {
|
|
20
|
+
root: string;
|
|
21
|
+
imageSlot: string;
|
|
22
|
+
nameSlot: string;
|
|
23
|
+
stockStatusSlot: string;
|
|
24
|
+
};
|
|
25
|
+
featured: {
|
|
26
|
+
root: string;
|
|
27
|
+
imageSlot: string;
|
|
28
|
+
nameSlot: string;
|
|
29
|
+
stockStatusSlot: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
shadow: {
|
|
33
|
+
true: {
|
|
34
|
+
root: string;
|
|
35
|
+
};
|
|
36
|
+
false: {
|
|
37
|
+
root: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
objectFit: {
|
|
41
|
+
cover: {
|
|
42
|
+
imageSlot: string;
|
|
43
|
+
};
|
|
44
|
+
contain: {
|
|
45
|
+
imageSlot: string;
|
|
46
|
+
};
|
|
47
|
+
fill: {
|
|
48
|
+
imageSlot: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
18
51
|
buttonVariant: {
|
|
19
52
|
cart: {
|
|
20
53
|
button: string;
|
|
@@ -48,6 +81,39 @@ declare const productCardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
48
81
|
actionsSlot: string;
|
|
49
82
|
button: string;
|
|
50
83
|
}, undefined, {
|
|
84
|
+
presentation: {
|
|
85
|
+
default: {
|
|
86
|
+
root: string;
|
|
87
|
+
imageSlot: string;
|
|
88
|
+
nameSlot: string;
|
|
89
|
+
stockStatusSlot: string;
|
|
90
|
+
};
|
|
91
|
+
featured: {
|
|
92
|
+
root: string;
|
|
93
|
+
imageSlot: string;
|
|
94
|
+
nameSlot: string;
|
|
95
|
+
stockStatusSlot: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
shadow: {
|
|
99
|
+
true: {
|
|
100
|
+
root: string;
|
|
101
|
+
};
|
|
102
|
+
false: {
|
|
103
|
+
root: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
objectFit: {
|
|
107
|
+
cover: {
|
|
108
|
+
imageSlot: string;
|
|
109
|
+
};
|
|
110
|
+
contain: {
|
|
111
|
+
imageSlot: string;
|
|
112
|
+
};
|
|
113
|
+
fill: {
|
|
114
|
+
imageSlot: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
51
117
|
buttonVariant: {
|
|
52
118
|
cart: {
|
|
53
119
|
button: string;
|
|
@@ -81,6 +147,39 @@ declare const productCardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
81
147
|
actionsSlot: string;
|
|
82
148
|
button: string;
|
|
83
149
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
150
|
+
presentation: {
|
|
151
|
+
default: {
|
|
152
|
+
root: string;
|
|
153
|
+
imageSlot: string;
|
|
154
|
+
nameSlot: string;
|
|
155
|
+
stockStatusSlot: string;
|
|
156
|
+
};
|
|
157
|
+
featured: {
|
|
158
|
+
root: string;
|
|
159
|
+
imageSlot: string;
|
|
160
|
+
nameSlot: string;
|
|
161
|
+
stockStatusSlot: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
shadow: {
|
|
165
|
+
true: {
|
|
166
|
+
root: string;
|
|
167
|
+
};
|
|
168
|
+
false: {
|
|
169
|
+
root: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
objectFit: {
|
|
173
|
+
cover: {
|
|
174
|
+
imageSlot: string;
|
|
175
|
+
};
|
|
176
|
+
contain: {
|
|
177
|
+
imageSlot: string;
|
|
178
|
+
};
|
|
179
|
+
fill: {
|
|
180
|
+
imageSlot: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
84
183
|
buttonVariant: {
|
|
85
184
|
cart: {
|
|
86
185
|
button: string;
|
|
@@ -114,54 +213,55 @@ declare const productCardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
114
213
|
actionsSlot: string;
|
|
115
214
|
button: string;
|
|
116
215
|
}>>;
|
|
117
|
-
export
|
|
216
|
+
export type ProductCardProps = HTMLAttributes<HTMLDivElement> & Omit<VariantProps<typeof productCardVariants>, "buttonVariant" | "objectFit"> & {
|
|
217
|
+
/** Preserve the default surface shadow, or disable it for flat catalogues. */
|
|
218
|
+
shadow?: boolean;
|
|
219
|
+
/** Opt-in featured composition; default retains the original component token roles. */
|
|
220
|
+
presentation?: "default" | "featured";
|
|
118
221
|
children: ReactNode;
|
|
119
222
|
ref?: Ref<HTMLDivElement>;
|
|
120
|
-
}
|
|
223
|
+
};
|
|
121
224
|
type ProductCardImageProps<T extends ElementType = typeof Image> = {
|
|
225
|
+
/** Image fitting inside the card media slot. Defaults to cover. */
|
|
226
|
+
objectFit?: "cover" | "contain" | "fill";
|
|
122
227
|
as?: T;
|
|
123
|
-
ref?: ComponentPropsWithRef<T
|
|
228
|
+
ref?: T extends typeof Image ? Ref<HTMLImageElement> : ComponentPropsWithRef<NoInfer<T>>["ref"];
|
|
124
229
|
className?: string;
|
|
125
|
-
} &
|
|
230
|
+
} & Omit<T extends typeof Image ? ImageProps : ComponentPropsWithoutRef<NoInfer<T>>, "as" | "className" | "ref">;
|
|
126
231
|
type ProductCardNameProps = HTMLAttributes<HTMLHeadingElement> & {
|
|
127
232
|
children: ReactNode;
|
|
128
233
|
/** Heading level that fits the page outline (`h3` by default). */
|
|
129
234
|
as?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
130
235
|
ref?: Ref<HTMLHeadingElement>;
|
|
131
236
|
};
|
|
132
|
-
|
|
237
|
+
type ProductCardPriceProps = HTMLAttributes<HTMLParagraphElement> & {
|
|
133
238
|
children: ReactNode;
|
|
134
239
|
ref?: Ref<HTMLParagraphElement>;
|
|
135
|
-
}
|
|
136
|
-
|
|
240
|
+
};
|
|
241
|
+
type ProductCardStockProps = HTMLAttributes<HTMLParagraphElement> & {
|
|
137
242
|
children: ReactNode;
|
|
138
243
|
status?: "in-stock" | "limited-stock" | "out-of-stock";
|
|
139
244
|
ref?: Ref<HTMLParagraphElement>;
|
|
140
|
-
}
|
|
141
|
-
|
|
245
|
+
};
|
|
246
|
+
type ProductCardBadgesProps = HTMLAttributes<HTMLDivElement> & {
|
|
142
247
|
children: ReactNode;
|
|
143
248
|
ref?: Ref<HTMLDivElement>;
|
|
144
|
-
}
|
|
145
|
-
|
|
249
|
+
};
|
|
250
|
+
type ProductCardRatingProps = HTMLAttributes<HTMLDivElement> & {
|
|
146
251
|
children?: ReactNode;
|
|
147
252
|
ref?: Ref<HTMLDivElement>;
|
|
148
253
|
rating?: RatingProps;
|
|
149
|
-
}
|
|
150
|
-
|
|
254
|
+
};
|
|
255
|
+
type ProductCardActionsProps = HTMLAttributes<HTMLDivElement> & {
|
|
151
256
|
children: ReactNode;
|
|
152
257
|
ref?: Ref<HTMLDivElement>;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
children?: ReactNode;
|
|
156
|
-
onClick?: () => void;
|
|
258
|
+
};
|
|
259
|
+
type ProductCardButtonProps = Omit<ComponentProps<typeof ButtonComponent>, "size" | "variant"> & {
|
|
157
260
|
buttonVariant?: "cart" | "detail" | "wishlist" | "custom";
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
ref?: Ref<HTMLButtonElement>;
|
|
161
|
-
}
|
|
162
|
-
export declare function ProductCard({ children, layout, className, ref, ...props }: ProductCardProps): import("react").JSX.Element;
|
|
261
|
+
};
|
|
262
|
+
export declare function ProductCard({ children, layout, presentation, shadow, className, ref, ...props }: ProductCardProps): import("react").JSX.Element;
|
|
163
263
|
export declare namespace ProductCard {
|
|
164
|
-
var _a: <T extends ElementType = typeof import("../atoms/image.js").Image>({ as, className, ref, ...props }: ProductCardImageProps<T>) => import("react").JSX.Element;
|
|
264
|
+
var _a: <T extends ElementType = typeof import("../atoms/image.js").Image>({ as, objectFit, className, ref, ...props }: ProductCardImageProps<T>) => import("react").JSX.Element;
|
|
165
265
|
export { _a as Image };
|
|
166
266
|
export var Name: ({ as: Heading, children, className, ref, ...props }: ProductCardNameProps) => import("react").JSX.Element;
|
|
167
267
|
export var Price: ({ children, className, ref, ...props }: ProductCardPriceProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../src/molecules/product-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAE1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../src/molecules/product-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAE1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,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AM,CAAA;CAAE,GACvC;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,iBAAiB,EACf,UAAU,GACV,OAAO,GACP,cAAc,GACd,UAAU,GACV,KAAK,GACL,SAAS,GACT,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,KAAK,CACR,GACC,yBAAyB,GAAG;IAC1B,KAAK,EAAE,SAAS,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,WAAW,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAA;IAC9D,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAC5B,CAAA;AAWH,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EACF,KAAK,EACL,SAAS,EACT,KAAK,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,KAAK,EACL,SAAiB,EACjB,OAAe,EACf,YAAY,EACZ,QAAgB,EAChB,QAAgB,EAChB,QAAQ,EACR,WAAW,EACX,kBAAkB,EAAE,eAAe,EACnC,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAS,EACT,IAAW,EACX,aAAa,EACb,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"quantity-field.d.ts","sourceRoot":"","sources":["../../../src/molecules/quantity-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAS,MAAM,OAAO,CAAA;AAEvD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,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v1.
|
|
5
|
+
* @componentVersion v1.1.4
|
|
6
6
|
* @skill radio-card-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
@@ -14,6 +14,7 @@ import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from "react";
|
|
|
14
14
|
import type { VariantProps } from "tailwind-variants";
|
|
15
15
|
import { Label } from "../atoms/label.js";
|
|
16
16
|
import { StatusText as StatusTextComponent } from "../atoms/status-text.js";
|
|
17
|
+
import { type DescribedBy } from "../internal/described-by.js";
|
|
17
18
|
declare const radioCardVariants: import("tailwind-variants").TVReturnType<{
|
|
18
19
|
variant: {
|
|
19
20
|
outline: {
|
|
@@ -367,6 +368,10 @@ type RadioCardAlign = NonNullable<VariantProps<typeof radioCardVariants>["align"
|
|
|
367
368
|
type RadioCardJustify = NonNullable<VariantProps<typeof radioCardVariants>["justify"]>;
|
|
368
369
|
type RadioCardValidateStatus = "default" | "error" | "success" | "warning";
|
|
369
370
|
type RadioCardContextValue = {
|
|
371
|
+
readOnly: boolean;
|
|
372
|
+
callerDescribedBy?: string;
|
|
373
|
+
errorMessageId?: string;
|
|
374
|
+
registerError: DescribedBy["registerDescription"];
|
|
370
375
|
api: ReturnType<typeof connect>;
|
|
371
376
|
variant: RadioCardVariant;
|
|
372
377
|
size: RadioCardSize;
|
|
@@ -376,10 +381,12 @@ type RadioCardContextValue = {
|
|
|
376
381
|
disabled: boolean;
|
|
377
382
|
required: boolean;
|
|
378
383
|
validateStatus: RadioCardValidateStatus;
|
|
379
|
-
};
|
|
384
|
+
} & DescribedBy;
|
|
380
385
|
declare function useRadioCardContext(): RadioCardContextValue;
|
|
381
386
|
type RadioCardMachineProps = Omit<ZagRadioGroupProps, "id" | "invalid" | "onValueChange">;
|
|
382
387
|
export type RadioCardProps = VariantProps<typeof radioCardVariants> & RadioCardMachineProps & {
|
|
388
|
+
"aria-label"?: string;
|
|
389
|
+
"aria-labelledby"?: string;
|
|
383
390
|
"aria-describedby"?: string;
|
|
384
391
|
id?: string;
|
|
385
392
|
children: ReactNode;
|
|
@@ -388,7 +395,7 @@ export type RadioCardProps = VariantProps<typeof radioCardVariants> & RadioCardM
|
|
|
388
395
|
validateStatus?: RadioCardValidateStatus;
|
|
389
396
|
onValueChange?: (value: string | null) => void;
|
|
390
397
|
};
|
|
391
|
-
export declare function RadioCard({ "aria-describedby": ariaDescribedByProp, id: providedId, disabled, required, orientation, itemOrientation, align, justify, validateStatus, onValueChange, variant, size, children, className, ref, ...machineProps }: RadioCardProps): import("react").JSX.Element;
|
|
398
|
+
export declare function RadioCard({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedByProp, id: providedId, disabled, readOnly, required, orientation, itemOrientation, align, justify, validateStatus, onValueChange, variant, size, children, className, ref, ...machineProps }: RadioCardProps): import("react").JSX.Element;
|
|
392
399
|
export declare namespace RadioCard {
|
|
393
400
|
var _a: ({ children, disabled, required, size: sizeProp, ...props }: RadioCardLabelProps) => import("react").JSX.Element;
|
|
394
401
|
export { _a as Label };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-card.d.ts","sourceRoot":"","sources":["../../../src/molecules/radio-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,OAAO,EACP,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"radio-card.d.ts","sourceRoot":"","sources":["../../../src/molecules/radio-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,OAAO,EACP,KAAK,SAAS,EAEd,KAAK,KAAK,IAAI,kBAAkB,EACjC,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACd,KAAK,GAAG,EAGT,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,g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A;AAkCD,KAAK,uBAAuB,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC/D,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAmCD,KAAK,wBAAwB,GAAG,IAAI,CAClC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,EACpD,QAAQ,GAAG,MAAM,CAClB,GAAG;IACF,MAAM,CAAC,EAAE,uBAAuB,CAAA;IAChC,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAkCD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
* RadioGroup — @techsio/ui-kit molecule.
|
|
3
3
|
*
|
|
4
4
|
* @component RadioGroup
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.1.4
|
|
6
6
|
* @skill radio-group-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
9
9
|
* Versioning is enforced at commit by scripts/check-skill-sync.mjs: @componentVersion must match
|
|
10
10
|
* the radio-group-usage skill's component_version and a changelog entry. Bump all three together.
|
|
11
11
|
*/
|
|
12
|
-
import
|
|
12
|
+
import { connect, machine, type Props as ZagRadioGroupProps, type ItemProps as ZagRadioItemProps } from "@zag-js/radio-group";
|
|
13
13
|
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from "react";
|
|
14
14
|
import type { VariantProps } from "tailwind-variants";
|
|
15
15
|
import { Label } from "../atoms/label.js";
|
|
16
16
|
import { StatusText as StatusTextComponent } from "../atoms/status-text.js";
|
|
17
17
|
import { type DescribedBy } from "../internal/described-by.js";
|
|
18
|
+
/** @internal One reset integration for both radio compositions. */
|
|
19
|
+
export declare const radioChoiceMachine: typeof machine;
|
|
18
20
|
declare const radioGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
19
21
|
variant: {
|
|
20
22
|
outline: {
|
|
@@ -191,7 +193,11 @@ type RadioGroupVariant = NonNullable<VariantProps<typeof radioGroupVariants>["va
|
|
|
191
193
|
type RadioGroupSize = NonNullable<VariantProps<typeof radioGroupVariants>["size"]>;
|
|
192
194
|
type RadioGroupValidateStatus = "default" | "error" | "success" | "warning";
|
|
193
195
|
type RadioGroupContextValue = {
|
|
194
|
-
|
|
196
|
+
readOnly: boolean;
|
|
197
|
+
callerDescribedBy?: string;
|
|
198
|
+
errorMessageId?: string;
|
|
199
|
+
registerError: DescribedBy["registerDescription"];
|
|
200
|
+
api: ReturnType<typeof connect>;
|
|
195
201
|
variant: RadioGroupVariant;
|
|
196
202
|
size: RadioGroupSize;
|
|
197
203
|
orientation: "horizontal" | "vertical";
|
|
@@ -201,8 +207,11 @@ type RadioGroupContextValue = {
|
|
|
201
207
|
statusTextId: string;
|
|
202
208
|
} & DescribedBy;
|
|
203
209
|
declare function useRadioGroupContext(): RadioGroupContextValue;
|
|
204
|
-
type RadioGroupMachineProps = Omit<
|
|
210
|
+
type RadioGroupMachineProps = Omit<ZagRadioGroupProps, "id" | "invalid" | "onValueChange">;
|
|
205
211
|
export type RadioGroupProps = VariantProps<typeof radioGroupVariants> & RadioGroupMachineProps & {
|
|
212
|
+
"aria-label"?: string;
|
|
213
|
+
"aria-labelledby"?: string;
|
|
214
|
+
"aria-describedby"?: string;
|
|
206
215
|
id?: string;
|
|
207
216
|
children: ReactNode;
|
|
208
217
|
className?: string;
|
|
@@ -210,7 +219,7 @@ export type RadioGroupProps = VariantProps<typeof radioGroupVariants> & RadioGro
|
|
|
210
219
|
validateStatus?: RadioGroupValidateStatus;
|
|
211
220
|
onValueChange?: (value: string | null) => void;
|
|
212
221
|
};
|
|
213
|
-
export declare function RadioGroup({ id: providedId, disabled, required, orientation, validateStatus, onValueChange, variant, size, children, className, ref, ...machineProps }: RadioGroupProps): import("react").JSX.Element;
|
|
222
|
+
export declare function RadioGroup({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedByProp, id: providedId, disabled, readOnly, required, orientation, validateStatus, onValueChange, variant, size, children, className, ref, ...machineProps }: RadioGroupProps): import("react").JSX.Element;
|
|
214
223
|
export declare namespace RadioGroup {
|
|
215
224
|
var _a: ({ children, disabled, required, size: sizeProp, ...props }: RadioGroupLabelProps) => import("react").JSX.Element;
|
|
216
225
|
export { _a as Label };
|
|
@@ -232,7 +241,7 @@ type RadioGroupLabelProps = Omit<ComponentPropsWithoutRef<typeof Label>, "disabl
|
|
|
232
241
|
type RadioGroupItemGroupProps = ComponentPropsWithoutRef<"div"> & {
|
|
233
242
|
ref?: Ref<HTMLDivElement>;
|
|
234
243
|
};
|
|
235
|
-
export type RadioGroupItemProps = Omit<ComponentPropsWithoutRef<"label">, "value"> &
|
|
244
|
+
export type RadioGroupItemProps = Omit<ComponentPropsWithoutRef<"label">, "value"> & ZagRadioItemProps & {
|
|
236
245
|
ref?: Ref<HTMLLabelElement>;
|
|
237
246
|
};
|
|
238
247
|
type RadioGroupItemHiddenInputProps = Omit<ComponentPropsWithoutRef<"input">, "type" | "value"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/molecules/radio-group.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/molecules/radio-group.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,OAAO,EACP,OAAO,EAEP,KAAK,KAAK,IAAI,kBAAkB,EAChC,KAAK,SAAS,IAAI,iBAAiB,EACpC,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACd,KAAK,GAAG,EAGT,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE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AAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAkBD,KAAK,uBAAuB,GAAG,wBAAwB,CAAC,MAAM,CAAC,GAAG;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;CAC3B,CAAA;AAwBD,KAAK,8BAA8B,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACtE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AA6BD,KAAK,yBAAyB,GAAG,IAAI,CACnC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,EACpD,QAAQ,GAAG,MAAM,CAClB,GAAG;IACF,MAAM,CAAC,EAAE,wBAAwB,CAAA;IACjC,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAkCD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SearchForm — @techsio/ui-kit molecule.
|
|
3
3
|
*
|
|
4
4
|
* @component SearchForm
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.1.2
|
|
6
6
|
* @skill search-form-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
@@ -16,21 +16,26 @@ import { type ButtonProps } from "../atoms/button.js";
|
|
|
16
16
|
import type { IconType } from "../atoms/icon.js";
|
|
17
17
|
import { type InputProps } from "../atoms/input.js";
|
|
18
18
|
import { type LabelProps } from "../atoms/label.js";
|
|
19
|
+
import { type StatusTextProps } from "../atoms/status-text.js";
|
|
20
|
+
import { type DescribedBy } from "../internal/described-by.js";
|
|
19
21
|
declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
|
|
20
22
|
size: {
|
|
21
23
|
sm: {
|
|
22
24
|
root: string;
|
|
23
25
|
button: string;
|
|
26
|
+
input: string;
|
|
24
27
|
clearButton: string;
|
|
25
28
|
};
|
|
26
29
|
md: {
|
|
27
30
|
root: string;
|
|
28
31
|
button: string;
|
|
32
|
+
input: string;
|
|
29
33
|
clearButton: string;
|
|
30
34
|
};
|
|
31
35
|
lg: {
|
|
32
36
|
root: string;
|
|
33
37
|
button: string;
|
|
38
|
+
input: string;
|
|
34
39
|
clearButton: string;
|
|
35
40
|
};
|
|
36
41
|
};
|
|
@@ -55,16 +60,19 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
|
|
|
55
60
|
sm: {
|
|
56
61
|
root: string;
|
|
57
62
|
button: string;
|
|
63
|
+
input: string;
|
|
58
64
|
clearButton: string;
|
|
59
65
|
};
|
|
60
66
|
md: {
|
|
61
67
|
root: string;
|
|
62
68
|
button: string;
|
|
69
|
+
input: string;
|
|
63
70
|
clearButton: string;
|
|
64
71
|
};
|
|
65
72
|
lg: {
|
|
66
73
|
root: string;
|
|
67
74
|
button: string;
|
|
75
|
+
input: string;
|
|
68
76
|
clearButton: string;
|
|
69
77
|
};
|
|
70
78
|
};
|
|
@@ -89,16 +97,19 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
|
|
|
89
97
|
sm: {
|
|
90
98
|
root: string;
|
|
91
99
|
button: string;
|
|
100
|
+
input: string;
|
|
92
101
|
clearButton: string;
|
|
93
102
|
};
|
|
94
103
|
md: {
|
|
95
104
|
root: string;
|
|
96
105
|
button: string;
|
|
106
|
+
input: string;
|
|
97
107
|
clearButton: string;
|
|
98
108
|
};
|
|
99
109
|
lg: {
|
|
100
110
|
root: string;
|
|
101
111
|
button: string;
|
|
112
|
+
input: string;
|
|
102
113
|
clearButton: string;
|
|
103
114
|
};
|
|
104
115
|
};
|
|
@@ -122,6 +133,17 @@ declare const searchFormVariants: import("tailwind-variants").TVReturnType<{
|
|
|
122
133
|
export type SearchFormSize = "sm" | "md" | "lg";
|
|
123
134
|
type SearchFormContextValue = {
|
|
124
135
|
size: SearchFormSize;
|
|
136
|
+
readOnly: boolean;
|
|
137
|
+
disabled: boolean;
|
|
138
|
+
setInputReadOnly: (value: boolean) => void;
|
|
139
|
+
setInputDisabled: (value: boolean) => void;
|
|
140
|
+
hasLabel: boolean;
|
|
141
|
+
setHasLabel: (present: boolean) => void;
|
|
142
|
+
hasButton: boolean;
|
|
143
|
+
setHasButton: (present: boolean) => void;
|
|
144
|
+
validateStatus: "default" | "error" | "warning" | "success";
|
|
145
|
+
descriptions: DescribedBy;
|
|
146
|
+
errors: DescribedBy;
|
|
125
147
|
gapped: boolean;
|
|
126
148
|
inputId: string;
|
|
127
149
|
inputValue: string;
|
|
@@ -134,14 +156,17 @@ type SearchFormContextValue = {
|
|
|
134
156
|
setHasClearButton: (present: boolean) => void;
|
|
135
157
|
};
|
|
136
158
|
declare function useSearchFormContext(): SearchFormContextValue;
|
|
137
|
-
export
|
|
159
|
+
export type SearchFormProps = VariantProps<typeof searchFormVariants> & Omit<ComponentPropsWithoutRef<"form">, "size"> & {
|
|
160
|
+
readOnly?: boolean;
|
|
161
|
+
disabled?: boolean;
|
|
162
|
+
validateStatus?: "default" | "error" | "warning" | "success";
|
|
138
163
|
children: ReactNode;
|
|
139
164
|
defaultValue?: string;
|
|
140
165
|
value?: string;
|
|
141
166
|
onValueChange?: (value: string) => void;
|
|
142
167
|
ref?: Ref<HTMLFormElement>;
|
|
143
|
-
}
|
|
144
|
-
export declare function SearchForm({ size, gapped, children, defaultValue, value, onValueChange, className, ref, onSubmit, ...props }: SearchFormProps): import("react").JSX.Element;
|
|
168
|
+
};
|
|
169
|
+
export declare function SearchForm({ size, gapped, readOnly, disabled: explicitDisabled, validateStatus, children, defaultValue, value, onValueChange, className, ref, onSubmit, ...props }: SearchFormProps): import("react").JSX.Element;
|
|
145
170
|
export declare namespace SearchForm {
|
|
146
171
|
var _a: ({ children, className, ...props }: SearchFormLabelProps) => import("react").JSX.Element;
|
|
147
172
|
export { _a as Label };
|
|
@@ -149,18 +174,18 @@ export declare namespace SearchForm {
|
|
|
149
174
|
export var Input: ({ className, placeholder, ref, ...props }: SearchFormInputProps) => import("react").JSX.Element;
|
|
150
175
|
export var Button: ({ className, children, showSearchIcon, icon, iconPosition, ...props }: SearchFormButtonProps) => import("react").JSX.Element;
|
|
151
176
|
export var ClearButton: ({ className, icon, tone, ...props }: SearchFormClearButtonProps) => import("react").ReactPortal | null;
|
|
177
|
+
export var _b: ({ status: statusProp, size: sizeProp, ...props }: StatusTextProps) => import("react").JSX.Element;
|
|
178
|
+
export { _b as StatusText };
|
|
152
179
|
export var displayName: string;
|
|
153
180
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
interface SearchFormControlProps extends ComponentPropsWithoutRef<"div"> {
|
|
181
|
+
type SearchFormLabelProps = Omit<LabelProps, "htmlFor" | "size"> & {};
|
|
182
|
+
type SearchFormControlProps = ComponentPropsWithoutRef<"div"> & {
|
|
157
183
|
ref?: Ref<HTMLDivElement>;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
interface SearchFormButtonProps extends Omit<ButtonProps, "size"> {
|
|
184
|
+
};
|
|
185
|
+
type SearchFormInputProps = Omit<InputProps, "size" | "value" | "onChange" | "withButtonInside"> & {};
|
|
186
|
+
type SearchFormButtonProps = Omit<ButtonProps, "size"> & {
|
|
162
187
|
showSearchIcon?: boolean;
|
|
163
|
-
}
|
|
188
|
+
};
|
|
164
189
|
type SearchFormClearButtonProps = Omit<ActionIconProps, "size" | "onClick" | "type" | "icon"> & {
|
|
165
190
|
icon?: IconType;
|
|
166
191
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-form.d.ts","sourceRoot":"","sources":["../../../src/molecules/search-form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACd,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"search-form.d.ts","sourceRoot":"","sources":["../../../src/molecules/search-form.tsx"],"names":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