@ogcio/design-system-react 1.11.0 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/accordion-item.d.ts +11 -0
- package/dist/accordion/accordion-item.js +76 -0
- package/dist/accordion/accordion.d.ts +10 -0
- package/dist/accordion/accordion.js +39 -0
- package/dist/accordion/accordion.test.d.ts +1 -0
- package/dist/accordion/accordion.test.js +61 -0
- package/dist/alert/alert.d.ts +89 -0
- package/dist/alert/alert.js +115 -0
- package/dist/alert/alert.test.d.ts +1 -0
- package/dist/alert/alert.test.js +45 -0
- package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.d.ts +2 -0
- package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.js +322 -0
- package/dist/assets/logos/gov-of-ireland/harp-white.d.ts +2 -0
- package/dist/assets/logos/gov-of-ireland/harp-white.js +322 -0
- package/dist/assets/logos/harp/harp-white.d.ts +2 -0
- package/dist/assets/logos/harp/harp-white.js +60 -0
- package/dist/autocomplete/autocomplete.d.ts +4 -0
- package/dist/autocomplete/autocomplete.js +252 -0
- package/dist/autocomplete/types.d.ts +61 -0
- package/dist/autocomplete/types.js +13 -0
- package/dist/blockquote/blockquote.d.ts +3 -0
- package/dist/blockquote/blockquote.js +7 -0
- package/dist/blockquote/blockquote.test.d.ts +1 -0
- package/dist/blockquote/blockquote.test.js +21 -0
- package/dist/breadcrumbs/breadcrumbs.d.ts +5 -0
- package/dist/breadcrumbs/breadcrumbs.js +38 -0
- package/dist/breadcrumbs/breadcrumbs.test.d.ts +1 -0
- package/dist/breadcrumbs/breadcrumbs.test.js +43 -0
- package/dist/breadcrumbs/types.d.ts +17 -0
- package/dist/breadcrumbs/types.js +1 -0
- package/dist/button/button.d.ts +9 -0
- package/dist/button/button.js +38 -0
- package/dist/button/button.test.d.ts +1 -0
- package/dist/button/button.test.js +78 -0
- package/dist/button/helpers.d.ts +13 -0
- package/dist/button/helpers.js +39 -0
- package/dist/button/types.d.ts +13 -0
- package/dist/button/types.js +4 -0
- package/dist/button-group/button-group.d.ts +21 -0
- package/dist/button-group/button-group.js +85 -0
- package/dist/button-group/button-group.test.d.ts +1 -0
- package/dist/button-group/button-group.test.js +2982 -0
- package/dist/card/card-legacy.d.ts +5 -0
- package/dist/card/card-legacy.js +68 -0
- package/dist/card/card-next.d.ts +13 -0
- package/dist/card/card-next.js +84 -0
- package/dist/card/card.d.ts +2 -0
- package/dist/card/card.js +26 -0
- package/dist/card/card.test.d.ts +1 -0
- package/dist/card/card.test.js +130 -0
- package/dist/card/types.d.ts +92 -0
- package/dist/card/types.js +1 -0
- package/dist/checkbox/checkbox-group.d.ts +4 -0
- package/dist/checkbox/checkbox-group.js +7 -0
- package/dist/checkbox/checkbox.d.ts +4 -0
- package/dist/checkbox/checkbox.js +7 -0
- package/dist/checkbox/types.d.ts +14 -0
- package/dist/checkbox/types.js +5 -0
- package/dist/chip/chip.d.ts +9 -0
- package/dist/chip/chip.js +37 -0
- package/dist/cn.d.ts +2 -0
- package/dist/cn.js +19 -0
- package/dist/combo-box/combo-box.content.d.ts +12 -0
- package/dist/combo-box/combo-box.content.js +685 -0
- package/dist/combo-box/combo-box.d.ts +2 -0
- package/dist/combo-box/combo-box.js +17 -0
- package/dist/combo-box/dropdown-item.d.ts +2 -0
- package/dist/combo-box/dropdown-item.js +154 -0
- package/dist/combo-box/dropdown-item.test.d.ts +1 -0
- package/dist/combo-box/dropdown-item.test.js +88 -0
- package/dist/combo-box/types.d.ts +18 -0
- package/dist/combo-box/types.js +1 -0
- package/dist/common/types.d.ts +7 -0
- package/dist/common/types.js +1 -0
- package/dist/container/container.d.ts +16 -0
- package/dist/container/container.js +37 -0
- package/dist/container/container.test.d.ts +1 -0
- package/dist/container/container.test.js +28 -0
- package/dist/cookie-banner/cookie-banner.content.d.ts +3 -0
- package/dist/cookie-banner/cookie-banner.content.js +21 -0
- package/dist/cookie-banner/cookie-banner.d.ts +12 -0
- package/dist/cookie-banner/cookie-banner.js +31 -0
- package/dist/cookie-banner/cookie-banner.test.d.ts +1 -0
- package/dist/cookie-banner/cookie-banner.test.js +20 -0
- package/dist/details/details.d.ts +4 -0
- package/dist/details/details.js +55 -0
- package/dist/details/details.test.d.ts +1 -0
- package/dist/details/details.test.js +50 -0
- package/dist/drawer/drawer.content.d.ts +3 -0
- package/dist/drawer/drawer.content.js +68 -0
- package/dist/drawer/drawer.d.ts +26 -0
- package/dist/drawer/drawer.js +48 -0
- package/dist/drawer/drawer.test.d.ts +1 -0
- package/dist/drawer/drawer.test.js +69 -0
- package/dist/error-text/error-text.d.ts +7 -0
- package/dist/error-text/error-text.js +40 -0
- package/dist/error-text/error-text.test.d.ts +1 -0
- package/dist/error-text/error-text.test.js +30 -0
- package/dist/error-text/types.d.ts +8 -0
- package/dist/error-text/types.js +1 -0
- package/dist/file-upload/file-upload.d.ts +9 -0
- package/dist/file-upload/file-upload.js +6 -0
- package/dist/footer/footer.d.ts +11 -0
- package/dist/footer/footer.js +108 -0
- package/dist/footer/footer.test.d.ts +1 -0
- package/dist/footer/footer.test.js +42 -0
- package/dist/forms/form-field-with-tag/form-field-with-tag.d.ts +24 -0
- package/dist/forms/form-field-with-tag/form-field-with-tag.js +50 -0
- package/dist/forms/form-field.d.ts +11 -0
- package/dist/forms/form-field.js +41 -0
- package/dist/forms/form.d.ts +4 -0
- package/dist/forms/form.js +5 -0
- package/dist/header/components/header-menu.d.ts +13 -0
- package/dist/header/components/header-menu.js +126 -0
- package/dist/header/components/header-search.d.ts +7 -0
- package/dist/header/components/header-search.js +59 -0
- package/dist/header/components/header-slot.d.ts +12 -0
- package/dist/header/components/header-slot.js +129 -0
- package/dist/header/header.d.ts +2 -0
- package/dist/header/header.js +201 -0
- package/dist/header/header.test.d.ts +1 -0
- package/dist/header/header.test.js +95 -0
- package/dist/header/helper.d.ts +2 -0
- package/dist/header/helper.js +79 -0
- package/dist/header/types.d.ts +76 -0
- package/dist/header/types.js +1 -0
- package/dist/heading/heading.d.ts +82 -0
- package/dist/heading/heading.js +50 -0
- package/dist/hint-text/hint-text.d.ts +7 -0
- package/dist/hint-text/hint-text.js +30 -0
- package/dist/hint-text/hint-text.test.d.ts +1 -0
- package/dist/hint-text/hint-text.test.js +31 -0
- package/dist/hint-text/types.d.ts +7 -0
- package/dist/hint-text/types.js +1 -0
- package/dist/hooks/use-breakpoint.d.ts +12 -0
- package/dist/hooks/use-breakpoint.js +24 -0
- package/dist/hooks/use-dom-id.d.ts +1 -0
- package/dist/hooks/use-dom-id.js +8 -0
- package/dist/i18n/config.d.ts +7 -0
- package/dist/i18n/config.js +13 -0
- package/dist/i18n/utility.d.ts +1 -0
- package/dist/i18n/utility.js +5 -0
- package/dist/i18next-DxWa09nx.js +1395 -0
- package/dist/icon/icon.d.ts +15 -0
- package/dist/icon/icon.js +173 -0
- package/dist/icon/icon.test.d.ts +1 -0
- package/dist/icon/icon.test.js +53 -0
- package/dist/icon/icons.d.ts +2 -0
- package/dist/icon/icons.js +144 -0
- package/dist/icon/svg.d.ts +7 -0
- package/dist/icon/svg.js +22 -0
- package/dist/icon/svgs/bluesky.d.ts +5 -0
- package/dist/icon/svgs/bluesky.js +24 -0
- package/dist/icon/svgs/facebook.d.ts +5 -0
- package/dist/icon/svgs/facebook.js +24 -0
- package/dist/icon/svgs/instagram.d.ts +5 -0
- package/dist/icon/svgs/instagram.js +24 -0
- package/dist/icon/svgs/linkedin.d.ts +5 -0
- package/dist/icon/svgs/linkedin.js +24 -0
- package/dist/icon/svgs/placeholder.d.ts +5 -0
- package/dist/icon/svgs/placeholder.js +30 -0
- package/dist/icon/svgs/threads.d.ts +5 -0
- package/dist/icon/svgs/threads.js +24 -0
- package/dist/icon/svgs/tiktok.d.ts +5 -0
- package/dist/icon/svgs/tiktok.js +24 -0
- package/dist/icon/svgs/x.d.ts +5 -0
- package/dist/icon/svgs/x.js +24 -0
- package/dist/icon/svgs/youtube.d.ts +5 -0
- package/dist/icon/svgs/youtube.js +29 -0
- package/dist/icon-button/icon-button.d.ts +10 -0
- package/dist/icon-button/icon-button.js +43 -0
- package/dist/icon-button/icon-button.test.d.ts +1 -0
- package/dist/icon-button/icon-button.test.js +56 -0
- package/dist/index-DNkhmzZp.js +2419 -0
- package/dist/index-ntYL1VRC.js +64 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +190 -0
- package/dist/input-checkbox/input-checkbox.d.ts +3 -0
- package/dist/input-checkbox/input-checkbox.js +51 -0
- package/dist/input-checkbox/types.d.ts +12 -0
- package/dist/input-checkbox/types.js +8 -0
- package/dist/input-checkbox-group/input-checkbox-group.d.ts +2 -0
- package/dist/input-checkbox-group/input-checkbox-group.js +24 -0
- package/dist/input-checkbox-group/types.d.ts +7 -0
- package/dist/input-checkbox-group/types.js +1 -0
- package/dist/input-file/input-file.d.ts +2 -0
- package/dist/input-file/input-file.js +20 -0
- package/dist/input-file/types.d.ts +1 -0
- package/dist/input-file/types.js +1 -0
- package/dist/input-password/input-password.d.ts +2 -0
- package/dist/input-password/input-password.js +30 -0
- package/dist/input-password/input-password.test.d.ts +1 -0
- package/dist/input-password/input-password.test.js +16 -0
- package/dist/input-password/types.d.ts +2 -0
- package/dist/input-password/types.js +1 -0
- package/dist/input-radio/input-radio.d.ts +3 -0
- package/dist/input-radio/input-radio.js +68 -0
- package/dist/input-radio/types.d.ts +14 -0
- package/dist/input-radio/types.js +8 -0
- package/dist/input-radio-group/input-radio-group.d.ts +3 -0
- package/dist/input-radio-group/input-radio-group.js +28 -0
- package/dist/input-radio-group/types.d.ts +5 -0
- package/dist/input-radio-group/types.js +1 -0
- package/dist/input-text/input-text.d.ts +19 -0
- package/dist/input-text/input-text.js +140 -0
- package/dist/input-text/type.d.ts +27 -0
- package/dist/input-text/type.js +1 -0
- package/dist/label/label.d.ts +11 -0
- package/dist/label/label.js +27 -0
- package/dist/label/label.test.d.ts +1 -0
- package/dist/label/label.test.js +49 -0
- package/dist/label/types.d.ts +7 -0
- package/dist/label/types.js +1 -0
- package/dist/link/link.d.ts +47 -0
- package/dist/link/link.js +104 -0
- package/dist/link/link.test.d.ts +1 -0
- package/dist/link/link.test.js +66 -0
- package/dist/list/list.d.ts +13 -0
- package/dist/list/list.js +44 -0
- package/dist/list/list.test.d.ts +1 -0
- package/dist/list/list.test.js +67 -0
- package/dist/list-item/list-item.d.ts +9 -0
- package/dist/list-item/list-item.js +19 -0
- package/dist/modal/modal.content.d.ts +2 -0
- package/dist/modal/modal.content.js +19 -0
- package/dist/modal/modal.d.ts +11 -0
- package/dist/modal/modal.js +222 -0
- package/dist/modal/modal.test.d.ts +1 -0
- package/dist/modal/modal.test.js +81 -0
- package/dist/modal/types.d.ts +39 -0
- package/dist/modal/types.js +1 -0
- package/dist/pagination/pagination.d.ts +8 -0
- package/dist/pagination/pagination.js +104 -0
- package/dist/pagination/pagination.test.d.ts +1 -0
- package/dist/pagination/pagination.test.js +95 -0
- package/dist/paragraph/paragraph.d.ts +17 -0
- package/dist/paragraph/paragraph.js +60 -0
- package/dist/paragraph/paragraph.test.d.ts +1 -0
- package/dist/paragraph/paragraph.test.js +63 -0
- package/dist/phase-banner/phase-banner.d.ts +5 -0
- package/dist/phase-banner/phase-banner.js +10 -0
- package/dist/phase-banner/phase-banner.test.d.ts +1 -0
- package/dist/phase-banner/phase-banner.test.js +27 -0
- package/dist/popover/popover.d.ts +2 -0
- package/dist/popover/popover.js +946 -0
- package/dist/popover/types.d.ts +10 -0
- package/dist/popover/types.js +1 -0
- package/dist/primitives/anchor.d.ts +7 -0
- package/dist/primitives/anchor.js +14 -0
- package/dist/primitives/anchor.test.d.ts +1 -0
- package/dist/primitives/anchor.test.js +39 -0
- package/dist/primitives/input.d.ts +3 -0
- package/dist/primitives/input.js +9 -0
- package/dist/progress-bar/progress-bar.d.ts +7 -0
- package/dist/progress-bar/progress-bar.js +40 -0
- package/dist/progress-bar/progress-bar.test.d.ts +1 -0
- package/dist/progress-bar/progress-bar.test.js +34 -0
- package/dist/progress-stepper/progress-stepper.d.ts +5 -0
- package/dist/progress-stepper/progress-stepper.js +198 -0
- package/dist/progress-stepper/progress-stepper.test.d.ts +1 -0
- package/dist/progress-stepper/progress-stepper.test.js +117 -0
- package/dist/progress-stepper/types.d.ts +49 -0
- package/dist/progress-stepper/types.js +7 -0
- package/dist/radio/radio-group.d.ts +4 -0
- package/dist/radio/radio-group.js +7 -0
- package/dist/radio/radio.d.ts +4 -0
- package/dist/radio/radio.js +7 -0
- package/dist/radio/types.d.ts +14 -0
- package/dist/radio/types.js +5 -0
- package/dist/score-select/score-select.d.ts +3 -0
- package/dist/score-select/score-select.js +124 -0
- package/dist/score-select/type.d.ts +14 -0
- package/dist/score-select/type.js +1 -0
- package/dist/section-break/section-break.d.ts +7 -0
- package/dist/section-break/section-break.js +38 -0
- package/dist/section-break/section-break.test.d.ts +1 -0
- package/dist/section-break/section-break.test.js +36 -0
- package/dist/select/select-menu.d.ts +7 -0
- package/dist/select/select-menu.js +141 -0
- package/dist/select/select-native.d.ts +5 -0
- package/dist/select/select-native.js +27 -0
- package/dist/select/select-next.d.ts +5 -0
- package/dist/select/select-next.js +162 -0
- package/dist/select/select.d.ts +5 -0
- package/dist/select/select.js +10 -0
- package/dist/select/types.d.ts +62 -0
- package/dist/select/types.js +1 -0
- package/dist/side-nav/side-nav.d.ts +6 -0
- package/dist/side-nav/side-nav.js +171 -0
- package/dist/side-nav/types.d.ts +18 -0
- package/dist/side-nav/types.js +1 -0
- package/dist/spinner/spinner.d.ts +35 -0
- package/dist/spinner/spinner.js +84 -0
- package/dist/spinner/spinner.test.d.ts +1 -0
- package/dist/spinner/spinner.test.js +11 -0
- package/dist/stack/stack.d.ts +3 -0
- package/dist/stack/stack.js +186 -0
- package/dist/stack/stack.test.d.ts +1 -0
- package/dist/stack/stack.test.js +44 -0
- package/dist/stack/types.d.ts +32 -0
- package/dist/stack/types.js +1 -0
- package/dist/styles.css +3 -0
- package/dist/summary-list/summary-list.d.ts +14 -0
- package/dist/summary-list/summary-list.js +46 -0
- package/dist/summary-list/summary-list.test.d.ts +1 -0
- package/dist/summary-list/summary-list.test.js +56 -0
- package/dist/summary-list/types.d.ts +20 -0
- package/dist/summary-list/types.js +1 -0
- package/dist/table/caption.d.ts +5 -0
- package/dist/table/caption.js +15 -0
- package/dist/table/column-group.d.ts +2 -0
- package/dist/table/column-group.js +10 -0
- package/dist/table/column.d.ts +2 -0
- package/dist/table/column.js +10 -0
- package/dist/table/table-body.d.ts +2 -0
- package/dist/table/table-body.js +10 -0
- package/dist/table/table-content.d.ts +1 -0
- package/dist/table/table-content.js +26 -0
- package/dist/table/table-data.d.ts +8 -0
- package/dist/table/table-data.js +35 -0
- package/dist/table/table-foot.d.ts +2 -0
- package/dist/table/table-foot.js +10 -0
- package/dist/table/table-head.d.ts +2 -0
- package/dist/table/table-head.js +10 -0
- package/dist/table/table-header.d.ts +8 -0
- package/dist/table/table-header.js +35 -0
- package/dist/table/table-row.d.ts +2 -0
- package/dist/table/table-row.js +10 -0
- package/dist/table/table.d.ts +25 -0
- package/dist/table/table.js +33 -0
- package/dist/table/table.test.d.ts +1 -0
- package/dist/table/table.test.js +18 -0
- package/dist/tabs/tab-item.d.ts +17 -0
- package/dist/tabs/tab-item.js +42 -0
- package/dist/tabs/tab-list.d.ts +5 -0
- package/dist/tabs/tab-list.js +62 -0
- package/dist/tabs/tab-panel.d.ts +7 -0
- package/dist/tabs/tab-panel.js +22 -0
- package/dist/tabs/tabs-content.d.ts +1 -0
- package/dist/tabs/tabs-content.js +17 -0
- package/dist/tabs/tabs.d.ts +7 -0
- package/dist/tabs/tabs.js +24 -0
- package/dist/tabs/tabs.test.d.ts +1 -0
- package/dist/tabs/tabs.test.js +44 -0
- package/dist/tag/tag.d.ts +19 -0
- package/dist/tag/tag.js +27 -0
- package/dist/tag/tag.test.d.ts +1 -0
- package/dist/tag/tag.test.js +40 -0
- package/dist/test-utilities-BS7B3BF-.js +34112 -0
- package/dist/test-utilities.d.ts +8 -0
- package/dist/test-utilities.js +87 -0
- package/dist/text-input/text-input.d.ts +23 -0
- package/dist/text-input/text-input.js +7 -0
- package/dist/textarea/textarea.d.ts +13 -0
- package/dist/textarea/textarea.js +98 -0
- package/dist/toast/ds-toast.d.ts +82 -0
- package/dist/toast/ds-toast.js +116 -0
- package/dist/toast/toast.d.ts +6 -0
- package/dist/toast/toast.js +125 -0
- package/dist/toast/toast.test.d.ts +1 -0
- package/dist/toast/toast.test.js +44 -0
- package/dist/toast/types.d.ts +24 -0
- package/dist/toast/types.js +1 -0
- package/dist/tooltip/tooltip.d.ts +10 -0
- package/dist/tooltip/tooltip.js +67 -0
- package/dist/tooltip/tooltip.test.d.ts +1 -0
- package/dist/tooltip/tooltip.test.js +85 -0
- package/dist/utilities.d.ts +9 -0
- package/dist/utilities.js +13 -0
- package/dist/utils/utilities.d.ts +24 -0
- package/dist/utils/utilities.js +20 -0
- package/dist/utils/utilities.test.d.ts +1 -0
- package/dist/utils/utilities.test.js +79 -0
- package/package.json +4 -5
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as c, Fragment as d } from "react/jsx-runtime";
|
|
3
|
+
function p(e, r) {
|
|
4
|
+
if (typeof e == "function")
|
|
5
|
+
return e(r);
|
|
6
|
+
e != null && (e.current = r);
|
|
7
|
+
}
|
|
8
|
+
function m(...e) {
|
|
9
|
+
return (r) => {
|
|
10
|
+
let n = !1;
|
|
11
|
+
const l = e.map((t) => {
|
|
12
|
+
const o = p(t, r);
|
|
13
|
+
return !n && typeof o == "function" && (n = !0), o;
|
|
14
|
+
});
|
|
15
|
+
if (n)
|
|
16
|
+
return () => {
|
|
17
|
+
for (let t = 0; t < l.length; t++) {
|
|
18
|
+
const o = l[t];
|
|
19
|
+
typeof o == "function" ? o() : p(e[t], null);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var y = i.forwardRef((e, r) => {
|
|
25
|
+
const { children: n, ...l } = e, t = i.Children.toArray(n), o = t.find(h);
|
|
26
|
+
if (o) {
|
|
27
|
+
const s = o.props.children, a = t.map((u) => u === o ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : u);
|
|
28
|
+
return /* @__PURE__ */ c(f, { ...l, ref: r, children: i.isValidElement(s) ? i.cloneElement(s, void 0, a) : null });
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ c(f, { ...l, ref: r, children: n });
|
|
31
|
+
});
|
|
32
|
+
y.displayName = "Slot";
|
|
33
|
+
var f = i.forwardRef((e, r) => {
|
|
34
|
+
const { children: n, ...l } = e;
|
|
35
|
+
if (i.isValidElement(n)) {
|
|
36
|
+
const t = R(n), o = C(l, n.props);
|
|
37
|
+
return n.type !== i.Fragment && (o.ref = r ? m(r, t) : t), i.cloneElement(n, o);
|
|
38
|
+
}
|
|
39
|
+
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
40
|
+
});
|
|
41
|
+
f.displayName = "SlotClone";
|
|
42
|
+
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
43
|
+
function h(e) {
|
|
44
|
+
return i.isValidElement(e) && e.type === g;
|
|
45
|
+
}
|
|
46
|
+
function C(e, r) {
|
|
47
|
+
const n = { ...r };
|
|
48
|
+
for (const l in r) {
|
|
49
|
+
const t = e[l], o = r[l];
|
|
50
|
+
/^on[A-Z]/.test(l) ? t && o ? n[l] = (...a) => {
|
|
51
|
+
o(...a), t(...a);
|
|
52
|
+
} : t && (n[l] = t) : l === "style" ? n[l] = { ...t, ...o } : l === "className" && (n[l] = [t, o].filter(Boolean).join(" "));
|
|
53
|
+
}
|
|
54
|
+
return { ...e, ...n };
|
|
55
|
+
}
|
|
56
|
+
function R(e) {
|
|
57
|
+
var l, t;
|
|
58
|
+
let r = (l = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : l.get, n = r && "isReactWarning" in r && r.isReactWarning;
|
|
59
|
+
return n ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
g as S,
|
|
63
|
+
y as a
|
|
64
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export { AccordionItem, type AccordionItemProps, } from './accordion/accordion-item.js';
|
|
2
|
+
export { Accordion, type AccordionProps } from './accordion/accordion.js';
|
|
3
|
+
export { Alert, type AlertProps } from './alert/alert.js';
|
|
4
|
+
export { Autocomplete, AutocompleteItem } from './autocomplete/autocomplete.js';
|
|
5
|
+
export type { AutocompleteItemProps, AutocompleteProps, } from './autocomplete/types.js';
|
|
6
|
+
export { Blockquote, type BlockquoteProps } from './blockquote/blockquote.js';
|
|
7
|
+
export { BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Breadcrumbs, } from './breadcrumbs/breadcrumbs.js';
|
|
8
|
+
export { type BreadcrumbLinkProps, type BreadcrumbProps, } from './breadcrumbs/types.js';
|
|
9
|
+
export { ButtonGroup, ButtonGroupItem } from './button-group/button-group.js';
|
|
10
|
+
export { Button } from './button/button.js';
|
|
11
|
+
export { type ButtonProps } from './button/types.js';
|
|
12
|
+
export { CardAction, CardContainer, CardDescription, CardHeader, CardMedia, CardSubtitle, CardTag, CardTitle, } from './card/card-next.js';
|
|
13
|
+
export { Card } from './card/card.js';
|
|
14
|
+
export type { CardActionProps, CardContainerProps, CardDescriptionProps, CardHeaderProps, CardMediaProps, CardProps, } from './card/types.js';
|
|
15
|
+
export { CheckboxGroup } from './checkbox/checkbox-group.js';
|
|
16
|
+
export { Checkbox } from './checkbox/checkbox.js';
|
|
17
|
+
export { type CheckboxGroupProps, type CheckboxProps, } from './checkbox/types.js';
|
|
18
|
+
export { Chip, type ChipProps } from './chip/chip.js';
|
|
19
|
+
export { Combobox } from './combo-box/combo-box.js';
|
|
20
|
+
export { DropdownItem } from './combo-box/dropdown-item.js';
|
|
21
|
+
export { type ComboboxProps, type DropdownItemProps, } from './combo-box/types.js';
|
|
22
|
+
export { Container } from './container/container.js';
|
|
23
|
+
export * from './cookie-banner/cookie-banner.js';
|
|
24
|
+
export { Details, type DetailsProps } from './details/details.js';
|
|
25
|
+
export { Drawer, DrawerBody, DrawerFooter, DrawerWrapper, } from './drawer/drawer.js';
|
|
26
|
+
export type { DrawerProps, DrawerWrapperProps } from './drawer/drawer.js';
|
|
27
|
+
export type { ErrorTextProps } from './error-text/types.js';
|
|
28
|
+
export { FileUpload, type FileUploadProps } from './file-upload/file-upload.js';
|
|
29
|
+
export { Footer, type FooterProps } from './footer/footer.js';
|
|
30
|
+
export { FormFieldWithTag, type FormFieldWithTagProps, } from './forms/form-field-with-tag/form-field-with-tag.js';
|
|
31
|
+
export { FormField, type FormFieldProps } from './forms/form-field.js';
|
|
32
|
+
export { Form } from './forms/form.js';
|
|
33
|
+
export { HeaderSearch, type HeaderSearchProps, } from './header/components/header-search.js';
|
|
34
|
+
export { Header } from './header/header.js';
|
|
35
|
+
export type { HeaderItem, HeaderProps } from './header/types.js';
|
|
36
|
+
export { Heading, type HeadingProps } from './heading/heading.js';
|
|
37
|
+
export type { HintTextProps } from './hint-text/types.js';
|
|
38
|
+
export * from './i18n/config.js';
|
|
39
|
+
export { IconButton, type IconButtonProps } from './icon-button/icon-button.js';
|
|
40
|
+
export { Icon, type IconProps } from './icon/icon.js';
|
|
41
|
+
export { Icons } from './icon/icons.js';
|
|
42
|
+
export { InputCheckboxGroup } from './input-checkbox-group/input-checkbox-group.js';
|
|
43
|
+
export type { InputCheckboxGroupProps } from './input-checkbox-group/types.js';
|
|
44
|
+
export { InputCheckbox } from './input-checkbox/input-checkbox.js';
|
|
45
|
+
export { InputCheckboxSizeEnum, type InputCheckboxProps, type InputCheckboxSizeEnumType, } from './input-checkbox/types.js';
|
|
46
|
+
export { InputFile } from './input-file/input-file.js';
|
|
47
|
+
export type { InputFileProps } from './input-file/types.js';
|
|
48
|
+
export { InputPassword } from './input-password/input-password.js';
|
|
49
|
+
export { InputRadioGroup } from './input-radio-group/input-radio-group.js';
|
|
50
|
+
export type { InputRadioGroupProps } from './input-radio-group/types.js';
|
|
51
|
+
export { InputRadio } from './input-radio/input-radio.js';
|
|
52
|
+
export { InputRadioSizeEnum, type InputRadioProps, type InputRadioSizeType, } from './input-radio/types.js';
|
|
53
|
+
export { InputText } from './input-text/input-text.js';
|
|
54
|
+
export type { InputActionButtonProps, InputTextProps, } from './input-text/type.js';
|
|
55
|
+
export type { LabelTextProps } from './label/types.js';
|
|
56
|
+
export { Link, type LinkProps } from './link/link.js';
|
|
57
|
+
export { ListItem, type ListItemProps } from './list-item/list-item.js';
|
|
58
|
+
export { List, type ListProps } from './list/list.js';
|
|
59
|
+
export { Modal, ModalBody, ModalFooter, ModalTitle, ModalWrapper, } from './modal/modal.js';
|
|
60
|
+
export type * from './modal/types.js';
|
|
61
|
+
export { Pagination, type PaginationProps } from './pagination/pagination.js';
|
|
62
|
+
export { Paragraph, type ParagraphProps } from './paragraph/paragraph.js';
|
|
63
|
+
export { PhaseBanner, type PhaseBannerProps, } from './phase-banner/phase-banner.js';
|
|
64
|
+
export { Popover } from './popover/popover.js';
|
|
65
|
+
export type { PopoverProps } from './popover/types.js';
|
|
66
|
+
export { ProgressBar, type ProgressBarProps, } from './progress-bar/progress-bar.js';
|
|
67
|
+
export * from './progress-stepper/progress-stepper.js';
|
|
68
|
+
export { RadioGroup } from './radio/radio-group.js';
|
|
69
|
+
export { Radio } from './radio/radio.js';
|
|
70
|
+
export type { RadioGroupProps, RadioProps } from './radio/types.js';
|
|
71
|
+
export { ScoreSelect } from './score-select/score-select.js';
|
|
72
|
+
export type { ScoreSelectProps } from './score-select/type.js';
|
|
73
|
+
export { SectionBreak, type SectionBreakProps, } from './section-break/section-break.js';
|
|
74
|
+
export { Select, SelectGroupItem, SelectItem } from './select/select.js';
|
|
75
|
+
export type { SelectGroupItemProps, SelectMenuOptionProps, SelectMenuProps, SelectNextGroupProps, SelectNextOptionProps, SelectNextProps, } from './select/types.js';
|
|
76
|
+
export { SideNav, SideNavItem } from './side-nav/side-nav.js';
|
|
77
|
+
export type { SideNavItemProps, SideNavProps } from './side-nav/types.js';
|
|
78
|
+
export { Spinner, type SpinnerProps } from './spinner/spinner.js';
|
|
79
|
+
export { Stack } from './stack/stack.js';
|
|
80
|
+
export { type StackProps } from './stack/types.js';
|
|
81
|
+
export { SummaryList, SummaryListAction, SummaryListRow, SummaryListValue, } from './summary-list/summary-list.js';
|
|
82
|
+
export type { SummaryListActionProps, SummaryListProps, SummaryListRowProps, SummaryListValueProps, } from './summary-list/types.js';
|
|
83
|
+
export { Caption, type CaptionProps } from './table/caption.js';
|
|
84
|
+
export { ColumnGroup } from './table/column-group.js';
|
|
85
|
+
export { Column } from './table/column.js';
|
|
86
|
+
export { TableBody } from './table/table-body.js';
|
|
87
|
+
export { TableData } from './table/table-data.js';
|
|
88
|
+
export { TableFoot } from './table/table-foot.js';
|
|
89
|
+
export { TableHead } from './table/table-head.js';
|
|
90
|
+
export { TableHeader } from './table/table-header.js';
|
|
91
|
+
export { TableRow } from './table/table-row.js';
|
|
92
|
+
export { Table, type TableProps } from './table/table.js';
|
|
93
|
+
export { TabItem, type TabItemProps } from './tabs/tab-item.js';
|
|
94
|
+
export { TabList } from './tabs/tab-list.js';
|
|
95
|
+
export { TabPanel } from './tabs/tab-panel.js';
|
|
96
|
+
export { Tabs, type TabsProps } from './tabs/tabs.js';
|
|
97
|
+
export { Tag, TagTypeEnum, type TagProps, type TagType } from './tag/tag.js';
|
|
98
|
+
export { TextInput, type TextInputProps } from './text-input/text-input.js';
|
|
99
|
+
export { TextArea, type TextAreaProps } from './textarea/textarea.js';
|
|
100
|
+
export { toaster, ToastProvider } from './toast/toast.js';
|
|
101
|
+
export type { ToastHorizontalPosition, ToastPosition, ToastProps, ToastVariant, ToastVerticalPosition, } from './toast/types.js';
|
|
102
|
+
export { Tooltip, type TooltipProps } from './tooltip/tooltip.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { AccordionItem as e } from "./accordion/accordion-item.js";
|
|
2
|
+
import { Accordion as p } from "./accordion/accordion.js";
|
|
3
|
+
import { Alert as x } from "./alert/alert.js";
|
|
4
|
+
import { Autocomplete as f, AutocompleteItem as i } from "./autocomplete/autocomplete.js";
|
|
5
|
+
import { Blockquote as d } from "./blockquote/blockquote.js";
|
|
6
|
+
import { BreadcrumbCurrentLink as l, BreadcrumbEllipsis as c, BreadcrumbLink as s, Breadcrumbs as I } from "./breadcrumbs/breadcrumbs.js";
|
|
7
|
+
import { ButtonGroup as C, ButtonGroupItem as T } from "./button-group/button-group.js";
|
|
8
|
+
import { Button as B } from "./button/button.js";
|
|
9
|
+
import { CardAction as F, CardContainer as h, CardDescription as L, CardHeader as g, CardMedia as P, CardSubtitle as w, CardTag as y, CardTitle as A } from "./card/card-next.js";
|
|
10
|
+
import { Card as G } from "./card/card.js";
|
|
11
|
+
import { CheckboxGroup as H } from "./checkbox/checkbox-group.js";
|
|
12
|
+
import { Checkbox as v } from "./checkbox/checkbox.js";
|
|
13
|
+
import { Chip as W } from "./chip/chip.js";
|
|
14
|
+
import { Combobox as N } from "./combo-box/combo-box.js";
|
|
15
|
+
import { DropdownItem as U } from "./combo-box/dropdown-item.js";
|
|
16
|
+
import { Container as j } from "./container/container.js";
|
|
17
|
+
import { CookieBanner as K } from "./cookie-banner/cookie-banner.js";
|
|
18
|
+
import { Details as Q } from "./details/details.js";
|
|
19
|
+
import { Drawer as Y, DrawerBody as Z, DrawerFooter as _, DrawerWrapper as $ } from "./drawer/drawer.js";
|
|
20
|
+
import { FileUpload as ro } from "./file-upload/file-upload.js";
|
|
21
|
+
import { Footer as to } from "./footer/footer.js";
|
|
22
|
+
import { FormFieldWithTag as mo } from "./forms/form-field-with-tag/form-field-with-tag.js";
|
|
23
|
+
import { FormField as ao } from "./forms/form-field.js";
|
|
24
|
+
import { Form as io } from "./forms/form.js";
|
|
25
|
+
import { HeaderSearch as uo } from "./header/components/header-search.js";
|
|
26
|
+
import { Header as co } from "./header/header.js";
|
|
27
|
+
import { Heading as Io } from "./heading/heading.js";
|
|
28
|
+
import { initI18n as Co } from "./i18n/config.js";
|
|
29
|
+
import { IconButton as So } from "./icon-button/icon-button.js";
|
|
30
|
+
import { Icon as ko } from "./icon/icon.js";
|
|
31
|
+
import { Icons as ho } from "./icon/icons.js";
|
|
32
|
+
import { InputCheckboxGroup as go } from "./input-checkbox-group/input-checkbox-group.js";
|
|
33
|
+
import { InputCheckbox as wo } from "./input-checkbox/input-checkbox.js";
|
|
34
|
+
import { InputCheckboxSizeEnum as Ao } from "./input-checkbox/types.js";
|
|
35
|
+
import { InputFile as Go } from "./input-file/input-file.js";
|
|
36
|
+
import { InputPassword as Ho } from "./input-password/input-password.js";
|
|
37
|
+
import { InputRadioGroup as vo } from "./input-radio-group/input-radio-group.js";
|
|
38
|
+
import { InputRadio as Wo } from "./input-radio/input-radio.js";
|
|
39
|
+
import { InputRadioSizeEnum as No } from "./input-radio/types.js";
|
|
40
|
+
import { InputText as Uo } from "./input-text/input-text.js";
|
|
41
|
+
import { Link as jo } from "./link/link.js";
|
|
42
|
+
import { ListItem as Ko } from "./list-item/list-item.js";
|
|
43
|
+
import { List as Qo } from "./list/list.js";
|
|
44
|
+
import { Modal as Yo, ModalBody as Zo, ModalFooter as _o, ModalTitle as $o, ModalWrapper as or } from "./modal/modal.js";
|
|
45
|
+
import { Pagination as er } from "./pagination/pagination.js";
|
|
46
|
+
import { Paragraph as pr } from "./paragraph/paragraph.js";
|
|
47
|
+
import { PhaseBanner as xr } from "./phase-banner/phase-banner.js";
|
|
48
|
+
import { Popover as fr } from "./popover/popover.js";
|
|
49
|
+
import { ProgressBar as nr } from "./progress-bar/progress-bar.js";
|
|
50
|
+
import { ProgressStepper as ur, Step as lr, StepItem as cr } from "./progress-stepper/progress-stepper.js";
|
|
51
|
+
import { RadioGroup as Ir } from "./radio/radio-group.js";
|
|
52
|
+
import { Radio as Cr } from "./radio/radio.js";
|
|
53
|
+
import { ScoreSelect as Sr } from "./score-select/score-select.js";
|
|
54
|
+
import { SectionBreak as kr } from "./section-break/section-break.js";
|
|
55
|
+
import { Select as hr } from "./select/select.js";
|
|
56
|
+
import { SideNav as gr, SideNavItem as Pr } from "./side-nav/side-nav.js";
|
|
57
|
+
import { Spinner as yr } from "./spinner/spinner.js";
|
|
58
|
+
import { Stack as Dr } from "./stack/stack.js";
|
|
59
|
+
import { SummaryList as Rr, SummaryListAction as Hr, SummaryListRow as Mr, SummaryListValue as vr } from "./summary-list/summary-list.js";
|
|
60
|
+
import { Caption as Wr } from "./table/caption.js";
|
|
61
|
+
import { ColumnGroup as Nr } from "./table/column-group.js";
|
|
62
|
+
import { Column as Ur } from "./table/column.js";
|
|
63
|
+
import { TableBody as jr } from "./table/table-body.js";
|
|
64
|
+
import { TableData as Kr } from "./table/table-data.js";
|
|
65
|
+
import { TableFoot as Qr } from "./table/table-foot.js";
|
|
66
|
+
import { TableHead as Yr } from "./table/table-head.js";
|
|
67
|
+
import { TableHeader as _r } from "./table/table-header.js";
|
|
68
|
+
import { TableRow as oe } from "./table/table-row.js";
|
|
69
|
+
import { Table as ee } from "./table/table.js";
|
|
70
|
+
import { TabItem as pe } from "./tabs/tab-item.js";
|
|
71
|
+
import { TabList as xe } from "./tabs/tab-list.js";
|
|
72
|
+
import { TabPanel as fe } from "./tabs/tab-panel.js";
|
|
73
|
+
import { Tabs as ne } from "./tabs/tabs.js";
|
|
74
|
+
import { Tag as ue, TagTypeEnum as le } from "./tag/tag.js";
|
|
75
|
+
import { TextInput as se } from "./text-input/text-input.js";
|
|
76
|
+
import { TextArea as be } from "./textarea/textarea.js";
|
|
77
|
+
import { ToastProvider as Te, toaster as Se } from "./toast/toast.js";
|
|
78
|
+
import { Tooltip as ke } from "./tooltip/tooltip.js";
|
|
79
|
+
import { SelectGroupItem as he, SelectItem as Le } from "./select/select-native.js";
|
|
80
|
+
import { i as Pe } from "./i18next-DxWa09nx.js";
|
|
81
|
+
export {
|
|
82
|
+
p as Accordion,
|
|
83
|
+
e as AccordionItem,
|
|
84
|
+
x as Alert,
|
|
85
|
+
f as Autocomplete,
|
|
86
|
+
i as AutocompleteItem,
|
|
87
|
+
d as Blockquote,
|
|
88
|
+
l as BreadcrumbCurrentLink,
|
|
89
|
+
c as BreadcrumbEllipsis,
|
|
90
|
+
s as BreadcrumbLink,
|
|
91
|
+
I as Breadcrumbs,
|
|
92
|
+
B as Button,
|
|
93
|
+
C as ButtonGroup,
|
|
94
|
+
T as ButtonGroupItem,
|
|
95
|
+
Wr as Caption,
|
|
96
|
+
G as Card,
|
|
97
|
+
F as CardAction,
|
|
98
|
+
h as CardContainer,
|
|
99
|
+
L as CardDescription,
|
|
100
|
+
g as CardHeader,
|
|
101
|
+
P as CardMedia,
|
|
102
|
+
w as CardSubtitle,
|
|
103
|
+
y as CardTag,
|
|
104
|
+
A as CardTitle,
|
|
105
|
+
v as Checkbox,
|
|
106
|
+
H as CheckboxGroup,
|
|
107
|
+
W as Chip,
|
|
108
|
+
Ur as Column,
|
|
109
|
+
Nr as ColumnGroup,
|
|
110
|
+
N as Combobox,
|
|
111
|
+
j as Container,
|
|
112
|
+
K as CookieBanner,
|
|
113
|
+
Q as Details,
|
|
114
|
+
Y as Drawer,
|
|
115
|
+
Z as DrawerBody,
|
|
116
|
+
_ as DrawerFooter,
|
|
117
|
+
$ as DrawerWrapper,
|
|
118
|
+
U as DropdownItem,
|
|
119
|
+
ro as FileUpload,
|
|
120
|
+
to as Footer,
|
|
121
|
+
io as Form,
|
|
122
|
+
ao as FormField,
|
|
123
|
+
mo as FormFieldWithTag,
|
|
124
|
+
co as Header,
|
|
125
|
+
uo as HeaderSearch,
|
|
126
|
+
Io as Heading,
|
|
127
|
+
ko as Icon,
|
|
128
|
+
So as IconButton,
|
|
129
|
+
ho as Icons,
|
|
130
|
+
wo as InputCheckbox,
|
|
131
|
+
go as InputCheckboxGroup,
|
|
132
|
+
Ao as InputCheckboxSizeEnum,
|
|
133
|
+
Go as InputFile,
|
|
134
|
+
Ho as InputPassword,
|
|
135
|
+
Wo as InputRadio,
|
|
136
|
+
vo as InputRadioGroup,
|
|
137
|
+
No as InputRadioSizeEnum,
|
|
138
|
+
Uo as InputText,
|
|
139
|
+
jo as Link,
|
|
140
|
+
Qo as List,
|
|
141
|
+
Ko as ListItem,
|
|
142
|
+
Yo as Modal,
|
|
143
|
+
Zo as ModalBody,
|
|
144
|
+
_o as ModalFooter,
|
|
145
|
+
$o as ModalTitle,
|
|
146
|
+
or as ModalWrapper,
|
|
147
|
+
er as Pagination,
|
|
148
|
+
pr as Paragraph,
|
|
149
|
+
xr as PhaseBanner,
|
|
150
|
+
fr as Popover,
|
|
151
|
+
nr as ProgressBar,
|
|
152
|
+
ur as ProgressStepper,
|
|
153
|
+
Cr as Radio,
|
|
154
|
+
Ir as RadioGroup,
|
|
155
|
+
Sr as ScoreSelect,
|
|
156
|
+
kr as SectionBreak,
|
|
157
|
+
hr as Select,
|
|
158
|
+
he as SelectGroupItem,
|
|
159
|
+
Le as SelectItem,
|
|
160
|
+
gr as SideNav,
|
|
161
|
+
Pr as SideNavItem,
|
|
162
|
+
yr as Spinner,
|
|
163
|
+
Dr as Stack,
|
|
164
|
+
lr as Step,
|
|
165
|
+
cr as StepItem,
|
|
166
|
+
Rr as SummaryList,
|
|
167
|
+
Hr as SummaryListAction,
|
|
168
|
+
Mr as SummaryListRow,
|
|
169
|
+
vr as SummaryListValue,
|
|
170
|
+
pe as TabItem,
|
|
171
|
+
xe as TabList,
|
|
172
|
+
fe as TabPanel,
|
|
173
|
+
ee as Table,
|
|
174
|
+
jr as TableBody,
|
|
175
|
+
Kr as TableData,
|
|
176
|
+
Qr as TableFoot,
|
|
177
|
+
Yr as TableHead,
|
|
178
|
+
_r as TableHeader,
|
|
179
|
+
oe as TableRow,
|
|
180
|
+
ne as Tabs,
|
|
181
|
+
ue as Tag,
|
|
182
|
+
le as TagTypeEnum,
|
|
183
|
+
be as TextArea,
|
|
184
|
+
se as TextInput,
|
|
185
|
+
Te as ToastProvider,
|
|
186
|
+
ke as Tooltip,
|
|
187
|
+
Pe as i18next,
|
|
188
|
+
Co as initI18n,
|
|
189
|
+
Se as toaster
|
|
190
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as r, Fragment as m, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { useId as s } from "react";
|
|
4
|
+
import { HintText as d } from "../hint-text/hint-text.js";
|
|
5
|
+
import { Input as h } from "../primitives/input.js";
|
|
6
|
+
import { InputCheckboxSizeEnum as n } from "./types.js";
|
|
7
|
+
const u = (e) => {
|
|
8
|
+
switch (e) {
|
|
9
|
+
case n.Large:
|
|
10
|
+
return "gi-input-checkbox-large";
|
|
11
|
+
case n.Small:
|
|
12
|
+
return "gi-input-checkbox-small";
|
|
13
|
+
default:
|
|
14
|
+
return "gi-input-checkbox-medium";
|
|
15
|
+
}
|
|
16
|
+
}, p = (e) => {
|
|
17
|
+
let i = "gi-w-8";
|
|
18
|
+
return e === n.Large && (i = "gi-w-11"), e === n.Small && (i = "gi-w-6"), i;
|
|
19
|
+
}, x = ({
|
|
20
|
+
id: e,
|
|
21
|
+
size: i = n.Medium,
|
|
22
|
+
label: l,
|
|
23
|
+
hint: a,
|
|
24
|
+
...o
|
|
25
|
+
}) => {
|
|
26
|
+
const t = e || s();
|
|
27
|
+
return /* @__PURE__ */ r(m, { children: [
|
|
28
|
+
/* @__PURE__ */ r("div", { className: "gi-input-checkbox-container", children: [
|
|
29
|
+
/* @__PURE__ */ c(
|
|
30
|
+
h,
|
|
31
|
+
{
|
|
32
|
+
type: "checkbox",
|
|
33
|
+
id: t,
|
|
34
|
+
className: u(i),
|
|
35
|
+
"aria-labelledby": l ? `${t}-label` : void 0,
|
|
36
|
+
...o
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ c("label", { id: `${t}-label`, htmlFor: t, children: l })
|
|
40
|
+
] }),
|
|
41
|
+
a && /* @__PURE__ */ r("div", { className: "gi-input-checkbox-hint-container", children: [
|
|
42
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("div", { className: p(i) }) }),
|
|
43
|
+
/* @__PURE__ */ c(d, { id: `${t}-hint`, text: a })
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
x.displayName = "InputCheckbox";
|
|
48
|
+
export {
|
|
49
|
+
x as InputCheckbox,
|
|
50
|
+
p as getCheckboxWidth
|
|
51
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export declare const InputCheckboxSizeEnum: {
|
|
3
|
+
readonly Large: "lg";
|
|
4
|
+
readonly Medium: "md";
|
|
5
|
+
readonly Small: "sm";
|
|
6
|
+
};
|
|
7
|
+
export type InputCheckboxSizeEnumType = (typeof InputCheckboxSizeEnum)[keyof typeof InputCheckboxSizeEnum];
|
|
8
|
+
export type InputCheckboxProps = {
|
|
9
|
+
size?: InputCheckboxSizeEnumType;
|
|
10
|
+
label?: string;
|
|
11
|
+
hint?: string;
|
|
12
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { useState as h, Children as g, isValidElement as m, cloneElement as f } from "react";
|
|
4
|
+
const V = ({ size: r, groupId: c, inline: o, onChange: n, children: p }) => {
|
|
5
|
+
const [i, l] = h([]), u = (e) => {
|
|
6
|
+
let t = [];
|
|
7
|
+
t = i.includes(e) ? i.filter((d) => d !== e) : [...i, e], l(t), n == null || n(t);
|
|
8
|
+
}, a = g.map(p, (e) => m(e) ? f(e, {
|
|
9
|
+
onChange: () => u(e.props.value),
|
|
10
|
+
checked: i.includes(e.props.value),
|
|
11
|
+
size: r,
|
|
12
|
+
name: c
|
|
13
|
+
}) : e);
|
|
14
|
+
return /* @__PURE__ */ s("div", { className: "gi-input-group-container", children: /* @__PURE__ */ s("div", { className: "gi-input-group-options-container", children: /* @__PURE__ */ s(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: o ? "gi-input-group-options-inline" : "gi-input-group-options-stacked",
|
|
18
|
+
children: a
|
|
19
|
+
}
|
|
20
|
+
) }) });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
V as InputCheckboxGroup
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { cn as m } from "../cn.js";
|
|
4
|
+
import { Input as o } from "../primitives/input.js";
|
|
5
|
+
const f = e(
|
|
6
|
+
({ className: t, ...i }, p) => /* @__PURE__ */ r(
|
|
7
|
+
o,
|
|
8
|
+
{
|
|
9
|
+
...i,
|
|
10
|
+
className: m(t, "gi-input-file"),
|
|
11
|
+
type: "file",
|
|
12
|
+
multiple: !0,
|
|
13
|
+
ref: p
|
|
14
|
+
}
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
f.displayName = "InputFile";
|
|
18
|
+
export {
|
|
19
|
+
f as InputFile
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type InputFileProps = React.InputHTMLAttributes<Omit<HTMLInputElement, 'type'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { useState as e } from "react";
|
|
4
|
+
import { InputText as r } from "../input-text/input-text.js";
|
|
5
|
+
const y = (o) => {
|
|
6
|
+
const [t, s] = e({
|
|
7
|
+
icon: "visibility",
|
|
8
|
+
type: "password"
|
|
9
|
+
}), n = () => {
|
|
10
|
+
const i = t.type === "text";
|
|
11
|
+
s({
|
|
12
|
+
type: i ? "password" : "text",
|
|
13
|
+
icon: i ? "visibility" : "visibility_off"
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ p(
|
|
17
|
+
r,
|
|
18
|
+
{
|
|
19
|
+
...o,
|
|
20
|
+
type: t.type,
|
|
21
|
+
inputActionButton: {
|
|
22
|
+
icon: t.icon,
|
|
23
|
+
onClick: n
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
y as InputPassword
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as a, f as n, r as i } from "../test-utilities-BS7B3BF-.js";
|
|
3
|
+
import { InputPassword as c } from "./input-password.js";
|
|
4
|
+
describe("InputPassword", () => {
|
|
5
|
+
afterEach(a);
|
|
6
|
+
const o = (t = {}) => i(/* @__PURE__ */ r(c, { "aria-label": "Password Input", ...t }));
|
|
7
|
+
it("should render a password input with a visibility toggle button", () => {
|
|
8
|
+
const t = o(), e = t.getByLabelText("Password Input"), s = t.getByRole("button");
|
|
9
|
+
expect(e).toBeTruthy(), expect(e).toHaveAttribute("type", "password"), expect(s).toBeTruthy();
|
|
10
|
+
}), it("should toggle input type between password and text when clicking the visibility button", () => {
|
|
11
|
+
const t = o(), e = t.getByLabelText("Password Input"), s = t.getByRole("button");
|
|
12
|
+
n.click(s), expect(e).toHaveAttribute("type", "text"), n.click(s), expect(e).toHaveAttribute("type", "password");
|
|
13
|
+
}), it("should pass axe accessibility tests", async () => {
|
|
14
|
+
await o().axe();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, Fragment as c, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
import { useId as p } from "react";
|
|
4
|
+
import { cn as n } from "../cn.js";
|
|
5
|
+
import { HintText as u } from "../hint-text/hint-text.js";
|
|
6
|
+
import { InputText as f } from "../input-text/input-text.js";
|
|
7
|
+
import { Label as h } from "../label/label.js";
|
|
8
|
+
import { Input as x } from "../primitives/input.js";
|
|
9
|
+
import { InputRadioSizeEnum as d } from "./types.js";
|
|
10
|
+
const v = (r) => {
|
|
11
|
+
let i = "gi-input-radio-medium";
|
|
12
|
+
return r === d.Large && (i = "gi-input-radio-large"), r === d.Small && (i = "gi-input-radio-small"), i;
|
|
13
|
+
}, y = (r) => {
|
|
14
|
+
let i = "gi-w-8";
|
|
15
|
+
return r === d.Large && (i = "gi-w-11"), r === d.Small && (i = "gi-w-6"), i;
|
|
16
|
+
}, C = ({
|
|
17
|
+
label: r,
|
|
18
|
+
hint: i,
|
|
19
|
+
id: s,
|
|
20
|
+
size: t = "md",
|
|
21
|
+
conditionalInput: a,
|
|
22
|
+
checked: l,
|
|
23
|
+
...g
|
|
24
|
+
}) => {
|
|
25
|
+
const m = s ?? p();
|
|
26
|
+
return /* @__PURE__ */ e(c, { children: /* @__PURE__ */ o("div", { className: "gi-input-radio-container", children: [
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
x,
|
|
29
|
+
{
|
|
30
|
+
type: "radio",
|
|
31
|
+
id: m,
|
|
32
|
+
checked: l,
|
|
33
|
+
className: v(t),
|
|
34
|
+
"aria-describedby": i ? `${m}-hint` : void 0,
|
|
35
|
+
"aria-required": a ? "true" : "false",
|
|
36
|
+
...g
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ o(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: n({
|
|
43
|
+
"gi-mt-1": t === "md",
|
|
44
|
+
"gi-mt-2": t === "lg"
|
|
45
|
+
}),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ e(h, { htmlFor: m, text: r || "", size: t }),
|
|
48
|
+
(i || a) && /* @__PURE__ */ e("div", { className: "gi-radio-conditional-divider-container", children: /* @__PURE__ */ o("div", { children: [
|
|
49
|
+
i && /* @__PURE__ */ e(u, { text: i, size: t }),
|
|
50
|
+
a && /* @__PURE__ */ e(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: n("gi-mt-3", {
|
|
54
|
+
"gi-hidden": !l
|
|
55
|
+
}),
|
|
56
|
+
children: /* @__PURE__ */ e(f, { ...a })
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }) })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] }) });
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
C as InputRadio,
|
|
67
|
+
y as getRadioWidth
|
|
68
|
+
};
|