prime-ui-kit 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/examples/02-settings-panels.d.ts.map +1 -1
- package/dist/components/accordion/examples/04-api-docs-sections.d.ts.map +1 -1
- package/dist/components/accordion/examples/05-knowledge-base-categories.d.ts.map +1 -1
- package/dist/components/avatar/examples/app-header-nav.d.ts.map +1 -1
- package/dist/components/avatar/examples/src-from-state.d.ts.map +1 -1
- package/dist/components/banner/examples/cookie-consent-row.d.ts.map +1 -1
- package/dist/components/banner/examples/feature-promo.d.ts.map +1 -1
- package/dist/components/checkbox/examples/bulk-select-rows.d.ts.map +1 -1
- package/dist/components/checkbox/examples/empty-label-form.d.ts.map +1 -1
- package/dist/components/checkbox/examples/feature-flags-list.d.ts.map +1 -1
- package/dist/components/checkbox/examples/settings-panel.d.ts.map +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts.map +1 -1
- package/dist/components/color-picker/ColorPickerRac.d.ts.map +1 -1
- package/dist/components/color-picker/examples/controlled-form-field.d.ts.map +1 -1
- package/dist/components/color-picker/examples/theme-accent.d.ts.map +1 -1
- package/dist/components/command-menu/examples/composition-tags-footer.d.ts.map +1 -1
- package/dist/components/command-menu/examples/variants-density-items.d.ts.map +1 -1
- package/dist/components/datepicker/examples/full-width-form.d.ts.map +1 -1
- package/dist/components/digit-input/examples/error-state.d.ts.map +1 -1
- package/dist/components/digit-input/examples/resend-and-clear.d.ts.map +1 -1
- package/dist/components/divider/examples/section-breaks.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +0 -14
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/examples/account-menu.d.ts.map +1 -1
- package/dist/components/dropdown/examples/actions-menu.d.ts.map +1 -1
- package/dist/components/dropdown/examples/full-width.d.ts.map +1 -1
- package/dist/components/empty-page/EmptyPage.d.ts +63 -0
- package/dist/components/empty-page/EmptyPage.d.ts.map +1 -0
- package/dist/components/empty-page/examples/canonical.d.ts +3 -0
- package/dist/components/empty-page/examples/canonical.d.ts.map +1 -0
- package/dist/components/empty-page/examples/sizes.d.ts +3 -0
- package/dist/components/empty-page/examples/sizes.d.ts.map +1 -0
- package/dist/components/empty-page/examples/table-region.d.ts +6 -0
- package/dist/components/empty-page/examples/table-region.d.ts.map +1 -0
- package/dist/components/hint/examples/a11y-describedby.d.ts.map +1 -1
- package/dist/components/hint/examples/error-hint.d.ts.map +1 -1
- package/dist/components/hint/examples/field-help.d.ts.map +1 -1
- package/dist/components/hint/examples/field-states.d.ts.map +1 -1
- package/dist/components/hint/examples/inline-tip-form.d.ts.map +1 -1
- package/dist/components/hint/examples/success-confirmation.d.ts.map +1 -1
- package/dist/components/hint/examples/variants.d.ts.map +1 -1
- package/dist/components/index.css +254 -106
- package/dist/components/index.css.map +4 -4
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +373 -337
- package/dist/components/index.js.map +4 -4
- package/dist/components/input/examples/login-email.d.ts.map +1 -1
- package/dist/components/input/examples/search.d.ts.map +1 -1
- package/dist/components/link-button/examples/disabled.d.ts.map +1 -1
- package/dist/components/link-button/examples/external.d.ts.map +1 -1
- package/dist/components/link-button/examples/inline-text-link.d.ts.map +1 -1
- package/dist/components/link-button/examples/navigation-cluster.d.ts.map +1 -1
- package/dist/components/modal/examples/pattern-controlled.d.ts.map +1 -1
- package/dist/components/modal/examples/pattern-portal-and-scroll.d.ts.map +1 -1
- package/dist/components/modal/examples/scenario-multi-field-form.d.ts.map +1 -1
- package/dist/components/notification/examples/action-toast.d.ts.map +1 -1
- package/dist/components/notification/examples/error-success.d.ts.map +1 -1
- package/dist/components/popover/Popover.d.ts +3 -3
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/examples/composition.d.ts +1 -1
- package/dist/components/popover/examples/date-trigger.d.ts.map +1 -1
- package/dist/components/popover/examples/features.d.ts.map +1 -1
- package/dist/components/popover/examples/form-in-popover.d.ts.map +1 -1
- package/dist/components/popover/examples/full-width.d.ts.map +1 -1
- package/dist/components/popover/examples/placement.d.ts.map +1 -1
- package/dist/components/popover/examples/rich-content.d.ts.map +1 -1
- package/dist/components/popover/examples/sizes.d.ts +1 -1
- package/dist/components/progress-bar/examples/step-progress.d.ts.map +1 -1
- package/dist/components/progress-circle/examples/dashboard-ring.d.ts.map +1 -1
- package/dist/components/progress-circle/examples/states.d.ts.map +1 -1
- package/dist/components/radio/examples/plan-picker.d.ts.map +1 -1
- package/dist/components/segmented-control/examples/pricing-toggle.d.ts.map +1 -1
- package/dist/components/segmented-control/examples/view-mode.d.ts.map +1 -1
- package/dist/components/select/examples/01-country.d.ts.map +1 -1
- package/dist/components/select/examples/02-controlled.d.ts.map +1 -1
- package/dist/components/select/examples/03-groups.d.ts.map +1 -1
- package/dist/components/select/examples/04-full-width-form.d.ts.map +1 -1
- package/dist/components/switch/examples/composition.d.ts.map +1 -1
- package/dist/components/switch/examples/scenario-feature-flag.d.ts.map +1 -1
- package/dist/components/tabs/examples/01-settings-vertical-rail.d.ts.map +1 -1
- package/dist/components/tag/examples/controlled.d.ts.map +1 -1
- package/dist/components/textarea/examples/01-support-ticket.d.ts.map +1 -1
- package/dist/components/textarea/examples/02-comment.d.ts.map +1 -1
- package/dist/components/textarea/examples/controlled.d.ts.map +1 -1
- package/dist/components/textarea/examples/features.d.ts.map +1 -1
- package/dist/components/tooltip/examples/composition.d.ts.map +1 -1
- package/dist/index.css +254 -106
- package/dist/index.css.map +4 -4
- package/dist/index.js +375 -338
- package/dist/index.js.map +4 -4
- package/dist/internal/states.d.ts +2 -0
- package/dist/internal/states.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/COMPONENT.md +1 -1
- package/src/components/accordion/examples/01-faq-marketing.tsx +1 -1
- package/src/components/accordion/examples/02-settings-panels.tsx +1 -6
- package/src/components/accordion/examples/03-checkout-order-summary.tsx +1 -1
- package/src/components/accordion/examples/04-api-docs-sections.tsx +0 -1
- package/src/components/accordion/examples/05-knowledge-base-categories.tsx +1 -7
- package/src/components/avatar/COMPONENT.md +2 -2
- package/src/components/avatar/examples/app-header-nav.tsx +5 -13
- package/src/components/avatar/examples/comment-thread.tsx +1 -1
- package/src/components/avatar/examples/src-from-state.tsx +0 -1
- package/src/components/badge/examples/admin-tags.tsx +6 -6
- package/src/components/badge/examples/ecommerce-inventory.tsx +5 -5
- package/src/components/badge/examples/inbox-labels.tsx +5 -5
- package/src/components/badge/examples/status-presence.tsx +4 -4
- package/src/components/banner/examples/controlled-visibility.tsx +1 -1
- package/src/components/banner/examples/cookie-consent-row.tsx +0 -1
- package/src/components/banner/examples/feature-promo.tsx +0 -1
- package/src/components/button/examples/canonical-composition.tsx +4 -4
- package/src/components/button/examples/destructive-confirm.tsx +3 -3
- package/src/components/button/examples/form-submit-row.tsx +2 -2
- package/src/components/button/examples/full-width-stack.tsx +2 -2
- package/src/components/button/examples/icon-composition.tsx +6 -6
- package/src/components/button/examples/toolbar.tsx +4 -4
- package/src/components/button-group/COMPONENT.md +1 -1
- package/src/components/button-group/examples/editor-toolbar.tsx +1 -1
- package/src/components/button-group/examples/form-footer.tsx +1 -1
- package/src/components/button-group/examples/full-width.tsx +1 -1
- package/src/components/button-group/examples/view-switcher.tsx +1 -1
- package/src/components/button-group/examples/wizard-actions.tsx +1 -1
- package/src/components/checkbox/examples/bulk-select-rows.tsx +0 -2
- package/src/components/checkbox/examples/empty-label-form.tsx +1 -2
- package/src/components/checkbox/examples/feature-flags-list.tsx +0 -1
- package/src/components/checkbox/examples/settings-panel.tsx +1 -4
- package/src/components/color-picker/COMPONENT.md +2 -2
- package/src/components/color-picker/examples/brand-kit.tsx +3 -3
- package/src/components/color-picker/examples/controlled-form-field.tsx +4 -6
- package/src/components/color-picker/examples/field-eyedropper.tsx +2 -2
- package/src/components/color-picker/examples/format-variants.tsx +2 -2
- package/src/components/color-picker/examples/full-width.tsx +2 -2
- package/src/components/color-picker/examples/minimal-popover.tsx +2 -2
- package/src/components/color-picker/examples/panel-placement.tsx +4 -4
- package/src/components/color-picker/examples/product-variant-swatch.tsx +2 -2
- package/src/components/color-picker/examples/readout-trigger.tsx +2 -2
- package/src/components/color-picker/examples/states.tsx +4 -4
- package/src/components/color-picker/examples/theme-accent.tsx +2 -7
- package/src/components/command-menu/examples/app-palette.tsx +1 -1
- package/src/components/command-menu/examples/composition-tags-footer.tsx +2 -7
- package/src/components/command-menu/examples/controlled-open-search.tsx +1 -1
- package/src/components/command-menu/examples/disabled-items.tsx +1 -1
- package/src/components/command-menu/examples/file-search.tsx +1 -1
- package/src/components/command-menu/examples/full-width-panel.tsx +1 -1
- package/src/components/command-menu/examples/item-icon-as.tsx +1 -1
- package/src/components/command-menu/examples/quick-actions.tsx +1 -1
- package/src/components/command-menu/examples/variants-density-items.tsx +2 -4
- package/src/components/data-table/COMPONENT.md +2 -0
- package/src/components/datepicker/examples/birthdate.tsx +2 -2
- package/src/components/datepicker/examples/booking.tsx +2 -2
- package/src/components/datepicker/examples/full-width-form.tsx +3 -10
- package/src/components/datepicker/examples/range-report.tsx +2 -2
- package/src/components/digit-input/examples/composition.tsx +3 -3
- package/src/components/digit-input/examples/error-state.tsx +3 -5
- package/src/components/digit-input/examples/otp-login.tsx +3 -3
- package/src/components/digit-input/examples/resend-and-clear.tsx +3 -9
- package/src/components/digit-input/examples/verification-step.tsx +4 -4
- package/src/components/divider/examples/card-splits.tsx +2 -2
- package/src/components/divider/examples/inset-stack.tsx +1 -1
- package/src/components/divider/examples/line-spacing-column.tsx +3 -3
- package/src/components/divider/examples/section-breaks.tsx +2 -6
- package/src/components/drawer/COMPONENT.md +1 -1
- package/src/components/drawer/examples/cart-preview.tsx +4 -4
- package/src/components/drawer/examples/explicit-panel.tsx +3 -3
- package/src/components/drawer/examples/filters-panel.tsx +7 -7
- package/src/components/drawer/examples/mobile-nav-sheet.tsx +3 -3
- package/src/components/drawer/examples/settings-side.tsx +6 -6
- package/src/components/dropdown/COMPONENT.md +5 -18
- package/src/components/dropdown/examples/account-menu.tsx +31 -33
- package/src/components/dropdown/examples/actions-menu.tsx +0 -1
- package/src/components/dropdown/examples/composition.tsx +1 -1
- package/src/components/dropdown/examples/controlled.tsx +1 -1
- package/src/components/dropdown/examples/dropdown-examples.module.css +0 -4
- package/src/components/dropdown/examples/full-width.tsx +0 -1
- package/src/components/dropdown/examples/select-like-list.tsx +1 -1
- package/src/components/dropdown/examples/states.tsx +1 -1
- package/src/components/dropdown/examples/variants.tsx +1 -1
- package/src/components/empty-page/COMPONENT.md +143 -0
- package/src/components/empty-page/examples/canonical.tsx +22 -0
- package/src/components/empty-page/examples/examples-demos.module.css +25 -0
- package/src/components/empty-page/examples/sizes.tsx +23 -0
- package/src/components/empty-page/examples/table-region.tsx +35 -0
- package/src/components/file-upload/examples/full-width.tsx +1 -1
- package/src/components/hint/examples/a11y-describedby.tsx +2 -4
- package/src/components/hint/examples/controlled-variant.tsx +1 -1
- package/src/components/hint/examples/error-hint.tsx +3 -5
- package/src/components/hint/examples/field-help.tsx +3 -5
- package/src/components/hint/examples/field-states.tsx +9 -19
- package/src/components/hint/examples/inline-tip-form.tsx +6 -10
- package/src/components/hint/examples/success-confirmation.tsx +3 -5
- package/src/components/hint/examples/variants.tsx +3 -9
- package/src/components/hint/examples/with-icon.tsx +1 -1
- package/src/components/input/examples/affix-url-and-amount.tsx +2 -2
- package/src/components/input/examples/checkout-full-width.tsx +2 -2
- package/src/components/input/examples/login-email.tsx +1 -5
- package/src/components/input/examples/password-with-hint.tsx +1 -1
- package/src/components/input/examples/search.tsx +0 -1
- package/src/components/kbd/examples/composition-chord-icon.tsx +1 -1
- package/src/components/kbd/examples/toolbar-hints.tsx +2 -2
- package/src/components/label/examples/with-icon.tsx +1 -1
- package/src/components/link-button/COMPONENT.md +1 -1
- package/src/components/link-button/examples/composition.tsx +3 -3
- package/src/components/link-button/examples/disabled.tsx +2 -4
- package/src/components/link-button/examples/external.tsx +1 -6
- package/src/components/link-button/examples/inline-text-link.tsx +2 -4
- package/src/components/link-button/examples/navigation-cluster.tsx +4 -12
- package/src/components/modal/COMPONENT.md +4 -4
- package/src/components/modal/examples/canonical-maximal.tsx +4 -4
- package/src/components/modal/examples/pattern-close-behavior.tsx +3 -3
- package/src/components/modal/examples/pattern-controlled.tsx +3 -5
- package/src/components/modal/examples/pattern-full-width-footer.tsx +3 -3
- package/src/components/modal/examples/pattern-portal-and-scroll.tsx +3 -5
- package/src/components/modal/examples/scenario-confirm-delete.tsx +3 -3
- package/src/components/modal/examples/scenario-edit-entity.tsx +4 -4
- package/src/components/modal/examples/scenario-legal-consent.tsx +2 -2
- package/src/components/modal/examples/scenario-multi-field-form.tsx +7 -13
- package/src/components/notification/examples/action-toast.tsx +0 -2
- package/src/components/notification/examples/error-success.tsx +0 -2
- package/src/components/page-content/COMPONENT.md +1 -0
- package/src/components/popover/COMPONENT.md +1 -1
- package/src/components/popover/examples/as-child.tsx +1 -1
- package/src/components/popover/examples/canonical-panel.tsx +2 -2
- package/src/components/popover/examples/composition.tsx +7 -7
- package/src/components/popover/examples/controlled.tsx +4 -4
- package/src/components/popover/examples/date-trigger.tsx +3 -10
- package/src/components/popover/examples/features.tsx +6 -13
- package/src/components/popover/examples/form-in-popover.tsx +5 -13
- package/src/components/popover/examples/full-width.tsx +2 -9
- package/src/components/popover/examples/inset-variants.tsx +6 -6
- package/src/components/popover/examples/placement.tsx +2 -7
- package/src/components/popover/examples/rich-content.tsx +6 -8
- package/src/components/popover/examples/sizes.tsx +5 -5
- package/src/components/popover/examples/states.tsx +4 -4
- package/src/components/progress-bar/examples/indeterminate-busy-state.tsx +1 -1
- package/src/components/progress-bar/examples/step-progress.tsx +0 -1
- package/src/components/progress-bar/examples/upload-progress.tsx +1 -1
- package/src/components/progress-bar/examples/wizard-composition.tsx +1 -1
- package/src/components/progress-circle/examples/a11y-label.tsx +1 -1
- package/src/components/progress-circle/examples/composition.tsx +2 -2
- package/src/components/progress-circle/examples/dashboard-ring.tsx +1 -6
- package/src/components/progress-circle/examples/max-scale.tsx +3 -3
- package/src/components/progress-circle/examples/states.tsx +5 -13
- package/src/components/radio/examples/notification-channel.tsx +3 -3
- package/src/components/radio/examples/plan-picker.tsx +0 -3
- package/src/components/radio/examples/settings-group.tsx +4 -4
- package/src/components/radio/examples/shipping-method.tsx +3 -3
- package/src/components/segmented-control/examples/canonical-composition.tsx +7 -7
- package/src/components/segmented-control/examples/composition.tsx +7 -7
- package/src/components/segmented-control/examples/features.tsx +3 -3
- package/src/components/segmented-control/examples/full-width.tsx +1 -1
- package/src/components/segmented-control/examples/pricing-toggle.tsx +0 -1
- package/src/components/segmented-control/examples/states.tsx +3 -3
- package/src/components/segmented-control/examples/view-mode.tsx +0 -1
- package/src/components/segmented-progress-bar/examples/size-ladder.tsx +1 -1
- package/src/components/select/COMPONENT.md +3 -3
- package/src/components/select/examples/01-country.tsx +2 -4
- package/src/components/select/examples/02-controlled.tsx +2 -4
- package/src/components/select/examples/03-groups.tsx +2 -4
- package/src/components/select/examples/04-full-width-form.tsx +4 -8
- package/src/components/select/examples/pattern-composition.tsx +1 -1
- package/src/components/select/examples/pattern-controlled.tsx +1 -1
- package/src/components/select/examples/pattern-features.tsx +1 -1
- package/src/components/select/examples/pattern-full-width.tsx +1 -1
- package/src/components/select/examples/pattern-native.tsx +1 -1
- package/src/components/select/examples/pattern-states.tsx +4 -4
- package/src/components/slider/COMPONENT.md +1 -1
- package/src/components/stepper/COMPONENT.md +1 -1
- package/src/components/stepper/examples/01-checkout-horizontal.tsx +1 -1
- package/src/components/stepper/examples/02-onboarding-vertical.tsx +1 -1
- package/src/components/stepper/examples/03-vertical-primitive-rail.tsx +1 -1
- package/src/components/stepper/examples/04-checkout-step-error.tsx +1 -1
- package/src/components/stepper/examples/05-horizontal-primitive.tsx +1 -1
- package/src/components/switch/COMPONENT.md +1 -1
- package/src/components/switch/examples/canonical-maximal.tsx +1 -1
- package/src/components/switch/examples/composition.tsx +1 -2
- package/src/components/switch/examples/controlled.tsx +1 -1
- package/src/components/switch/examples/full-width.tsx +1 -1
- package/src/components/switch/examples/scenario-billing-annual.tsx +1 -1
- package/src/components/switch/examples/scenario-feature-flag.tsx +1 -6
- package/src/components/switch/examples/scenario-settings-toggle.tsx +3 -3
- package/src/components/switch/examples/states.tsx +6 -6
- package/src/components/switch/examples/variants.tsx +2 -2
- package/src/components/tabs/COMPONENT.md +1 -1
- package/src/components/tabs/examples/01-settings-vertical-rail.tsx +1 -6
- package/src/components/tag/COMPONENT.md +1 -1
- package/src/components/tag/examples/01-filter-chips.tsx +1 -1
- package/src/components/tag/examples/02-removable-selected-values.tsx +1 -1
- package/src/components/tag/examples/03-status-metadata.tsx +3 -3
- package/src/components/tag/examples/controlled.tsx +1 -6
- package/src/components/tag/examples/removable.tsx +1 -1
- package/src/components/textarea/examples/01-support-ticket.tsx +0 -1
- package/src/components/textarea/examples/02-comment.tsx +1 -2
- package/src/components/textarea/examples/composition.tsx +2 -2
- package/src/components/textarea/examples/controlled.tsx +0 -1
- package/src/components/textarea/examples/features.tsx +3 -12
- package/src/components/textarea/examples/full-width.tsx +1 -1
- package/src/components/textarea/examples/states.tsx +4 -4
- package/src/components/textarea/examples/variants.tsx +2 -2
- package/src/components/tooltip/COMPONENT.md +0 -1
- package/src/components/tooltip/examples/canonical-icon-hint.tsx +1 -1
- package/src/components/tooltip/examples/composition.tsx +3 -9
- package/src/components/tooltip/examples/controlled.tsx +2 -2
- package/src/components/tooltip/examples/delay.tsx +1 -1
- package/src/components/tooltip/examples/long-content.tsx +2 -2
- package/src/components/tooltip/examples/side.tsx +4 -4
- package/src/components/tooltip/examples/states.tsx +2 -2
- package/src/components/tooltip/examples/surfaces.tsx +2 -2
- package/dist/components/dropdown/examples/inset.d.ts +0 -3
- package/dist/components/dropdown/examples/inset.d.ts.map +0 -1
- package/src/components/dropdown/examples/inset.tsx +0 -51
package/dist/components/index.js
CHANGED
|
@@ -4782,7 +4782,6 @@ var EyeDropperButton = React38.forwardRef(function EyeDropperButton2({ children,
|
|
|
4782
4782
|
className: cx(ColorPicker_default.eyeDropperSquare, className),
|
|
4783
4783
|
disabled: true,
|
|
4784
4784
|
mode: "stroke",
|
|
4785
|
-
size: "m",
|
|
4786
4785
|
tabIndex: -1,
|
|
4787
4786
|
type,
|
|
4788
4787
|
variant: "neutral",
|
|
@@ -4799,7 +4798,6 @@ var EyeDropperButton = React38.forwardRef(function EyeDropperButton2({ children,
|
|
|
4799
4798
|
"aria-label": ariaLabel ?? "\u041F\u0438\u043F\u0435\u0442\u043A\u0430",
|
|
4800
4799
|
className: cx(ColorPicker_default.eyeDropperSquare, className),
|
|
4801
4800
|
mode: "stroke",
|
|
4802
|
-
size: "m",
|
|
4803
4801
|
variant: "neutral",
|
|
4804
4802
|
onClick: (e) => {
|
|
4805
4803
|
onClick?.(e);
|
|
@@ -6871,7 +6869,6 @@ import * as React47 from "react";
|
|
|
6871
6869
|
|
|
6872
6870
|
// src/components/dropdown/Dropdown.module.css
|
|
6873
6871
|
var Dropdown_default = {
|
|
6874
|
-
inset: "Dropdown_inset2",
|
|
6875
6872
|
content: "Dropdown_content2",
|
|
6876
6873
|
block: "Dropdown_block2",
|
|
6877
6874
|
header: "Dropdown_header2",
|
|
@@ -7266,30 +7263,10 @@ function DropdownHeaderTrailing({
|
|
|
7266
7263
|
);
|
|
7267
7264
|
}
|
|
7268
7265
|
DropdownHeaderTrailing.displayName = "DropdownHeaderTrailing";
|
|
7269
|
-
function DropdownInset({
|
|
7270
|
-
children,
|
|
7271
|
-
className,
|
|
7272
|
-
padding = "x2",
|
|
7273
|
-
gap = "x3",
|
|
7274
|
-
...rest
|
|
7275
|
-
}) {
|
|
7276
|
-
return /* @__PURE__ */ jsx35(
|
|
7277
|
-
"div",
|
|
7278
|
-
{
|
|
7279
|
-
className: cx(Dropdown_default.inset, className),
|
|
7280
|
-
"data-inset-gap": gap,
|
|
7281
|
-
"data-inset-padding": padding,
|
|
7282
|
-
...rest,
|
|
7283
|
-
children
|
|
7284
|
-
}
|
|
7285
|
-
);
|
|
7286
|
-
}
|
|
7287
|
-
DropdownInset.displayName = "DropdownInset";
|
|
7288
7266
|
var Dropdown = {
|
|
7289
7267
|
Root: DropdownRoot,
|
|
7290
7268
|
Trigger: DropdownTrigger,
|
|
7291
7269
|
Content: DropdownContent,
|
|
7292
|
-
Inset: DropdownInset,
|
|
7293
7270
|
Block: DropdownBlock,
|
|
7294
7271
|
Header: DropdownHeader,
|
|
7295
7272
|
HeaderRow: DropdownHeaderRow,
|
|
@@ -7305,12 +7282,70 @@ var Dropdown = {
|
|
|
7305
7282
|
Separator: DropdownSeparator
|
|
7306
7283
|
};
|
|
7307
7284
|
|
|
7285
|
+
// src/components/empty-page/EmptyPage.tsx
|
|
7286
|
+
import * as React48 from "react";
|
|
7287
|
+
|
|
7288
|
+
// src/components/empty-page/EmptyPage.module.css
|
|
7289
|
+
var EmptyPage_default = {
|
|
7290
|
+
root: "EmptyPage_root2",
|
|
7291
|
+
iconWrap: "EmptyPage_iconWrap2",
|
|
7292
|
+
title: "EmptyPage_title2",
|
|
7293
|
+
description: "EmptyPage_description2",
|
|
7294
|
+
actions: "EmptyPage_actions2"
|
|
7295
|
+
};
|
|
7296
|
+
|
|
7297
|
+
// src/components/empty-page/EmptyPage.tsx
|
|
7298
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
7299
|
+
var EmptyPageRoot = React48.forwardRef(function EmptyPageRoot2({ size = "m", layout = "default", className, children, ...rest }, forwardedRef) {
|
|
7300
|
+
return /* @__PURE__ */ jsx36(
|
|
7301
|
+
"div",
|
|
7302
|
+
{
|
|
7303
|
+
ref: forwardedRef,
|
|
7304
|
+
className: cx(EmptyPage_default.root, className),
|
|
7305
|
+
...rest,
|
|
7306
|
+
...toDataAttributes({
|
|
7307
|
+
size,
|
|
7308
|
+
layout: layout === "fill" ? "fill" : void 0
|
|
7309
|
+
}),
|
|
7310
|
+
children: /* @__PURE__ */ jsx36(ControlSizeProvider, { value: size, children })
|
|
7311
|
+
}
|
|
7312
|
+
);
|
|
7313
|
+
});
|
|
7314
|
+
EmptyPageRoot.displayName = "EmptyPage.Root";
|
|
7315
|
+
function EmptyPageIcon({ className, children, ...rest }) {
|
|
7316
|
+
return /* @__PURE__ */ jsx36("div", { className: cx(EmptyPage_default.iconWrap, className), ...rest, children });
|
|
7317
|
+
}
|
|
7318
|
+
EmptyPageIcon.displayName = "EmptyPage.Icon";
|
|
7319
|
+
var EmptyPageTitle = React48.forwardRef(
|
|
7320
|
+
function EmptyPageTitle2({ className, children, ...rest }, forwardedRef) {
|
|
7321
|
+
return /* @__PURE__ */ jsx36("h2", { ref: forwardedRef, className: cx(EmptyPage_default.title, className), ...rest, children });
|
|
7322
|
+
}
|
|
7323
|
+
);
|
|
7324
|
+
EmptyPageTitle.displayName = "EmptyPage.Title";
|
|
7325
|
+
var EmptyPageDescription = React48.forwardRef(
|
|
7326
|
+
function EmptyPageDescription2({ className, children, ...rest }, forwardedRef) {
|
|
7327
|
+
return /* @__PURE__ */ jsx36("p", { ref: forwardedRef, className: cx(EmptyPage_default.description, className), ...rest, children });
|
|
7328
|
+
}
|
|
7329
|
+
);
|
|
7330
|
+
EmptyPageDescription.displayName = "EmptyPage.Description";
|
|
7331
|
+
function EmptyPageActions({ className, children, ...rest }) {
|
|
7332
|
+
return /* @__PURE__ */ jsx36("div", { className: cx(EmptyPage_default.actions, className), ...rest, children });
|
|
7333
|
+
}
|
|
7334
|
+
EmptyPageActions.displayName = "EmptyPage.Actions";
|
|
7335
|
+
var EmptyPage = {
|
|
7336
|
+
Root: EmptyPageRoot,
|
|
7337
|
+
Icon: EmptyPageIcon,
|
|
7338
|
+
Title: EmptyPageTitle,
|
|
7339
|
+
Description: EmptyPageDescription,
|
|
7340
|
+
Actions: EmptyPageActions
|
|
7341
|
+
};
|
|
7342
|
+
|
|
7308
7343
|
// src/components/example-frame/ExampleFrame.tsx
|
|
7309
7344
|
import { Code2, Eye as Eye2, Monitor, Smartphone, Tablet } from "lucide-react";
|
|
7310
|
-
import * as
|
|
7345
|
+
import * as React50 from "react";
|
|
7311
7346
|
|
|
7312
7347
|
// src/components/segmented-control/SegmentedControl.tsx
|
|
7313
|
-
import * as
|
|
7348
|
+
import * as React49 from "react";
|
|
7314
7349
|
|
|
7315
7350
|
// src/components/segmented-control/SegmentedControl.module.css
|
|
7316
7351
|
var SegmentedControl_default = {
|
|
@@ -7321,7 +7356,7 @@ var SegmentedControl_default = {
|
|
|
7321
7356
|
};
|
|
7322
7357
|
|
|
7323
7358
|
// src/components/segmented-control/SegmentedControl.tsx
|
|
7324
|
-
import { jsx as
|
|
7359
|
+
import { jsx as jsx37, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7325
7360
|
function readCssWidthPx(root, widthExpression) {
|
|
7326
7361
|
const doc = root.ownerDocument;
|
|
7327
7362
|
const win = doc.defaultView;
|
|
@@ -7349,23 +7384,23 @@ function SegmentedControlRoot({
|
|
|
7349
7384
|
defaultValue,
|
|
7350
7385
|
onChange: onValueChange
|
|
7351
7386
|
});
|
|
7352
|
-
const [indicator, setIndicator] =
|
|
7387
|
+
const [indicator, setIndicator] = React49.useState({
|
|
7353
7388
|
left: 0,
|
|
7354
7389
|
top: 0,
|
|
7355
7390
|
width: 0,
|
|
7356
7391
|
height: 0
|
|
7357
7392
|
});
|
|
7358
|
-
const [animate2, setAnimate] =
|
|
7359
|
-
const containerRef =
|
|
7360
|
-
const indicatorRef =
|
|
7361
|
-
const onSelect =
|
|
7393
|
+
const [animate2, setAnimate] = React49.useState(false);
|
|
7394
|
+
const containerRef = React49.useRef(null);
|
|
7395
|
+
const indicatorRef = React49.useRef(null);
|
|
7396
|
+
const onSelect = React49.useCallback(
|
|
7362
7397
|
(nextValue) => {
|
|
7363
7398
|
setAnimate(true);
|
|
7364
7399
|
setSelectedValue(nextValue);
|
|
7365
7400
|
},
|
|
7366
7401
|
[setSelectedValue]
|
|
7367
7402
|
);
|
|
7368
|
-
|
|
7403
|
+
React49.useLayoutEffect(() => {
|
|
7369
7404
|
const root = containerRef.current;
|
|
7370
7405
|
if (!root) return;
|
|
7371
7406
|
const update = () => {
|
|
@@ -7402,12 +7437,12 @@ function SegmentedControlRoot({
|
|
|
7402
7437
|
ro?.disconnect();
|
|
7403
7438
|
};
|
|
7404
7439
|
}, []);
|
|
7405
|
-
|
|
7440
|
+
React49.useEffect(() => {
|
|
7406
7441
|
if (!animate2) return;
|
|
7407
7442
|
const id = window.setTimeout(() => setAnimate(false), 320);
|
|
7408
7443
|
return () => window.clearTimeout(id);
|
|
7409
7444
|
}, [animate2]);
|
|
7410
|
-
|
|
7445
|
+
React49.useLayoutEffect(() => {
|
|
7411
7446
|
const indicatorEl = indicatorRef.current;
|
|
7412
7447
|
if (!indicatorEl) return;
|
|
7413
7448
|
indicatorEl.style.transform = `translate3d(${indicator.left}px, ${indicator.top}px, 0)`;
|
|
@@ -7438,7 +7473,7 @@ function SegmentedControlRoot({
|
|
|
7438
7473
|
if (nextValue) onSelect(nextValue);
|
|
7439
7474
|
};
|
|
7440
7475
|
const hasSelection = selectedValue !== "";
|
|
7441
|
-
return /* @__PURE__ */
|
|
7476
|
+
return /* @__PURE__ */ jsx37(SegmentedControlProvider, { value: { value: selectedValue, onSelect, rootDisabled: disabled }, children: /* @__PURE__ */ jsxs17(
|
|
7442
7477
|
"div",
|
|
7443
7478
|
{
|
|
7444
7479
|
ref: containerRef,
|
|
@@ -7451,8 +7486,8 @@ function SegmentedControlRoot({
|
|
|
7451
7486
|
"data-size": size,
|
|
7452
7487
|
"data-animate": animate2 ? "true" : void 0,
|
|
7453
7488
|
children: [
|
|
7454
|
-
/* @__PURE__ */
|
|
7455
|
-
/* @__PURE__ */
|
|
7489
|
+
/* @__PURE__ */ jsx37(ControlSizeProvider, { value: size, children }),
|
|
7490
|
+
/* @__PURE__ */ jsx37("div", { ref: indicatorRef, className: SegmentedControl_default.indicator, "aria-hidden": "true" })
|
|
7456
7491
|
]
|
|
7457
7492
|
}
|
|
7458
7493
|
) });
|
|
@@ -7469,7 +7504,7 @@ function SegmentedControlItem({
|
|
|
7469
7504
|
const isDisabled = ctx.rootDisabled || disabled;
|
|
7470
7505
|
return (
|
|
7471
7506
|
// biome-ignore lint/a11y/useSemanticElements: compound component intentionally uses role="radio" with roving tabindex
|
|
7472
|
-
/* @__PURE__ */
|
|
7507
|
+
/* @__PURE__ */ jsx37(
|
|
7473
7508
|
"button",
|
|
7474
7509
|
{
|
|
7475
7510
|
role: "radio",
|
|
@@ -7491,7 +7526,7 @@ function SegmentedControlItem({
|
|
|
7491
7526
|
}
|
|
7492
7527
|
SegmentedControlItem.displayName = "SegmentedControl.Item";
|
|
7493
7528
|
function SegmentedControlIcon({ children, className, ...rest }) {
|
|
7494
|
-
return /* @__PURE__ */
|
|
7529
|
+
return /* @__PURE__ */ jsx37("span", { className: cx(SegmentedControl_default.icon, className), "aria-hidden": "true", ...rest, children });
|
|
7495
7530
|
}
|
|
7496
7531
|
SegmentedControlIcon.displayName = "SegmentedControl.Icon";
|
|
7497
7532
|
var SegmentedControl = {
|
|
@@ -7515,7 +7550,7 @@ var ExampleFrame_default = {
|
|
|
7515
7550
|
};
|
|
7516
7551
|
|
|
7517
7552
|
// src/components/example-frame/ExampleFrame.tsx
|
|
7518
|
-
import { Fragment as Fragment5, jsx as
|
|
7553
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7519
7554
|
var [ExampleFrameProvider, useExampleFrameContext] = createComponentContext("ExampleFrame");
|
|
7520
7555
|
function ExampleFrameRoot({
|
|
7521
7556
|
code,
|
|
@@ -7533,14 +7568,14 @@ function ExampleFrameRoot({
|
|
|
7533
7568
|
previewLayout = "default",
|
|
7534
7569
|
themePreset
|
|
7535
7570
|
}) {
|
|
7536
|
-
const [pane, setPane] =
|
|
7537
|
-
const [uncontrolledViewport, setUncontrolledViewport] =
|
|
7538
|
-
const [uncontrolledScheme, setUncontrolledScheme] =
|
|
7571
|
+
const [pane, setPane] = React50.useState("preview");
|
|
7572
|
+
const [uncontrolledViewport, setUncontrolledViewport] = React50.useState(defaultViewport);
|
|
7573
|
+
const [uncontrolledScheme, setUncontrolledScheme] = React50.useState(defaultColorScheme);
|
|
7539
7574
|
const isSchemeControlled = colorSchemeProp !== void 0;
|
|
7540
7575
|
const colorScheme = isSchemeControlled ? colorSchemeProp : uncontrolledScheme;
|
|
7541
7576
|
const isViewportControlled = viewportProp !== void 0;
|
|
7542
7577
|
const viewport = isViewportControlled ? viewportProp : uncontrolledViewport;
|
|
7543
|
-
const setColorScheme =
|
|
7578
|
+
const setColorScheme = React50.useCallback(
|
|
7544
7579
|
(next) => {
|
|
7545
7580
|
if (!isSchemeControlled) {
|
|
7546
7581
|
setUncontrolledScheme(next);
|
|
@@ -7549,7 +7584,7 @@ function ExampleFrameRoot({
|
|
|
7549
7584
|
},
|
|
7550
7585
|
[isSchemeControlled, onColorSchemeChange]
|
|
7551
7586
|
);
|
|
7552
|
-
const setViewport =
|
|
7587
|
+
const setViewport = React50.useCallback(
|
|
7553
7588
|
(next) => {
|
|
7554
7589
|
if (!isViewportControlled) {
|
|
7555
7590
|
setUncontrolledViewport(next);
|
|
@@ -7558,7 +7593,7 @@ function ExampleFrameRoot({
|
|
|
7558
7593
|
},
|
|
7559
7594
|
[isViewportControlled, onViewportChange]
|
|
7560
7595
|
);
|
|
7561
|
-
const ctxValue =
|
|
7596
|
+
const ctxValue = React50.useMemo(
|
|
7562
7597
|
() => ({
|
|
7563
7598
|
code,
|
|
7564
7599
|
language,
|
|
@@ -7584,17 +7619,17 @@ function ExampleFrameRoot({
|
|
|
7584
7619
|
]
|
|
7585
7620
|
);
|
|
7586
7621
|
let previewChildren = null;
|
|
7587
|
-
|
|
7588
|
-
if (
|
|
7622
|
+
React50.Children.forEach(children, (child) => {
|
|
7623
|
+
if (React50.isValidElement(child) && child.type === ExampleFrameStage) {
|
|
7589
7624
|
previewChildren = child.props.children ?? null;
|
|
7590
7625
|
}
|
|
7591
7626
|
});
|
|
7592
7627
|
if (previewChildren === null) {
|
|
7593
7628
|
previewChildren = children;
|
|
7594
7629
|
}
|
|
7595
|
-
return /* @__PURE__ */
|
|
7596
|
-
/* @__PURE__ */
|
|
7597
|
-
pane === "preview" ? /* @__PURE__ */
|
|
7630
|
+
return /* @__PURE__ */ jsx38(ExampleFrameProvider, { value: ctxValue, children: /* @__PURE__ */ jsxs18("div", { className: cx(ExampleFrame_default.root, className), children: [
|
|
7631
|
+
/* @__PURE__ */ jsx38(ExampleFrameToolbar, {}),
|
|
7632
|
+
pane === "preview" ? /* @__PURE__ */ jsx38("div", { className: ExampleFrame_default.previewShell, children: /* @__PURE__ */ jsx38("div", { className: ExampleFrame_default.previewViewport, "data-viewport": viewport, children: /* @__PURE__ */ jsx38(
|
|
7598
7633
|
"div",
|
|
7599
7634
|
{
|
|
7600
7635
|
className: ExampleFrame_default.previewInner,
|
|
@@ -7603,14 +7638,14 @@ function ExampleFrameRoot({
|
|
|
7603
7638
|
...themePreset != null && themePreset !== "" ? { "data-theme-preset": themePreset } : {},
|
|
7604
7639
|
children: previewChildren
|
|
7605
7640
|
}
|
|
7606
|
-
) }) }) : /* @__PURE__ */
|
|
7641
|
+
) }) }) : /* @__PURE__ */ jsx38(ExampleFrameCodePane, { themePreset })
|
|
7607
7642
|
] }) });
|
|
7608
7643
|
}
|
|
7609
7644
|
ExampleFrameRoot.displayName = "ExampleFrame.Root";
|
|
7610
7645
|
function ExampleFrameToolbar() {
|
|
7611
7646
|
const ctx = useExampleFrameContext();
|
|
7612
|
-
const [copyState, setCopyState] =
|
|
7613
|
-
const handleCopy =
|
|
7647
|
+
const [copyState, setCopyState] = React50.useState("idle");
|
|
7648
|
+
const handleCopy = React50.useCallback(async () => {
|
|
7614
7649
|
try {
|
|
7615
7650
|
await navigator.clipboard.writeText(ctx.code);
|
|
7616
7651
|
setCopyState("copied");
|
|
@@ -7636,18 +7671,18 @@ function ExampleFrameToolbar() {
|
|
|
7636
7671
|
size: "s",
|
|
7637
7672
|
children: [
|
|
7638
7673
|
/* @__PURE__ */ jsxs18(SegmentedControl.Item, { value: "preview", children: [
|
|
7639
|
-
/* @__PURE__ */
|
|
7674
|
+
/* @__PURE__ */ jsx38(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx38(Eye2, { size: 14, strokeWidth: 2, "aria-hidden": true }) }),
|
|
7640
7675
|
"Preview"
|
|
7641
7676
|
] }),
|
|
7642
7677
|
/* @__PURE__ */ jsxs18(SegmentedControl.Item, { value: "code", children: [
|
|
7643
|
-
/* @__PURE__ */
|
|
7678
|
+
/* @__PURE__ */ jsx38(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx38(Code2, { size: 14, strokeWidth: 2, "aria-hidden": true }) }),
|
|
7644
7679
|
"Code"
|
|
7645
7680
|
] })
|
|
7646
7681
|
]
|
|
7647
7682
|
}
|
|
7648
7683
|
),
|
|
7649
7684
|
/* @__PURE__ */ jsxs18("div", { className: ExampleFrame_default.toolbarLine1End, children: [
|
|
7650
|
-
ctx.showThemeToggle ? /* @__PURE__ */
|
|
7685
|
+
ctx.showThemeToggle ? /* @__PURE__ */ jsx38(
|
|
7651
7686
|
Button.Root,
|
|
7652
7687
|
{
|
|
7653
7688
|
type: "button",
|
|
@@ -7656,10 +7691,10 @@ function ExampleFrameToolbar() {
|
|
|
7656
7691
|
size: "s",
|
|
7657
7692
|
onClick: toggleScheme,
|
|
7658
7693
|
"aria-label": ctx.colorScheme === "light" ? "\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0442\u0451\u043C\u043D\u0443\u044E \u0442\u0435\u043C\u0443" : "\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0432\u0435\u0442\u043B\u0443\u044E \u0442\u0435\u043C\u0443",
|
|
7659
|
-
children: /* @__PURE__ */
|
|
7694
|
+
children: /* @__PURE__ */ jsx38(Button.Icon, { children: ctx.colorScheme === "light" ? /* @__PURE__ */ jsx38(Icon, { name: "theme.dark", size: "s", tone: "subtle" }) : /* @__PURE__ */ jsx38(Icon, { name: "theme.light", size: "s", tone: "subtle" }) })
|
|
7660
7695
|
}
|
|
7661
7696
|
) : null,
|
|
7662
|
-
/* @__PURE__ */
|
|
7697
|
+
/* @__PURE__ */ jsx38(
|
|
7663
7698
|
Button.Root,
|
|
7664
7699
|
{
|
|
7665
7700
|
type: "button",
|
|
@@ -7668,7 +7703,7 @@ function ExampleFrameToolbar() {
|
|
|
7668
7703
|
size: "s",
|
|
7669
7704
|
onClick: handleCopy,
|
|
7670
7705
|
"aria-label": copyLabel,
|
|
7671
|
-
children: /* @__PURE__ */
|
|
7706
|
+
children: /* @__PURE__ */ jsx38(Button.Icon, { children: /* @__PURE__ */ jsx38(Icon, { name: "action.copy", size: "s", tone: "subtle" }) })
|
|
7672
7707
|
}
|
|
7673
7708
|
)
|
|
7674
7709
|
] })
|
|
@@ -7682,15 +7717,15 @@ function ExampleFrameToolbar() {
|
|
|
7682
7717
|
size: "s",
|
|
7683
7718
|
children: [
|
|
7684
7719
|
/* @__PURE__ */ jsxs18(SegmentedControl.Item, { value: "desktop", children: [
|
|
7685
|
-
/* @__PURE__ */
|
|
7720
|
+
/* @__PURE__ */ jsx38(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx38(Monitor, { size: 14, strokeWidth: 2, "aria-hidden": true }) }),
|
|
7686
7721
|
"Desktop"
|
|
7687
7722
|
] }),
|
|
7688
7723
|
/* @__PURE__ */ jsxs18(SegmentedControl.Item, { value: "tablet", children: [
|
|
7689
|
-
/* @__PURE__ */
|
|
7724
|
+
/* @__PURE__ */ jsx38(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx38(Tablet, { size: 14, strokeWidth: 2, "aria-hidden": true }) }),
|
|
7690
7725
|
"Tablet"
|
|
7691
7726
|
] }),
|
|
7692
7727
|
/* @__PURE__ */ jsxs18(SegmentedControl.Item, { value: "mobile", children: [
|
|
7693
|
-
/* @__PURE__ */
|
|
7728
|
+
/* @__PURE__ */ jsx38(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx38(Smartphone, { size: 14, strokeWidth: 2, "aria-hidden": true }) }),
|
|
7694
7729
|
"Mobile"
|
|
7695
7730
|
] })
|
|
7696
7731
|
]
|
|
@@ -7703,11 +7738,11 @@ function ExampleFrameCodePane({ themePreset }) {
|
|
|
7703
7738
|
const ctx = useExampleFrameContext();
|
|
7704
7739
|
const trimmed = ctx.code.trimEnd();
|
|
7705
7740
|
const presetProps = themePreset != null && themePreset !== "" ? { "data-theme-preset": themePreset } : {};
|
|
7706
|
-
return /* @__PURE__ */
|
|
7741
|
+
return /* @__PURE__ */ jsx38("div", { className: ExampleFrame_default.codePane, "data-theme": ctx.colorScheme, ...presetProps, children: /* @__PURE__ */ jsx38(CodeBlock.Root, { code: trimmed, colorScheme: ctx.colorScheme }) });
|
|
7707
7742
|
}
|
|
7708
7743
|
ExampleFrameCodePane.displayName = "ExampleFrame.CodePane";
|
|
7709
7744
|
function ExampleFrameStage({ children }) {
|
|
7710
|
-
return /* @__PURE__ */
|
|
7745
|
+
return /* @__PURE__ */ jsx38(Fragment5, { children });
|
|
7711
7746
|
}
|
|
7712
7747
|
ExampleFrameStage.displayName = "ExampleFrame.Stage";
|
|
7713
7748
|
var ExampleFrame = {
|
|
@@ -7716,10 +7751,10 @@ var ExampleFrame = {
|
|
|
7716
7751
|
};
|
|
7717
7752
|
|
|
7718
7753
|
// src/components/file-upload/FileUpload.tsx
|
|
7719
|
-
import * as
|
|
7754
|
+
import * as React52 from "react";
|
|
7720
7755
|
|
|
7721
7756
|
// src/components/progress-bar/ProgressBar.tsx
|
|
7722
|
-
import * as
|
|
7757
|
+
import * as React51 from "react";
|
|
7723
7758
|
|
|
7724
7759
|
// src/components/progress-bar/ProgressBar.module.css
|
|
7725
7760
|
var ProgressBar_default = {
|
|
@@ -7729,18 +7764,18 @@ var ProgressBar_default = {
|
|
|
7729
7764
|
};
|
|
7730
7765
|
|
|
7731
7766
|
// src/components/progress-bar/ProgressBar.tsx
|
|
7732
|
-
import { jsx as
|
|
7767
|
+
import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7733
7768
|
function clampProgress(value, max) {
|
|
7734
7769
|
return Math.min(max, Math.max(value, 0));
|
|
7735
7770
|
}
|
|
7736
|
-
var ProgressBarRoot =
|
|
7771
|
+
var ProgressBarRoot = React51.forwardRef(
|
|
7737
7772
|
({ value, max = 100, label, size = "m", className }, ref) => {
|
|
7738
7773
|
const safeMax = max > 0 ? max : 100;
|
|
7739
7774
|
const safeValue = clampProgress(value, safeMax);
|
|
7740
|
-
const labelId =
|
|
7775
|
+
const labelId = React51.useId();
|
|
7741
7776
|
return /* @__PURE__ */ jsxs19("div", { className: cx(ProgressBar_default.root, className), ...toDataAttributes({ size }), children: [
|
|
7742
|
-
label ? /* @__PURE__ */
|
|
7743
|
-
/* @__PURE__ */
|
|
7777
|
+
label ? /* @__PURE__ */ jsx39("span", { className: ProgressBar_default.label, id: labelId, children: label }) : null,
|
|
7778
|
+
/* @__PURE__ */ jsx39(
|
|
7744
7779
|
"progress",
|
|
7745
7780
|
{
|
|
7746
7781
|
ref,
|
|
@@ -7792,26 +7827,26 @@ var FileUpload_default = {
|
|
|
7792
7827
|
};
|
|
7793
7828
|
|
|
7794
7829
|
// src/components/file-upload/FileUpload.tsx
|
|
7795
|
-
import { jsx as
|
|
7830
|
+
import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
7796
7831
|
function FileUploadIcon({ className, children, ...rest }) {
|
|
7797
|
-
return /* @__PURE__ */
|
|
7832
|
+
return /* @__PURE__ */ jsx40("span", { className: cx(FileUpload_default.iconWrap, className), "aria-hidden": true, ...rest, children });
|
|
7798
7833
|
}
|
|
7799
7834
|
FileUploadIcon.displayName = "FileUpload.Icon";
|
|
7800
7835
|
function FileUploadTitle({ className, children, tone = "default", ...rest }) {
|
|
7801
|
-
return /* @__PURE__ */
|
|
7836
|
+
return /* @__PURE__ */ jsx40("p", { className: cx(FileUpload_default.title, tone === "muted" && FileUpload_default.titleMuted, className), ...rest, children });
|
|
7802
7837
|
}
|
|
7803
7838
|
FileUploadTitle.displayName = "FileUpload.Title";
|
|
7804
7839
|
function FileUploadHint({ className, children, ...rest }) {
|
|
7805
7840
|
const controlSize = useOptionalControlSize() ?? "m";
|
|
7806
|
-
return /* @__PURE__ */
|
|
7841
|
+
return /* @__PURE__ */ jsx40(Hint.Root, { size: controlSize, className, ...rest, children });
|
|
7807
7842
|
}
|
|
7808
7843
|
FileUploadHint.displayName = "FileUpload.Hint";
|
|
7809
7844
|
function FileUploadBrowseLabel({ className, children, ...rest }) {
|
|
7810
|
-
return /* @__PURE__ */
|
|
7845
|
+
return /* @__PURE__ */ jsx40("span", { className: cx(FileUpload_default.browse, className), ...rest, children });
|
|
7811
7846
|
}
|
|
7812
7847
|
FileUploadBrowseLabel.displayName = "FileUpload.BrowseLabel";
|
|
7813
|
-
var FileUploadBrowseLink =
|
|
7814
|
-
({ className, type = "button", onClick, ...rest }, ref) => /* @__PURE__ */
|
|
7848
|
+
var FileUploadBrowseLink = React52.forwardRef(
|
|
7849
|
+
({ className, type = "button", onClick, ...rest }, ref) => /* @__PURE__ */ jsx40(
|
|
7815
7850
|
"button",
|
|
7816
7851
|
{
|
|
7817
7852
|
ref,
|
|
@@ -7828,15 +7863,15 @@ var FileUploadBrowseLink = React51.forwardRef(
|
|
|
7828
7863
|
);
|
|
7829
7864
|
FileUploadBrowseLink.displayName = "FileUpload.BrowseLink";
|
|
7830
7865
|
function FileUploadDropBody({ className, children, ...rest }) {
|
|
7831
|
-
return /* @__PURE__ */
|
|
7866
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.dropBody, className), ...rest, children });
|
|
7832
7867
|
}
|
|
7833
7868
|
FileUploadDropBody.displayName = "FileUpload.DropBody";
|
|
7834
7869
|
function FileUploadActionsRow({ className, children, ...rest }) {
|
|
7835
|
-
return /* @__PURE__ */
|
|
7870
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.actionsRow, className), ...rest, children });
|
|
7836
7871
|
}
|
|
7837
7872
|
FileUploadActionsRow.displayName = "FileUpload.ActionsRow";
|
|
7838
|
-
var FileUploadChip =
|
|
7839
|
-
({ className, type = "button", onClick, ...rest }, ref) => /* @__PURE__ */
|
|
7873
|
+
var FileUploadChip = React52.forwardRef(
|
|
7874
|
+
({ className, type = "button", onClick, ...rest }, ref) => /* @__PURE__ */ jsx40(
|
|
7840
7875
|
"button",
|
|
7841
7876
|
{
|
|
7842
7877
|
ref,
|
|
@@ -7853,12 +7888,12 @@ var FileUploadChip = React51.forwardRef(
|
|
|
7853
7888
|
);
|
|
7854
7889
|
FileUploadChip.displayName = "FileUpload.Chip";
|
|
7855
7890
|
function FileUploadChipLabel({ className, children, ...rest }) {
|
|
7856
|
-
return /* @__PURE__ */
|
|
7891
|
+
return /* @__PURE__ */ jsx40("span", { className: cx(FileUpload_default.chipLabel, className), ...rest, children });
|
|
7857
7892
|
}
|
|
7858
7893
|
FileUploadChipLabel.displayName = "FileUpload.ChipLabel";
|
|
7859
7894
|
function FileUploadFormatBadge({ format, color = "gray", className }) {
|
|
7860
7895
|
const label = format.trim().slice(0, 8).toUpperCase();
|
|
7861
|
-
return /* @__PURE__ */
|
|
7896
|
+
return /* @__PURE__ */ jsx40(
|
|
7862
7897
|
"span",
|
|
7863
7898
|
{
|
|
7864
7899
|
className: cx(FileUpload_default.formatBadge, className),
|
|
@@ -7875,7 +7910,7 @@ function FileUploadItem({
|
|
|
7875
7910
|
size = "m",
|
|
7876
7911
|
...rest
|
|
7877
7912
|
}) {
|
|
7878
|
-
return /* @__PURE__ */
|
|
7913
|
+
return /* @__PURE__ */ jsx40(
|
|
7879
7914
|
"div",
|
|
7880
7915
|
{
|
|
7881
7916
|
className: cx(FileUpload_default.item, className),
|
|
@@ -7886,50 +7921,50 @@ function FileUploadItem({
|
|
|
7886
7921
|
}
|
|
7887
7922
|
FileUploadItem.displayName = "FileUpload.Item";
|
|
7888
7923
|
function FileUploadItemRow({ className, children, ...rest }) {
|
|
7889
|
-
return /* @__PURE__ */
|
|
7924
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemRow, className), ...rest, children });
|
|
7890
7925
|
}
|
|
7891
7926
|
FileUploadItemRow.displayName = "FileUpload.ItemRow";
|
|
7892
7927
|
function FileUploadItemMain({ className, children, ...rest }) {
|
|
7893
|
-
return /* @__PURE__ */
|
|
7928
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemMain, className), ...rest, children });
|
|
7894
7929
|
}
|
|
7895
7930
|
FileUploadItemMain.displayName = "FileUpload.ItemMain";
|
|
7896
7931
|
function FileUploadItemStack({ className, children, ...rest }) {
|
|
7897
|
-
return /* @__PURE__ */
|
|
7932
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemStack, className), ...rest, children });
|
|
7898
7933
|
}
|
|
7899
7934
|
FileUploadItemStack.displayName = "FileUpload.ItemStack";
|
|
7900
7935
|
function FileUploadItemTextGroup({ className, children, ...rest }) {
|
|
7901
|
-
return /* @__PURE__ */
|
|
7936
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemTextGroup, className), ...rest, children });
|
|
7902
7937
|
}
|
|
7903
7938
|
FileUploadItemTextGroup.displayName = "FileUpload.ItemTextGroup";
|
|
7904
|
-
var FileUploadItemTryAgain =
|
|
7905
|
-
({ className, type = "button", ...rest }, ref) => /* @__PURE__ */
|
|
7939
|
+
var FileUploadItemTryAgain = React52.forwardRef(
|
|
7940
|
+
({ className, type = "button", ...rest }, ref) => /* @__PURE__ */ jsx40("button", { ref, type, className: cx(FileUpload_default.itemTryAgain, className), ...rest })
|
|
7906
7941
|
);
|
|
7907
7942
|
FileUploadItemTryAgain.displayName = "FileUpload.ItemTryAgain";
|
|
7908
7943
|
function FileUploadItemName({ className, children, ...rest }) {
|
|
7909
|
-
return /* @__PURE__ */
|
|
7944
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemName, className), ...rest, children });
|
|
7910
7945
|
}
|
|
7911
7946
|
FileUploadItemName.displayName = "FileUpload.ItemName";
|
|
7912
7947
|
function FileUploadItemMeta({ className, children, ...rest }) {
|
|
7913
|
-
return /* @__PURE__ */
|
|
7948
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemMeta, className), ...rest, children });
|
|
7914
7949
|
}
|
|
7915
7950
|
FileUploadItemMeta.displayName = "FileUpload.ItemMeta";
|
|
7916
7951
|
function FileUploadItemMetaSep({ className, ...rest }) {
|
|
7917
|
-
return /* @__PURE__ */
|
|
7952
|
+
return /* @__PURE__ */ jsx40("span", { className: cx(FileUpload_default.itemMetaSep, className), "aria-hidden": true, ...rest, children: "\u2219" });
|
|
7918
7953
|
}
|
|
7919
7954
|
FileUploadItemMetaSep.displayName = "FileUpload.ItemMetaSep";
|
|
7920
7955
|
function FileUploadItemActions({ className, children, ...rest }) {
|
|
7921
|
-
return /* @__PURE__ */
|
|
7956
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemActions, className), ...rest, children });
|
|
7922
7957
|
}
|
|
7923
7958
|
FileUploadItemActions.displayName = "FileUpload.ItemActions";
|
|
7924
7959
|
function FileUploadItemFooter({ className, children, ...rest }) {
|
|
7925
|
-
return /* @__PURE__ */
|
|
7960
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemFooter, className), ...rest, children });
|
|
7926
7961
|
}
|
|
7927
7962
|
FileUploadItemFooter.displayName = "FileUpload.ItemFooter";
|
|
7928
7963
|
function FileUploadItemProgress({ value, max, className, children }) {
|
|
7929
|
-
return /* @__PURE__ */
|
|
7964
|
+
return /* @__PURE__ */ jsx40("div", { className: cx(FileUpload_default.itemProgress, className), children: children ?? (value !== void 0 ? /* @__PURE__ */ jsx40(ProgressBar.Root, { value, max }) : null) });
|
|
7930
7965
|
}
|
|
7931
7966
|
FileUploadItemProgress.displayName = "FileUpload.ItemProgress";
|
|
7932
|
-
var FileUploadRoot =
|
|
7967
|
+
var FileUploadRoot = React52.forwardRef(
|
|
7933
7968
|
({
|
|
7934
7969
|
size = "m",
|
|
7935
7970
|
appearance = "dashed",
|
|
@@ -7942,7 +7977,7 @@ var FileUploadRoot = React51.forwardRef(
|
|
|
7942
7977
|
children,
|
|
7943
7978
|
...rest
|
|
7944
7979
|
}, ref) => {
|
|
7945
|
-
const [isDragOver, setIsDragOver] =
|
|
7980
|
+
const [isDragOver, setIsDragOver] = React52.useState(false);
|
|
7946
7981
|
const mergeInputRef = useMergedRefs(inputRefProp);
|
|
7947
7982
|
const handleChange = (e) => {
|
|
7948
7983
|
const list = e.target.files;
|
|
@@ -7971,12 +8006,12 @@ var FileUploadRoot = React51.forwardRef(
|
|
|
7971
8006
|
}
|
|
7972
8007
|
};
|
|
7973
8008
|
const defaultBody = /* @__PURE__ */ jsxs20("div", { className: FileUpload_default.inner, children: [
|
|
7974
|
-
/* @__PURE__ */
|
|
8009
|
+
/* @__PURE__ */ jsx40(FileUploadIcon, { children: /* @__PURE__ */ jsx40(Icon, { name: "action.upload", size, tone: "subtle" }) }),
|
|
7975
8010
|
/* @__PURE__ */ jsxs20("div", { className: FileUpload_default.copy, children: [
|
|
7976
|
-
/* @__PURE__ */
|
|
7977
|
-
/* @__PURE__ */
|
|
8011
|
+
/* @__PURE__ */ jsx40(FileUploadTitle, { children: "Choose a file or drag & drop it here." }),
|
|
8012
|
+
/* @__PURE__ */ jsx40(FileUploadHint, { children: "JPEG, PNG, PDF, MP4 up to 50 MB." })
|
|
7978
8013
|
] }),
|
|
7979
|
-
/* @__PURE__ */
|
|
8014
|
+
/* @__PURE__ */ jsx40(FileUploadBrowseLabel, { children: "Browse file" })
|
|
7980
8015
|
] });
|
|
7981
8016
|
return /* @__PURE__ */ jsxs20(
|
|
7982
8017
|
"label",
|
|
@@ -7991,7 +8026,7 @@ var FileUploadRoot = React51.forwardRef(
|
|
|
7991
8026
|
onDragLeave: handleDragLeave,
|
|
7992
8027
|
onDrop: handleDrop,
|
|
7993
8028
|
children: [
|
|
7994
|
-
/* @__PURE__ */
|
|
8029
|
+
/* @__PURE__ */ jsx40(
|
|
7995
8030
|
"input",
|
|
7996
8031
|
{
|
|
7997
8032
|
ref: mergeInputRef,
|
|
@@ -8004,7 +8039,7 @@ var FileUploadRoot = React51.forwardRef(
|
|
|
8004
8039
|
"aria-disabled": disabled || void 0
|
|
8005
8040
|
}
|
|
8006
8041
|
),
|
|
8007
|
-
/* @__PURE__ */
|
|
8042
|
+
/* @__PURE__ */ jsx40(ControlSizeProvider, { value: size, children: children ?? defaultBody })
|
|
8008
8043
|
]
|
|
8009
8044
|
}
|
|
8010
8045
|
);
|
|
@@ -8038,7 +8073,7 @@ var FileUpload = {
|
|
|
8038
8073
|
};
|
|
8039
8074
|
|
|
8040
8075
|
// src/components/kbd/Kbd.tsx
|
|
8041
|
-
import * as
|
|
8076
|
+
import * as React53 from "react";
|
|
8042
8077
|
|
|
8043
8078
|
// src/components/kbd/Kbd.module.css
|
|
8044
8079
|
var Kbd_default = {
|
|
@@ -8046,19 +8081,19 @@ var Kbd_default = {
|
|
|
8046
8081
|
};
|
|
8047
8082
|
|
|
8048
8083
|
// src/components/kbd/Kbd.tsx
|
|
8049
|
-
import { jsx as
|
|
8050
|
-
var KbdRoot =
|
|
8084
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
8085
|
+
var KbdRoot = React53.forwardRef(
|
|
8051
8086
|
({ children, className, size: sizeProp, ...rest }, ref) => {
|
|
8052
8087
|
const controlSurface = useOptionalControlSize();
|
|
8053
8088
|
const size = sizeProp ?? (controlSurface !== void 0 ? controlSurfaceToInputSize(controlSurface) : "m");
|
|
8054
|
-
return /* @__PURE__ */
|
|
8089
|
+
return /* @__PURE__ */ jsx41(
|
|
8055
8090
|
"kbd",
|
|
8056
8091
|
{
|
|
8057
8092
|
ref,
|
|
8058
8093
|
className: cx(Kbd_default.root, className),
|
|
8059
8094
|
...rest,
|
|
8060
8095
|
...toDataAttributes({ size }),
|
|
8061
|
-
children: /* @__PURE__ */
|
|
8096
|
+
children: /* @__PURE__ */ jsx41(ControlSizeProvider, { value: size, children })
|
|
8062
8097
|
}
|
|
8063
8098
|
);
|
|
8064
8099
|
}
|
|
@@ -8068,7 +8103,7 @@ var Kbd = { Root: KbdRoot };
|
|
|
8068
8103
|
|
|
8069
8104
|
// src/components/notification/Notification.tsx
|
|
8070
8105
|
import { AlertTriangle, CheckCircle2, Info, X as X3, XCircle } from "lucide-react";
|
|
8071
|
-
import * as
|
|
8106
|
+
import * as React54 from "react";
|
|
8072
8107
|
|
|
8073
8108
|
// src/components/notification/Notification.module.css
|
|
8074
8109
|
var Notification_default = {
|
|
@@ -8097,16 +8132,16 @@ var Notification_default = {
|
|
|
8097
8132
|
};
|
|
8098
8133
|
|
|
8099
8134
|
// src/components/notification/Notification.tsx
|
|
8100
|
-
import { jsx as
|
|
8135
|
+
import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8101
8136
|
function useCountdown(item, paused, onExpire) {
|
|
8102
|
-
const [progress, setProgress] =
|
|
8103
|
-
const remainingRef =
|
|
8104
|
-
const lastTsRef =
|
|
8105
|
-
const pausedRef =
|
|
8106
|
-
const onExpireRef =
|
|
8137
|
+
const [progress, setProgress] = React54.useState(1);
|
|
8138
|
+
const remainingRef = React54.useRef(item.duration);
|
|
8139
|
+
const lastTsRef = React54.useRef(null);
|
|
8140
|
+
const pausedRef = React54.useRef(paused);
|
|
8141
|
+
const onExpireRef = React54.useRef(onExpire);
|
|
8107
8142
|
pausedRef.current = paused;
|
|
8108
8143
|
onExpireRef.current = onExpire;
|
|
8109
|
-
|
|
8144
|
+
React54.useEffect(() => {
|
|
8110
8145
|
if (item.persistent || item.duration <= 0) return;
|
|
8111
8146
|
remainingRef.current = item.duration;
|
|
8112
8147
|
lastTsRef.current = null;
|
|
@@ -8171,14 +8206,14 @@ function NotificationCard({
|
|
|
8171
8206
|
stackExpanded
|
|
8172
8207
|
}),
|
|
8173
8208
|
children: [
|
|
8174
|
-
/* @__PURE__ */
|
|
8209
|
+
/* @__PURE__ */ jsx42("div", { className: Notification_default.iconWrap, "aria-hidden": "true", children: item.icon ?? /* @__PURE__ */ jsx42(DefaultIcon, { className: Notification_default.icon }) }),
|
|
8175
8210
|
/* @__PURE__ */ jsxs21("div", { className: Notification_default.content, children: [
|
|
8176
8211
|
/* @__PURE__ */ jsxs21("header", { className: Notification_default.header, children: [
|
|
8177
|
-
/* @__PURE__ */
|
|
8178
|
-
item.badge !== void 0 ? /* @__PURE__ */
|
|
8212
|
+
/* @__PURE__ */ jsx42("p", { className: Notification_default.title, children: item.title }),
|
|
8213
|
+
item.badge !== void 0 ? /* @__PURE__ */ jsx42("span", { className: Notification_default.badge, children: item.badge }) : null
|
|
8179
8214
|
] }),
|
|
8180
|
-
item.description ? /* @__PURE__ */
|
|
8181
|
-
item.action ? /* @__PURE__ */
|
|
8215
|
+
item.description ? /* @__PURE__ */ jsx42("p", { className: Notification_default.description, children: item.description }) : null,
|
|
8216
|
+
item.action ? /* @__PURE__ */ jsx42("div", { className: Notification_default.actionRow, children: /* @__PURE__ */ jsx42(
|
|
8182
8217
|
Button.Root,
|
|
8183
8218
|
{
|
|
8184
8219
|
type: "button",
|
|
@@ -8190,17 +8225,17 @@ function NotificationCard({
|
|
|
8190
8225
|
}
|
|
8191
8226
|
) }) : null
|
|
8192
8227
|
] }),
|
|
8193
|
-
item.closable ? /* @__PURE__ */
|
|
8228
|
+
item.closable ? /* @__PURE__ */ jsx42(
|
|
8194
8229
|
"button",
|
|
8195
8230
|
{
|
|
8196
8231
|
type: "button",
|
|
8197
8232
|
className: Notification_default.closeButton,
|
|
8198
8233
|
"aria-label": "Dismiss notification",
|
|
8199
8234
|
onClick: () => onDismiss(item.id),
|
|
8200
|
-
children: /* @__PURE__ */
|
|
8235
|
+
children: /* @__PURE__ */ jsx42(X3, { "aria-hidden": "true" })
|
|
8201
8236
|
}
|
|
8202
8237
|
) : null,
|
|
8203
|
-
!item.persistent ? /* @__PURE__ */
|
|
8238
|
+
!item.persistent ? /* @__PURE__ */ jsx42("div", { className: Notification_default.progressTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx42("span", { className: Notification_default.progressValue, style: { transform: `scaleX(${progress})` } }) }) : null
|
|
8204
8239
|
]
|
|
8205
8240
|
}
|
|
8206
8241
|
);
|
|
@@ -8208,8 +8243,8 @@ function NotificationCard({
|
|
|
8208
8243
|
|
|
8209
8244
|
// src/components/notification/NotificationStore.tsx
|
|
8210
8245
|
import { AnimatePresence, LayoutGroup, motion } from "framer-motion";
|
|
8211
|
-
import * as
|
|
8212
|
-
import { jsx as
|
|
8246
|
+
import * as React55 from "react";
|
|
8247
|
+
import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8213
8248
|
var DEFAULT_DURATION = 5e3;
|
|
8214
8249
|
var PEEK_VISIBLE = 3;
|
|
8215
8250
|
var PEEK_PX = 8;
|
|
@@ -8236,7 +8271,7 @@ var POSITIONS = [
|
|
|
8236
8271
|
"bottom-right"
|
|
8237
8272
|
];
|
|
8238
8273
|
var TYPES = ["success", "error", "warning", "info"];
|
|
8239
|
-
var StoreContext =
|
|
8274
|
+
var StoreContext = React55.createContext(null);
|
|
8240
8275
|
function newId() {
|
|
8241
8276
|
return globalThis.crypto?.randomUUID?.() ?? `ntf-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
8242
8277
|
}
|
|
@@ -8248,10 +8283,10 @@ function NotificationStack({
|
|
|
8248
8283
|
items,
|
|
8249
8284
|
onDismiss
|
|
8250
8285
|
}) {
|
|
8251
|
-
const [expanded, setExpanded] =
|
|
8252
|
-
const collapseTimerRef =
|
|
8286
|
+
const [expanded, setExpanded] = React55.useState(false);
|
|
8287
|
+
const collapseTimerRef = React55.useRef(null);
|
|
8253
8288
|
const top = isTop(position);
|
|
8254
|
-
const handleHover =
|
|
8289
|
+
const handleHover = React55.useCallback((hovered) => {
|
|
8255
8290
|
if (collapseTimerRef.current !== null) {
|
|
8256
8291
|
clearTimeout(collapseTimerRef.current);
|
|
8257
8292
|
collapseTimerRef.current = null;
|
|
@@ -8262,14 +8297,14 @@ function NotificationStack({
|
|
|
8262
8297
|
collapseTimerRef.current = window.setTimeout(() => setExpanded(false), 100);
|
|
8263
8298
|
}
|
|
8264
8299
|
}, []);
|
|
8265
|
-
|
|
8300
|
+
React55.useEffect(
|
|
8266
8301
|
() => () => {
|
|
8267
8302
|
if (collapseTimerRef.current !== null) clearTimeout(collapseTimerRef.current);
|
|
8268
8303
|
},
|
|
8269
8304
|
[]
|
|
8270
8305
|
);
|
|
8271
8306
|
const visible = items.filter((n) => !n.dismissing);
|
|
8272
|
-
return /* @__PURE__ */
|
|
8307
|
+
return /* @__PURE__ */ jsx43(
|
|
8273
8308
|
motion.ol,
|
|
8274
8309
|
{
|
|
8275
8310
|
layout: true,
|
|
@@ -8280,7 +8315,7 @@ function NotificationStack({
|
|
|
8280
8315
|
transition: { layout: TWEEN_SLOW },
|
|
8281
8316
|
onMouseEnter: () => handleHover(true),
|
|
8282
8317
|
onMouseLeave: () => handleHover(false),
|
|
8283
|
-
children: /* @__PURE__ */
|
|
8318
|
+
children: /* @__PURE__ */ jsx43(AnimatePresence, { children: visible.map((item, index) => /* @__PURE__ */ jsx43(
|
|
8284
8319
|
NotificationStackItem,
|
|
8285
8320
|
{
|
|
8286
8321
|
item,
|
|
@@ -8296,7 +8331,7 @@ function NotificationStack({
|
|
|
8296
8331
|
}
|
|
8297
8332
|
);
|
|
8298
8333
|
}
|
|
8299
|
-
var NotificationStackItem =
|
|
8334
|
+
var NotificationStackItem = React55.memo(function NotificationStackItem2({
|
|
8300
8335
|
item,
|
|
8301
8336
|
index,
|
|
8302
8337
|
expanded,
|
|
@@ -8311,7 +8346,7 @@ var NotificationStackItem = React54.memo(function NotificationStackItem2({
|
|
|
8311
8346
|
const rotateEnter = top ? -45 : 45;
|
|
8312
8347
|
const rotateExit = top ? 25 : -25;
|
|
8313
8348
|
const layoutDep = `${item.id}-${index}-${String(expanded)}-${String(hidden)}`;
|
|
8314
|
-
return /* @__PURE__ */
|
|
8349
|
+
return /* @__PURE__ */ jsx43(
|
|
8315
8350
|
motion.li,
|
|
8316
8351
|
{
|
|
8317
8352
|
className: Notification_default.item,
|
|
@@ -8347,7 +8382,7 @@ var NotificationStackItem = React54.memo(function NotificationStackItem2({
|
|
|
8347
8382
|
transformOrigin: top ? "top center" : "bottom center",
|
|
8348
8383
|
pointerEvents: hidden ? "none" : "auto"
|
|
8349
8384
|
},
|
|
8350
|
-
children: /* @__PURE__ */
|
|
8385
|
+
children: /* @__PURE__ */ jsx43(
|
|
8351
8386
|
NotificationCard,
|
|
8352
8387
|
{
|
|
8353
8388
|
item,
|
|
@@ -8364,7 +8399,7 @@ function NotificationToaster({
|
|
|
8364
8399
|
entries,
|
|
8365
8400
|
onDismiss
|
|
8366
8401
|
}) {
|
|
8367
|
-
const grouped =
|
|
8402
|
+
const grouped = React55.useMemo(() => {
|
|
8368
8403
|
const map = /* @__PURE__ */ new Map();
|
|
8369
8404
|
for (const entry of entries) {
|
|
8370
8405
|
if (!map.has(entry.position)) map.set(entry.position, /* @__PURE__ */ new Map());
|
|
@@ -8380,18 +8415,18 @@ function NotificationToaster({
|
|
|
8380
8415
|
}
|
|
8381
8416
|
return map;
|
|
8382
8417
|
}, [entries]);
|
|
8383
|
-
return /* @__PURE__ */
|
|
8418
|
+
return /* @__PURE__ */ jsx43(Portal, { children: /* @__PURE__ */ jsx43("div", { className: Notification_default.viewport, children: POSITIONS.map((pos) => {
|
|
8384
8419
|
const byType = grouped.get(pos);
|
|
8385
8420
|
if (!byType?.size) return null;
|
|
8386
8421
|
const [vertical, horizontal] = pos.split("-");
|
|
8387
8422
|
const stacks = TYPES.map((type) => ({ type, items: byType.get(type) ?? [] })).filter(
|
|
8388
8423
|
(s) => s.items.length > 0
|
|
8389
8424
|
);
|
|
8390
|
-
return /* @__PURE__ */
|
|
8425
|
+
return /* @__PURE__ */ jsx43(
|
|
8391
8426
|
"section",
|
|
8392
8427
|
{
|
|
8393
8428
|
className: `${Notification_default.zone} ${Notification_default[vertical]} ${Notification_default[horizontal]}`,
|
|
8394
|
-
children: /* @__PURE__ */
|
|
8429
|
+
children: /* @__PURE__ */ jsx43(LayoutGroup, { id: `zone-${pos}`, children: stacks.map((s) => /* @__PURE__ */ jsx43(
|
|
8395
8430
|
NotificationStack,
|
|
8396
8431
|
{
|
|
8397
8432
|
position: pos,
|
|
@@ -8410,18 +8445,18 @@ function NotificationProvider({
|
|
|
8410
8445
|
position = "top-right",
|
|
8411
8446
|
max = 5
|
|
8412
8447
|
}) {
|
|
8413
|
-
const [entries, setEntries] =
|
|
8414
|
-
const dismiss =
|
|
8448
|
+
const [entries, setEntries] = React55.useState([]);
|
|
8449
|
+
const dismiss = React55.useCallback((id) => {
|
|
8415
8450
|
setEntries((prev) => prev.map((n) => n.id === id ? { ...n, dismissing: true } : n));
|
|
8416
8451
|
window.setTimeout(() => {
|
|
8417
8452
|
setEntries((prev) => prev.filter((n) => n.id !== id));
|
|
8418
8453
|
}, DISMISS_CLEANUP_MS);
|
|
8419
8454
|
}, []);
|
|
8420
|
-
const dismissAll =
|
|
8455
|
+
const dismissAll = React55.useCallback(() => {
|
|
8421
8456
|
setEntries((prev) => prev.map((n) => ({ ...n, dismissing: true })));
|
|
8422
8457
|
window.setTimeout(() => setEntries([]), DISMISS_CLEANUP_MS);
|
|
8423
8458
|
}, []);
|
|
8424
|
-
const notify =
|
|
8459
|
+
const notify = React55.useCallback(
|
|
8425
8460
|
(options) => {
|
|
8426
8461
|
const id = newId();
|
|
8427
8462
|
const record = {
|
|
@@ -8447,29 +8482,29 @@ function NotificationProvider({
|
|
|
8447
8482
|
},
|
|
8448
8483
|
[position, max]
|
|
8449
8484
|
);
|
|
8450
|
-
const publicItems =
|
|
8451
|
-
const value =
|
|
8485
|
+
const publicItems = React55.useMemo(() => entries.filter((n) => !n.dismissing), [entries]);
|
|
8486
|
+
const value = React55.useMemo(
|
|
8452
8487
|
() => ({ items: publicItems, notify, dismiss, dismissAll }),
|
|
8453
8488
|
[publicItems, notify, dismiss, dismissAll]
|
|
8454
8489
|
);
|
|
8455
8490
|
return /* @__PURE__ */ jsxs22(StoreContext.Provider, { value, children: [
|
|
8456
8491
|
children,
|
|
8457
|
-
/* @__PURE__ */
|
|
8492
|
+
/* @__PURE__ */ jsx43(NotificationToaster, { entries, onDismiss: dismiss })
|
|
8458
8493
|
] });
|
|
8459
8494
|
}
|
|
8460
8495
|
function useNotifications() {
|
|
8461
|
-
const ctx =
|
|
8496
|
+
const ctx = React55.useContext(StoreContext);
|
|
8462
8497
|
if (!ctx) throw new Error("useNotifications must be used within NotificationProvider");
|
|
8463
8498
|
return { notify: ctx.notify, dismiss: ctx.dismiss, dismissAll: ctx.dismissAll };
|
|
8464
8499
|
}
|
|
8465
8500
|
function useNotificationStore() {
|
|
8466
|
-
const ctx =
|
|
8501
|
+
const ctx = React55.useContext(StoreContext);
|
|
8467
8502
|
if (!ctx) throw new Error("useNotificationStore must be used within NotificationProvider");
|
|
8468
8503
|
return ctx;
|
|
8469
8504
|
}
|
|
8470
8505
|
|
|
8471
8506
|
// src/components/page-content/PageContent.tsx
|
|
8472
|
-
import * as
|
|
8507
|
+
import * as React56 from "react";
|
|
8473
8508
|
|
|
8474
8509
|
// src/components/page-content/PageContent.module.css
|
|
8475
8510
|
var PageContent_default = {
|
|
@@ -8482,10 +8517,10 @@ var PageContent_default = {
|
|
|
8482
8517
|
};
|
|
8483
8518
|
|
|
8484
8519
|
// src/components/page-content/PageContent.tsx
|
|
8485
|
-
import { jsx as
|
|
8486
|
-
var PageContentRoot =
|
|
8520
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
8521
|
+
var PageContentRoot = React56.forwardRef(
|
|
8487
8522
|
function PageContentRoot2({ maxWidth = "full", className, children, ...rest }, forwardedRef) {
|
|
8488
|
-
return /* @__PURE__ */
|
|
8523
|
+
return /* @__PURE__ */ jsx44(
|
|
8489
8524
|
"div",
|
|
8490
8525
|
{
|
|
8491
8526
|
ref: forwardedRef,
|
|
@@ -8500,25 +8535,25 @@ var PageContentRoot = React55.forwardRef(
|
|
|
8500
8535
|
}
|
|
8501
8536
|
);
|
|
8502
8537
|
PageContentRoot.displayName = "PageContent.Root";
|
|
8503
|
-
var PageContentSection =
|
|
8538
|
+
var PageContentSection = React56.forwardRef(
|
|
8504
8539
|
function PageContentSection2({ className, children, ...rest }, forwardedRef) {
|
|
8505
|
-
return /* @__PURE__ */
|
|
8540
|
+
return /* @__PURE__ */ jsx44("section", { ref: forwardedRef, className: cx(PageContent_default.section, className), ...rest, children });
|
|
8506
8541
|
}
|
|
8507
8542
|
);
|
|
8508
8543
|
PageContentSection.displayName = "PageContent.Section";
|
|
8509
8544
|
function PageContentHeader({ className, children, ...rest }) {
|
|
8510
|
-
return /* @__PURE__ */
|
|
8545
|
+
return /* @__PURE__ */ jsx44("div", { className: cx(PageContent_default.header, className), ...rest, children });
|
|
8511
8546
|
}
|
|
8512
8547
|
PageContentHeader.displayName = "PageContent.Header";
|
|
8513
|
-
var PageContentTitle =
|
|
8548
|
+
var PageContentTitle = React56.forwardRef(
|
|
8514
8549
|
function PageContentTitle2({ className, children, ...rest }, forwardedRef) {
|
|
8515
|
-
return /* @__PURE__ */
|
|
8550
|
+
return /* @__PURE__ */ jsx44("h1", { ref: forwardedRef, className: cx(PageContent_default.title, className), ...rest, children });
|
|
8516
8551
|
}
|
|
8517
8552
|
);
|
|
8518
8553
|
PageContentTitle.displayName = "PageContent.Title";
|
|
8519
|
-
var PageContentDescription =
|
|
8554
|
+
var PageContentDescription = React56.forwardRef(
|
|
8520
8555
|
function PageContentDescription2({ className, children, measure = "readable", ...rest }, forwardedRef) {
|
|
8521
|
-
return /* @__PURE__ */
|
|
8556
|
+
return /* @__PURE__ */ jsx44(
|
|
8522
8557
|
"p",
|
|
8523
8558
|
{
|
|
8524
8559
|
ref: forwardedRef,
|
|
@@ -8534,7 +8569,7 @@ var PageContentDescription = React55.forwardRef(
|
|
|
8534
8569
|
);
|
|
8535
8570
|
PageContentDescription.displayName = "PageContent.Description";
|
|
8536
8571
|
function PageContentBody({ className, children, ...rest }) {
|
|
8537
|
-
return /* @__PURE__ */
|
|
8572
|
+
return /* @__PURE__ */ jsx44("div", { className: cx(PageContent_default.body, className), ...rest, children });
|
|
8538
8573
|
}
|
|
8539
8574
|
PageContentBody.displayName = "PageContent.Body";
|
|
8540
8575
|
var PageContent = {
|
|
@@ -8547,17 +8582,17 @@ var PageContent = {
|
|
|
8547
8582
|
};
|
|
8548
8583
|
|
|
8549
8584
|
// src/components/popover/Popover.tsx
|
|
8550
|
-
import * as
|
|
8585
|
+
import * as React58 from "react";
|
|
8551
8586
|
|
|
8552
8587
|
// src/components/popover/Popover.module.css
|
|
8553
8588
|
var Popover_default = {
|
|
8554
|
-
|
|
8589
|
+
popoverScroll: "Popover_popoverScroll2",
|
|
8555
8590
|
popoverInBottom: "Popover_popoverInBottom2",
|
|
8556
8591
|
popoverInTop: "Popover_popoverInTop2"
|
|
8557
8592
|
};
|
|
8558
8593
|
|
|
8559
8594
|
// src/components/popover/usePopoverPosition.ts
|
|
8560
|
-
import * as
|
|
8595
|
+
import * as React57 from "react";
|
|
8561
8596
|
|
|
8562
8597
|
// src/components/popover/popoverGeometry.ts
|
|
8563
8598
|
var POPOVER_MIN_MAX_HEIGHT = 120;
|
|
@@ -8584,8 +8619,8 @@ function usePopoverPosition({
|
|
|
8584
8619
|
align,
|
|
8585
8620
|
sameMinWidthAsTrigger
|
|
8586
8621
|
}) {
|
|
8587
|
-
const [layout, setLayout] =
|
|
8588
|
-
const commit =
|
|
8622
|
+
const [layout, setLayout] = React57.useState(null);
|
|
8623
|
+
const commit = React57.useCallback(() => {
|
|
8589
8624
|
const trigger = triggerRef.current;
|
|
8590
8625
|
const panel = contentRef.current;
|
|
8591
8626
|
if (!trigger || !panel) return;
|
|
@@ -8622,7 +8657,7 @@ function usePopoverPosition({
|
|
|
8622
8657
|
};
|
|
8623
8658
|
setLayout((prev) => prev && layoutEqual2(prev, next) ? prev : next);
|
|
8624
8659
|
}, [triggerRef, contentRef, side, align, sameMinWidthAsTrigger]);
|
|
8625
|
-
|
|
8660
|
+
React57.useLayoutEffect(() => {
|
|
8626
8661
|
if (!open) {
|
|
8627
8662
|
setLayout(null);
|
|
8628
8663
|
return;
|
|
@@ -8659,7 +8694,7 @@ function usePopoverPosition({
|
|
|
8659
8694
|
}
|
|
8660
8695
|
|
|
8661
8696
|
// src/components/popover/Popover.tsx
|
|
8662
|
-
import { jsx as
|
|
8697
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
8663
8698
|
var [PopoverProvider, usePopoverContext] = createComponentContext("Popover");
|
|
8664
8699
|
function PopoverRoot({ open, defaultOpen = false, onOpenChange, children }) {
|
|
8665
8700
|
const [isOpen, setIsOpen] = useControllableState({
|
|
@@ -8667,25 +8702,25 @@ function PopoverRoot({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
8667
8702
|
defaultValue: defaultOpen,
|
|
8668
8703
|
onChange: onOpenChange
|
|
8669
8704
|
});
|
|
8670
|
-
const id =
|
|
8705
|
+
const id = React58.useId();
|
|
8671
8706
|
const triggerId = `${id}-trigger`;
|
|
8672
8707
|
const contentId = `${id}-content`;
|
|
8673
|
-
const triggerRef =
|
|
8674
|
-
const onClose =
|
|
8675
|
-
const onToggle =
|
|
8676
|
-
const value =
|
|
8708
|
+
const triggerRef = React58.useRef(null);
|
|
8709
|
+
const onClose = React58.useCallback(() => setIsOpen(false), [setIsOpen]);
|
|
8710
|
+
const onToggle = React58.useCallback(() => setIsOpen((v) => !v), [setIsOpen]);
|
|
8711
|
+
const value = React58.useMemo(
|
|
8677
8712
|
() => ({ isOpen, onClose, onToggle, triggerId, contentId, triggerRef }),
|
|
8678
8713
|
[isOpen, onClose, onToggle, triggerId, contentId]
|
|
8679
8714
|
);
|
|
8680
|
-
return /* @__PURE__ */
|
|
8715
|
+
return /* @__PURE__ */ jsx45(PopoverProvider, { value, children });
|
|
8681
8716
|
}
|
|
8682
8717
|
PopoverRoot.displayName = "PopoverRoot";
|
|
8683
8718
|
function PopoverTrigger({ children, asChild: _asChild = true }) {
|
|
8684
8719
|
void _asChild;
|
|
8685
8720
|
const { isOpen, onToggle, triggerId, contentId, triggerRef } = usePopoverContext();
|
|
8686
|
-
const toggleRef =
|
|
8721
|
+
const toggleRef = React58.useRef(onToggle);
|
|
8687
8722
|
toggleRef.current = onToggle;
|
|
8688
|
-
const setNode =
|
|
8723
|
+
const setNode = React58.useCallback(
|
|
8689
8724
|
(el) => {
|
|
8690
8725
|
triggerRef.current = el;
|
|
8691
8726
|
},
|
|
@@ -8693,9 +8728,9 @@ function PopoverTrigger({ children, asChild: _asChild = true }) {
|
|
|
8693
8728
|
);
|
|
8694
8729
|
const child = children;
|
|
8695
8730
|
const childRef = child.props.ref ?? child.ref;
|
|
8696
|
-
const mergedRef =
|
|
8731
|
+
const mergedRef = React58.useMemo(() => mergeRefs(childRef, setNode), [childRef, setNode]);
|
|
8697
8732
|
const userClick = child.props?.onClick;
|
|
8698
|
-
return
|
|
8733
|
+
return React58.cloneElement(child, {
|
|
8699
8734
|
ref: mergedRef,
|
|
8700
8735
|
id: triggerId,
|
|
8701
8736
|
"aria-expanded": isOpen,
|
|
@@ -8715,13 +8750,13 @@ function PopoverContent({
|
|
|
8715
8750
|
size = "m",
|
|
8716
8751
|
trapFocus = false,
|
|
8717
8752
|
insetPadding = "none",
|
|
8718
|
-
insetGap = "
|
|
8753
|
+
insetGap = "pad",
|
|
8719
8754
|
children,
|
|
8720
8755
|
className
|
|
8721
8756
|
}) {
|
|
8722
8757
|
const { isOpen, onClose, triggerRef, contentId, triggerId } = usePopoverContext();
|
|
8723
8758
|
const overlayPortalLayer = useOverlayPortalLayer();
|
|
8724
|
-
const contentRef =
|
|
8759
|
+
const contentRef = React58.useRef(null);
|
|
8725
8760
|
const layout = usePopoverPosition({
|
|
8726
8761
|
open: isOpen,
|
|
8727
8762
|
triggerRef,
|
|
@@ -8734,7 +8769,7 @@ function PopoverContent({
|
|
|
8734
8769
|
enabled: isOpen && trapFocus,
|
|
8735
8770
|
restoreFocus: true
|
|
8736
8771
|
});
|
|
8737
|
-
const ref =
|
|
8772
|
+
const ref = React58.useMemo(() => mergeRefs(contentRef, trapRef), [trapRef]);
|
|
8738
8773
|
useEscapeKey({ enabled: isOpen, onEscape: onClose });
|
|
8739
8774
|
useOutsideClick({
|
|
8740
8775
|
refs: [triggerRef, contentRef],
|
|
@@ -8743,7 +8778,7 @@ function PopoverContent({
|
|
|
8743
8778
|
shouldSuppressOutsideClick: (target) => isPortaledSelectListboxOwnedByContainer(target, contentRef.current)
|
|
8744
8779
|
});
|
|
8745
8780
|
if (!isOpen) return null;
|
|
8746
|
-
return /* @__PURE__ */
|
|
8781
|
+
return /* @__PURE__ */ jsx45(Portal, { children: /* @__PURE__ */ jsx45(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx45(
|
|
8747
8782
|
ScrollContainer,
|
|
8748
8783
|
{
|
|
8749
8784
|
ref,
|
|
@@ -8757,7 +8792,7 @@ function PopoverContent({
|
|
|
8757
8792
|
"data-size": size,
|
|
8758
8793
|
"data-inset-padding": insetPadding,
|
|
8759
8794
|
"data-inset-gap": insetGap,
|
|
8760
|
-
className: cx(Popover_default.
|
|
8795
|
+
className: cx(Popover_default.popoverScroll, className),
|
|
8761
8796
|
style: layout?.style,
|
|
8762
8797
|
children
|
|
8763
8798
|
}
|
|
@@ -8771,7 +8806,7 @@ var Popover = {
|
|
|
8771
8806
|
};
|
|
8772
8807
|
|
|
8773
8808
|
// src/components/progress-circle/ProgressCircle.tsx
|
|
8774
|
-
import * as
|
|
8809
|
+
import * as React59 from "react";
|
|
8775
8810
|
|
|
8776
8811
|
// src/components/progress-circle/ProgressCircle.module.css
|
|
8777
8812
|
var ProgressCircle_default = {
|
|
@@ -8782,12 +8817,12 @@ var ProgressCircle_default = {
|
|
|
8782
8817
|
};
|
|
8783
8818
|
|
|
8784
8819
|
// src/components/progress-circle/ProgressCircle.tsx
|
|
8785
|
-
import { jsx as
|
|
8820
|
+
import { jsx as jsx46, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8786
8821
|
var pc = primitiveTokens.progressCircle;
|
|
8787
8822
|
function clampProgress2(value, max) {
|
|
8788
8823
|
return Math.min(max, Math.max(value, 0));
|
|
8789
8824
|
}
|
|
8790
|
-
var ProgressCircleRoot =
|
|
8825
|
+
var ProgressCircleRoot = React59.forwardRef(
|
|
8791
8826
|
({ value, max = 100, size = "m", label, children, className }, ref) => {
|
|
8792
8827
|
const safeMax = max > 0 ? max : 100;
|
|
8793
8828
|
const safeValue = clampProgress2(value, safeMax);
|
|
@@ -8821,7 +8856,7 @@ var ProgressCircleRoot = React58.forwardRef(
|
|
|
8821
8856
|
"aria-valuemax": safeMax,
|
|
8822
8857
|
"aria-label": label,
|
|
8823
8858
|
children: [
|
|
8824
|
-
/* @__PURE__ */
|
|
8859
|
+
/* @__PURE__ */ jsx46(
|
|
8825
8860
|
"circle",
|
|
8826
8861
|
{
|
|
8827
8862
|
cx: center,
|
|
@@ -8832,7 +8867,7 @@ var ProgressCircleRoot = React58.forwardRef(
|
|
|
8832
8867
|
strokeWidth
|
|
8833
8868
|
}
|
|
8834
8869
|
),
|
|
8835
|
-
/* @__PURE__ */
|
|
8870
|
+
/* @__PURE__ */ jsx46(
|
|
8836
8871
|
"circle",
|
|
8837
8872
|
{
|
|
8838
8873
|
cx: center,
|
|
@@ -8849,7 +8884,7 @@ var ProgressCircleRoot = React58.forwardRef(
|
|
|
8849
8884
|
]
|
|
8850
8885
|
}
|
|
8851
8886
|
),
|
|
8852
|
-
children ? /* @__PURE__ */
|
|
8887
|
+
children ? /* @__PURE__ */ jsx46("div", { className: ProgressCircle_default.inner, children }) : null
|
|
8853
8888
|
]
|
|
8854
8889
|
}
|
|
8855
8890
|
);
|
|
@@ -8859,7 +8894,7 @@ ProgressCircleRoot.displayName = "ProgressCircleRoot";
|
|
|
8859
8894
|
var ProgressCircle = { Root: ProgressCircleRoot };
|
|
8860
8895
|
|
|
8861
8896
|
// src/components/radio/Radio.tsx
|
|
8862
|
-
import * as
|
|
8897
|
+
import * as React60 from "react";
|
|
8863
8898
|
|
|
8864
8899
|
// src/components/radio/Radio.module.css
|
|
8865
8900
|
var Radio_default = {
|
|
@@ -8875,9 +8910,9 @@ var Radio_default = {
|
|
|
8875
8910
|
};
|
|
8876
8911
|
|
|
8877
8912
|
// src/components/radio/Radio.tsx
|
|
8878
|
-
import { jsx as
|
|
8913
|
+
import { jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8879
8914
|
var [RadioProvider, useRadioContext] = createComponentContext("Radio");
|
|
8880
|
-
var RadioRoot =
|
|
8915
|
+
var RadioRoot = React60.forwardRef(
|
|
8881
8916
|
({
|
|
8882
8917
|
id,
|
|
8883
8918
|
variant = "default",
|
|
@@ -8888,14 +8923,14 @@ var RadioRoot = React59.forwardRef(
|
|
|
8888
8923
|
children,
|
|
8889
8924
|
...inputRest
|
|
8890
8925
|
}, ref) => {
|
|
8891
|
-
const rawId =
|
|
8926
|
+
const rawId = React60.useId();
|
|
8892
8927
|
const inputId = id ?? rawId;
|
|
8893
8928
|
const hintId = `${inputId}-hint`;
|
|
8894
8929
|
const errorId = `${inputId}-error`;
|
|
8895
|
-
const [hasHint, setHasHint] =
|
|
8896
|
-
const [hasError, setHasError] =
|
|
8930
|
+
const [hasHint, setHasHint] = React60.useState(false);
|
|
8931
|
+
const [hasError, setHasError] = React60.useState(false);
|
|
8897
8932
|
const invalid = variant === "error" || hasError;
|
|
8898
|
-
const restInputPropsRef =
|
|
8933
|
+
const restInputPropsRef = React60.useRef(inputRest);
|
|
8899
8934
|
restInputPropsRef.current = inputRest;
|
|
8900
8935
|
const parts = [
|
|
8901
8936
|
ariaDescribedBy,
|
|
@@ -8903,11 +8938,11 @@ var RadioRoot = React59.forwardRef(
|
|
|
8903
8938
|
hasError ? errorId : void 0
|
|
8904
8939
|
].filter(Boolean);
|
|
8905
8940
|
const describedBy = parts.length > 0 ? parts.join(" ") : void 0;
|
|
8906
|
-
const registerHint =
|
|
8907
|
-
const unregisterHint =
|
|
8908
|
-
const registerError =
|
|
8909
|
-
const unregisterError =
|
|
8910
|
-
const ctxValue =
|
|
8941
|
+
const registerHint = React60.useCallback(() => setHasHint(true), []);
|
|
8942
|
+
const unregisterHint = React60.useCallback(() => setHasHint(false), []);
|
|
8943
|
+
const registerError = React60.useCallback(() => setHasError(true), []);
|
|
8944
|
+
const unregisterError = React60.useCallback(() => setHasError(false), []);
|
|
8945
|
+
const ctxValue = React60.useMemo(
|
|
8911
8946
|
() => ({
|
|
8912
8947
|
inputId,
|
|
8913
8948
|
hintId,
|
|
@@ -8938,7 +8973,7 @@ var RadioRoot = React59.forwardRef(
|
|
|
8938
8973
|
unregisterError
|
|
8939
8974
|
]
|
|
8940
8975
|
);
|
|
8941
|
-
return /* @__PURE__ */
|
|
8976
|
+
return /* @__PURE__ */ jsx47(RadioProvider, { value: ctxValue, children: /* @__PURE__ */ jsx47(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx47(
|
|
8942
8977
|
"div",
|
|
8943
8978
|
{
|
|
8944
8979
|
className: cx(Radio_default.field, className),
|
|
@@ -8954,9 +8989,9 @@ var RadioRoot = React59.forwardRef(
|
|
|
8954
8989
|
}
|
|
8955
8990
|
);
|
|
8956
8991
|
RadioRoot.displayName = "RadioRoot";
|
|
8957
|
-
var RadioLabel =
|
|
8992
|
+
var RadioLabel = React60.forwardRef(function RadioLabel2({ children, className, ...rest }, ref) {
|
|
8958
8993
|
const { inputId, inputRef, invalid, disabled, describedBy, restInputPropsRef, size } = useRadioContext();
|
|
8959
|
-
const filterId =
|
|
8994
|
+
const filterId = React60.useId();
|
|
8960
8995
|
const svgFilterId = `es-radio-${filterId.replace(/:/g, "")}`;
|
|
8961
8996
|
return /* @__PURE__ */ jsxs24(
|
|
8962
8997
|
Label.Root,
|
|
@@ -8969,7 +9004,7 @@ var RadioLabel = React59.forwardRef(function RadioLabel2({ children, className,
|
|
|
8969
9004
|
...rest,
|
|
8970
9005
|
children: [
|
|
8971
9006
|
/* @__PURE__ */ jsxs24("span", { className: Radio_default.controlCell, children: [
|
|
8972
|
-
/* @__PURE__ */
|
|
9007
|
+
/* @__PURE__ */ jsx47(
|
|
8973
9008
|
"input",
|
|
8974
9009
|
{
|
|
8975
9010
|
ref: inputRef,
|
|
@@ -8983,8 +9018,8 @@ var RadioLabel = React59.forwardRef(function RadioLabel2({ children, className,
|
|
|
8983
9018
|
}
|
|
8984
9019
|
),
|
|
8985
9020
|
/* @__PURE__ */ jsxs24("svg", { viewBox: "0 0 18 18", className: Radio_default.svg, "aria-hidden": "true", children: [
|
|
8986
|
-
/* @__PURE__ */
|
|
8987
|
-
/* @__PURE__ */
|
|
9021
|
+
/* @__PURE__ */ jsx47("defs", { children: /* @__PURE__ */ jsx47("filter", { id: svgFilterId, children: /* @__PURE__ */ jsx47("feDropShadow", { dx: "0", dy: "1", stdDeviation: "0.5", floodOpacity: "0.10" }) }) }),
|
|
9022
|
+
/* @__PURE__ */ jsx47(
|
|
8988
9023
|
"circle",
|
|
8989
9024
|
{
|
|
8990
9025
|
cx: "9",
|
|
@@ -8994,10 +9029,10 @@ var RadioLabel = React59.forwardRef(function RadioLabel2({ children, className,
|
|
|
8994
9029
|
filter: `url(#${svgFilterId})`
|
|
8995
9030
|
}
|
|
8996
9031
|
),
|
|
8997
|
-
/* @__PURE__ */
|
|
9032
|
+
/* @__PURE__ */ jsx47("circle", { cx: "9", cy: "9", r: "4", className: Radio_default.innerCircle })
|
|
8998
9033
|
] })
|
|
8999
9034
|
] }),
|
|
9000
|
-
children !== void 0 && children !== null ? /* @__PURE__ */
|
|
9035
|
+
children !== void 0 && children !== null ? /* @__PURE__ */ jsx47("span", { className: Radio_default.text, children }) : null
|
|
9001
9036
|
]
|
|
9002
9037
|
}
|
|
9003
9038
|
);
|
|
@@ -9005,13 +9040,13 @@ var RadioLabel = React59.forwardRef(function RadioLabel2({ children, className,
|
|
|
9005
9040
|
RadioLabel.displayName = "RadioLabel";
|
|
9006
9041
|
function RadioHint({ children, className, ...rest }) {
|
|
9007
9042
|
const { hintId, registerHint, unregisterHint, size, disabled } = useRadioContext();
|
|
9008
|
-
|
|
9043
|
+
React60.useLayoutEffect(() => {
|
|
9009
9044
|
registerHint();
|
|
9010
9045
|
return () => {
|
|
9011
9046
|
unregisterHint();
|
|
9012
9047
|
};
|
|
9013
9048
|
}, [registerHint, unregisterHint]);
|
|
9014
|
-
return /* @__PURE__ */
|
|
9049
|
+
return /* @__PURE__ */ jsx47(
|
|
9015
9050
|
Hint.Root,
|
|
9016
9051
|
{
|
|
9017
9052
|
id: hintId,
|
|
@@ -9026,13 +9061,13 @@ function RadioHint({ children, className, ...rest }) {
|
|
|
9026
9061
|
RadioHint.displayName = "RadioHint";
|
|
9027
9062
|
function RadioError({ children, className, ...rest }) {
|
|
9028
9063
|
const { errorId, registerError, unregisterError, size } = useRadioContext();
|
|
9029
|
-
|
|
9064
|
+
React60.useLayoutEffect(() => {
|
|
9030
9065
|
registerError();
|
|
9031
9066
|
return () => {
|
|
9032
9067
|
unregisterError();
|
|
9033
9068
|
};
|
|
9034
9069
|
}, [registerError, unregisterError]);
|
|
9035
|
-
return /* @__PURE__ */
|
|
9070
|
+
return /* @__PURE__ */ jsx47(
|
|
9036
9071
|
Hint.Root,
|
|
9037
9072
|
{
|
|
9038
9073
|
id: errorId,
|
|
@@ -9053,7 +9088,7 @@ var Radio = {
|
|
|
9053
9088
|
};
|
|
9054
9089
|
|
|
9055
9090
|
// src/components/segmented-progress-bar/SegmentedProgressBar.tsx
|
|
9056
|
-
import * as
|
|
9091
|
+
import * as React61 from "react";
|
|
9057
9092
|
|
|
9058
9093
|
// src/components/segmented-progress-bar/SegmentedProgressBar.module.css
|
|
9059
9094
|
var SegmentedProgressBar_default = {
|
|
@@ -9065,7 +9100,7 @@ var SegmentedProgressBar_default = {
|
|
|
9065
9100
|
};
|
|
9066
9101
|
|
|
9067
9102
|
// src/components/segmented-progress-bar/SegmentedProgressBar.tsx
|
|
9068
|
-
import { jsx as
|
|
9103
|
+
import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9069
9104
|
function clampNonNegative(n) {
|
|
9070
9105
|
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
9071
9106
|
}
|
|
@@ -9082,15 +9117,15 @@ function buildDistributionDescription(segments, total) {
|
|
|
9082
9117
|
});
|
|
9083
9118
|
return parts.join(", ");
|
|
9084
9119
|
}
|
|
9085
|
-
var SegmentedProgressBarRoot =
|
|
9120
|
+
var SegmentedProgressBarRoot = React61.forwardRef(
|
|
9086
9121
|
({ segments, label, size = "m", segmentGap = "none", className }, ref) => {
|
|
9087
|
-
const labelId =
|
|
9088
|
-
const descriptionId =
|
|
9089
|
-
const safe =
|
|
9122
|
+
const labelId = React61.useId();
|
|
9123
|
+
const descriptionId = React61.useId();
|
|
9124
|
+
const safe = React61.useMemo(
|
|
9090
9125
|
() => segments.map((s) => ({ ...s, value: clampNonNegative(s.value) })),
|
|
9091
9126
|
[segments]
|
|
9092
9127
|
);
|
|
9093
|
-
const total =
|
|
9128
|
+
const total = React61.useMemo(() => safe.reduce((acc, s) => acc + s.value, 0), [safe]);
|
|
9094
9129
|
const distributionText = buildDistributionDescription(safe, total);
|
|
9095
9130
|
const trackA11y = label ? { "aria-labelledby": labelId, "aria-describedby": descriptionId } : { "aria-label": distributionText };
|
|
9096
9131
|
return /* @__PURE__ */ jsxs25(
|
|
@@ -9099,10 +9134,10 @@ var SegmentedProgressBarRoot = React60.forwardRef(
|
|
|
9099
9134
|
className: cx(SegmentedProgressBar_default.root, className),
|
|
9100
9135
|
...toDataAttributes({ size, "segment-gap": segmentGap }),
|
|
9101
9136
|
children: [
|
|
9102
|
-
label ? /* @__PURE__ */
|
|
9103
|
-
label ? /* @__PURE__ */
|
|
9104
|
-
/* @__PURE__ */
|
|
9105
|
-
return /* @__PURE__ */
|
|
9137
|
+
label ? /* @__PURE__ */ jsx48("span", { className: SegmentedProgressBar_default.label, id: labelId, children: label }) : null,
|
|
9138
|
+
label ? /* @__PURE__ */ jsx48("span", { id: descriptionId, className: SegmentedProgressBar_default.visuallyHidden, children: distributionText }) : null,
|
|
9139
|
+
/* @__PURE__ */ jsx48("div", { ref, className: SegmentedProgressBar_default.track, role: "group", ...trackA11y, children: total > 0 ? safe.map((seg, i) => {
|
|
9140
|
+
return /* @__PURE__ */ jsx48(
|
|
9106
9141
|
"div",
|
|
9107
9142
|
{
|
|
9108
9143
|
className: SegmentedProgressBar_default.segment,
|
|
@@ -9122,7 +9157,7 @@ SegmentedProgressBarRoot.displayName = "SegmentedProgressBarRoot";
|
|
|
9122
9157
|
var SegmentedProgressBar = { Root: SegmentedProgressBarRoot };
|
|
9123
9158
|
|
|
9124
9159
|
// src/components/slider/Slider.tsx
|
|
9125
|
-
import * as
|
|
9160
|
+
import * as React62 from "react";
|
|
9126
9161
|
|
|
9127
9162
|
// src/components/slider/Slider.module.css
|
|
9128
9163
|
var Slider_default = {
|
|
@@ -9132,7 +9167,7 @@ var Slider_default = {
|
|
|
9132
9167
|
};
|
|
9133
9168
|
|
|
9134
9169
|
// src/components/slider/Slider.tsx
|
|
9135
|
-
import { jsx as
|
|
9170
|
+
import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9136
9171
|
function clamp2(n, min, max) {
|
|
9137
9172
|
return Math.min(max, Math.max(min, n));
|
|
9138
9173
|
}
|
|
@@ -9158,7 +9193,7 @@ function SliderRoot({
|
|
|
9158
9193
|
defaultValue: clamp2(initialDefault, min, max),
|
|
9159
9194
|
onChange
|
|
9160
9195
|
});
|
|
9161
|
-
const id =
|
|
9196
|
+
const id = React62.useId();
|
|
9162
9197
|
const safeValue = clamp2(value, min, max);
|
|
9163
9198
|
const applyValueFromInput = (el) => {
|
|
9164
9199
|
const next = Number.parseFloat(el.value);
|
|
@@ -9173,9 +9208,9 @@ function SliderRoot({
|
|
|
9173
9208
|
const handleRangeInput = (e) => {
|
|
9174
9209
|
applyValueFromInput(e.currentTarget);
|
|
9175
9210
|
};
|
|
9176
|
-
return /* @__PURE__ */
|
|
9177
|
-
label ? /* @__PURE__ */
|
|
9178
|
-
/* @__PURE__ */
|
|
9211
|
+
return /* @__PURE__ */ jsx49("div", { className: cx(Slider_default.root, className), ...toDataAttributes({ size }), children: /* @__PURE__ */ jsxs26(ControlSizeProvider, { value: size, children: [
|
|
9212
|
+
label ? /* @__PURE__ */ jsx49("label", { className: Slider_default.label, htmlFor: id, children: label }) : null,
|
|
9213
|
+
/* @__PURE__ */ jsx49(
|
|
9179
9214
|
"input",
|
|
9180
9215
|
{
|
|
9181
9216
|
id: label ? id : void 0,
|
|
@@ -9197,7 +9232,7 @@ SliderRoot.displayName = "SliderRoot";
|
|
|
9197
9232
|
var Slider2 = { Root: SliderRoot };
|
|
9198
9233
|
|
|
9199
9234
|
// src/components/stepper/HorizontalStepper.tsx
|
|
9200
|
-
import * as
|
|
9235
|
+
import * as React63 from "react";
|
|
9201
9236
|
|
|
9202
9237
|
// src/components/stepper/StepperAlign.module.css
|
|
9203
9238
|
var StepperAlign_default = {
|
|
@@ -9215,10 +9250,10 @@ var StepperAlign_default = {
|
|
|
9215
9250
|
};
|
|
9216
9251
|
|
|
9217
9252
|
// src/components/stepper/stepperAlignContext.tsx
|
|
9218
|
-
import { jsx as
|
|
9253
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
9219
9254
|
var [StepperAlignItemProvider, useStepperAlignItemState] = createComponentContext("StepperAlign.Item");
|
|
9220
9255
|
function StepperAlignCheckIcon({ className }) {
|
|
9221
|
-
return /* @__PURE__ */
|
|
9256
|
+
return /* @__PURE__ */ jsx50(
|
|
9222
9257
|
"svg",
|
|
9223
9258
|
{
|
|
9224
9259
|
className,
|
|
@@ -9226,7 +9261,7 @@ function StepperAlignCheckIcon({ className }) {
|
|
|
9226
9261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9227
9262
|
fill: "none",
|
|
9228
9263
|
"aria-hidden": "true",
|
|
9229
|
-
children: /* @__PURE__ */
|
|
9264
|
+
children: /* @__PURE__ */ jsx50(
|
|
9230
9265
|
"path",
|
|
9231
9266
|
{
|
|
9232
9267
|
fill: "currentColor",
|
|
@@ -9238,14 +9273,14 @@ function StepperAlignCheckIcon({ className }) {
|
|
|
9238
9273
|
}
|
|
9239
9274
|
|
|
9240
9275
|
// src/components/stepper/HorizontalStepper.tsx
|
|
9241
|
-
import { jsx as
|
|
9276
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
9242
9277
|
function HorizontalStepperRoot({
|
|
9243
9278
|
className,
|
|
9244
9279
|
size = "m",
|
|
9245
9280
|
children,
|
|
9246
9281
|
...rest
|
|
9247
9282
|
}) {
|
|
9248
|
-
return /* @__PURE__ */
|
|
9283
|
+
return /* @__PURE__ */ jsx51(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx51("div", { className: cx(StepperAlign_default.hRoot, className), "data-size": size, ...rest, children }) });
|
|
9249
9284
|
}
|
|
9250
9285
|
HorizontalStepperRoot.displayName = "HorizontalStepper.Root";
|
|
9251
9286
|
function HorizontalStepperSeparatorIcon({
|
|
@@ -9254,12 +9289,12 @@ function HorizontalStepperSeparatorIcon({
|
|
|
9254
9289
|
...rest
|
|
9255
9290
|
}) {
|
|
9256
9291
|
const Component = as ?? IconChevronRight;
|
|
9257
|
-
return /* @__PURE__ */
|
|
9292
|
+
return /* @__PURE__ */ jsx51("span", { className: StepperAlign_default.hSeparator, "aria-hidden": "true", children: /* @__PURE__ */ jsx51(Component, { className: cx(StepperAlign_default.hSeparatorIcon, className), strokeWidth: 2, ...rest }) });
|
|
9258
9293
|
}
|
|
9259
9294
|
HorizontalStepperSeparatorIcon.displayName = "HorizontalStepper.SeparatorIcon";
|
|
9260
|
-
var HorizontalStepperItem =
|
|
9295
|
+
var HorizontalStepperItem = React63.forwardRef(
|
|
9261
9296
|
function HorizontalStepperItem2({ state = "default", className, type = "button", children, ...rest }, ref) {
|
|
9262
|
-
return /* @__PURE__ */
|
|
9297
|
+
return /* @__PURE__ */ jsx51(StepperAlignItemProvider, { value: { state }, children: /* @__PURE__ */ jsx51(
|
|
9263
9298
|
"button",
|
|
9264
9299
|
{
|
|
9265
9300
|
ref,
|
|
@@ -9282,9 +9317,9 @@ function HorizontalStepperItemIndicator({
|
|
|
9282
9317
|
const { state: ctxState } = useStepperAlignItemState();
|
|
9283
9318
|
const state = stateProp ?? ctxState;
|
|
9284
9319
|
if (state === "completed") {
|
|
9285
|
-
return /* @__PURE__ */
|
|
9320
|
+
return /* @__PURE__ */ jsx51("div", { className: cx(StepperAlign_default.hIndicator, className), "data-state": state, ...rest, children: /* @__PURE__ */ jsx51(StepperAlignCheckIcon, { className: StepperAlign_default.hCheck }) });
|
|
9286
9321
|
}
|
|
9287
|
-
return /* @__PURE__ */
|
|
9322
|
+
return /* @__PURE__ */ jsx51("div", { className: cx(StepperAlign_default.hIndicator, className), "data-state": state, ...rest, children });
|
|
9288
9323
|
}
|
|
9289
9324
|
HorizontalStepperItemIndicator.displayName = "HorizontalStepper.ItemIndicator";
|
|
9290
9325
|
var HorizontalStepper = {
|
|
@@ -9295,7 +9330,7 @@ var HorizontalStepper = {
|
|
|
9295
9330
|
};
|
|
9296
9331
|
|
|
9297
9332
|
// src/components/stepper/Stepper.tsx
|
|
9298
|
-
import * as
|
|
9333
|
+
import * as React65 from "react";
|
|
9299
9334
|
|
|
9300
9335
|
// src/components/stepper/Stepper.module.css
|
|
9301
9336
|
var Stepper_default = {
|
|
@@ -9308,15 +9343,15 @@ var Stepper_default = {
|
|
|
9308
9343
|
};
|
|
9309
9344
|
|
|
9310
9345
|
// src/components/stepper/VerticalStepper.tsx
|
|
9311
|
-
import * as
|
|
9312
|
-
import { jsx as
|
|
9346
|
+
import * as React64 from "react";
|
|
9347
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
9313
9348
|
function VerticalStepperRoot({
|
|
9314
9349
|
className,
|
|
9315
9350
|
size = "m",
|
|
9316
9351
|
children,
|
|
9317
9352
|
...rest
|
|
9318
9353
|
}) {
|
|
9319
|
-
return /* @__PURE__ */
|
|
9354
|
+
return /* @__PURE__ */ jsx52(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx52("div", { className: cx(StepperAlign_default.vRoot, className), "data-size": size, ...rest, children }) });
|
|
9320
9355
|
}
|
|
9321
9356
|
VerticalStepperRoot.displayName = "VerticalStepper.Root";
|
|
9322
9357
|
function VerticalStepperArrow({
|
|
@@ -9325,12 +9360,12 @@ function VerticalStepperArrow({
|
|
|
9325
9360
|
...rest
|
|
9326
9361
|
}) {
|
|
9327
9362
|
const Component = as ?? IconChevronRight;
|
|
9328
|
-
return /* @__PURE__ */
|
|
9363
|
+
return /* @__PURE__ */ jsx52(Component, { className: cx(StepperAlign_default.vArrow, className), strokeWidth: 2, ...rest });
|
|
9329
9364
|
}
|
|
9330
9365
|
VerticalStepperArrow.displayName = "VerticalStepper.Arrow";
|
|
9331
|
-
var VerticalStepperItem =
|
|
9366
|
+
var VerticalStepperItem = React64.forwardRef(
|
|
9332
9367
|
function VerticalStepperItem2({ state = "default", className, type = "button", children, ...rest }, ref) {
|
|
9333
|
-
return /* @__PURE__ */
|
|
9368
|
+
return /* @__PURE__ */ jsx52(StepperAlignItemProvider, { value: { state }, children: /* @__PURE__ */ jsx52(
|
|
9334
9369
|
"button",
|
|
9335
9370
|
{
|
|
9336
9371
|
ref,
|
|
@@ -9353,9 +9388,9 @@ function VerticalStepperItemIndicator({
|
|
|
9353
9388
|
const { state: ctxState } = useStepperAlignItemState();
|
|
9354
9389
|
const state = stateProp ?? ctxState;
|
|
9355
9390
|
if (state === "completed") {
|
|
9356
|
-
return /* @__PURE__ */
|
|
9391
|
+
return /* @__PURE__ */ jsx52("div", { className: cx(StepperAlign_default.vIndicator, className), "data-state": state, ...rest, children: /* @__PURE__ */ jsx52(StepperAlignCheckIcon, { className: StepperAlign_default.vCheck }) });
|
|
9357
9392
|
}
|
|
9358
|
-
return /* @__PURE__ */
|
|
9393
|
+
return /* @__PURE__ */ jsx52("div", { className: cx(StepperAlign_default.vIndicator, className), "data-state": state, ...rest, children });
|
|
9359
9394
|
}
|
|
9360
9395
|
VerticalStepperItemIndicator.displayName = "VerticalStepper.ItemIndicator";
|
|
9361
9396
|
var VerticalStepper = {
|
|
@@ -9366,7 +9401,7 @@ var VerticalStepper = {
|
|
|
9366
9401
|
};
|
|
9367
9402
|
|
|
9368
9403
|
// src/components/stepper/Stepper.tsx
|
|
9369
|
-
import { jsx as
|
|
9404
|
+
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
9370
9405
|
var [StepperRootProvider, useStepperRootContext] = createComponentContext("Stepper");
|
|
9371
9406
|
var [StepperStepProvider, useStepperStepContext] = createComponentContext("Stepper.Step");
|
|
9372
9407
|
function toAlignState(status) {
|
|
@@ -9386,18 +9421,18 @@ function StepperRoot({
|
|
|
9386
9421
|
children,
|
|
9387
9422
|
className
|
|
9388
9423
|
}) {
|
|
9389
|
-
const indexRef =
|
|
9424
|
+
const indexRef = React65.useRef(0);
|
|
9390
9425
|
indexRef.current = 0;
|
|
9391
|
-
const getNextStepIndex =
|
|
9426
|
+
const getNextStepIndex = React65.useCallback(() => {
|
|
9392
9427
|
const idx = indexRef.current;
|
|
9393
9428
|
indexRef.current += 1;
|
|
9394
9429
|
return idx;
|
|
9395
9430
|
}, []);
|
|
9396
|
-
const value =
|
|
9431
|
+
const value = React65.useMemo(
|
|
9397
9432
|
() => ({ orientation, currentStep, getNextStepIndex }),
|
|
9398
9433
|
[orientation, currentStep, getNextStepIndex]
|
|
9399
9434
|
);
|
|
9400
|
-
return /* @__PURE__ */
|
|
9435
|
+
return /* @__PURE__ */ jsx53(StepperRootProvider, { value, children: /* @__PURE__ */ jsx53(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx53(
|
|
9401
9436
|
"ol",
|
|
9402
9437
|
{
|
|
9403
9438
|
className: cx(
|
|
@@ -9412,11 +9447,11 @@ function StepperRoot({
|
|
|
9412
9447
|
}
|
|
9413
9448
|
StepperRoot.displayName = "Stepper.Root";
|
|
9414
9449
|
function StepperSeparatorIcon({ className }) {
|
|
9415
|
-
return /* @__PURE__ */
|
|
9450
|
+
return /* @__PURE__ */ jsx53("li", { className: Stepper_default.separatorLi, "aria-hidden": "true", children: /* @__PURE__ */ jsx53(HorizontalStepper.SeparatorIcon, { className }) });
|
|
9416
9451
|
}
|
|
9417
9452
|
StepperSeparatorIcon.displayName = "Stepper.SeparatorIcon";
|
|
9418
9453
|
function StepperArrow({ className, ...rest }) {
|
|
9419
|
-
return /* @__PURE__ */
|
|
9454
|
+
return /* @__PURE__ */ jsx53(VerticalStepper.Arrow, { className, ...rest });
|
|
9420
9455
|
}
|
|
9421
9456
|
StepperArrow.displayName = "Stepper.Arrow";
|
|
9422
9457
|
function StepperIndicator({ children, className }) {
|
|
@@ -9425,8 +9460,8 @@ function StepperIndicator({ children, className }) {
|
|
|
9425
9460
|
const alignState = toAlignState(status);
|
|
9426
9461
|
const indClass = orientation === "horizontal" ? StepperAlign_default.hIndicator : StepperAlign_default.vIndicator;
|
|
9427
9462
|
const checkClass = orientation === "horizontal" ? StepperAlign_default.hCheck : StepperAlign_default.vCheck;
|
|
9428
|
-
const defaultChild = status === "completed" ? /* @__PURE__ */
|
|
9429
|
-
return /* @__PURE__ */
|
|
9463
|
+
const defaultChild = status === "completed" ? /* @__PURE__ */ jsx53(StepperAlignCheckIcon, { className: checkClass }) : String(index + 1);
|
|
9464
|
+
return /* @__PURE__ */ jsx53(
|
|
9430
9465
|
"span",
|
|
9431
9466
|
{
|
|
9432
9467
|
className: cx(indClass, className),
|
|
@@ -9440,18 +9475,18 @@ function StepperIndicator({ children, className }) {
|
|
|
9440
9475
|
StepperIndicator.displayName = "Stepper.Indicator";
|
|
9441
9476
|
function StepperContent({ title, description, className }) {
|
|
9442
9477
|
return /* @__PURE__ */ jsxs27("div", { className: cx(Stepper_default.content, className), children: [
|
|
9443
|
-
/* @__PURE__ */
|
|
9444
|
-
description ? /* @__PURE__ */
|
|
9478
|
+
/* @__PURE__ */ jsx53("div", { className: Stepper_default.title, children: title }),
|
|
9479
|
+
description ? /* @__PURE__ */ jsx53("p", { className: Stepper_default.description, children: description }) : null
|
|
9445
9480
|
] });
|
|
9446
9481
|
}
|
|
9447
9482
|
StepperContent.displayName = "Stepper.Content";
|
|
9448
|
-
var StepperStep =
|
|
9483
|
+
var StepperStep = React65.forwardRef(function StepperStep2({ index: indexProp, status: statusProp, children, className, disabled, type = "button", ...rest }, ref) {
|
|
9449
9484
|
const { currentStep, orientation, getNextStepIndex } = useStepperRootContext();
|
|
9450
9485
|
const index = indexProp ?? getNextStepIndex();
|
|
9451
9486
|
const status = statusProp ?? computeStepStatus(index, currentStep);
|
|
9452
9487
|
const alignState = toAlignState(status);
|
|
9453
9488
|
const itemClass = orientation === "horizontal" ? StepperAlign_default.hItem : StepperAlign_default.vItem;
|
|
9454
|
-
return /* @__PURE__ */
|
|
9489
|
+
return /* @__PURE__ */ jsx53(StepperStepProvider, { value: { status, index }, children: /* @__PURE__ */ jsx53(StepperAlignItemProvider, { value: { state: alignState }, children: /* @__PURE__ */ jsx53("li", { className: Stepper_default.stepLi, "data-status": status, children: /* @__PURE__ */ jsx53(
|
|
9455
9490
|
"button",
|
|
9456
9491
|
{
|
|
9457
9492
|
ref,
|
|
@@ -9479,7 +9514,7 @@ var Stepper = {
|
|
|
9479
9514
|
};
|
|
9480
9515
|
|
|
9481
9516
|
// src/components/switch/Switch.tsx
|
|
9482
|
-
import * as
|
|
9517
|
+
import * as React66 from "react";
|
|
9483
9518
|
|
|
9484
9519
|
// src/components/switch/Switch.module.css
|
|
9485
9520
|
var Switch_default = {
|
|
@@ -9493,9 +9528,9 @@ var Switch_default = {
|
|
|
9493
9528
|
};
|
|
9494
9529
|
|
|
9495
9530
|
// src/components/switch/Switch.tsx
|
|
9496
|
-
import { jsx as
|
|
9531
|
+
import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9497
9532
|
var [SwitchProvider, useSwitchContext] = createComponentContext("Switch");
|
|
9498
|
-
var SwitchRoot =
|
|
9533
|
+
var SwitchRoot = React66.forwardRef(
|
|
9499
9534
|
({
|
|
9500
9535
|
id,
|
|
9501
9536
|
checked,
|
|
@@ -9510,19 +9545,19 @@ var SwitchRoot = React65.forwardRef(
|
|
|
9510
9545
|
children,
|
|
9511
9546
|
...inputRest
|
|
9512
9547
|
}, ref) => {
|
|
9513
|
-
const rawId =
|
|
9548
|
+
const rawId = React66.useId();
|
|
9514
9549
|
const inputId = id ?? rawId;
|
|
9515
9550
|
const hintId = `${inputId}-hint`;
|
|
9516
9551
|
const errorId = `${inputId}-error`;
|
|
9517
|
-
const [hasHint, setHasHint] =
|
|
9518
|
-
const [hasError, setHasError] =
|
|
9552
|
+
const [hasHint, setHasHint] = React66.useState(false);
|
|
9553
|
+
const [hasError, setHasError] = React66.useState(false);
|
|
9519
9554
|
const invalid = variant === "error" || hasError;
|
|
9520
9555
|
const [isChecked, setChecked] = useControllableState({
|
|
9521
9556
|
value: checked,
|
|
9522
9557
|
defaultValue: defaultChecked,
|
|
9523
9558
|
onChange: onCheckedChange
|
|
9524
9559
|
});
|
|
9525
|
-
const handleChange =
|
|
9560
|
+
const handleChange = React66.useCallback(
|
|
9526
9561
|
(e) => {
|
|
9527
9562
|
if (readOnly) {
|
|
9528
9563
|
e.preventDefault();
|
|
@@ -9532,7 +9567,7 @@ var SwitchRoot = React65.forwardRef(
|
|
|
9532
9567
|
},
|
|
9533
9568
|
[readOnly, setChecked]
|
|
9534
9569
|
);
|
|
9535
|
-
const restInputPropsRef =
|
|
9570
|
+
const restInputPropsRef = React66.useRef(inputRest);
|
|
9536
9571
|
restInputPropsRef.current = inputRest;
|
|
9537
9572
|
const parts = [
|
|
9538
9573
|
ariaDescribedBy,
|
|
@@ -9540,11 +9575,11 @@ var SwitchRoot = React65.forwardRef(
|
|
|
9540
9575
|
hasError ? errorId : void 0
|
|
9541
9576
|
].filter(Boolean);
|
|
9542
9577
|
const describedBy = parts.length > 0 ? parts.join(" ") : void 0;
|
|
9543
|
-
const registerHint =
|
|
9544
|
-
const unregisterHint =
|
|
9545
|
-
const registerError =
|
|
9546
|
-
const unregisterError =
|
|
9547
|
-
const ctxValue =
|
|
9578
|
+
const registerHint = React66.useCallback(() => setHasHint(true), []);
|
|
9579
|
+
const unregisterHint = React66.useCallback(() => setHasHint(false), []);
|
|
9580
|
+
const registerError = React66.useCallback(() => setHasError(true), []);
|
|
9581
|
+
const unregisterError = React66.useCallback(() => setHasError(false), []);
|
|
9582
|
+
const ctxValue = React66.useMemo(
|
|
9548
9583
|
() => ({
|
|
9549
9584
|
inputId,
|
|
9550
9585
|
hintId,
|
|
@@ -9581,7 +9616,7 @@ var SwitchRoot = React65.forwardRef(
|
|
|
9581
9616
|
unregisterError
|
|
9582
9617
|
]
|
|
9583
9618
|
);
|
|
9584
|
-
return /* @__PURE__ */
|
|
9619
|
+
return /* @__PURE__ */ jsx54(SwitchProvider, { value: ctxValue, children: /* @__PURE__ */ jsx54(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx54(
|
|
9585
9620
|
"div",
|
|
9586
9621
|
{
|
|
9587
9622
|
className: cx(Switch_default.field, className),
|
|
@@ -9599,7 +9634,7 @@ var SwitchRoot = React65.forwardRef(
|
|
|
9599
9634
|
}
|
|
9600
9635
|
);
|
|
9601
9636
|
SwitchRoot.displayName = "SwitchRoot";
|
|
9602
|
-
var SwitchLabel =
|
|
9637
|
+
var SwitchLabel = React66.forwardRef(function SwitchLabel2({ children, className, ...rest }, ref) {
|
|
9603
9638
|
const {
|
|
9604
9639
|
inputId,
|
|
9605
9640
|
inputRef,
|
|
@@ -9623,7 +9658,7 @@ var SwitchLabel = React65.forwardRef(function SwitchLabel2({ children, className
|
|
|
9623
9658
|
...rest,
|
|
9624
9659
|
children: [
|
|
9625
9660
|
/* @__PURE__ */ jsxs28("span", { className: Switch_default.controlCell, children: [
|
|
9626
|
-
/* @__PURE__ */
|
|
9661
|
+
/* @__PURE__ */ jsx54(
|
|
9627
9662
|
"input",
|
|
9628
9663
|
{
|
|
9629
9664
|
ref: inputRef,
|
|
@@ -9641,9 +9676,9 @@ var SwitchLabel = React65.forwardRef(function SwitchLabel2({ children, className
|
|
|
9641
9676
|
...restInputPropsRef.current
|
|
9642
9677
|
}
|
|
9643
9678
|
),
|
|
9644
|
-
/* @__PURE__ */
|
|
9679
|
+
/* @__PURE__ */ jsx54("span", { className: Switch_default.track, "aria-hidden": "true" })
|
|
9645
9680
|
] }),
|
|
9646
|
-
children !== void 0 && children !== null ? /* @__PURE__ */
|
|
9681
|
+
children !== void 0 && children !== null ? /* @__PURE__ */ jsx54("span", { className: Switch_default.text, children }) : null
|
|
9647
9682
|
]
|
|
9648
9683
|
}
|
|
9649
9684
|
);
|
|
@@ -9651,13 +9686,13 @@ var SwitchLabel = React65.forwardRef(function SwitchLabel2({ children, className
|
|
|
9651
9686
|
SwitchLabel.displayName = "SwitchLabel";
|
|
9652
9687
|
function SwitchHint({ children, className, ...rest }) {
|
|
9653
9688
|
const { hintId, registerHint, unregisterHint, size, disabled } = useSwitchContext();
|
|
9654
|
-
|
|
9689
|
+
React66.useLayoutEffect(() => {
|
|
9655
9690
|
registerHint();
|
|
9656
9691
|
return () => {
|
|
9657
9692
|
unregisterHint();
|
|
9658
9693
|
};
|
|
9659
9694
|
}, [registerHint, unregisterHint]);
|
|
9660
|
-
return /* @__PURE__ */
|
|
9695
|
+
return /* @__PURE__ */ jsx54(
|
|
9661
9696
|
Hint.Root,
|
|
9662
9697
|
{
|
|
9663
9698
|
id: hintId,
|
|
@@ -9672,13 +9707,13 @@ function SwitchHint({ children, className, ...rest }) {
|
|
|
9672
9707
|
SwitchHint.displayName = "SwitchHint";
|
|
9673
9708
|
function SwitchError({ children, className, ...rest }) {
|
|
9674
9709
|
const { errorId, registerError, unregisterError, size } = useSwitchContext();
|
|
9675
|
-
|
|
9710
|
+
React66.useLayoutEffect(() => {
|
|
9676
9711
|
registerError();
|
|
9677
9712
|
return () => {
|
|
9678
9713
|
unregisterError();
|
|
9679
9714
|
};
|
|
9680
9715
|
}, [registerError, unregisterError]);
|
|
9681
|
-
return /* @__PURE__ */
|
|
9716
|
+
return /* @__PURE__ */ jsx54(
|
|
9682
9717
|
Hint.Root,
|
|
9683
9718
|
{
|
|
9684
9719
|
id: errorId,
|
|
@@ -9699,7 +9734,7 @@ var Switch = {
|
|
|
9699
9734
|
};
|
|
9700
9735
|
|
|
9701
9736
|
// src/components/tabs/Tabs.tsx
|
|
9702
|
-
import * as
|
|
9737
|
+
import * as React67 from "react";
|
|
9703
9738
|
|
|
9704
9739
|
// src/components/tabs/Tabs.module.css
|
|
9705
9740
|
var Tabs_default = {
|
|
@@ -9715,7 +9750,7 @@ var Tabs_default = {
|
|
|
9715
9750
|
};
|
|
9716
9751
|
|
|
9717
9752
|
// src/components/tabs/Tabs.tsx
|
|
9718
|
-
import { jsx as
|
|
9753
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9719
9754
|
var [TabsProvider, useTabsContext] = createComponentContext("Tabs");
|
|
9720
9755
|
function TabsRoot({
|
|
9721
9756
|
value,
|
|
@@ -9726,29 +9761,29 @@ function TabsRoot({
|
|
|
9726
9761
|
children,
|
|
9727
9762
|
className
|
|
9728
9763
|
}) {
|
|
9729
|
-
const rootId =
|
|
9764
|
+
const rootId = React67.useId();
|
|
9730
9765
|
const [activeValue, setActiveValue] = useControllableState({
|
|
9731
9766
|
value,
|
|
9732
9767
|
defaultValue,
|
|
9733
9768
|
onChange: onValueChange
|
|
9734
9769
|
});
|
|
9735
|
-
const contextValue =
|
|
9770
|
+
const contextValue = React67.useMemo(
|
|
9736
9771
|
() => ({ activeValue, onSelect: setActiveValue, orientation, rootId, size }),
|
|
9737
9772
|
[activeValue, setActiveValue, orientation, rootId, size]
|
|
9738
9773
|
);
|
|
9739
|
-
return /* @__PURE__ */
|
|
9774
|
+
return /* @__PURE__ */ jsx55(TabsProvider, { value: contextValue, children: /* @__PURE__ */ jsx55("div", { className: cx(Tabs_default.root, className), "data-orientation": orientation, "data-size": size, children }) });
|
|
9740
9775
|
}
|
|
9741
9776
|
TabsRoot.displayName = "TabsRoot";
|
|
9742
9777
|
function TabsList({ children, className }) {
|
|
9743
9778
|
const { orientation, rootId, activeValue, onSelect, size } = useTabsContext();
|
|
9744
|
-
const listRef =
|
|
9745
|
-
const [indicator, setIndicator] =
|
|
9779
|
+
const listRef = React67.useRef(null);
|
|
9780
|
+
const [indicator, setIndicator] = React67.useState({
|
|
9746
9781
|
left: 0,
|
|
9747
9782
|
top: 0,
|
|
9748
9783
|
width: 0,
|
|
9749
9784
|
height: 0
|
|
9750
9785
|
});
|
|
9751
|
-
const updateIndicator =
|
|
9786
|
+
const updateIndicator = React67.useCallback(() => {
|
|
9752
9787
|
const list = listRef.current;
|
|
9753
9788
|
if (!list) return;
|
|
9754
9789
|
const active = list.querySelector('[role="tab"][aria-selected="true"]');
|
|
@@ -9763,7 +9798,7 @@ function TabsList({ children, className }) {
|
|
|
9763
9798
|
height: active.offsetHeight
|
|
9764
9799
|
});
|
|
9765
9800
|
}, []);
|
|
9766
|
-
|
|
9801
|
+
React67.useLayoutEffect(() => {
|
|
9767
9802
|
const list = listRef.current;
|
|
9768
9803
|
if (!list) return;
|
|
9769
9804
|
updateIndicator();
|
|
@@ -9828,8 +9863,8 @@ function TabsList({ children, className }) {
|
|
|
9828
9863
|
className: cx(Tabs_default.list, className),
|
|
9829
9864
|
onKeyDown: handleKeyDown,
|
|
9830
9865
|
children: [
|
|
9831
|
-
/* @__PURE__ */
|
|
9832
|
-
/* @__PURE__ */
|
|
9866
|
+
/* @__PURE__ */ jsx55(ControlSizeProvider, { value: size, children }),
|
|
9867
|
+
/* @__PURE__ */ jsx55(
|
|
9833
9868
|
"div",
|
|
9834
9869
|
{
|
|
9835
9870
|
className: cx(
|
|
@@ -9855,7 +9890,7 @@ TabsList.displayName = "TabsList";
|
|
|
9855
9890
|
function TabsTab({ value, disabled = false, children, className }) {
|
|
9856
9891
|
const { activeValue, onSelect, rootId } = useTabsContext();
|
|
9857
9892
|
const isSelected = activeValue === value;
|
|
9858
|
-
return /* @__PURE__ */
|
|
9893
|
+
return /* @__PURE__ */ jsx55(
|
|
9859
9894
|
"button",
|
|
9860
9895
|
{
|
|
9861
9896
|
role: "tab",
|
|
@@ -9877,18 +9912,18 @@ function TabsTab({ value, disabled = false, children, className }) {
|
|
|
9877
9912
|
}
|
|
9878
9913
|
TabsTab.displayName = "TabsTab";
|
|
9879
9914
|
function TabsIcon({ children, className, ...rest }) {
|
|
9880
|
-
return /* @__PURE__ */
|
|
9915
|
+
return /* @__PURE__ */ jsx55("span", { className: cx(Tabs_default.icon, className), "aria-hidden": "true", ...rest, children });
|
|
9881
9916
|
}
|
|
9882
9917
|
TabsIcon.displayName = "TabsIcon";
|
|
9883
9918
|
function TabsLabel({ children, className, ...rest }) {
|
|
9884
|
-
return /* @__PURE__ */
|
|
9919
|
+
return /* @__PURE__ */ jsx55("span", { className: cx(Tabs_default.label, className), ...rest, children });
|
|
9885
9920
|
}
|
|
9886
9921
|
TabsLabel.displayName = "TabsLabel";
|
|
9887
9922
|
function TabsPanel({ value, children, className }) {
|
|
9888
9923
|
const { activeValue, rootId } = useTabsContext();
|
|
9889
9924
|
const isActive = activeValue === value;
|
|
9890
9925
|
if (!isActive) return null;
|
|
9891
|
-
return /* @__PURE__ */
|
|
9926
|
+
return /* @__PURE__ */ jsx55(
|
|
9892
9927
|
"div",
|
|
9893
9928
|
{
|
|
9894
9929
|
role: "tabpanel",
|
|
@@ -9910,7 +9945,7 @@ var Tabs = {
|
|
|
9910
9945
|
};
|
|
9911
9946
|
|
|
9912
9947
|
// src/components/tag/Tag.tsx
|
|
9913
|
-
import * as
|
|
9948
|
+
import * as React68 from "react";
|
|
9914
9949
|
|
|
9915
9950
|
// src/components/tag/Tag.module.css
|
|
9916
9951
|
var Tag_default = {
|
|
@@ -9922,8 +9957,8 @@ var Tag_default = {
|
|
|
9922
9957
|
};
|
|
9923
9958
|
|
|
9924
9959
|
// src/components/tag/Tag.tsx
|
|
9925
|
-
import { jsx as
|
|
9926
|
-
var TagRoot =
|
|
9960
|
+
import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9961
|
+
var TagRoot = React68.forwardRef(
|
|
9927
9962
|
({ size: sizeProp, onRemove, disabled, children, className, ...rest }, ref) => {
|
|
9928
9963
|
const controlSurface = useOptionalControlSize();
|
|
9929
9964
|
const size = sizeProp ?? (controlSurface !== void 0 ? controlSurfaceToInputSize(controlSurface) : "m");
|
|
@@ -9939,8 +9974,8 @@ var TagRoot = React67.forwardRef(
|
|
|
9939
9974
|
}),
|
|
9940
9975
|
...rest,
|
|
9941
9976
|
children: [
|
|
9942
|
-
/* @__PURE__ */
|
|
9943
|
-
onRemove ? /* @__PURE__ */
|
|
9977
|
+
/* @__PURE__ */ jsx56("span", { className: Tag_default.body, children: /* @__PURE__ */ jsx56(ControlSizeProvider, { value: size, children }) }),
|
|
9978
|
+
onRemove ? /* @__PURE__ */ jsx56(
|
|
9944
9979
|
"button",
|
|
9945
9980
|
{
|
|
9946
9981
|
type: "button",
|
|
@@ -9948,7 +9983,7 @@ var TagRoot = React67.forwardRef(
|
|
|
9948
9983
|
"aria-label": "Remove",
|
|
9949
9984
|
onClick: onRemove,
|
|
9950
9985
|
disabled,
|
|
9951
|
-
children: /* @__PURE__ */
|
|
9986
|
+
children: /* @__PURE__ */ jsx56("svg", { className: Tag_default.removeIcon, viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx56(
|
|
9952
9987
|
"path",
|
|
9953
9988
|
{
|
|
9954
9989
|
d: "M2 2l8 8M10 2l-8 8",
|
|
@@ -9966,13 +10001,13 @@ var TagRoot = React67.forwardRef(
|
|
|
9966
10001
|
);
|
|
9967
10002
|
TagRoot.displayName = "TagRoot";
|
|
9968
10003
|
function TagIcon({ children, className }) {
|
|
9969
|
-
return /* @__PURE__ */
|
|
10004
|
+
return /* @__PURE__ */ jsx56("span", { className: cx(Tag_default.icon, className), children });
|
|
9970
10005
|
}
|
|
9971
10006
|
TagIcon.displayName = "TagIcon";
|
|
9972
10007
|
var Tag = { Root: TagRoot, Icon: TagIcon };
|
|
9973
10008
|
|
|
9974
10009
|
// src/components/textarea/Textarea.tsx
|
|
9975
|
-
import * as
|
|
10010
|
+
import * as React69 from "react";
|
|
9976
10011
|
|
|
9977
10012
|
// src/components/textarea/Textarea.module.css
|
|
9978
10013
|
var Textarea_default = {
|
|
@@ -9989,7 +10024,7 @@ var Textarea_default = {
|
|
|
9989
10024
|
};
|
|
9990
10025
|
|
|
9991
10026
|
// src/components/textarea/Textarea.tsx
|
|
9992
|
-
import { jsx as
|
|
10027
|
+
import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9993
10028
|
var [TextareaProvider, useTextareaContext] = createComponentContext("Textarea");
|
|
9994
10029
|
function TextareaCharCounter({ current, max }) {
|
|
9995
10030
|
const overflow = current > max;
|
|
@@ -10011,8 +10046,8 @@ TextareaCharCounter.displayName = "Textarea.CharCounter";
|
|
|
10011
10046
|
function partitionTextareaChildren(children) {
|
|
10012
10047
|
const counters = [];
|
|
10013
10048
|
const rest = [];
|
|
10014
|
-
|
|
10015
|
-
if (
|
|
10049
|
+
React69.Children.forEach(children, (child) => {
|
|
10050
|
+
if (React69.isValidElement(child) && child.type === TextareaCharCounter) {
|
|
10016
10051
|
counters.push(child);
|
|
10017
10052
|
} else if (child != null && child !== false) {
|
|
10018
10053
|
rest.push(child);
|
|
@@ -10020,7 +10055,7 @@ function partitionTextareaChildren(children) {
|
|
|
10020
10055
|
});
|
|
10021
10056
|
return { counters, rest };
|
|
10022
10057
|
}
|
|
10023
|
-
var TextareaRoot =
|
|
10058
|
+
var TextareaRoot = React69.forwardRef(
|
|
10024
10059
|
({
|
|
10025
10060
|
id,
|
|
10026
10061
|
className,
|
|
@@ -10037,12 +10072,12 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10037
10072
|
children,
|
|
10038
10073
|
...rest
|
|
10039
10074
|
}, ref) => {
|
|
10040
|
-
const rawId =
|
|
10075
|
+
const rawId = React69.useId();
|
|
10041
10076
|
const inputId = id ?? rawId;
|
|
10042
10077
|
const hintId = `${inputId}-hint`;
|
|
10043
10078
|
const errorId = `${inputId}-error`;
|
|
10044
|
-
const [hasHint, setHasHint] =
|
|
10045
|
-
const [hasError, setHasError] =
|
|
10079
|
+
const [hasHint, setHasHint] = React69.useState(false);
|
|
10080
|
+
const [hasError, setHasError] = React69.useState(false);
|
|
10046
10081
|
const invalid = variant === "error" || hasError;
|
|
10047
10082
|
const resolvedAriaInvalid = ariaInvalid ?? (invalid || void 0);
|
|
10048
10083
|
const parts = [
|
|
@@ -10051,25 +10086,25 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10051
10086
|
hasError ? errorId : void 0
|
|
10052
10087
|
].filter(Boolean);
|
|
10053
10088
|
const describedBy = parts.length > 0 ? parts.join(" ") : void 0;
|
|
10054
|
-
const registerHint =
|
|
10055
|
-
const unregisterHint =
|
|
10056
|
-
const registerError =
|
|
10057
|
-
const unregisterError =
|
|
10058
|
-
const wrapperRef =
|
|
10089
|
+
const registerHint = React69.useCallback(() => setHasHint(true), []);
|
|
10090
|
+
const unregisterHint = React69.useCallback(() => setHasHint(false), []);
|
|
10091
|
+
const registerError = React69.useCallback(() => setHasError(true), []);
|
|
10092
|
+
const unregisterError = React69.useCallback(() => setHasError(false), []);
|
|
10093
|
+
const wrapperRef = React69.useRef(null);
|
|
10059
10094
|
const { counters: counterChildren, rest: otherChildren } = partitionTextareaChildren(children);
|
|
10060
10095
|
const showFooter = counterChildren.length > 0;
|
|
10061
|
-
|
|
10096
|
+
React69.useLayoutEffect(() => {
|
|
10062
10097
|
if (!autoResize || !wrapperRef.current) return;
|
|
10063
10098
|
const textarea = wrapperRef.current.querySelector("textarea");
|
|
10064
10099
|
if (textarea) {
|
|
10065
10100
|
wrapperRef.current.dataset.value = textarea.value;
|
|
10066
10101
|
}
|
|
10067
10102
|
}, [autoResize]);
|
|
10068
|
-
|
|
10103
|
+
React69.useEffect(() => {
|
|
10069
10104
|
if (!autoResize || !wrapperRef.current || typeof value !== "string") return;
|
|
10070
10105
|
wrapperRef.current.dataset.value = value;
|
|
10071
10106
|
}, [autoResize, value]);
|
|
10072
|
-
const handleInput =
|
|
10107
|
+
const handleInput = React69.useCallback(
|
|
10073
10108
|
(e) => {
|
|
10074
10109
|
if (autoResize && wrapperRef.current) {
|
|
10075
10110
|
wrapperRef.current.dataset.value = e.currentTarget.value;
|
|
@@ -10078,7 +10113,7 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10078
10113
|
},
|
|
10079
10114
|
[autoResize, onInput]
|
|
10080
10115
|
);
|
|
10081
|
-
const ctxValue =
|
|
10116
|
+
const ctxValue = React69.useMemo(
|
|
10082
10117
|
() => ({
|
|
10083
10118
|
hintId,
|
|
10084
10119
|
errorId,
|
|
@@ -10102,7 +10137,7 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10102
10137
|
unregisterError
|
|
10103
10138
|
]
|
|
10104
10139
|
);
|
|
10105
|
-
const textareaEl = /* @__PURE__ */
|
|
10140
|
+
const textareaEl = /* @__PURE__ */ jsx57(
|
|
10106
10141
|
"textarea",
|
|
10107
10142
|
{
|
|
10108
10143
|
ref,
|
|
@@ -10118,9 +10153,9 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10118
10153
|
...rest
|
|
10119
10154
|
}
|
|
10120
10155
|
);
|
|
10121
|
-
const textareaBlock = autoResize ? /* @__PURE__ */
|
|
10122
|
-
return /* @__PURE__ */
|
|
10123
|
-
/* @__PURE__ */
|
|
10156
|
+
const textareaBlock = autoResize ? /* @__PURE__ */ jsx57("div", { ref: wrapperRef, className: Textarea_default.autoResize, children: textareaEl }) : textareaEl;
|
|
10157
|
+
return /* @__PURE__ */ jsx57(TextareaProvider, { value: ctxValue, children: /* @__PURE__ */ jsx57(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs31("div", { className: Textarea_default.field, ...toDataAttributes({ size }), children: [
|
|
10158
|
+
/* @__PURE__ */ jsx57(
|
|
10124
10159
|
"label",
|
|
10125
10160
|
{
|
|
10126
10161
|
htmlFor: inputId,
|
|
@@ -10132,8 +10167,8 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10132
10167
|
size
|
|
10133
10168
|
}),
|
|
10134
10169
|
children: /* @__PURE__ */ jsxs31("div", { className: Textarea_default.controlStack, children: [
|
|
10135
|
-
/* @__PURE__ */
|
|
10136
|
-
showFooter ? /* @__PURE__ */
|
|
10170
|
+
/* @__PURE__ */ jsx57("div", { className: Textarea_default.textareaRegion, children: textareaBlock }),
|
|
10171
|
+
showFooter ? /* @__PURE__ */ jsx57("div", { className: Textarea_default.controlFooter, children: counterChildren }) : null
|
|
10137
10172
|
] })
|
|
10138
10173
|
}
|
|
10139
10174
|
),
|
|
@@ -10144,13 +10179,13 @@ var TextareaRoot = React68.forwardRef(
|
|
|
10144
10179
|
TextareaRoot.displayName = "Textarea.Root";
|
|
10145
10180
|
function TextareaHint({ children, className, ...rest }) {
|
|
10146
10181
|
const { hintId, registerHint, unregisterHint, size, disabled, readOnly } = useTextareaContext();
|
|
10147
|
-
|
|
10182
|
+
React69.useLayoutEffect(() => {
|
|
10148
10183
|
registerHint();
|
|
10149
10184
|
return () => {
|
|
10150
10185
|
unregisterHint();
|
|
10151
10186
|
};
|
|
10152
10187
|
}, [registerHint, unregisterHint]);
|
|
10153
|
-
return /* @__PURE__ */
|
|
10188
|
+
return /* @__PURE__ */ jsx57(
|
|
10154
10189
|
Hint.Root,
|
|
10155
10190
|
{
|
|
10156
10191
|
id: hintId,
|
|
@@ -10165,13 +10200,13 @@ function TextareaHint({ children, className, ...rest }) {
|
|
|
10165
10200
|
TextareaHint.displayName = "Textarea.Hint";
|
|
10166
10201
|
function TextareaError({ children, className, ...rest }) {
|
|
10167
10202
|
const { errorId, registerError, unregisterError, size } = useTextareaContext();
|
|
10168
|
-
|
|
10203
|
+
React69.useLayoutEffect(() => {
|
|
10169
10204
|
registerError();
|
|
10170
10205
|
return () => {
|
|
10171
10206
|
unregisterError();
|
|
10172
10207
|
};
|
|
10173
10208
|
}, [registerError, unregisterError]);
|
|
10174
|
-
return /* @__PURE__ */
|
|
10209
|
+
return /* @__PURE__ */ jsx57(
|
|
10175
10210
|
Hint.Root,
|
|
10176
10211
|
{
|
|
10177
10212
|
id: errorId,
|
|
@@ -10211,6 +10246,7 @@ export {
|
|
|
10211
10246
|
Divider,
|
|
10212
10247
|
Drawer,
|
|
10213
10248
|
Dropdown,
|
|
10249
|
+
EmptyPage,
|
|
10214
10250
|
ExampleFrame,
|
|
10215
10251
|
FileUpload,
|
|
10216
10252
|
Hint,
|