@studiolxd/brand 49.28.0 → 50.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +61 -0
- package/README.md +26 -4
- package/dist/_shared/assign-ref.js +6 -0
- package/dist/_shared/calendargrid.js +57 -57
- package/dist/_shared/datepicker.js +67 -65
- package/dist/_shared/default-render-link.js +7 -0
- package/dist/_shared/dialogsurface.js +1 -1
- package/dist/_shared/dropdownitems.js +14 -20
- package/dist/_shared/imagecropdialog.js +38 -441
- package/dist/_shared/overflow-focusable.js +15 -0
- package/dist/_shared/side-offset.js +13 -0
- package/dist/_shared/tokens.js +31 -129
- package/dist/_shared/useasyncoptions.js +30 -0
- package/dist/_types/atoms/Accordion/Accordion.d.ts +7 -1
- package/dist/_types/atoms/AsyncMultiSelect/AsyncMultiSelect.d.ts +8 -4
- package/dist/_types/atoms/AsyncSelect/AsyncSelect.d.ts +8 -4
- package/dist/_types/atoms/Autocomplete/Autocomplete.d.ts +10 -6
- package/dist/_types/atoms/CloseButton/CloseButton.d.ts +13 -3
- package/dist/_types/atoms/Fieldset/Fieldset.d.ts +1 -1
- package/dist/_types/atoms/InputPhone/InputPhone.d.ts +2 -0
- package/dist/_types/atoms/MultiSelect/MultiSelect.d.ts +11 -10
- package/dist/_types/atoms/Select/Select.d.ts +6 -0
- package/dist/_types/atoms/Skeleton/Skeleton.d.ts +1 -1
- package/dist/_types/atoms/Spinner/Spinner.d.ts +3 -1
- package/dist/_types/atoms/TypingIndicator/TypingIndicator.d.ts +3 -1
- package/dist/_types/atoms/_shared/useAsyncOptions.d.ts +36 -0
- package/dist/_types/constants/assign-ref.d.ts +12 -0
- package/dist/_types/constants/default-render-link.d.ts +13 -0
- package/dist/_types/constants/overflow-focusable.d.ts +15 -0
- package/dist/_types/constants/side-offset.d.ts +18 -0
- package/dist/_types/email/EmailLayout.d.ts +38 -21
- package/dist/_types/messages/BrandMessages.d.ts +8 -2
- package/dist/_types/messages/index.d.ts +1 -1
- package/dist/_types/molecules/AppLauncher/AppLauncher.d.ts +9 -3
- package/dist/_types/molecules/Calendar/Calendar.d.ts +10 -1
- package/dist/_types/molecules/CalendarPlanner/CalendarPlanner.d.ts +43 -13
- package/dist/_types/molecules/CalendarRoster/CalendarRoster.d.ts +10 -2
- package/dist/_types/molecules/ContextMenu/ContextMenu.d.ts +8 -1
- package/dist/_types/molecules/DatePicker/DatePicker.d.ts +6 -0
- package/dist/_types/molecules/DateTimeField/DateTimeField.d.ts +2 -0
- package/dist/_types/molecules/DocsSearch/DocsSearch.d.ts +2 -2
- package/dist/_types/molecules/FloatingToolbar/FloatingToolbar.d.ts +83 -0
- package/dist/_types/molecules/FormField/FormField.d.ts +5 -6
- package/dist/_types/molecules/LanguageSwitcher/LanguageSwitcher.d.ts +7 -3
- package/dist/_types/molecules/LoadingRegion/LoadingRegion.d.ts +12 -4
- package/dist/_types/molecules/Modal/Modal.d.ts +10 -4
- package/dist/_types/molecules/OrgSwitcher/OrgSwitcher.d.ts +7 -1
- package/dist/_types/molecules/PasswordField/PasswordField.d.ts +9 -2
- package/dist/_types/molecules/PrevNextNav/PrevNextNav.d.ts +3 -1
- package/dist/_types/molecules/RecurrenceField/RecurrenceField.d.ts +6 -1
- package/dist/_types/molecules/SidebarNav/SidebarNav.d.ts +18 -2
- package/dist/_types/molecules/SiteNav/SiteNav.d.ts +4 -1
- package/dist/_types/molecules/StatTile/StatTile.d.ts +15 -1
- package/dist/_types/molecules/Table/Table.d.ts +1 -1
- package/dist/_types/molecules/ThemeSwitcher/ThemeSwitcher.d.ts +38 -3
- package/dist/_types/molecules/Toast/Toaster.d.ts +8 -0
- package/dist/_types/molecules/UserMenu/UserMenu.d.ts +7 -1
- package/dist/_types/molecules/_shared/calendarGrid.d.ts +15 -2
- package/dist/_types/molecules/_shared/dialogSurface.d.ts +6 -1
- package/dist/_types/molecules/_shared/dropdownItems.d.ts +0 -2
- package/dist/_types/sections/AppHeader/AppHeader.d.ts +3 -1
- package/dist/_types/sections/AppShell/AppShell.d.ts +6 -1
- package/dist/_types/sections/LegalFooter/LegalFooter.d.ts +7 -1
- package/dist/_types/sections/Sidebar/Sidebar.d.ts +3 -1
- package/dist/_types/sections/SiteFooter/SiteFooter.d.ts +6 -2
- package/dist/_types/sections/SiteHeader/SiteHeader.d.ts +2 -2
- package/dist/_types/templates/ConnectorAuth/ConnectorAuthShell.d.ts +5 -2
- package/dist/_types/templates/ConnectorAuth/ConnectorConsentPage.d.ts +1 -1
- package/dist/_types/templates/ConnectorAuth/ConnectorExternalSignInPage.d.ts +1 -1
- package/dist/_types/templates/ConnectorAuth/ConnectorRejectionPage.d.ts +1 -1
- package/dist/_types/templates/ConnectorAuth/ConnectorSignInPage.d.ts +1 -1
- package/dist/_types/templates/ErrorPage/ErrorPage.d.ts +7 -1
- package/dist/_types/templates/NotFoundPage/NotFoundPage.d.ts +7 -1
- package/dist/_types/templates/PublicPageShell/PublicPageShell.d.ts +6 -0
- package/dist/accordion.css +1 -1
- package/dist/accordion.js +6 -5
- package/dist/alert.css +1 -1
- package/dist/app-header.js +16 -21
- package/dist/app-launcher.css +1 -1
- package/dist/app-launcher.js +29 -21
- package/dist/app-shell.js +43 -43
- package/dist/async-multi-select.css +1 -1
- package/dist/async-multi-select.js +104 -173
- package/dist/async-select.css +1 -1
- package/dist/async-select.js +81 -137
- package/dist/autocomplete.css +1 -1
- package/dist/autocomplete.js +76 -115
- package/dist/brand.css +77 -987
- package/dist/breadcrumb.js +11 -16
- package/dist/button.css +1 -1
- package/dist/calendar-planner.css +1 -1
- package/dist/calendar-planner.js +100 -95
- package/dist/calendar-roster.css +1 -1
- package/dist/calendar-roster.js +69 -61
- package/dist/calendar.css +1 -1
- package/dist/calendar.js +86 -85
- package/dist/card.css +1 -1
- package/dist/card.js +42 -41
- package/dist/chart.css +1 -1
- package/dist/chat-shell.js +48 -47
- package/dist/checkbox.css +1 -1
- package/dist/close-button.js +14 -12
- package/dist/command-palette.css +1 -1
- package/dist/connector-consent-page.js +19 -18
- package/dist/connector-external-sign-in-page.js +6 -5
- package/dist/connector-rejection-page.js +5 -4
- package/dist/connector-sign-in-page.js +10 -9
- package/dist/consent.css +1 -1
- package/dist/context-menu.js +3 -2
- package/dist/conversation-list.css +1 -1
- package/dist/conversation-thread.css +1 -1
- package/dist/conversation-thread.js +1 -0
- package/dist/data-table.js +74 -1625
- package/dist/date-time-field.js +7 -6
- package/dist/docs-search.js +36 -38
- package/dist/email.js +10 -7
- package/dist/error-page.js +2 -2
- package/dist/fieldset.css +1 -1
- package/dist/figure.js +1 -0
- package/dist/file-upload.css +1 -1
- package/dist/file-upload.js +48 -50
- package/dist/floating-toolbar.css +1 -0
- package/dist/floating-toolbar.js +64 -0
- package/dist/form-field.js +55 -53
- package/dist/imagecropdialog.css +1 -1
- package/dist/input-phone.css +1 -1
- package/dist/input-phone.js +30 -31
- package/dist/input.css +1 -1
- package/dist/label.css +1 -1
- package/dist/language-switcher.js +37 -44
- package/dist/legal-footer.js +12 -17
- package/dist/loading-region.css +1 -1
- package/dist/loading-region.js +8 -8
- package/dist/menu.css +1 -1
- package/dist/menu.js +4 -3
- package/dist/message-bubble.css +1 -1
- package/dist/message-composer.css +1 -1
- package/dist/modal.css +1 -1
- package/dist/modal.js +9 -9
- package/dist/multi-select.css +1 -1
- package/dist/multi-select.js +104 -172
- package/dist/not-found-page.js +8 -5
- package/dist/notification-list.js +16 -21
- package/dist/notification-panel.js +34 -46
- package/dist/number-badge.css +1 -1
- package/dist/number-input.css +1 -1
- package/dist/org-switcher.css +1 -1
- package/dist/org-switcher.js +13 -11
- package/dist/password-field.js +40 -39
- package/dist/popover.css +1 -1
- package/dist/popover.js +9 -15
- package/dist/prev-next-nav.js +8 -7
- package/dist/public-page-shell.js +7 -6
- package/dist/radio.css +1 -1
- package/dist/recurrence-field.css +1 -1
- package/dist/recurrence-field.js +38 -37
- package/dist/select.css +1 -1
- package/dist/select.js +3 -2
- package/dist/sheet.css +1 -1
- package/dist/sidebar-nav.css +1 -1
- package/dist/sidebar-nav.js +75 -70
- package/dist/sidebar.css +1 -1
- package/dist/sidebar.js +46 -42
- package/dist/site-footer.js +28 -28
- package/dist/site-header.js +39 -44
- package/dist/site-nav.js +10 -19
- package/dist/site-search.js +34 -36
- package/dist/site-shell.js +17 -16
- package/dist/skeleton.js +8 -6
- package/dist/sortable.js +20 -19
- package/dist/spinner.js +11 -7
- package/dist/stat-tile.js +24 -26
- package/dist/switcher.css +1 -1
- package/dist/table.css +1 -1
- package/dist/table.js +57 -45
- package/dist/textarea.css +1 -1
- package/dist/theme-switcher.js +57 -56
- package/dist/toaster.css +1 -1
- package/dist/toggle.css +1 -1
- package/dist/tokens.css +75 -986
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +20 -27
- package/dist/typing-indicator.css +1 -1
- package/dist/typing-indicator.js +4 -4
- package/dist/user-menu.css +1 -1
- package/dist/user-menu.js +38 -45
- package/dist/visuallyhidden.css +1 -1
- package/package.json +26 -14
- package/src/tokens/components/async-multi-select.css +4 -0
- package/src/tokens/components/async-select.css +3 -0
- package/src/tokens/components/autocomplete.css +1 -0
- package/src/tokens/components/breadcrumb.css +0 -2
- package/src/tokens/components/button.css +0 -23
- package/src/tokens/components/control.css +0 -4
- package/src/tokens/components/file-upload.css +0 -4
- package/src/tokens/components/radio.css +2 -0
- package/src/tokens/components/site-header.css +0 -1
- package/src/tokens/index.css +5 -7
- package/src/tokens/molecules/async-multi-select-field.css +0 -6
- package/src/tokens/molecules/async-select-field.css +0 -6
- package/src/tokens/molecules/autocomplete-field.css +0 -5
- package/src/tokens/molecules/avatar-upload.css +0 -6
- package/src/tokens/molecules/calendar-roster.css +5 -0
- package/src/tokens/molecules/chart.css +0 -3
- package/src/tokens/molecules/checkbox-field.css +0 -6
- package/src/tokens/molecules/consent.css +1 -0
- package/src/tokens/molecules/conversation-thread.css +10 -0
- package/src/tokens/molecules/date-picker-field.css +0 -6
- package/src/tokens/molecules/date-time-field.css +0 -6
- package/src/tokens/molecules/dropdown-field.css +0 -6
- package/src/tokens/molecules/file-upload-field.css +0 -6
- package/src/tokens/molecules/floating-toolbar.css +18 -0
- package/src/tokens/molecules/floating-toolbar.ts +4 -0
- package/src/tokens/molecules/input-field.css +0 -1
- package/src/tokens/molecules/input-phone-field.css +0 -6
- package/src/tokens/molecules/modal.css +1 -0
- package/src/tokens/molecules/multi-select-field.css +0 -6
- package/src/tokens/molecules/number-input-field.css +0 -6
- package/src/tokens/molecules/otp-field.css +0 -6
- package/src/tokens/molecules/radio-field.css +0 -6
- package/src/tokens/molecules/recurrence-field.css +1 -0
- package/src/tokens/molecules/select-field.css +0 -6
- package/src/tokens/molecules/sidebar-nav.css +0 -6
- package/src/tokens/molecules/site-search.css +0 -2
- package/src/tokens/molecules/switcher-field.css +0 -1
- package/src/tokens/molecules/table.css +1 -0
- package/src/tokens/molecules/textarea-field.css +0 -6
- package/src/tokens/molecules/time-field.css +0 -6
- package/src/tokens/scss/_index.legacy.scss +1 -0
- package/src/tokens/scss/_index.scss +1 -0
- package/src/tokens/scss/components/_async-multi-select.scss +4 -0
- package/src/tokens/scss/components/_async-select.scss +3 -0
- package/src/tokens/scss/components/_autocomplete.scss +1 -0
- package/src/tokens/scss/components/_breadcrumb.scss +0 -2
- package/src/tokens/scss/components/_button.scss +0 -23
- package/src/tokens/scss/components/_control.scss +0 -4
- package/src/tokens/scss/components/_file-upload.scss +0 -4
- package/src/tokens/scss/components/_site-header.scss +0 -1
- package/src/tokens/scss/molecules/_async-multi-select-field.scss +0 -5
- package/src/tokens/scss/molecules/_async-select-field.scss +0 -5
- package/src/tokens/scss/molecules/_autocomplete-field.scss +0 -5
- package/src/tokens/scss/molecules/_avatar-upload.scss +0 -5
- package/src/tokens/scss/molecules/_calendar-roster.scss +4 -0
- package/src/tokens/scss/molecules/_chart.scss +0 -2
- package/src/tokens/scss/molecules/_checkbox-field.scss +0 -5
- package/src/tokens/scss/molecules/_consent.scss +1 -0
- package/src/tokens/scss/molecules/_conversation-thread.scss +3 -0
- package/src/tokens/scss/molecules/_date-picker-field.scss +0 -5
- package/src/tokens/scss/molecules/_date-time-field.scss +0 -5
- package/src/tokens/scss/molecules/_dropdown-field.scss +0 -5
- package/src/tokens/scss/molecules/_file-upload-field.scss +0 -5
- package/src/tokens/scss/molecules/_floating-toolbar.scss +15 -0
- package/src/tokens/scss/molecules/_input-field.scss +0 -1
- package/src/tokens/scss/molecules/_input-phone-field.scss +0 -5
- package/src/tokens/scss/molecules/_modal.scss +1 -0
- package/src/tokens/scss/molecules/_multi-select-field.scss +0 -5
- package/src/tokens/scss/molecules/_number-input-field.scss +0 -5
- package/src/tokens/scss/molecules/_otp-field.scss +0 -5
- package/src/tokens/scss/molecules/_radio-field.scss +0 -5
- package/src/tokens/scss/molecules/_recurrence-field.scss +1 -0
- package/src/tokens/scss/molecules/_select-field.scss +0 -5
- package/src/tokens/scss/molecules/_sidebar-nav.scss +0 -4
- package/src/tokens/scss/molecules/_site-search.scss +0 -2
- package/src/tokens/scss/molecules/_switcher-field.scss +0 -1
- package/src/tokens/scss/molecules/_table.scss +1 -0
- package/src/tokens/scss/molecules/_textarea-field.scss +0 -5
- package/src/tokens/scss/molecules/_time-field.scss +0 -5
- package/src/tokens/surface-dark-derived.css +2 -1
- package/src/tokens/surface-invert.css +15 -21
- package/src/tokens/surface-public.css +0 -19
- package/src/tokens/tokens.json +31 -129
- package/CHANGELOG.md +0 -8154
- package/dist/_types/data/home.d.ts +0 -83
- package/dist/_types/pages/Auth/AuthPage.d.ts +0 -24
- package/dist/_types/pages/Onboarding/OnboardingPage.d.ts +0 -37
- package/dist/_types/pages/Status/StatusPage.d.ts +0 -37
- package/dist/_types/pages/Status/_datos.d.ts +0 -47
- package/src/tokens/surface-light.css +0 -782
- package/src/tokens/utils.test.ts +0 -86
package/dist/date-time-field.js
CHANGED
|
@@ -19,8 +19,8 @@ function f(e) {
|
|
|
19
19
|
m: e.getMinutes()
|
|
20
20
|
} : null;
|
|
21
21
|
}
|
|
22
|
-
var p = o(function({ id: o, label: p, labelHidden: m, value: h, placeholder: g, timeStep: _, minDate: v, maxDate: y, disabledDates: b, name: x, size: S, disabled: C, readOnly: w, error: T = !1, errorMessage: E, helperText: D, locale: O = "es-ES", className: k, calendarLabel: A, openCalendarLabel: j, invalidMessage: M, maskLetters: N, previousMonthLabel: P, nextMonthLabel: F, previousYearsLabel: I, nextYearsLabel: L, yearGridLabel: R, gridLabel: z, hoursLabel: B, minutesLabel: V, onChange: H, onBlur: U }, W) {
|
|
23
|
-
let G = i(m), K = e(S), q = c(), J = o ?? q, Y = `${J}-date`, X = E ? `${J}-error` : void 0, Z = D ? `${J}-helper` : void 0, Q = [X, Z].filter(Boolean).join(" ") || void 0, $ = T || !!E,
|
|
22
|
+
var p = o(function({ id: o, label: p, labelHidden: m, value: h, placeholder: g, timeStep: _, minDate: v, maxDate: y, disabledDates: b, name: x, size: S, disabled: C, readOnly: w, error: T = !1, errorMessage: E, helperText: D, locale: O = "es-ES", className: k, calendarLabel: A, openCalendarLabel: j, invalidMessage: M, maskLetters: N, previousMonthLabel: P, nextMonthLabel: F, previousYearsLabel: I, nextYearsLabel: L, yearGridLabel: R, gridLabel: z, today: ee, hoursLabel: B, minutesLabel: V, onChange: H, onBlur: U }, W) {
|
|
23
|
+
let G = i(m), K = e(S), q = c(), J = o ?? q, Y = `${J}-date`, X = E ? `${J}-error` : void 0, Z = D ? `${J}-helper` : void 0, Q = [X, Z].filter(Boolean).join(" ") || void 0, $ = T || !!E, te = s((e) => {
|
|
24
24
|
if (!e) {
|
|
25
25
|
H?.(null);
|
|
26
26
|
return;
|
|
@@ -30,7 +30,7 @@ var p = o(function({ id: o, label: p, labelHidden: m, value: h, placeholder: g,
|
|
|
30
30
|
m: 0
|
|
31
31
|
};
|
|
32
32
|
H?.(d(e, t));
|
|
33
|
-
}, [h, H]),
|
|
33
|
+
}, [h, H]), ne = s((e) => {
|
|
34
34
|
h && H?.(d(h, e));
|
|
35
35
|
}, [h, H]);
|
|
36
36
|
return /* @__PURE__ */ u("div", {
|
|
@@ -54,7 +54,7 @@ var p = o(function({ id: o, label: p, labelHidden: m, value: h, placeholder: g,
|
|
|
54
54
|
id: Y,
|
|
55
55
|
name: x,
|
|
56
56
|
value: h ?? null,
|
|
57
|
-
onChange:
|
|
57
|
+
onChange: te,
|
|
58
58
|
onBlur: U,
|
|
59
59
|
placeholder: g,
|
|
60
60
|
minDate: v,
|
|
@@ -74,10 +74,11 @@ var p = o(function({ id: o, label: p, labelHidden: m, value: h, placeholder: g,
|
|
|
74
74
|
previousYearsLabel: I,
|
|
75
75
|
nextYearsLabel: L,
|
|
76
76
|
yearGridLabel: R,
|
|
77
|
-
gridLabel: z
|
|
77
|
+
gridLabel: z,
|
|
78
|
+
today: ee
|
|
78
79
|
}), /* @__PURE__ */ l(r, {
|
|
79
80
|
value: f(h),
|
|
80
|
-
onChange:
|
|
81
|
+
onChange: ne,
|
|
81
82
|
onBlur: U,
|
|
82
83
|
step: _,
|
|
83
84
|
size: K,
|
package/dist/docs-search.js
CHANGED
|
@@ -2,60 +2,58 @@
|
|
|
2
2
|
import './docs-search.css';
|
|
3
3
|
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
4
|
import { Spinner as t } from "./spinner.js";
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { t as n } from "./_shared/default-render-link.js";
|
|
6
|
+
import { InputField as r } from "./input-field.js";
|
|
7
|
+
import { useId as i } from "react";
|
|
8
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import { Autocomplete as c } from "@base-ui/react/autocomplete";
|
|
9
10
|
//#region src/stories/molecules/DocsSearch/DocsSearch.tsx
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function c({ id: c = "docs-search", query: l, onQueryChange: u, results: d, loading: f = !1, label: p, labelHidden: m, placeholder: h, clearable: g = !0, clearLabel: _, resultsLabel: v, emptyLabel: y, loadingLabel: b, size: x, renderLink: S = s, onSelect: C, className: w }) {
|
|
14
|
-
let T = e("docsSearch"), E = l.trim() !== "" && d.length === 0 ? f ? T("loading", b) : T("empty", y) : null;
|
|
15
|
-
return /* @__PURE__ */ i(o.Root, {
|
|
11
|
+
function l({ id: l, query: u, onQueryChange: d, results: f, loading: p = !1, label: m, labelHidden: h, placeholder: g, clearable: _ = !0, clearLabel: v, resultsLabel: y, emptyLabel: b, loadingLabel: x, size: S, renderLink: C = n, onSelect: w, className: T }) {
|
|
12
|
+
let E = e("docsSearch"), D = i(), O = l ?? D, k = u.trim() !== "" && f.length === 0 ? p ? E("loading", x) : E("empty", b) : null;
|
|
13
|
+
return /* @__PURE__ */ o(c.Root, {
|
|
16
14
|
inline: !0,
|
|
17
15
|
open: !0,
|
|
18
|
-
items:
|
|
16
|
+
items: f,
|
|
19
17
|
filter: null,
|
|
20
|
-
value:
|
|
21
|
-
onValueChange:
|
|
22
|
-
children: /* @__PURE__ */
|
|
23
|
-
className: ["docs-search",
|
|
18
|
+
value: u,
|
|
19
|
+
onValueChange: d,
|
|
20
|
+
children: /* @__PURE__ */ s("div", {
|
|
21
|
+
className: ["docs-search", T].filter(Boolean).join(" "),
|
|
24
22
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
id:
|
|
27
|
-
render: /* @__PURE__ */
|
|
28
|
-
id:
|
|
29
|
-
label:
|
|
30
|
-
labelHidden:
|
|
23
|
+
/* @__PURE__ */ o(c.Input, {
|
|
24
|
+
id: O,
|
|
25
|
+
render: /* @__PURE__ */ o(r, {
|
|
26
|
+
id: O,
|
|
27
|
+
label: E("label", m),
|
|
28
|
+
labelHidden: h,
|
|
31
29
|
kind: "search",
|
|
32
|
-
clearable:
|
|
33
|
-
...
|
|
34
|
-
placeholder:
|
|
35
|
-
...
|
|
30
|
+
clearable: _,
|
|
31
|
+
...v === void 0 ? {} : { clearLabel: v },
|
|
32
|
+
placeholder: E("placeholder", g),
|
|
33
|
+
...S ? { size: S } : {}
|
|
36
34
|
})
|
|
37
35
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ o(c.List, {
|
|
39
37
|
className: "docs-search__results",
|
|
40
|
-
"aria-label":
|
|
41
|
-
children: (e) => /* @__PURE__ */
|
|
38
|
+
"aria-label": E("results", y),
|
|
39
|
+
children: (e) => /* @__PURE__ */ o(c.Item, {
|
|
42
40
|
value: e,
|
|
43
41
|
className: "docs-search__result",
|
|
44
|
-
onClick: () =>
|
|
45
|
-
render: (t) =>
|
|
42
|
+
onClick: () => w?.(e),
|
|
43
|
+
render: (t) => C({
|
|
46
44
|
...t,
|
|
47
45
|
href: e.href,
|
|
48
46
|
className: t.className ?? "docs-search__result",
|
|
49
|
-
children: /* @__PURE__ */ a
|
|
50
|
-
e.product && /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ s(a, { children: [
|
|
48
|
+
e.product && /* @__PURE__ */ o("span", {
|
|
51
49
|
className: "docs-search__result-product",
|
|
52
50
|
children: e.product
|
|
53
51
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ o("span", {
|
|
55
53
|
className: "docs-search__result-title",
|
|
56
54
|
children: e.title
|
|
57
55
|
}),
|
|
58
|
-
e.excerpt && /* @__PURE__ */
|
|
56
|
+
e.excerpt && /* @__PURE__ */ o("span", {
|
|
59
57
|
className: "docs-search__result-excerpt",
|
|
60
58
|
children: e.excerpt
|
|
61
59
|
})
|
|
@@ -63,17 +61,17 @@ function c({ id: c = "docs-search", query: l, onQueryChange: u, results: d, load
|
|
|
63
61
|
})
|
|
64
62
|
}, e.href)
|
|
65
63
|
}),
|
|
66
|
-
|
|
64
|
+
k && /* @__PURE__ */ s("p", {
|
|
67
65
|
className: "docs-search__status",
|
|
68
66
|
role: "status",
|
|
69
|
-
children: [
|
|
67
|
+
children: [p && /* @__PURE__ */ o(t, {
|
|
70
68
|
size: "sm",
|
|
71
69
|
"aria-hidden": !0
|
|
72
|
-
}),
|
|
70
|
+
}), k]
|
|
73
71
|
})
|
|
74
72
|
]
|
|
75
73
|
})
|
|
76
74
|
});
|
|
77
75
|
}
|
|
78
76
|
//#endregion
|
|
79
|
-
export {
|
|
77
|
+
export { l as DocsSearch };
|
package/dist/email.js
CHANGED
|
@@ -223,29 +223,32 @@ function I(e) {
|
|
|
223
223
|
})
|
|
224
224
|
]
|
|
225
225
|
});
|
|
226
|
-
let { unsubscribeUrl: t, preferencesUrl: n,
|
|
226
|
+
let { unsubscribeUrl: t, preferencesUrl: n, unsubscribeLabel: r } = e, o = (e, t) => {
|
|
227
|
+
if (t === void 0) throw Error(`@studiolxd/brand/email: falta «optOut.${e}». El pie de baja no trae textos puestos: los pasa quien manda el correo, en el idioma del destinatario.`);
|
|
228
|
+
return t;
|
|
229
|
+
}, s = /* @__PURE__ */ i(h, {
|
|
227
230
|
href: t,
|
|
228
231
|
style: M.link,
|
|
229
|
-
children: o
|
|
232
|
+
children: o("unsubscribeLabel", r)
|
|
230
233
|
});
|
|
231
234
|
return n ? /* @__PURE__ */ a(v, {
|
|
232
235
|
style: M.footnote,
|
|
233
236
|
children: [
|
|
234
|
-
u,
|
|
235
237
|
s,
|
|
238
|
+
o("manageBeforeLabel", e.manageBeforeLabel),
|
|
236
239
|
/* @__PURE__ */ i(h, {
|
|
237
240
|
href: n,
|
|
238
241
|
style: M.link,
|
|
239
|
-
children:
|
|
242
|
+
children: o("managePreferencesLabel", e.managePreferencesLabel)
|
|
240
243
|
}),
|
|
241
|
-
|
|
244
|
+
o("manageAfterLabel", e.manageAfterLabel)
|
|
242
245
|
]
|
|
243
246
|
}) : /* @__PURE__ */ a(v, {
|
|
244
247
|
style: M.footnote,
|
|
245
248
|
children: [
|
|
246
|
-
|
|
249
|
+
o("manageLabel", e.manageLabel),
|
|
247
250
|
" ",
|
|
248
|
-
|
|
251
|
+
s
|
|
249
252
|
]
|
|
250
253
|
});
|
|
251
254
|
}
|
package/dist/error-page.js
CHANGED
|
@@ -6,14 +6,14 @@ import { PageIntro as r } from "./page-intro.js";
|
|
|
6
6
|
import { PublicPageShell as i } from "./public-page-shell.js";
|
|
7
7
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
8
|
//#region src/stories/templates/ErrorPage/ErrorPage.tsx
|
|
9
|
-
function s({ title: s, description: c, homeAction: l, retryDescription: u, retryAction: d, header: f, footer: p, id: m = "main-content", shell: h = !0 }) {
|
|
9
|
+
function s({ title: s, description: c, homeAction: l, retryDescription: u, retryAction: d, header: f, footer: p, id: m = "main-content", shell: h = !0, className: g }) {
|
|
10
10
|
return /* @__PURE__ */ a(i, {
|
|
11
11
|
header: f,
|
|
12
12
|
footer: p,
|
|
13
13
|
id: m,
|
|
14
14
|
shell: h,
|
|
15
15
|
children: /* @__PURE__ */ o(e, {
|
|
16
|
-
className: "error-page__content",
|
|
16
|
+
className: ["error-page__content", g].filter(Boolean).join(" "),
|
|
17
17
|
children: [/* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(r, {
|
|
18
18
|
title: s,
|
|
19
19
|
description: c
|
package/dist/fieldset.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fieldset{border:none;min-inline-size:0;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fieldset__legend{margin-block:0;
|
|
1
|
+
.fieldset{border:none;min-inline-size:0;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fieldset__legend{margin-block:0;inline-size:100%;margin-block-end:var(--fieldset-legend-space-after);margin-inline:0;padding-inline:0;display:block}.fieldset__legend.fieldset__legend--1{font-family:var(--text-h1-font-family);font-size:var(--text-h1-font-size);font-weight:var(--text-h1-font-weight);line-height:var(--text-h1-line-height);color:var(--text-h1-color);letter-spacing:var(--text-h1-letter-spacing)}.fieldset__legend.fieldset__legend--2{font-family:var(--text-h2-font-family);font-size:var(--text-h2-font-size);font-weight:var(--text-h2-font-weight);line-height:var(--text-h2-line-height);color:var(--text-h2-color);letter-spacing:var(--text-h2-letter-spacing)}.fieldset__legend.fieldset__legend--3{font-family:var(--text-h3-font-family);font-size:var(--text-h3-font-size);font-weight:var(--text-h3-font-weight);line-height:var(--text-h3-line-height);color:var(--text-h3-color);letter-spacing:var(--text-h3-letter-spacing)}.fieldset__legend.fieldset__legend--4{font-family:var(--text-h4-font-family);font-size:var(--text-h4-font-size);font-weight:var(--text-h4-font-weight);line-height:var(--text-h4-line-height);color:var(--text-h4-color);letter-spacing:var(--text-h4-letter-spacing)}.fieldset__legend.fieldset__legend--5{font-family:var(--text-h5-font-family);font-size:var(--text-h5-font-size);font-weight:var(--text-h5-font-weight);line-height:var(--text-h5-line-height);color:var(--text-h5-color);letter-spacing:var(--text-h5-letter-spacing)}.fieldset__legend.fieldset__legend--6{font-family:var(--text-h6-font-family);font-size:var(--text-h6-font-size);font-weight:var(--text-h6-font-weight);line-height:var(--text-h6-line-height);color:var(--text-h6-color);letter-spacing:var(--text-h6-letter-spacing)}.fieldset__legend.fieldset__legend--size-1{font-size:var(--text-size-1)}.fieldset__legend.fieldset__legend--size-2{font-size:var(--text-size-2)}.fieldset__legend.fieldset__legend--size-3{font-size:var(--text-size-3)}.fieldset__legend.fieldset__legend--size-4{font-size:var(--text-size-4)}.fieldset__legend.fieldset__legend--size-5{font-size:var(--text-size-5)}.fieldset__legend.fieldset__legend--size-6{font-size:var(--text-size-6)}.fieldset__legend.fieldset__legend--size-7{font-size:var(--text-size-7)}.fieldset__legend.fieldset__legend--size-8{font-size:var(--text-size-8)}.fieldset__legend.fieldset__legend--size-9{font-size:var(--text-size-9)}.fieldset__legend.fieldset__legend--size-10{font-size:var(--text-size-10)}.fieldset__legend.fieldset__legend--thin{font-weight:var(--font-weight-thin)}.fieldset__legend.fieldset__legend--extralight{font-weight:var(--font-weight-extralight)}.fieldset__legend.fieldset__legend--light{font-weight:var(--font-weight-light)}.fieldset__legend.fieldset__legend--regular{font-weight:var(--font-weight-regular)}.fieldset__legend.fieldset__legend--medium{font-weight:var(--font-weight-medium)}.fieldset__legend.fieldset__legend--semibold{font-weight:var(--font-weight-semibold)}.fieldset__legend.fieldset__legend--bold{font-weight:var(--font-weight-bold)}.fieldset__legend.fieldset__legend--extrabold{font-weight:var(--font-weight-extrabold)}.fieldset__legend.fieldset__legend--black{font-weight:var(--font-weight-black)}
|
package/dist/figure.js
CHANGED
package/dist/file-upload.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.file-upload{
|
|
1
|
+
.file-upload{inline-size:100%}.file-upload__dropzone{--_drop-color:var(--file-upload-border-color);--_drop-bg:var(--file-upload-bg);--_dash:var(--file-upload-border-dash-length);--_gap:var(--file-upload-border-dash-gap)}.file-upload.file-upload--sm{--file-upload-padding-block:var(--file-upload-sm-padding-block);--file-upload-padding-inline:var(--file-upload-sm-padding-inline);--file-upload-text-font-size:var(--file-upload-sm-text-font-size);--file-upload-subtext-font-size:var(--file-upload-sm-subtext-font-size);--file-upload-thumb-size:var(--file-upload-sm-thumb-size);--file-upload-item-name-font-size:var(--file-upload-sm-item-name-font-size)}.file-upload.file-upload--lg{--file-upload-padding-block:var(--file-upload-lg-padding-block);--file-upload-padding-inline:var(--file-upload-lg-padding-inline);--file-upload-text-font-size:var(--file-upload-lg-text-font-size);--file-upload-subtext-font-size:var(--file-upload-lg-subtext-font-size);--file-upload-thumb-size:var(--file-upload-lg-thumb-size);--file-upload-item-name-font-size:var(--file-upload-lg-item-name-font-size)}.file-upload__dropzone{justify-content:center;align-items:center;gap:var(--file-upload-gap);inline-size:100%;padding-block:var(--file-upload-padding-block);padding-inline:var(--file-upload-padding-inline);background-image:repeating-linear-gradient(90deg, var(--_drop-color) 0, var(--_drop-color) var(--_dash), transparent var(--_dash), transparent calc(var(--_dash) + var(--_gap))), repeating-linear-gradient(90deg, var(--_drop-color) 0, var(--_drop-color) var(--_dash), transparent var(--_dash), transparent calc(var(--_dash) + var(--_gap))), repeating-linear-gradient(180deg, var(--_drop-color) 0, var(--_drop-color) var(--_dash), transparent var(--_dash), transparent calc(var(--_dash) + var(--_gap))), repeating-linear-gradient(180deg, var(--_drop-color) 0, var(--_drop-color) var(--_dash), transparent var(--_dash), transparent calc(var(--_dash) + var(--_gap)));background-size:100% var(--file-upload-border-width), 100% var(--file-upload-border-width), var(--file-upload-border-width) 100%, var(--file-upload-border-width) 100%;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-color:var(--_drop-bg);color:var(--file-upload-text-color);cursor:pointer;transition:background-image var(--file-upload-transition-duration) var(--file-upload-transition-easing), background-color var(--file-upload-transition-duration) var(--file-upload-transition-easing);text-align:center;box-sizing:border-box;outline:none;flex-direction:column;display:flex}.file-upload:has(input[type=file]:focus-visible) .file-upload__dropzone{outline:var(--input-focus-ring-width) solid var(--input-focus-ring-color);outline-offset:var(--file-upload-remove-focus-ring-offset)}.file-upload.file-upload--dragging .file-upload__dropzone{--_drop-color:var(--file-upload-drag-border-color);--_drop-bg:var(--file-upload-drag-bg)}.file-upload.file-upload--error .file-upload__dropzone{--_drop-color:var(--file-upload-error-border-color);--_drop-bg:var(--file-upload-error-bg)}.file-upload.file-upload--disabled .file-upload__dropzone{opacity:var(--file-upload-disabled-opacity);cursor:var(--file-upload-disabled-cursor);pointer-events:none}.file-upload.file-upload--uploading .file-upload__dropzone{cursor:progress;pointer-events:none}.file-upload.file-upload--uploading span.file-upload__icon{display:flex}.file-upload.file-upload--uploading .file-upload__item-remove{pointer-events:none}.file-upload__icon{color:var(--file-upload-icon-color);flex-shrink:0;margin-block-end:var(--file-upload-gap)}.file-upload__text{font-family:var(--file-upload-text-font-family);font-size:var(--file-upload-text-font-size);font-weight:var(--file-upload-text-font-weight);color:var(--file-upload-text-color)}.file-upload__text--secondary{color:var(--file-upload-subtext-color);font-weight:var(--file-upload-subtext-font-weight)}.file-upload__subtext{font-family:var(--file-upload-text-font-family);font-size:var(--file-upload-subtext-font-size);color:var(--file-upload-subtext-color);margin-block-start:var(--file-upload-gap)}.file-upload__list{gap:var(--file-upload-list-gap);flex-direction:column;margin:0;margin-block-start:var(--file-upload-list-margin-block-start);padding:0;list-style:none;display:flex}.file-upload__item{align-items:center;gap:var(--file-upload-item-gap);padding-block:var(--file-upload-item-padding-block);padding-inline:var(--file-upload-item-padding-inline);border-width:var(--file-upload-item-border-width);border-style:solid;border-color:var(--file-upload-item-border-color);border-radius:var(--file-upload-item-border-radius);background-color:var(--file-upload-item-bg);display:flex}.file-upload__item.file-upload__item--error{border-color:var(--file-upload-item-error-border-color);background-color:var(--file-upload-item-error-bg)}.file-upload__item-thumb{inline-size:var(--file-upload-thumb-size);block-size:var(--file-upload-thumb-size);border-radius:var(--file-upload-thumb-border-radius);background-color:var(--file-upload-thumb-bg);color:var(--file-upload-thumb-icon-color);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.file-upload__item-thumb img{object-fit:cover;block-size:100%;inline-size:100%}.file-upload__item-info{gap:var(--file-upload-item-info-gap);flex-direction:column;flex:1;min-inline-size:0;display:flex}.file-upload__item-name{font-family:var(--file-upload-item-name-font-family);font-size:var(--file-upload-item-name-font-size);font-weight:var(--file-upload-item-name-font-weight);color:var(--file-upload-item-name-color);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-upload__item-size{font-family:var(--file-upload-item-name-font-family);font-size:var(--file-upload-item-size-font-size);color:var(--file-upload-item-size-color)}.file-upload__item-error-msg{font-family:var(--file-upload-item-name-font-family);font-size:var(--file-upload-item-error-font-size);color:var(--file-upload-item-error-color)}.file-upload__item-remove{cursor:pointer;color:var(--file-upload-remove-color);transition:color var(--file-upload-transition-duration) var(--file-upload-transition-easing);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;line-height:1;display:flex}.file-upload__item-remove:hover{color:var(--file-upload-remove-color-hover)}.file-upload__item-remove:focus-visible{outline:var(--input-focus-ring-width) solid var(--input-focus-ring-color);outline-offset:var(--file-upload-remove-focus-ring-offset);border-radius:var(--file-upload-remove-border-radius)}.file-upload__progress{margin-block-start:var(--file-upload-progress-margin-block-start)}
|
package/dist/file-upload.js
CHANGED
|
@@ -5,47 +5,45 @@ import { Icon as t } from "./icon.js";
|
|
|
5
5
|
import { VisuallyHidden as n } from "./visually-hidden.js";
|
|
6
6
|
import { Spinner as r } from "./spinner.js";
|
|
7
7
|
import { n as i } from "./_shared/form-size.js";
|
|
8
|
-
import { t as ee } from "./_shared/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { t as ee } from "./_shared/assign-ref.js";
|
|
9
|
+
import { t as te } from "./_shared/progressbar.js";
|
|
10
|
+
import { i as ne, n as a, t as o } from "./_shared/validate.js";
|
|
11
|
+
import { forwardRef as s, useCallback as c, useEffect as l, useId as re, useRef as u, useState as d } from "react";
|
|
12
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
13
|
//#region src/stories/atoms/FileUpload/FileUpload.tsx
|
|
13
|
-
var
|
|
14
|
-
function
|
|
14
|
+
var h = /* @__PURE__ */ new WeakMap();
|
|
15
|
+
function ie(e) {
|
|
15
16
|
if (!e.type.startsWith("image/")) return;
|
|
16
|
-
let t =
|
|
17
|
-
return t || (t = URL.createObjectURL(e),
|
|
17
|
+
let t = h.get(e);
|
|
18
|
+
return t || (t = URL.createObjectURL(e), h.set(e, t)), t;
|
|
18
19
|
}
|
|
19
20
|
function g(e) {
|
|
20
|
-
let t =
|
|
21
|
-
t && (URL.revokeObjectURL(t),
|
|
21
|
+
let t = h.get(e);
|
|
22
|
+
t && (URL.revokeObjectURL(t), h.delete(e));
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _ = o(function({ multiple: o = !1, accept: m, maxSize: _, maxFiles: v, value: y, defaultValue: b = [], onChange: x, progress: S, uploading: C = !1, uploadingLabel: ae, uploadingLabelVisible: oe = !1, disabled: w = !1, error: T = !1, id: se, name: ce, describedBy: le, ariaLabel: ue, "aria-describedby": de, "aria-label": fe, required: pe, onBlur: me, className: he, locale: E = ne, dropzoneLabel: ge, dropzoneActiveLabel: _e, dropzoneHintLabel: ve, maxSizeHint: ye, maxFilesHint: be, filesLabel: xe, progressLabel: D, removeFileLabel: O, tooLargeError: k, invalidTypeError: A, size: j }, M) {
|
|
27
|
-
let N = e("fileUpload"), P = i(j), F = P === "sm" ? "sm" : P === "lg" ? "lg" : "md", I = y !== void 0, [L, R] = u(b), [z, B] = u(/* @__PURE__ */ new Map()), [V, H] = u(!1), U = l(/* @__PURE__ */ new Set()), W = l(null), Se = re(), G = se ?? `file-upload-${Se}`, K = I ? y : L;
|
|
28
|
-
c(() => {
|
|
24
|
+
var _ = s(function({ multiple: s = !1, accept: h, maxSize: _, maxFiles: v, value: y, defaultValue: b = [], onChange: x, progress: S, uploading: C = !1, uploadingLabel: ae, uploadingLabelVisible: oe = !1, disabled: w = !1, error: T = !1, id: se, name: ce, describedBy: le, ariaLabel: ue, "aria-describedby": de, "aria-label": fe, required: pe, onBlur: me, className: he, locale: E = o, dropzoneLabel: ge, dropzoneActiveLabel: _e, dropzoneHintLabel: ve, maxSizeHint: ye, maxFilesHint: be, filesLabel: xe, progressLabel: D, removeFileLabel: O, tooLargeError: k, invalidTypeError: A, size: j }, M) {
|
|
25
|
+
let N = e("fileUpload"), P = i(j), F = P === "sm" ? "sm" : P === "lg" ? "lg" : "md", I = y !== void 0, [L, R] = d(b), [z, B] = d(/* @__PURE__ */ new Map()), [V, H] = d(!1), U = u(/* @__PURE__ */ new Set()), W = u(null), Se = re(), G = se ?? `file-upload-${Se}`, K = I ? y : L;
|
|
26
|
+
l(() => {
|
|
29
27
|
K.forEach((e) => U.current.add(e));
|
|
30
|
-
}, [K]),
|
|
28
|
+
}, [K]), l(() => {
|
|
31
29
|
let e = U.current;
|
|
32
30
|
return () => {
|
|
33
31
|
e.forEach(g);
|
|
34
32
|
};
|
|
35
33
|
}, []);
|
|
36
|
-
let q =
|
|
34
|
+
let q = c((e) => {
|
|
37
35
|
if (w || C) return;
|
|
38
36
|
let t = Array.from(e), n = I ? y ?? [] : L, r = new Map(z), i = [...n];
|
|
39
37
|
for (let e of t) {
|
|
40
38
|
if (v !== void 0 && i.filter((e) => !r.has(e)).length >= v) break;
|
|
41
|
-
let t =
|
|
39
|
+
let t = ne(e, h, _, N("tooLarge", k), N("invalidType", A), E);
|
|
42
40
|
t && r.set(e, t), i.push(e);
|
|
43
41
|
}
|
|
44
42
|
B(r), I || R(i), x?.(i.filter((e) => !r.has(e)));
|
|
45
43
|
}, [
|
|
46
44
|
w,
|
|
47
45
|
C,
|
|
48
|
-
|
|
46
|
+
h,
|
|
49
47
|
_,
|
|
50
48
|
v,
|
|
51
49
|
I,
|
|
@@ -57,7 +55,7 @@ var _ = o(function({ multiple: o = !1, accept: m, maxSize: _, maxFiles: v, value
|
|
|
57
55
|
k,
|
|
58
56
|
A,
|
|
59
57
|
E
|
|
60
|
-
]), Ce =
|
|
58
|
+
]), Ce = c((e) => {
|
|
61
59
|
if (C) return;
|
|
62
60
|
let t = (I ? y ?? [] : L).filter((t) => t !== e), n = new Map(z);
|
|
63
61
|
n.delete(e), g(e), B(n), I || R(t), x?.(t.filter((e) => !n.has(e))), W.current && (W.current.value = "");
|
|
@@ -88,18 +86,18 @@ var _ = o(function({ multiple: o = !1, accept: m, maxSize: _, maxFiles: v, value
|
|
|
88
86
|
K.length > 0 ? "file-upload--has-files" : "",
|
|
89
87
|
he ?? ""
|
|
90
88
|
].filter(Boolean).join(" "), Y = `${G}-hint`, ke = [le ?? de, Y].filter(Boolean).join(" "), X = N("dropzone", ge), Z = N("dropzoneHint", ve), Q = C ? N("uploading", ae) : "", Ae = C && oe, $ = [];
|
|
91
|
-
return
|
|
89
|
+
return h && $.push(h), _ && $.push(N("maxSize", ye)(a(_, E))), s && v && $.push(N("maxFiles", be)(v)), /* @__PURE__ */ m("div", {
|
|
92
90
|
className: J,
|
|
93
91
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ p(n, { children: /* @__PURE__ */ p("input", {
|
|
95
93
|
ref: (e) => {
|
|
96
|
-
W.current = e,
|
|
94
|
+
W.current = e, ee(M, e);
|
|
97
95
|
},
|
|
98
96
|
type: "file",
|
|
99
97
|
id: G,
|
|
100
98
|
name: ce,
|
|
101
|
-
multiple:
|
|
102
|
-
accept:
|
|
99
|
+
multiple: s,
|
|
100
|
+
accept: h,
|
|
103
101
|
disabled: w,
|
|
104
102
|
required: pe,
|
|
105
103
|
"aria-label": ue ?? fe,
|
|
@@ -111,43 +109,43 @@ var _ = o(function({ multiple: o = !1, accept: m, maxSize: _, maxFiles: v, value
|
|
|
111
109
|
onChange: we,
|
|
112
110
|
onBlur: me
|
|
113
111
|
}) }),
|
|
114
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ p("div", {
|
|
115
113
|
className: "file-upload__dropzone",
|
|
116
114
|
onClick: Oe,
|
|
117
115
|
onDragOver: Te,
|
|
118
116
|
onDragLeave: Ee,
|
|
119
117
|
onDrop: De,
|
|
120
118
|
"aria-hidden": "true",
|
|
121
|
-
children: C ? /* @__PURE__ */
|
|
119
|
+
children: C ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
|
|
122
120
|
className: "file-upload__icon",
|
|
123
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ p(r, {
|
|
124
122
|
size: F,
|
|
125
123
|
"aria-hidden": !0
|
|
126
124
|
})
|
|
127
|
-
}), Ae && /* @__PURE__ */
|
|
125
|
+
}), Ae && /* @__PURE__ */ p("span", {
|
|
128
126
|
className: "file-upload__text",
|
|
129
127
|
children: Q
|
|
130
|
-
})] }) : /* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
128
|
+
})] }) : /* @__PURE__ */ m(f, { children: [
|
|
129
|
+
/* @__PURE__ */ p(t, {
|
|
132
130
|
name: "upload",
|
|
133
131
|
size: F,
|
|
134
132
|
className: "file-upload__icon"
|
|
135
133
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ p("span", {
|
|
137
135
|
className: "file-upload__text",
|
|
138
136
|
children: V ? N("dropzoneActive", _e) : X
|
|
139
137
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ p("span", {
|
|
141
139
|
className: "file-upload__text file-upload__text--secondary",
|
|
142
140
|
children: Z
|
|
143
141
|
}),
|
|
144
|
-
$.length > 0 && /* @__PURE__ */
|
|
142
|
+
$.length > 0 && /* @__PURE__ */ p("span", {
|
|
145
143
|
className: "file-upload__subtext",
|
|
146
144
|
children: $.join(" · ")
|
|
147
145
|
})
|
|
148
146
|
] })
|
|
149
147
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ p(n, {
|
|
151
149
|
id: Y,
|
|
152
150
|
children: [
|
|
153
151
|
X,
|
|
@@ -155,56 +153,56 @@ var _ = o(function({ multiple: o = !1, accept: m, maxSize: _, maxFiles: v, value
|
|
|
155
153
|
...$
|
|
156
154
|
].join(". ")
|
|
157
155
|
}),
|
|
158
|
-
C && /* @__PURE__ */
|
|
156
|
+
C && /* @__PURE__ */ p(n, {
|
|
159
157
|
role: "status",
|
|
160
158
|
"aria-live": "polite",
|
|
161
159
|
"aria-atomic": "false",
|
|
162
160
|
children: Q
|
|
163
161
|
}),
|
|
164
|
-
K.length > 0 && /* @__PURE__ */
|
|
162
|
+
K.length > 0 && /* @__PURE__ */ p("ul", {
|
|
165
163
|
className: "file-upload__list",
|
|
166
164
|
"aria-label": N("files", xe),
|
|
167
165
|
children: K.map((e, n) => {
|
|
168
|
-
let r = z.get(e), i =
|
|
169
|
-
return /* @__PURE__ */
|
|
166
|
+
let r = z.get(e), i = ie(e);
|
|
167
|
+
return /* @__PURE__ */ m("li", {
|
|
170
168
|
className: `file-upload__item${r ? " file-upload__item--error" : ""}`,
|
|
171
169
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ p("div", {
|
|
173
171
|
className: "file-upload__item-thumb",
|
|
174
172
|
"aria-hidden": "true",
|
|
175
|
-
children: i ? /* @__PURE__ */
|
|
173
|
+
children: i ? /* @__PURE__ */ p("img", {
|
|
176
174
|
src: i,
|
|
177
175
|
alt: ""
|
|
178
|
-
}) : /* @__PURE__ */
|
|
176
|
+
}) : /* @__PURE__ */ p(t, {
|
|
179
177
|
name: "file-text",
|
|
180
178
|
size: "sm"
|
|
181
179
|
})
|
|
182
180
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ m("div", {
|
|
184
182
|
className: "file-upload__item-info",
|
|
185
183
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ p("span", {
|
|
187
185
|
className: "file-upload__item-name",
|
|
188
186
|
children: e.name
|
|
189
187
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ p("span", {
|
|
191
189
|
className: "file-upload__item-size",
|
|
192
190
|
children: a(e.size, E)
|
|
193
191
|
}),
|
|
194
|
-
r && /* @__PURE__ */
|
|
192
|
+
r && /* @__PURE__ */ p("span", {
|
|
195
193
|
className: "file-upload__item-error-msg",
|
|
196
194
|
role: "alert",
|
|
197
195
|
children: r
|
|
198
196
|
})
|
|
199
197
|
]
|
|
200
198
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ p("button", {
|
|
202
200
|
className: "file-upload__item-remove",
|
|
203
201
|
type: "button",
|
|
204
202
|
onClick: () => Ce(e),
|
|
205
203
|
"aria-disabled": C || void 0,
|
|
206
204
|
"aria-label": N("removeFile", O)(e.name),
|
|
207
|
-
children: /* @__PURE__ */
|
|
205
|
+
children: /* @__PURE__ */ p(t, {
|
|
208
206
|
name: "close",
|
|
209
207
|
size: "sm"
|
|
210
208
|
})
|
|
@@ -213,7 +211,7 @@ var _ = o(function({ multiple: o = !1, accept: m, maxSize: _, maxFiles: v, value
|
|
|
213
211
|
}, `${e.name}-${e.size}-${n}`);
|
|
214
212
|
})
|
|
215
213
|
}),
|
|
216
|
-
S !== void 0 && /* @__PURE__ */
|
|
214
|
+
S !== void 0 && /* @__PURE__ */ p(te, {
|
|
217
215
|
value: S,
|
|
218
216
|
label: N("progress", D),
|
|
219
217
|
size: "sm",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.floating-toolbar{--floating-toolbar-rail-inline-size:calc(var(--floating-toolbar-button-size) + 2 * var(--floating-toolbar-padding-inline) + 2 * var(--floating-toolbar-border-width));position:relative}.floating-toolbar__bar{box-sizing:border-box;align-items:center;gap:var(--floating-toolbar-gap);padding-block:var(--floating-toolbar-padding-block);padding-inline:var(--floating-toolbar-padding-inline);background-color:var(--floating-toolbar-bg);border-style:solid;border-width:var(--floating-toolbar-border-width);border-color:var(--floating-toolbar-border-color);border-radius:var(--floating-toolbar-border-radius);box-shadow:var(--floating-toolbar-shadow);opacity:0;pointer-events:none;transition-property:opacity;transition-duration:var(--floating-toolbar-transition-duration);transition-timing-function:var(--floating-toolbar-transition-easing);display:flex;position:absolute;inset-block-end:calc(100% + var(--floating-toolbar-offset));inset-inline:0}.floating-toolbar__bar:before{content:"";block-size:calc(var(--floating-toolbar-offset) + var(--floating-toolbar-border-width));position:absolute;inset-block-start:100%;inset-inline:0}.floating-toolbar__group{align-items:center;gap:var(--floating-toolbar-gap);flex-direction:row;display:flex}.floating-toolbar__group.floating-toolbar__group--end{margin-inline-start:auto}.floating-toolbar:is(:hover,:focus-within,.floating-toolbar--always-visible,:has(>.floating-toolbar__bar [data-popup-open]))>.floating-toolbar__bar{opacity:1;pointer-events:auto}.floating-toolbar.floating-toolbar--sides{padding-inline:calc(var(--floating-toolbar-rail-inline-size) + var(--floating-toolbar-offset))}.floating-toolbar.floating-toolbar--sides>.floating-toolbar__bar{box-shadow:none;background-color:#0000;border-width:0;align-items:flex-start;padding-block:0;padding-inline:0;inset-block:0}.floating-toolbar.floating-toolbar--sides>.floating-toolbar__bar:before{content:none}.floating-toolbar.floating-toolbar--sides:is(:hover,:focus-within,.floating-toolbar--always-visible,:has(>.floating-toolbar__bar [data-popup-open]))>.floating-toolbar__bar{pointer-events:none}.floating-toolbar.floating-toolbar--sides:is(:hover,:focus-within,.floating-toolbar--always-visible,:has(>.floating-toolbar__bar [data-popup-open]))>.floating-toolbar__bar>.floating-toolbar__group{pointer-events:auto}.floating-toolbar.floating-toolbar--sides>.floating-toolbar__bar>.floating-toolbar__group{box-sizing:border-box;inline-size:var(--floating-toolbar-rail-inline-size);padding-block:var(--floating-toolbar-padding-block);padding-inline:var(--floating-toolbar-padding-inline);background-color:var(--floating-toolbar-bg);border-style:solid;border-width:var(--floating-toolbar-border-width);border-color:var(--floating-toolbar-border-color);border-radius:var(--floating-toolbar-border-radius);box-shadow:var(--floating-toolbar-shadow);flex-direction:column;position:sticky;inset-block-start:0}@media (width>=1024px){.floating-toolbar.floating-toolbar--auto{padding-inline:calc(var(--floating-toolbar-rail-inline-size) + var(--floating-toolbar-offset))}.floating-toolbar.floating-toolbar--auto>.floating-toolbar__bar{box-shadow:none;background-color:#0000;border-width:0;align-items:flex-start;padding-block:0;padding-inline:0;inset-block:0}.floating-toolbar.floating-toolbar--auto>.floating-toolbar__bar:before{content:none}.floating-toolbar.floating-toolbar--auto:is(:hover,:focus-within,.floating-toolbar--always-visible,:has(>.floating-toolbar__bar [data-popup-open]))>.floating-toolbar__bar{pointer-events:none}.floating-toolbar.floating-toolbar--auto:is(:hover,:focus-within,.floating-toolbar--always-visible,:has(>.floating-toolbar__bar [data-popup-open]))>.floating-toolbar__bar>.floating-toolbar__group{pointer-events:auto}.floating-toolbar.floating-toolbar--auto>.floating-toolbar__bar>.floating-toolbar__group{box-sizing:border-box;inline-size:var(--floating-toolbar-rail-inline-size);padding-block:var(--floating-toolbar-padding-block);padding-inline:var(--floating-toolbar-padding-inline);background-color:var(--floating-toolbar-bg);border-style:solid;border-width:var(--floating-toolbar-border-width);border-color:var(--floating-toolbar-border-color);border-radius:var(--floating-toolbar-border-radius);box-shadow:var(--floating-toolbar-shadow);flex-direction:column;position:sticky;inset-block-start:0}}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import './floating-toolbar.css';
|
|
3
|
+
import { Button as e } from "./button.js";
|
|
4
|
+
import { Tooltip as t } from "./tooltip.js";
|
|
5
|
+
import { t as n } from "./_shared/media-query.js";
|
|
6
|
+
import { createContext as r, forwardRef as i, useContext as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import { Toolbar as c } from "@base-ui/react/toolbar";
|
|
9
|
+
//#region src/stories/molecules/FloatingToolbar/FloatingToolbar.tsx
|
|
10
|
+
var l = "(min-width: 1024px)", u = r("top"), d = i(function({ start: e, end: t, layout: r = "auto", alwaysVisible: i = !1, label: a, children: d, className: f, ...p }, m) {
|
|
11
|
+
let h = n(l), g = r === "sides" || r === "auto" && h === !0;
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
13
|
+
ref: m,
|
|
14
|
+
className: [
|
|
15
|
+
"floating-toolbar",
|
|
16
|
+
`floating-toolbar--${r}`,
|
|
17
|
+
i ? "floating-toolbar--always-visible" : "",
|
|
18
|
+
f ?? ""
|
|
19
|
+
].filter(Boolean).join(" "),
|
|
20
|
+
...p,
|
|
21
|
+
children: [/* @__PURE__ */ s(c.Root, {
|
|
22
|
+
className: "floating-toolbar__bar",
|
|
23
|
+
"aria-label": a,
|
|
24
|
+
orientation: g ? "vertical" : "horizontal",
|
|
25
|
+
children: [e != null && /* @__PURE__ */ o(u.Provider, {
|
|
26
|
+
value: g ? "left" : "top",
|
|
27
|
+
children: /* @__PURE__ */ o(c.Group, {
|
|
28
|
+
className: "floating-toolbar__group floating-toolbar__group--start",
|
|
29
|
+
children: e
|
|
30
|
+
})
|
|
31
|
+
}), t != null && /* @__PURE__ */ o(u.Provider, {
|
|
32
|
+
value: g ? "right" : "top",
|
|
33
|
+
children: /* @__PURE__ */ o(c.Group, {
|
|
34
|
+
className: "floating-toolbar__group floating-toolbar__group--end",
|
|
35
|
+
children: t
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
}), /* @__PURE__ */ o("div", {
|
|
39
|
+
className: "floating-toolbar__content",
|
|
40
|
+
children: d
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}), f = i(function({ label: n, icon: r, destructive: i = !1, className: s, ...l }, d) {
|
|
44
|
+
return /* @__PURE__ */ o(t, {
|
|
45
|
+
label: n,
|
|
46
|
+
side: a(u),
|
|
47
|
+
describe: !1,
|
|
48
|
+
ref: d,
|
|
49
|
+
...l,
|
|
50
|
+
children: /* @__PURE__ */ o(c.Button, {
|
|
51
|
+
render: /* @__PURE__ */ o(e, {
|
|
52
|
+
variant: "ghost",
|
|
53
|
+
size: "sm",
|
|
54
|
+
iconOnly: !0,
|
|
55
|
+
destructive: i,
|
|
56
|
+
"aria-label": n,
|
|
57
|
+
className: s
|
|
58
|
+
}),
|
|
59
|
+
children: r
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
export { d as FloatingToolbar, f as FloatingToolbarButton };
|