@snksergio/design-system 0.19.1 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -12
- package/dist-lib/chunks/{app-shell-Cy9be0Zx.mjs → app-shell-78w0pYdP.mjs} +849 -79
- package/dist-lib/chunks/app-shell-78w0pYdP.mjs.map +1 -0
- package/dist-lib/chunks/{app-shell-CPx9X7zP.cjs → app-shell-Cyh8AUJT.cjs} +947 -176
- package/dist-lib/chunks/app-shell-Cyh8AUJT.cjs.map +1 -0
- package/dist-lib/chunks/{clientes-showcase-mocks-ayU1SDOA.mjs → clientes-showcase-mocks-CwWGCCmf.mjs} +1 -27
- package/dist-lib/chunks/clientes-showcase-mocks-CwWGCCmf.mjs.map +1 -0
- package/dist-lib/chunks/{clientes-showcase-mocks-DygUqkkh.cjs → clientes-showcase-mocks-CwhluBTT.cjs} +1 -44
- package/dist-lib/chunks/clientes-showcase-mocks-CwhluBTT.cjs.map +1 -0
- package/dist-lib/chunks/{input-BWevV7up.cjs → input-BjUSWce3.cjs} +24 -4
- package/dist-lib/chunks/input-BjUSWce3.cjs.map +1 -0
- package/dist-lib/chunks/{input-C9eKSSEb.mjs → input-DCDU4i4S.mjs} +23 -3
- package/dist-lib/chunks/input-DCDU4i4S.mjs.map +1 -0
- package/dist-lib/chunks/kpi-delta-C_3V6uG6.cjs +148 -0
- package/dist-lib/chunks/kpi-delta-C_3V6uG6.cjs.map +1 -0
- package/dist-lib/chunks/kpi-delta-DpYuDY4h.mjs +149 -0
- package/dist-lib/chunks/kpi-delta-DpYuDY4h.mjs.map +1 -0
- package/dist-lib/chunks/{page-header-CQbTGWQ8.mjs → page-header-B6XJyIMz.mjs} +2 -2
- package/dist-lib/chunks/{page-header-CQbTGWQ8.mjs.map → page-header-B6XJyIMz.mjs.map} +1 -1
- package/dist-lib/chunks/{page-header-BZ-WrxV2.cjs → page-header-D0rpU0yn.cjs} +4 -4
- package/dist-lib/chunks/{page-header-BZ-WrxV2.cjs.map → page-header-D0rpU0yn.cjs.map} +1 -1
- package/dist-lib/chunks/{panel-pOXMw6a-.cjs → panel-B_SSIEDs.cjs} +1876 -1067
- package/dist-lib/chunks/panel-B_SSIEDs.cjs.map +1 -0
- package/dist-lib/chunks/{panel-BCUixETK.mjs → panel-CEkyoGiO.mjs} +1639 -831
- package/dist-lib/chunks/panel-CEkyoGiO.mjs.map +1 -0
- package/dist-lib/index.cjs +3819 -230
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.mjs +3898 -313
- package/dist-lib/index.mjs.map +1 -1
- package/dist-lib/preview/chat.cjs +41 -42
- package/dist-lib/preview/chat.cjs.map +1 -1
- package/dist-lib/preview/chat.mjs +2 -3
- package/dist-lib/preview/chat.mjs.map +1 -1
- package/dist-lib/preview/clientes.cjs +22 -24
- package/dist-lib/preview/clientes.cjs.map +1 -1
- package/dist-lib/preview/clientes.mjs +5 -7
- package/dist-lib/preview/clientes.mjs.map +1 -1
- package/dist-lib/preview/dashboard.cjs +232 -28
- package/dist-lib/preview/dashboard.cjs.map +1 -1
- package/dist-lib/preview/dashboard.mjs +215 -11
- package/dist-lib/preview/dashboard.mjs.map +1 -1
- package/dist-lib/preview/mocks.cjs +1 -1
- package/dist-lib/preview/mocks.mjs +1 -1
- package/dist-lib/src/components/index.d.ts +14 -0
- package/dist-lib/src/components/index.d.ts.map +1 -1
- package/dist-lib/src/components/shadcn/command.d.ts.map +1 -1
- package/dist-lib/src/components/shadcn/input.d.ts.map +1 -1
- package/dist-lib/src/components/shadcn/tabs.d.ts +11 -6
- package/dist-lib/src/components/shadcn/tabs.d.ts.map +1 -1
- package/dist-lib/src/components/shadcn/tooltip.d.ts +25 -7
- package/dist-lib/src/components/shadcn/tooltip.d.ts.map +1 -1
- package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.d.ts +13 -0
- package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.styles.d.ts +95 -0
- package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.types.d.ts +81 -0
- package/dist-lib/src/components/ui/ChoroplethMap/choropleth-map.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ChoroplethMap/index.d.ts +3 -0
- package/dist-lib/src/components/ui/ChoroplethMap/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.d.ts +16 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.presets.d.ts +13 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.presets.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.styles.d.ts +135 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.types.d.ts +35 -0
- package/dist-lib/src/components/ui/ColorPicker/color-picker.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ColorPicker/index.d.ts +6 -0
- package/dist-lib/src/components/ui/ColorPicker/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ConversationListItem/conversation-list-item.d.ts +23 -0
- package/dist-lib/src/components/ui/ConversationListItem/conversation-list-item.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ConversationListItem/conversation-list-item.styles.d.ts +173 -0
- package/dist-lib/src/components/ui/ConversationListItem/conversation-list-item.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ConversationListItem/conversation-list-item.types.d.ts +59 -0
- package/dist-lib/src/components/ui/ConversationListItem/conversation-list-item.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/ConversationListItem/index.d.ts +5 -0
- package/dist-lib/src/components/ui/ConversationListItem/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DataTable/data-table.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/data-table.types.d.ts +14 -1
- package/dist-lib/src/components/ui/DataTable/data-table.types.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/hooks/use-column-auto-width.d.ts +9 -0
- package/dist-lib/src/components/ui/DataTable/hooks/use-column-auto-width.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/hooks/use-data-table-controller.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/services/saved-views.types.d.ts +9 -0
- package/dist-lib/src/components/ui/DataTable/services/saved-views.types.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/utils/calculate-column-widths.d.ts +16 -0
- package/dist-lib/src/components/ui/DataTable/utils/calculate-column-widths.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DatePicker/datepicker.d.ts +31 -8
- package/dist-lib/src/components/ui/DatePicker/datepicker.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DatePicker/index.d.ts +1 -1
- package/dist-lib/src/components/ui/DatePicker/index.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DateSeparatorChip/date-separator-chip.d.ts +18 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/date-separator-chip.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/date-separator-chip.styles.d.ts +63 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/date-separator-chip.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/date-separator-chip.types.d.ts +21 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/date-separator-chip.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/index.d.ts +5 -0
- package/dist-lib/src/components/ui/DateSeparatorChip/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/EmptyState/empty-state.d.ts +12 -0
- package/dist-lib/src/components/ui/EmptyState/empty-state.d.ts.map +1 -0
- package/dist-lib/src/components/ui/EmptyState/empty-state.styles.d.ts +83 -0
- package/dist-lib/src/components/ui/EmptyState/empty-state.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/EmptyState/empty-state.types.d.ts +43 -0
- package/dist-lib/src/components/ui/EmptyState/empty-state.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/EmptyState/index.d.ts +5 -0
- package/dist-lib/src/components/ui/EmptyState/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/FileUploadField/file-upload-field.d.ts +15 -0
- package/dist-lib/src/components/ui/FileUploadField/file-upload-field.d.ts.map +1 -0
- package/dist-lib/src/components/ui/FileUploadField/file-upload-field.styles.d.ts +66 -0
- package/dist-lib/src/components/ui/FileUploadField/file-upload-field.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/FileUploadField/file-upload-field.types.d.ts +41 -0
- package/dist-lib/src/components/ui/FileUploadField/file-upload-field.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/FileUploadField/index.d.ts +3 -0
- package/dist-lib/src/components/ui/FileUploadField/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Kpi/kpi-delta.d.ts +4 -1
- package/dist-lib/src/components/ui/Kpi/kpi-delta.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Kpi/kpi.d.ts +1 -1
- package/dist-lib/src/components/ui/Kpi/kpi.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Kpi/kpi.styles.d.ts +42 -0
- package/dist-lib/src/components/ui/Kpi/kpi.styles.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Kpi/kpi.types.d.ts +13 -1
- package/dist-lib/src/components/ui/Kpi/kpi.types.d.ts.map +1 -1
- package/dist-lib/src/components/ui/MarkdownText/index.d.ts +5 -0
- package/dist-lib/src/components/ui/MarkdownText/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MarkdownText/markdown-text.d.ts +14 -0
- package/dist-lib/src/components/ui/MarkdownText/markdown-text.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MarkdownText/markdown-text.styles.d.ts +72 -0
- package/dist-lib/src/components/ui/MarkdownText/markdown-text.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MarkdownText/markdown-text.types.d.ts +26 -0
- package/dist-lib/src/components/ui/MarkdownText/markdown-text.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MenuSidebar/sidebar-section.d.ts.map +1 -1
- package/dist-lib/src/components/ui/MenuSidebar/sidebar.styles.d.ts +1 -0
- package/dist-lib/src/components/ui/MenuSidebar/sidebar.styles.d.ts.map +1 -1
- package/dist-lib/src/components/ui/MenuSidebar/sidebar.types.d.ts +7 -1
- package/dist-lib/src/components/ui/MenuSidebar/sidebar.types.d.ts.map +1 -1
- package/dist-lib/src/components/ui/MessageAck/index.d.ts +5 -0
- package/dist-lib/src/components/ui/MessageAck/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageAck/message-ack.d.ts +18 -0
- package/dist-lib/src/components/ui/MessageAck/message-ack.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageAck/message-ack.styles.d.ts +61 -0
- package/dist-lib/src/components/ui/MessageAck/message-ack.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageAck/message-ack.types.d.ts +14 -0
- package/dist-lib/src/components/ui/MessageAck/message-ack.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageBubble/index.d.ts +5 -0
- package/dist-lib/src/components/ui/MessageBubble/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageBubble/message-bubble.d.ts +20 -0
- package/dist-lib/src/components/ui/MessageBubble/message-bubble.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageBubble/message-bubble.styles.d.ts +180 -0
- package/dist-lib/src/components/ui/MessageBubble/message-bubble.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageBubble/message-bubble.types.d.ts +87 -0
- package/dist-lib/src/components/ui/MessageBubble/message-bubble.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageComposer/index.d.ts +5 -0
- package/dist-lib/src/components/ui/MessageComposer/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageComposer/message-composer.d.ts +18 -0
- package/dist-lib/src/components/ui/MessageComposer/message-composer.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageComposer/message-composer.styles.d.ts +113 -0
- package/dist-lib/src/components/ui/MessageComposer/message-composer.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageComposer/message-composer.types.d.ts +49 -0
- package/dist-lib/src/components/ui/MessageComposer/message-composer.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/index.d.ts +6 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/message-variables-picker.d.ts +12 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/message-variables-picker.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/message-variables-picker.styles.d.ts +57 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/message-variables-picker.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/message-variables-picker.types.d.ts +36 -0
- package/dist-lib/src/components/ui/MessageVariablesPicker/message-variables-picker.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Modal/modal.d.ts +3 -1
- package/dist-lib/src/components/ui/Modal/modal.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Modal/modal.styles.d.ts +7 -1
- package/dist-lib/src/components/ui/Modal/modal.styles.d.ts.map +1 -1
- package/dist-lib/src/components/ui/MonthYearPicker/index.d.ts +3 -0
- package/dist-lib/src/components/ui/MonthYearPicker/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MonthYearPicker/month-year-picker.d.ts +11 -0
- package/dist-lib/src/components/ui/MonthYearPicker/month-year-picker.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MonthYearPicker/month-year-picker.styles.d.ts +113 -0
- package/dist-lib/src/components/ui/MonthYearPicker/month-year-picker.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/MonthYearPicker/month-year-picker.types.d.ts +34 -0
- package/dist-lib/src/components/ui/MonthYearPicker/month-year-picker.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/SingleMenuSidebar/single-menu-sidebar.styles.d.ts +1 -1
- package/dist-lib/src/components/ui/Spinner/index.d.ts +3 -0
- package/dist-lib/src/components/ui/Spinner/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Spinner/spinner.d.ts +11 -0
- package/dist-lib/src/components/ui/Spinner/spinner.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Spinner/spinner.styles.d.ts +55 -0
- package/dist-lib/src/components/ui/Spinner/spinner.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Spinner/spinner.types.d.ts +12 -0
- package/dist-lib/src/components/ui/Spinner/spinner.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/TableToolbar/parts/table-toolbar-views.d.ts +7 -1
- package/dist-lib/src/components/ui/TableToolbar/parts/table-toolbar-views.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Toast/toast.d.ts +44 -0
- package/dist-lib/src/components/ui/Toast/toast.d.ts.map +1 -0
- package/dist-lib/src/hooks/useBrand.d.ts +31 -0
- package/dist-lib/src/hooks/useBrand.d.ts.map +1 -0
- package/dist-lib/src/preview/pages/ChatV2/components/QueueColumn/queue-column.styles.d.ts +3 -3
- package/dist-lib/src/preview/pages/ClientesShowcase/clientes-showcase-mocks.d.ts +1 -1
- package/dist-lib/src/preview/pages/ClientesShowcase/clientes-showcase-mocks.d.ts.map +1 -1
- package/dist-lib/src/preview/pages/ClientesShowcase/clientes-showcase.types.d.ts +1 -1
- package/dist-lib/src/preview/pages/ClientesShowcase/clientes-showcase.types.d.ts.map +1 -1
- package/dist-lib/src/preview/pages/ClientesShowcase/components/DetailDrawer/detail-drawer.types.d.ts +1 -1
- package/dist-lib/src/preview/pages/ClientesShowcase/components/DetailDrawer/detail-drawer.types.d.ts.map +1 -1
- package/dist-lib/src/preview/pages/DashboardShowcase.d.ts.map +1 -1
- package/dist-lib/src/preview/pages/_table-data.d.ts +51 -0
- package/dist-lib/src/preview/pages/_table-data.d.ts.map +1 -0
- package/dist-lib/src/utils/tv.d.ts.map +1 -1
- package/dist-lib/theme.css +32 -0
- package/dist-lib/tokens/brands/blue/primitives/color-palette.d.ts +266 -0
- package/dist-lib/tokens/brands/blue/primitives/color-palette.d.ts.map +1 -0
- package/dist-lib/tokens/brands/blue/semantic/color-dark.d.ts +200 -0
- package/dist-lib/tokens/brands/blue/semantic/color-dark.d.ts.map +1 -0
- package/dist-lib/tokens/brands/blue/semantic/color-light.d.ts +202 -0
- package/dist-lib/tokens/brands/blue/semantic/color-light.d.ts.map +1 -0
- package/dist-lib/tokens/brands/default/semantic/typography.d.ts +4 -2
- package/dist-lib/tokens/brands/default/semantic/typography.d.ts.map +1 -1
- package/dist-lib/tokens/brands/green/primitives/color-palette.d.ts +267 -0
- package/dist-lib/tokens/brands/green/primitives/color-palette.d.ts.map +1 -0
- package/dist-lib/tokens/brands/green/semantic/color-dark.d.ts +200 -0
- package/dist-lib/tokens/brands/green/semantic/color-dark.d.ts.map +1 -0
- package/dist-lib/tokens/brands/green/semantic/color-light.d.ts +201 -0
- package/dist-lib/tokens/brands/green/semantic/color-light.d.ts.map +1 -0
- package/dist-lib/tokens/brands/pay/primitives/color-palette.d.ts +146 -0
- package/dist-lib/tokens/brands/pay/primitives/color-palette.d.ts.map +1 -0
- package/dist-lib/tokens/brands/pay/semantic/color-dark.d.ts +201 -0
- package/dist-lib/tokens/brands/pay/semantic/color-dark.d.ts.map +1 -0
- package/dist-lib/tokens/brands/pay/semantic/color-light.d.ts +199 -0
- package/dist-lib/tokens/brands/pay/semantic/color-light.d.ts.map +1 -0
- package/dist-lib/tokens.cjs +35 -0
- package/dist-lib/tokens.cjs.map +1 -1
- package/dist-lib/tokens.mjs +35 -0
- package/dist-lib/tokens.mjs.map +1 -1
- package/package.json +21 -7
- package/dist-lib/chunks/app-shell-CPx9X7zP.cjs.map +0 -1
- package/dist-lib/chunks/app-shell-Cy9be0Zx.mjs.map +0 -1
- package/dist-lib/chunks/badge-DBdk74KN.mjs +0 -840
- package/dist-lib/chunks/badge-DBdk74KN.mjs.map +0 -1
- package/dist-lib/chunks/badge-gU2wtxrn.cjs +0 -856
- package/dist-lib/chunks/badge-gU2wtxrn.cjs.map +0 -1
- package/dist-lib/chunks/chip-group-2-f_Yo7Y.cjs +0 -763
- package/dist-lib/chunks/chip-group-2-f_Yo7Y.cjs.map +0 -1
- package/dist-lib/chunks/chip-group-_e-yh1Zq.mjs +0 -747
- package/dist-lib/chunks/chip-group-_e-yh1Zq.mjs.map +0 -1
- package/dist-lib/chunks/clientes-showcase-mocks-DygUqkkh.cjs.map +0 -1
- package/dist-lib/chunks/clientes-showcase-mocks-ayU1SDOA.mjs.map +0 -1
- package/dist-lib/chunks/input-BWevV7up.cjs.map +0 -1
- package/dist-lib/chunks/input-C9eKSSEb.mjs.map +0 -1
- package/dist-lib/chunks/panel-BCUixETK.mjs.map +0 -1
- package/dist-lib/chunks/panel-pOXMw6a-.cjs.map +0 -1
|
@@ -1,747 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, createContext, useContext } from "react";
|
|
3
|
-
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
6
|
-
import { tv as tv$1 } from "tailwind-variants";
|
|
7
|
-
const isDsPad = (v) => /^(pad|sp)-/.test(v);
|
|
8
|
-
const isDsGap = (v) => /^gp-/.test(v);
|
|
9
|
-
const isDsRadius = (v) => /^radius-/.test(v);
|
|
10
|
-
const isDsShadow = (v) => /^sh-/.test(v);
|
|
11
|
-
const isDsForm = (v) => /^form-/.test(v);
|
|
12
|
-
const twMerge = extendTailwindMerge({
|
|
13
|
-
extend: {
|
|
14
|
-
classGroups: {
|
|
15
|
-
"font-size": [
|
|
16
|
-
{
|
|
17
|
-
// Lista 1:1 com tokens/brands/default/semantic/typography.ts.
|
|
18
|
-
// Manter sincronizado com src/utils/tv.ts. Ver L-016.
|
|
19
|
-
text: [
|
|
20
|
-
// Displays (fluid clamp)
|
|
21
|
-
"display-2xl",
|
|
22
|
-
"display-xl",
|
|
23
|
-
"display-lg",
|
|
24
|
-
"display-md",
|
|
25
|
-
// Headings (xs estático, sm-xl fluid clamp)
|
|
26
|
-
"heading-xl",
|
|
27
|
-
"heading-lg",
|
|
28
|
-
"heading-md",
|
|
29
|
-
"heading-sm",
|
|
30
|
-
"heading-xs",
|
|
31
|
-
// Titles (weight 600 default)
|
|
32
|
-
"title-lg",
|
|
33
|
-
"title-md",
|
|
34
|
-
"title-sm",
|
|
35
|
-
// Body (xs/sm = weight 500 interactive; md-2xl = 400 corrido)
|
|
36
|
-
"body-2xl",
|
|
37
|
-
"body-xl",
|
|
38
|
-
"body-lg",
|
|
39
|
-
"body-md",
|
|
40
|
-
"body-sm",
|
|
41
|
-
"body-xs",
|
|
42
|
-
// Captions (weight 400)
|
|
43
|
-
"caption-md",
|
|
44
|
-
"caption-sm",
|
|
45
|
-
"caption-xs",
|
|
46
|
-
// Code (mono regular)
|
|
47
|
-
"code-md",
|
|
48
|
-
"code-sm"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
/* ── Padding ──────────────────────────────────────────────────────── */
|
|
53
|
-
p: [{ p: [isDsPad] }],
|
|
54
|
-
px: [{ px: [isDsPad] }],
|
|
55
|
-
py: [{ py: [isDsPad] }],
|
|
56
|
-
pt: [{ pt: [isDsPad] }],
|
|
57
|
-
pr: [{ pr: [isDsPad] }],
|
|
58
|
-
pb: [{ pb: [isDsPad] }],
|
|
59
|
-
pl: [{ pl: [isDsPad] }],
|
|
60
|
-
ps: [{ ps: [isDsPad] }],
|
|
61
|
-
pe: [{ pe: [isDsPad] }],
|
|
62
|
-
/* ── Margin (usa mesmo sp-*) ──────────────────────────────────────── */
|
|
63
|
-
m: [{ m: [isDsPad] }],
|
|
64
|
-
mx: [{ mx: [isDsPad] }],
|
|
65
|
-
my: [{ my: [isDsPad] }],
|
|
66
|
-
mt: [{ mt: [isDsPad] }],
|
|
67
|
-
mr: [{ mr: [isDsPad] }],
|
|
68
|
-
mb: [{ mb: [isDsPad] }],
|
|
69
|
-
ml: [{ ml: [isDsPad] }],
|
|
70
|
-
ms: [{ ms: [isDsPad] }],
|
|
71
|
-
me: [{ me: [isDsPad] }],
|
|
72
|
-
/* ── Inset / position (top/right/bottom/left) ─────────────────────── */
|
|
73
|
-
inset: [{ inset: [isDsPad] }],
|
|
74
|
-
"inset-x": [{ "inset-x": [isDsPad] }],
|
|
75
|
-
"inset-y": [{ "inset-y": [isDsPad] }],
|
|
76
|
-
"top": [{ top: [isDsPad] }],
|
|
77
|
-
"right": [{ right: [isDsPad] }],
|
|
78
|
-
"bottom": [{ bottom: [isDsPad] }],
|
|
79
|
-
"left": [{ left: [isDsPad] }],
|
|
80
|
-
"start": [{ start: [isDsPad] }],
|
|
81
|
-
"end": [{ end: [isDsPad] }],
|
|
82
|
-
/* ── Gap ──────────────────────────────────────────────────────────── */
|
|
83
|
-
gap: [{ gap: [isDsGap] }],
|
|
84
|
-
"gap-x": [{ "gap-x": [isDsGap] }],
|
|
85
|
-
"gap-y": [{ "gap-y": [isDsGap] }],
|
|
86
|
-
/* ── Rounded (todas as cantos) ────────────────────────────────────── */
|
|
87
|
-
rounded: [{ rounded: [isDsRadius] }],
|
|
88
|
-
"rounded-s": [{ "rounded-s": [isDsRadius] }],
|
|
89
|
-
"rounded-e": [{ "rounded-e": [isDsRadius] }],
|
|
90
|
-
"rounded-t": [{ "rounded-t": [isDsRadius] }],
|
|
91
|
-
"rounded-r": [{ "rounded-r": [isDsRadius] }],
|
|
92
|
-
"rounded-b": [{ "rounded-b": [isDsRadius] }],
|
|
93
|
-
"rounded-l": [{ "rounded-l": [isDsRadius] }],
|
|
94
|
-
"rounded-ss": [{ "rounded-ss": [isDsRadius] }],
|
|
95
|
-
"rounded-se": [{ "rounded-se": [isDsRadius] }],
|
|
96
|
-
"rounded-ee": [{ "rounded-ee": [isDsRadius] }],
|
|
97
|
-
"rounded-es": [{ "rounded-es": [isDsRadius] }],
|
|
98
|
-
"rounded-tl": [{ "rounded-tl": [isDsRadius] }],
|
|
99
|
-
"rounded-tr": [{ "rounded-tr": [isDsRadius] }],
|
|
100
|
-
"rounded-br": [{ "rounded-br": [isDsRadius] }],
|
|
101
|
-
"rounded-bl": [{ "rounded-bl": [isDsRadius] }],
|
|
102
|
-
/* ── Shadow ───────────────────────────────────────────────────────── */
|
|
103
|
-
shadow: [{ shadow: [isDsShadow] }],
|
|
104
|
-
/* ── Form sizes (min-h, h, w, size) ───────────────────────────────── */
|
|
105
|
-
"min-h": [{ "min-h": [isDsForm] }],
|
|
106
|
-
h: [{ h: [isDsForm] }],
|
|
107
|
-
w: [{ w: [isDsForm] }],
|
|
108
|
-
size: [{ size: [isDsForm] }]
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
function cn(...inputs) {
|
|
113
|
-
return twMerge(clsx(inputs));
|
|
114
|
-
}
|
|
115
|
-
const twMergeConfig = {
|
|
116
|
-
extend: {
|
|
117
|
-
classGroups: {
|
|
118
|
-
"font-size": [
|
|
119
|
-
{
|
|
120
|
-
text: [
|
|
121
|
-
// Displays (fluid clamp)
|
|
122
|
-
"display-2xl",
|
|
123
|
-
"display-xl",
|
|
124
|
-
"display-lg",
|
|
125
|
-
"display-md",
|
|
126
|
-
// Headings (xs estático, sm-xl fluid clamp)
|
|
127
|
-
"heading-xl",
|
|
128
|
-
"heading-lg",
|
|
129
|
-
"heading-md",
|
|
130
|
-
"heading-sm",
|
|
131
|
-
"heading-xs",
|
|
132
|
-
// Titles (weight 600 default)
|
|
133
|
-
"title-lg",
|
|
134
|
-
"title-md",
|
|
135
|
-
"title-sm",
|
|
136
|
-
// Body (xs/sm = weight 500 interactive; md-2xl = 400 corrido)
|
|
137
|
-
"body-2xl",
|
|
138
|
-
"body-xl",
|
|
139
|
-
"body-lg",
|
|
140
|
-
"body-md",
|
|
141
|
-
"body-sm",
|
|
142
|
-
"body-xs",
|
|
143
|
-
// Captions (weight 400)
|
|
144
|
-
"caption-md",
|
|
145
|
-
"caption-sm",
|
|
146
|
-
"caption-xs",
|
|
147
|
-
// Code (mono regular)
|
|
148
|
-
"code-md",
|
|
149
|
-
"code-sm"
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
const tv = (options, config) => tv$1(options, {
|
|
157
|
-
...config,
|
|
158
|
-
twMergeConfig
|
|
159
|
-
});
|
|
160
|
-
const buttonVariants = tv({
|
|
161
|
-
base: [
|
|
162
|
-
"inline-flex items-center justify-center",
|
|
163
|
-
"select-none whitespace-nowrap",
|
|
164
|
-
"focus-visible:outline-none",
|
|
165
|
-
"border border-transparent",
|
|
166
|
-
"text-body-sm font-semibold leading-none",
|
|
167
|
-
// 13px / 600 — alinhado com sandbox btn
|
|
168
|
-
"[&_svg]:shrink-0",
|
|
169
|
-
// SVG não diminui; tamanho controlado por size
|
|
170
|
-
"transition-all duration-200 ease-out",
|
|
171
|
-
"cursor-pointer",
|
|
172
|
-
"focus-visible:ring-4"
|
|
173
|
-
],
|
|
174
|
-
variants: {
|
|
175
|
-
color: {
|
|
176
|
-
primary: "focus-visible:ring-ring-brand",
|
|
177
|
-
secondary: "focus-visible:ring-ring-secondary",
|
|
178
|
-
critical: "focus-visible:ring-ring-danger",
|
|
179
|
-
success: "focus-visible:ring-ring-success",
|
|
180
|
-
warning: "focus-visible:ring-ring-warning"
|
|
181
|
-
},
|
|
182
|
-
variant: {
|
|
183
|
-
filled: "",
|
|
184
|
-
outline: "",
|
|
185
|
-
soft: "",
|
|
186
|
-
ghost: "bg-transparent"
|
|
187
|
-
},
|
|
188
|
-
size: {
|
|
189
|
-
// h28 / pad 10 / gap 6 / radius 8 / icon 12
|
|
190
|
-
"2xs": "min-h-form-xs px-pad-lg gap-gp-sm rounded-radius-md [&_svg]:size-[12px]",
|
|
191
|
-
// h32 / pad 12 / gap 6 / radius 8 / icon 14
|
|
192
|
-
xs: "min-h-form-sm px-pad-xl gap-gp-sm rounded-radius-md [&_svg]:size-[14px]",
|
|
193
|
-
// h36 / pad 12 / gap 6 / radius 10 / icon 14
|
|
194
|
-
sm: "min-h-form-md px-pad-xl gap-gp-sm rounded-radius-lg [&_svg]:size-[14px]",
|
|
195
|
-
// h40 / pad 16 / gap 6 / radius 10 / icon 14 (alinhado com sandbox Exportar)
|
|
196
|
-
md: "min-h-form-lg px-pad-2xl gap-gp-sm rounded-radius-lg [&_svg]:size-[14px]",
|
|
197
|
-
// h44 / pad 16 / gap 8 / radius 10 / icon 16
|
|
198
|
-
lg: "min-h-form-xl px-pad-2xl gap-gp-md rounded-radius-lg [&_svg]:size-[16px]",
|
|
199
|
-
// Icon buttons — width = height (square). Regra: SVG +2px vs versão com label
|
|
200
|
-
// (precisa preencher mais o quadrado sem o texto carregando peso visual).
|
|
201
|
-
"icon-2xs": "size-form-xs rounded-radius-md p-0 [&_svg]:size-[14px]",
|
|
202
|
-
// 28×28 / +2 (12→14)
|
|
203
|
-
"icon-xs": "size-form-sm rounded-radius-md p-0 [&_svg]:size-[16px]",
|
|
204
|
-
// 32×32 / +2 (14→16)
|
|
205
|
-
"icon-sm": "size-form-md rounded-radius-lg p-0 [&_svg]:size-[16px]",
|
|
206
|
-
// 36×36 / +2 (14→16)
|
|
207
|
-
"icon-md": "size-form-lg rounded-radius-lg p-0 [&_svg]:size-[16px]",
|
|
208
|
-
// 40×40 / +2 (14→16)
|
|
209
|
-
"icon-lg": "size-form-xl rounded-radius-lg p-0 [&_svg]:size-[18px]"
|
|
210
|
-
// 44×44 / +2 (16→18)
|
|
211
|
-
},
|
|
212
|
-
fullWidth: {
|
|
213
|
-
true: "w-full flex-1"
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* Shape do botão:
|
|
217
|
-
* - rounded (default): mantém o radius da `size` (varia por tamanho)
|
|
218
|
-
* - pill: força `rounded-full` (override com `!` pra ganhar do size)
|
|
219
|
-
*/
|
|
220
|
-
shape: {
|
|
221
|
-
rounded: "",
|
|
222
|
-
pill: "!rounded-full"
|
|
223
|
-
},
|
|
224
|
-
disabled: {
|
|
225
|
-
true: "pointer-events-none opacity-50"
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
compoundVariants: [
|
|
229
|
-
// ── Primary (brand) ─────────────────────────────────────────────
|
|
230
|
-
{
|
|
231
|
-
color: "primary",
|
|
232
|
-
variant: "filled",
|
|
233
|
-
class: "bg-bg-brand text-fg-on-brand hover:bg-bg-brand-hover"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
color: "primary",
|
|
237
|
-
variant: "outline",
|
|
238
|
-
class: "bg-bg-surface border-border-brand text-fg-brand shadow-sh-sm hover:bg-bg-brand-subtle hover:border-transparent hover:shadow-sh-none"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
color: "primary",
|
|
242
|
-
variant: "soft",
|
|
243
|
-
class: "bg-bg-brand-subtle text-fg-brand hover:bg-bg-brand-subtle-hover"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
color: "primary",
|
|
247
|
-
variant: "ghost",
|
|
248
|
-
class: "text-fg-brand hover:bg-bg-brand-subtle"
|
|
249
|
-
},
|
|
250
|
-
// ── Secondary (neutro) ──────────────────────────────────────────
|
|
251
|
-
{
|
|
252
|
-
color: "secondary",
|
|
253
|
-
variant: "filled",
|
|
254
|
-
class: "bg-bg-muted text-fg-muted hover:bg-bg-muted-hover hover:text-fg-default"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
// Outline alinhado com `.btn.tbl-tool-btn` do design-and-table-v2:
|
|
258
|
-
// light = bg-surface + border-subtle + fg-default + shadow-sm (mantém no hover)
|
|
259
|
-
// dark = bg-muted + border-input + fg-muted + sem shadow
|
|
260
|
-
color: "secondary",
|
|
261
|
-
variant: "outline",
|
|
262
|
-
class: [
|
|
263
|
-
"bg-bg-surface border-border-subtle text-fg-default shadow-sh-sm",
|
|
264
|
-
"dark:bg-bg-muted dark:border-border-input dark:text-fg-muted dark:shadow-sh-none",
|
|
265
|
-
"hover:bg-bg-muted-hover hover:text-fg-default",
|
|
266
|
-
"dark:hover:bg-bg-muted-hover dark:hover:text-fg-default"
|
|
267
|
-
].join(" ")
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
color: "secondary",
|
|
271
|
-
variant: "soft",
|
|
272
|
-
class: "bg-bg-muted text-fg-muted hover:bg-bg-muted-hover hover:text-fg-default"
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
color: "secondary",
|
|
276
|
-
variant: "ghost",
|
|
277
|
-
class: "text-fg-muted hover:bg-bg-muted hover:text-fg-default"
|
|
278
|
-
},
|
|
279
|
-
// ── Critical (danger) ───────────────────────────────────────────
|
|
280
|
-
{
|
|
281
|
-
color: "critical",
|
|
282
|
-
variant: "filled",
|
|
283
|
-
class: "bg-bg-danger text-fg-on-danger hover:bg-bg-danger-hover"
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
color: "critical",
|
|
287
|
-
variant: "outline",
|
|
288
|
-
class: "bg-bg-surface border-border-danger-muted text-fg-danger shadow-sh-sm hover:bg-bg-danger-muted hover:shadow-sh-none"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
color: "critical",
|
|
292
|
-
variant: "soft",
|
|
293
|
-
class: "bg-bg-danger-muted text-fg-danger hover:bg-bg-danger-muted-hover"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
color: "critical",
|
|
297
|
-
variant: "ghost",
|
|
298
|
-
class: "text-fg-danger hover:bg-bg-danger-muted"
|
|
299
|
-
},
|
|
300
|
-
// ── Success ─────────────────────────────────────────────────────
|
|
301
|
-
{
|
|
302
|
-
color: "success",
|
|
303
|
-
variant: "filled",
|
|
304
|
-
class: "bg-bg-success text-fg-on-success hover:bg-bg-success-hover"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
color: "success",
|
|
308
|
-
variant: "outline",
|
|
309
|
-
class: "bg-bg-surface border-border-success-muted text-fg-success shadow-sh-sm hover:bg-bg-success-muted hover:shadow-sh-none"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
color: "success",
|
|
313
|
-
variant: "soft",
|
|
314
|
-
class: "bg-bg-success-muted text-fg-success hover:bg-bg-success-muted-hover"
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
color: "success",
|
|
318
|
-
variant: "ghost",
|
|
319
|
-
class: "text-fg-success hover:bg-bg-success-muted"
|
|
320
|
-
},
|
|
321
|
-
// ── Warning ─────────────────────────────────────────────────────
|
|
322
|
-
{
|
|
323
|
-
color: "warning",
|
|
324
|
-
variant: "filled",
|
|
325
|
-
class: "bg-bg-warning text-fg-on-warning hover:bg-bg-warning-hover"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
color: "warning",
|
|
329
|
-
variant: "outline",
|
|
330
|
-
class: "bg-bg-surface border-border-warning-muted text-fg-warning shadow-sh-sm hover:bg-bg-warning-muted hover:shadow-sh-none"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
color: "warning",
|
|
334
|
-
variant: "soft",
|
|
335
|
-
class: "bg-bg-warning-muted text-fg-warning hover:bg-bg-warning-muted-hover"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
color: "warning",
|
|
339
|
-
variant: "ghost",
|
|
340
|
-
class: "text-fg-warning hover:bg-bg-warning-muted"
|
|
341
|
-
},
|
|
342
|
-
// ── Disabled — SEMPRE por último ────────────────────────────────
|
|
343
|
-
{ disabled: true, class: "pointer-events-none opacity-50" }
|
|
344
|
-
],
|
|
345
|
-
defaultVariants: {
|
|
346
|
-
color: "primary",
|
|
347
|
-
variant: "filled",
|
|
348
|
-
size: "md",
|
|
349
|
-
shape: "rounded"
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
const Button = forwardRef(
|
|
353
|
-
function Button2({
|
|
354
|
-
color,
|
|
355
|
-
variant,
|
|
356
|
-
size,
|
|
357
|
-
shape,
|
|
358
|
-
fullWidth,
|
|
359
|
-
loading = false,
|
|
360
|
-
disabled = false,
|
|
361
|
-
iconLeft,
|
|
362
|
-
iconRight,
|
|
363
|
-
children,
|
|
364
|
-
className,
|
|
365
|
-
type = "button",
|
|
366
|
-
...rest
|
|
367
|
-
}, ref) {
|
|
368
|
-
const isDisabled = disabled || loading;
|
|
369
|
-
return /* @__PURE__ */ jsxs(
|
|
370
|
-
"button",
|
|
371
|
-
{
|
|
372
|
-
ref,
|
|
373
|
-
type,
|
|
374
|
-
disabled: isDisabled,
|
|
375
|
-
className: buttonVariants({
|
|
376
|
-
color,
|
|
377
|
-
variant,
|
|
378
|
-
size,
|
|
379
|
-
shape,
|
|
380
|
-
fullWidth,
|
|
381
|
-
disabled: isDisabled,
|
|
382
|
-
className
|
|
383
|
-
}),
|
|
384
|
-
...rest,
|
|
385
|
-
children: [
|
|
386
|
-
loading && /* @__PURE__ */ jsx(Spinner, {}),
|
|
387
|
-
!loading && iconLeft,
|
|
388
|
-
children,
|
|
389
|
-
!loading && iconRight
|
|
390
|
-
]
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
);
|
|
395
|
-
function Spinner() {
|
|
396
|
-
return /* @__PURE__ */ jsx(
|
|
397
|
-
"svg",
|
|
398
|
-
{
|
|
399
|
-
width: "16",
|
|
400
|
-
height: "16",
|
|
401
|
-
viewBox: "0 0 16 16",
|
|
402
|
-
fill: "none",
|
|
403
|
-
className: "animate-spin",
|
|
404
|
-
children: /* @__PURE__ */ jsx(
|
|
405
|
-
"circle",
|
|
406
|
-
{
|
|
407
|
-
cx: "8",
|
|
408
|
-
cy: "8",
|
|
409
|
-
r: "6",
|
|
410
|
-
stroke: "currentColor",
|
|
411
|
-
strokeWidth: "2",
|
|
412
|
-
strokeLinecap: "round",
|
|
413
|
-
strokeDasharray: "28",
|
|
414
|
-
strokeDashoffset: "8",
|
|
415
|
-
className: "opacity-70"
|
|
416
|
-
}
|
|
417
|
-
)
|
|
418
|
-
}
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
const chipVariants = tv({
|
|
422
|
-
base: [
|
|
423
|
-
"inline-flex items-center justify-center gap-gp-xs shrink-0",
|
|
424
|
-
"font-semibold whitespace-nowrap select-none",
|
|
425
|
-
"transition-[background-color,color,border-color,box-shadow] duration-150",
|
|
426
|
-
"[&_svg]:shrink-0"
|
|
427
|
-
],
|
|
428
|
-
variants: {
|
|
429
|
-
size: {
|
|
430
|
-
sm: "h-[24px] px-pad-md text-caption-sm [&_svg]:size-[12px]",
|
|
431
|
-
md: "h-form-xs px-pad-lg text-body-xs font-normal [&_svg]:size-[12px]",
|
|
432
|
-
// 28px
|
|
433
|
-
lg: "h-form-sm px-pad-xl text-body-sm font-normal [&_svg]:size-[14px]",
|
|
434
|
-
// 32px
|
|
435
|
-
xl: "h-form-md px-pad-xl text-body-sm font-normal [&_svg]:size-[14px]"
|
|
436
|
-
// 36px (= Button md)
|
|
437
|
-
},
|
|
438
|
-
/**
|
|
439
|
-
* `pill` = rounded-full (default — chip pílula clássico).
|
|
440
|
-
* `rounded` = canto arredondado igual ao Button (radius-md em sm/md, radius-lg em lg/xl).
|
|
441
|
-
*/
|
|
442
|
-
shape: {
|
|
443
|
-
pill: "rounded-radius-full",
|
|
444
|
-
rounded: ""
|
|
445
|
-
// aplica via compoundVariants por size
|
|
446
|
-
},
|
|
447
|
-
color: {
|
|
448
|
-
primary: "",
|
|
449
|
-
neutral: "",
|
|
450
|
-
danger: "",
|
|
451
|
-
warning: "",
|
|
452
|
-
success: "",
|
|
453
|
-
info: ""
|
|
454
|
-
},
|
|
455
|
-
variant: {
|
|
456
|
-
solid: "",
|
|
457
|
-
outline: "border",
|
|
458
|
-
soft: "",
|
|
459
|
-
"soft-outline": "border"
|
|
460
|
-
},
|
|
461
|
-
interactive: {
|
|
462
|
-
true: "cursor-pointer outline-none focus-visible:shadow-sh-ring",
|
|
463
|
-
false: ""
|
|
464
|
-
},
|
|
465
|
-
selected: {
|
|
466
|
-
true: "",
|
|
467
|
-
false: ""
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
compoundVariants: [
|
|
471
|
-
/* ── Shape rounded × size — radius proporcional ao Button ──── */
|
|
472
|
-
{ shape: "rounded", size: "sm", class: "rounded-radius-md" },
|
|
473
|
-
{ shape: "rounded", size: "md", class: "rounded-radius-md" },
|
|
474
|
-
{ shape: "rounded", size: "lg", class: "rounded-radius-lg" },
|
|
475
|
-
{ shape: "rounded", size: "xl", class: "rounded-radius-lg" },
|
|
476
|
-
/* ── Solid ──────────────────────────────────────────────────── */
|
|
477
|
-
{ color: "primary", variant: "solid", class: "bg-bg-brand text-fg-on-brand" },
|
|
478
|
-
{ color: "neutral", variant: "solid", class: "bg-bg-muted text-fg-default" },
|
|
479
|
-
{ color: "danger", variant: "solid", class: "bg-bg-danger text-fg-on-danger" },
|
|
480
|
-
{ color: "warning", variant: "solid", class: "bg-bg-warning text-fg-on-warning" },
|
|
481
|
-
{ color: "success", variant: "solid", class: "bg-bg-success text-fg-on-success" },
|
|
482
|
-
{ color: "info", variant: "solid", class: "bg-bg-info text-fg-on-info" },
|
|
483
|
-
/* ── Outline ────────────────────────────────────────────────── */
|
|
484
|
-
{ color: "primary", variant: "outline", class: "bg-transparent border-border-brand text-fg-brand" },
|
|
485
|
-
{ color: "neutral", variant: "outline", class: "bg-transparent border-border-default text-fg-default" },
|
|
486
|
-
{ color: "danger", variant: "outline", class: "bg-transparent border-border-danger-muted text-fg-danger" },
|
|
487
|
-
{ color: "warning", variant: "outline", class: "bg-transparent border-border-warning-muted text-fg-warning" },
|
|
488
|
-
{ color: "success", variant: "outline", class: "bg-transparent border-border-success-muted text-fg-success" },
|
|
489
|
-
{ color: "info", variant: "outline", class: "bg-transparent border-border-info-muted text-fg-info" },
|
|
490
|
-
/* ── Soft ───────────────────────────────────────────────────── */
|
|
491
|
-
{ color: "primary", variant: "soft", class: "bg-bg-brand-subtle text-fg-brand" },
|
|
492
|
-
{ color: "neutral", variant: "soft", class: "bg-bg-muted text-fg-muted" },
|
|
493
|
-
{ color: "danger", variant: "soft", class: "bg-bg-danger-muted text-fg-danger" },
|
|
494
|
-
{ color: "warning", variant: "soft", class: "bg-bg-warning-muted text-fg-warning" },
|
|
495
|
-
{ color: "success", variant: "soft", class: "bg-bg-success-muted text-fg-success" },
|
|
496
|
-
{ color: "info", variant: "soft", class: "bg-bg-info-muted text-fg-info" },
|
|
497
|
-
/* ── Soft + Outline (bg sutil + borda definida) ─────────────── */
|
|
498
|
-
{ color: "primary", variant: "soft-outline", class: "bg-bg-brand-subtle border-border-brand text-fg-brand" },
|
|
499
|
-
{ color: "neutral", variant: "soft-outline", class: "bg-bg-muted border-border-default text-fg-muted" },
|
|
500
|
-
{ color: "danger", variant: "soft-outline", class: "bg-bg-danger-muted border-border-danger-muted text-fg-danger" },
|
|
501
|
-
{ color: "warning", variant: "soft-outline", class: "bg-bg-warning-muted border-border-warning-muted text-fg-warning" },
|
|
502
|
-
{ color: "success", variant: "soft-outline", class: "bg-bg-success-muted border-border-success-muted text-fg-success" },
|
|
503
|
-
{ color: "info", variant: "soft-outline", class: "bg-bg-info-muted border-border-info-muted text-fg-info" },
|
|
504
|
-
/* ── Hover (somente quando interactive) ────────────────────── */
|
|
505
|
-
{ interactive: true, color: "primary", variant: "solid", class: "hover:bg-bg-brand-hover" },
|
|
506
|
-
{ interactive: true, color: "neutral", variant: "solid", class: "hover:bg-bg-muted-hover" },
|
|
507
|
-
{ interactive: true, color: "danger", variant: "solid", class: "hover:bg-bg-danger-hover" },
|
|
508
|
-
{ interactive: true, color: "warning", variant: "solid", class: "hover:bg-bg-warning-hover" },
|
|
509
|
-
{ interactive: true, color: "success", variant: "solid", class: "hover:bg-bg-success-hover" },
|
|
510
|
-
{ interactive: true, color: "info", variant: "solid", class: "hover:bg-bg-info-hover" },
|
|
511
|
-
{ interactive: true, color: "primary", variant: "outline", class: "hover:bg-bg-brand-subtle" },
|
|
512
|
-
{ interactive: true, color: "neutral", variant: "outline", class: "hover:bg-bg-muted" },
|
|
513
|
-
{ interactive: true, color: "danger", variant: "outline", class: "hover:bg-bg-danger-muted" },
|
|
514
|
-
{ interactive: true, color: "warning", variant: "outline", class: "hover:bg-bg-warning-muted" },
|
|
515
|
-
{ interactive: true, color: "success", variant: "outline", class: "hover:bg-bg-success-muted" },
|
|
516
|
-
{ interactive: true, color: "info", variant: "outline", class: "hover:bg-bg-info-muted" },
|
|
517
|
-
{ interactive: true, color: "primary", variant: "soft", class: "hover:bg-bg-brand-subtle-hover" },
|
|
518
|
-
{ interactive: true, color: "neutral", variant: "soft", class: "hover:bg-bg-muted-hover hover:text-fg-default" },
|
|
519
|
-
{ interactive: true, color: "danger", variant: "soft", class: "hover:bg-bg-danger-muted-hover" },
|
|
520
|
-
{ interactive: true, color: "warning", variant: "soft", class: "hover:bg-bg-warning-muted-hover" },
|
|
521
|
-
{ interactive: true, color: "success", variant: "soft", class: "hover:bg-bg-success-muted-hover" },
|
|
522
|
-
{ interactive: true, color: "info", variant: "soft", class: "hover:bg-bg-info-muted-hover" },
|
|
523
|
-
{ interactive: true, color: "primary", variant: "soft-outline", class: "hover:bg-bg-brand-subtle-hover" },
|
|
524
|
-
{ interactive: true, color: "neutral", variant: "soft-outline", class: "hover:bg-bg-muted-hover hover:text-fg-default" },
|
|
525
|
-
{ interactive: true, color: "danger", variant: "soft-outline", class: "hover:bg-bg-danger-muted-hover" },
|
|
526
|
-
{ interactive: true, color: "warning", variant: "soft-outline", class: "hover:bg-bg-warning-muted-hover" },
|
|
527
|
-
{ interactive: true, color: "success", variant: "soft-outline", class: "hover:bg-bg-success-muted-hover" },
|
|
528
|
-
{ interactive: true, color: "info", variant: "soft-outline", class: "hover:bg-bg-info-muted-hover" },
|
|
529
|
-
/* ── Selected (ChipGroup) — força "soft" da color como visual ativo ── */
|
|
530
|
-
{ selected: true, color: "primary", class: "bg-bg-brand-subtle text-fg-brand border-transparent" },
|
|
531
|
-
{ selected: true, color: "neutral", class: "bg-bg-accent text-fg-default font-semibold border-transparent shadow-sh-sm" },
|
|
532
|
-
{ selected: true, color: "danger", class: "bg-bg-danger-muted text-fg-danger border-transparent" },
|
|
533
|
-
{ selected: true, color: "warning", class: "bg-bg-warning-muted text-fg-warning border-transparent" },
|
|
534
|
-
{ selected: true, color: "success", class: "bg-bg-success-muted text-fg-success border-transparent" },
|
|
535
|
-
{ selected: true, color: "info", class: "bg-bg-info-muted text-fg-info border-transparent" }
|
|
536
|
-
],
|
|
537
|
-
defaultVariants: {
|
|
538
|
-
color: "neutral",
|
|
539
|
-
variant: "soft",
|
|
540
|
-
size: "md",
|
|
541
|
-
shape: "pill",
|
|
542
|
-
interactive: false,
|
|
543
|
-
selected: false
|
|
544
|
-
}
|
|
545
|
-
});
|
|
546
|
-
const chipCount = tv({
|
|
547
|
-
base: [
|
|
548
|
-
"inline-flex items-center justify-center min-w-[16px] h-[16px] px-[4px]",
|
|
549
|
-
"rounded-radius-full text-caption-xs font-semibold leading-none",
|
|
550
|
-
"bg-bg-muted text-fg-default"
|
|
551
|
-
]
|
|
552
|
-
});
|
|
553
|
-
const Chip = forwardRef(function Chip2({
|
|
554
|
-
children,
|
|
555
|
-
color,
|
|
556
|
-
variant,
|
|
557
|
-
size,
|
|
558
|
-
shape,
|
|
559
|
-
selected,
|
|
560
|
-
onClick,
|
|
561
|
-
asButton,
|
|
562
|
-
className,
|
|
563
|
-
type,
|
|
564
|
-
...rest
|
|
565
|
-
}, ref) {
|
|
566
|
-
const interactive = Boolean(onClick) || asButton === true;
|
|
567
|
-
const classes = cn(
|
|
568
|
-
chipVariants({ color, variant, size, shape, interactive, selected }),
|
|
569
|
-
className
|
|
570
|
-
);
|
|
571
|
-
if (interactive) {
|
|
572
|
-
return /* @__PURE__ */ jsx(
|
|
573
|
-
"button",
|
|
574
|
-
{
|
|
575
|
-
ref,
|
|
576
|
-
type: type ?? "button",
|
|
577
|
-
onClick,
|
|
578
|
-
className: classes,
|
|
579
|
-
"aria-pressed": selected,
|
|
580
|
-
...rest,
|
|
581
|
-
children
|
|
582
|
-
}
|
|
583
|
-
);
|
|
584
|
-
}
|
|
585
|
-
return /* @__PURE__ */ jsx(
|
|
586
|
-
"span",
|
|
587
|
-
{
|
|
588
|
-
ref,
|
|
589
|
-
className: classes,
|
|
590
|
-
...rest,
|
|
591
|
-
children
|
|
592
|
-
}
|
|
593
|
-
);
|
|
594
|
-
});
|
|
595
|
-
const SELECTED_CLASSES = {
|
|
596
|
-
primary: {
|
|
597
|
-
solid: "data-[state=on]:bg-bg-brand data-[state=on]:text-fg-on-brand data-[state=on]:border-transparent",
|
|
598
|
-
outline: "data-[state=on]:border-border-brand data-[state=on]:text-fg-brand data-[state=on]:bg-transparent",
|
|
599
|
-
soft: "data-[state=on]:bg-bg-brand-subtle data-[state=on]:text-fg-brand data-[state=on]:border-transparent",
|
|
600
|
-
"soft-outline": "data-[state=on]:bg-bg-brand-subtle data-[state=on]:border-border-brand data-[state=on]:text-fg-brand"
|
|
601
|
-
},
|
|
602
|
-
neutral: {
|
|
603
|
-
solid: "data-[state=on]:bg-bg-muted data-[state=on]:text-fg-default data-[state=on]:border-transparent",
|
|
604
|
-
outline: "data-[state=on]:border-border-default data-[state=on]:text-fg-default data-[state=on]:bg-transparent",
|
|
605
|
-
soft: "data-[state=on]:bg-bg-accent data-[state=on]:text-fg-default data-[state=on]:border-transparent data-[state=on]:shadow-sh-sm",
|
|
606
|
-
"soft-outline": "data-[state=on]:bg-bg-muted data-[state=on]:border-border-default data-[state=on]:text-fg-default"
|
|
607
|
-
},
|
|
608
|
-
danger: {
|
|
609
|
-
solid: "data-[state=on]:bg-bg-danger data-[state=on]:text-fg-on-danger data-[state=on]:border-transparent",
|
|
610
|
-
outline: "data-[state=on]:border-border-danger-muted data-[state=on]:text-fg-danger data-[state=on]:bg-transparent",
|
|
611
|
-
soft: "data-[state=on]:bg-bg-danger-muted data-[state=on]:text-fg-danger data-[state=on]:border-transparent",
|
|
612
|
-
"soft-outline": "data-[state=on]:bg-bg-danger-muted data-[state=on]:border-border-danger-muted data-[state=on]:text-fg-danger"
|
|
613
|
-
},
|
|
614
|
-
warning: {
|
|
615
|
-
solid: "data-[state=on]:bg-bg-warning data-[state=on]:text-fg-on-warning data-[state=on]:border-transparent",
|
|
616
|
-
outline: "data-[state=on]:border-border-warning-muted data-[state=on]:text-fg-warning data-[state=on]:bg-transparent",
|
|
617
|
-
soft: "data-[state=on]:bg-bg-warning-muted data-[state=on]:text-fg-warning data-[state=on]:border-transparent",
|
|
618
|
-
"soft-outline": "data-[state=on]:bg-bg-warning-muted data-[state=on]:border-border-warning-muted data-[state=on]:text-fg-warning"
|
|
619
|
-
},
|
|
620
|
-
success: {
|
|
621
|
-
solid: "data-[state=on]:bg-bg-success data-[state=on]:text-fg-on-success data-[state=on]:border-transparent",
|
|
622
|
-
outline: "data-[state=on]:border-border-success-muted data-[state=on]:text-fg-success data-[state=on]:bg-transparent",
|
|
623
|
-
soft: "data-[state=on]:bg-bg-success-muted data-[state=on]:text-fg-success data-[state=on]:border-transparent",
|
|
624
|
-
"soft-outline": "data-[state=on]:bg-bg-success-muted data-[state=on]:border-border-success-muted data-[state=on]:text-fg-success"
|
|
625
|
-
},
|
|
626
|
-
info: {
|
|
627
|
-
solid: "data-[state=on]:bg-bg-info data-[state=on]:text-fg-on-info data-[state=on]:border-transparent",
|
|
628
|
-
outline: "data-[state=on]:border-border-info-muted data-[state=on]:text-fg-info data-[state=on]:bg-transparent",
|
|
629
|
-
soft: "data-[state=on]:bg-bg-info-muted data-[state=on]:text-fg-info data-[state=on]:border-transparent",
|
|
630
|
-
"soft-outline": "data-[state=on]:bg-bg-info-muted data-[state=on]:border-border-info-muted data-[state=on]:text-fg-info"
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
const ChipGroup = forwardRef(
|
|
634
|
-
function ChipGroup2(props, ref) {
|
|
635
|
-
const {
|
|
636
|
-
inactiveColor = "neutral",
|
|
637
|
-
inactiveVariant = "outline",
|
|
638
|
-
activeColor = "primary",
|
|
639
|
-
activeVariant = "soft-outline",
|
|
640
|
-
size = "md",
|
|
641
|
-
shape = "pill",
|
|
642
|
-
orientation = "horizontal",
|
|
643
|
-
ariaLabel,
|
|
644
|
-
className,
|
|
645
|
-
children
|
|
646
|
-
} = props;
|
|
647
|
-
const contextValue = {
|
|
648
|
-
inactiveColor,
|
|
649
|
-
inactiveVariant,
|
|
650
|
-
activeColor,
|
|
651
|
-
activeVariant,
|
|
652
|
-
size,
|
|
653
|
-
shape
|
|
654
|
-
};
|
|
655
|
-
if (props.type === "single") {
|
|
656
|
-
return /* @__PURE__ */ jsx(ChipGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
657
|
-
ToggleGroupPrimitive.Root,
|
|
658
|
-
{
|
|
659
|
-
ref,
|
|
660
|
-
type: "single",
|
|
661
|
-
value: props.value,
|
|
662
|
-
defaultValue: props.defaultValue,
|
|
663
|
-
onValueChange: props.onValueChange,
|
|
664
|
-
orientation,
|
|
665
|
-
"aria-label": ariaLabel,
|
|
666
|
-
className: cn(
|
|
667
|
-
"inline-flex items-center gap-gp-sm",
|
|
668
|
-
orientation === "vertical" && "flex-col",
|
|
669
|
-
className
|
|
670
|
-
),
|
|
671
|
-
children
|
|
672
|
-
}
|
|
673
|
-
) });
|
|
674
|
-
}
|
|
675
|
-
return /* @__PURE__ */ jsx(ChipGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
676
|
-
ToggleGroupPrimitive.Root,
|
|
677
|
-
{
|
|
678
|
-
ref,
|
|
679
|
-
type: "multiple",
|
|
680
|
-
value: props.value,
|
|
681
|
-
defaultValue: props.defaultValue,
|
|
682
|
-
onValueChange: props.onValueChange,
|
|
683
|
-
orientation,
|
|
684
|
-
"aria-label": ariaLabel,
|
|
685
|
-
className: cn(
|
|
686
|
-
"inline-flex items-center gap-gp-sm",
|
|
687
|
-
orientation === "vertical" && "flex-col",
|
|
688
|
-
className
|
|
689
|
-
),
|
|
690
|
-
children
|
|
691
|
-
}
|
|
692
|
-
) });
|
|
693
|
-
}
|
|
694
|
-
);
|
|
695
|
-
const ChipGroupContext = createContext({
|
|
696
|
-
inactiveColor: "neutral",
|
|
697
|
-
inactiveVariant: "outline",
|
|
698
|
-
activeColor: "primary",
|
|
699
|
-
activeVariant: "soft-outline",
|
|
700
|
-
size: "md",
|
|
701
|
-
shape: "pill"
|
|
702
|
-
});
|
|
703
|
-
const ChipGroupItem = forwardRef(
|
|
704
|
-
function ChipGroupItem2({ className, children, ...rest }, ref) {
|
|
705
|
-
const {
|
|
706
|
-
inactiveColor,
|
|
707
|
-
inactiveVariant,
|
|
708
|
-
activeColor,
|
|
709
|
-
activeVariant,
|
|
710
|
-
size,
|
|
711
|
-
shape
|
|
712
|
-
} = useContext(ChipGroupContext);
|
|
713
|
-
return /* @__PURE__ */ jsx(
|
|
714
|
-
ToggleGroupPrimitive.Item,
|
|
715
|
-
{
|
|
716
|
-
ref,
|
|
717
|
-
className: cn(
|
|
718
|
-
// Estado OFF — visual inativo (passa pelo chipVariants normal)
|
|
719
|
-
chipVariants({
|
|
720
|
-
color: inactiveColor,
|
|
721
|
-
variant: inactiveVariant,
|
|
722
|
-
size,
|
|
723
|
-
shape,
|
|
724
|
-
interactive: true
|
|
725
|
-
}),
|
|
726
|
-
// Estado ON — override via data-state=on com classes do active*
|
|
727
|
-
SELECTED_CLASSES[activeColor][activeVariant],
|
|
728
|
-
className
|
|
729
|
-
),
|
|
730
|
-
...rest,
|
|
731
|
-
children
|
|
732
|
-
}
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
);
|
|
736
|
-
export {
|
|
737
|
-
Button as B,
|
|
738
|
-
Chip as C,
|
|
739
|
-
ChipGroup as a,
|
|
740
|
-
ChipGroupItem as b,
|
|
741
|
-
cn as c,
|
|
742
|
-
buttonVariants as d,
|
|
743
|
-
chipCount as e,
|
|
744
|
-
chipVariants as f,
|
|
745
|
-
tv as t
|
|
746
|
-
};
|
|
747
|
-
//# sourceMappingURL=chip-group-_e-yh1Zq.mjs.map
|