@raystack/apsara 0.31.1 → 0.33.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/dist/command/command.cjs +3 -0
- package/dist/command/command.cjs.map +1 -1
- package/dist/command/command.d.ts.map +1 -1
- package/dist/command/command.js +3 -0
- package/dist/command/command.js.map +1 -1
- package/dist/dialog/dialog.cjs +12 -0
- package/dist/dialog/dialog.cjs.map +1 -1
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +12 -0
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs +92 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +89 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs +20 -0
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs.map +1 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js +20 -1
- package/dist/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -1
- package/dist/select/select.cjs +3 -0
- package/dist/select/select.cjs.map +1 -1
- package/dist/select/select.d.ts.map +1 -1
- package/dist/select/select.js +3 -0
- package/dist/select/select.js.map +1 -1
- package/dist/sheet/sheet.cjs +9 -0
- package/dist/sheet/sheet.cjs.map +1 -1
- package/dist/sheet/sheet.d.ts +12 -0
- package/dist/sheet/sheet.d.ts.map +1 -1
- package/dist/sheet/sheet.js +9 -0
- package/dist/sheet/sheet.js.map +1 -1
- package/dist/sidebar/sidebar.cjs +6 -6
- package/dist/sidebar/sidebar.cjs.map +1 -1
- package/dist/sidebar/sidebar.d.ts +4 -4
- package/dist/sidebar/sidebar.js +6 -6
- package/dist/sidebar/sidebar.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/table/table.cjs +24 -0
- package/dist/table/table.cjs.map +1 -1
- package/dist/table/table.d.ts.map +1 -1
- package/dist/table/table.js +24 -0
- package/dist/table/table.js.map +1 -1
- package/dist/toggle-group/togglegroup.cjs +9 -0
- package/dist/toggle-group/togglegroup.cjs.map +1 -1
- package/dist/toggle-group/togglegroup.d.ts.map +1 -1
- package/dist/toggle-group/togglegroup.js +9 -0
- package/dist/toggle-group/togglegroup.js.map +1 -1
- package/dist/v1/_virtual/isSameOrAfter.cjs +6 -0
- package/dist/v1/_virtual/isSameOrAfter.cjs.map +1 -0
- package/dist/v1/_virtual/isSameOrAfter.js +4 -0
- package/dist/v1/_virtual/isSameOrAfter.js.map +1 -0
- package/dist/v1/_virtual/isSameOrBefore.cjs +6 -0
- package/dist/v1/_virtual/isSameOrBefore.cjs.map +1 -0
- package/dist/v1/_virtual/isSameOrBefore.js +4 -0
- package/dist/v1/_virtual/isSameOrBefore.js.map +1 -0
- package/dist/v1/components/calendar/calendar.cjs +1 -1
- package/dist/v1/components/calendar/calendar.cjs.map +1 -1
- package/dist/v1/components/calendar/calendar.js +1 -1
- package/dist/v1/components/calendar/calendar.js.map +1 -1
- package/dist/v1/components/calendar/date-picker.cjs +26 -17
- package/dist/v1/components/calendar/date-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/date-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/date-picker.js +26 -17
- package/dist/v1/components/calendar/date-picker.js.map +1 -1
- package/dist/v1/components/calendar/range-picker.cjs +2 -2
- package/dist/v1/components/calendar/range-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/range-picker.d.ts +5 -1
- package/dist/v1/components/calendar/range-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/range-picker.js +2 -2
- package/dist/v1/components/calendar/range-picker.js.map +1 -1
- package/dist/v1/components/chip/chip.cjs +6 -6
- package/dist/v1/components/chip/chip.cjs.map +1 -1
- package/dist/v1/components/chip/chip.d.ts +4 -3
- package/dist/v1/components/chip/chip.d.ts.map +1 -1
- package/dist/v1/components/chip/chip.js +6 -6
- package/dist/v1/components/chip/chip.js.map +1 -1
- package/dist/v1/components/chip/chip.module.css.cjs +1 -1
- package/dist/v1/components/chip/chip.module.css.js +1 -1
- package/dist/v1/components/command/command.cjs +52 -0
- package/dist/v1/components/command/command.cjs.map +1 -0
- package/dist/v1/components/command/command.d.ts +2 -0
- package/dist/v1/components/command/command.d.ts.map +1 -0
- package/dist/v1/components/command/command.js +50 -0
- package/dist/v1/components/command/command.js.map +1 -0
- package/dist/v1/components/command/command.module.css.cjs +8 -0
- package/dist/v1/components/command/command.module.css.cjs.map +1 -0
- package/dist/v1/components/command/command.module.css.js +4 -0
- package/dist/v1/components/command/command.module.css.js.map +1 -0
- package/dist/v1/components/command/index.d.ts +2 -0
- package/dist/v1/components/command/index.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/content.cjs +81 -0
- package/dist/v1/components/data-table/components/content.cjs.map +1 -0
- package/dist/v1/components/data-table/components/content.d.ts +3 -0
- package/dist/v1/components/data-table/components/content.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/content.js +79 -0
- package/dist/v1/components/data-table/components/content.js.map +1 -0
- package/dist/v1/components/data-table/components/display-properties.cjs +14 -0
- package/dist/v1/components/data-table/components/display-properties.cjs.map +1 -0
- package/dist/v1/components/data-table/components/display-properties.d.ts +5 -0
- package/dist/v1/components/data-table/components/display-properties.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/display-properties.js +12 -0
- package/dist/v1/components/data-table/components/display-properties.js.map +1 -0
- package/dist/v1/components/data-table/components/display-settings.cjs +51 -0
- package/dist/v1/components/data-table/components/display-settings.cjs.map +1 -0
- package/dist/v1/components/data-table/components/display-settings.d.ts +2 -0
- package/dist/v1/components/data-table/components/display-settings.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/display-settings.js +49 -0
- package/dist/v1/components/data-table/components/display-settings.js.map +1 -0
- package/dist/v1/components/data-table/components/filters.cjs +44 -0
- package/dist/v1/components/data-table/components/filters.cjs.map +1 -0
- package/dist/v1/components/data-table/components/filters.d.ts +2 -0
- package/dist/v1/components/data-table/components/filters.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/filters.js +42 -0
- package/dist/v1/components/data-table/components/filters.js.map +1 -0
- package/dist/v1/components/data-table/components/grouping.cjs +31 -0
- package/dist/v1/components/data-table/components/grouping.cjs.map +1 -0
- package/dist/v1/components/data-table/components/grouping.d.ts +9 -0
- package/dist/v1/components/data-table/components/grouping.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/grouping.js +29 -0
- package/dist/v1/components/data-table/components/grouping.js.map +1 -0
- package/dist/v1/components/data-table/components/ordering.cjs +24 -0
- package/dist/v1/components/data-table/components/ordering.cjs.map +1 -0
- package/dist/v1/components/data-table/components/ordering.d.ts +8 -0
- package/dist/v1/components/data-table/components/ordering.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/ordering.js +22 -0
- package/dist/v1/components/data-table/components/ordering.js.map +1 -0
- package/dist/v1/components/data-table/components/search.cjs +22 -0
- package/dist/v1/components/data-table/components/search.cjs.map +1 -0
- package/dist/v1/components/data-table/components/search.d.ts +3 -0
- package/dist/v1/components/data-table/components/search.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/search.js +20 -0
- package/dist/v1/components/data-table/components/search.js.map +1 -0
- package/dist/v1/components/data-table/components/toolbar.cjs +15 -0
- package/dist/v1/components/data-table/components/toolbar.cjs.map +1 -0
- package/dist/v1/components/data-table/components/toolbar.d.ts +4 -0
- package/dist/v1/components/data-table/components/toolbar.d.ts.map +1 -0
- package/dist/v1/components/data-table/components/toolbar.js +13 -0
- package/dist/v1/components/data-table/components/toolbar.js.map +1 -0
- package/dist/v1/components/data-table/context.cjs +8 -0
- package/dist/v1/components/data-table/context.cjs.map +1 -0
- package/dist/v1/components/data-table/context.d.ts +3 -0
- package/dist/v1/components/data-table/context.d.ts.map +1 -0
- package/dist/v1/components/data-table/context.js +6 -0
- package/dist/v1/components/data-table/context.js.map +1 -0
- package/dist/v1/components/data-table/data-table.cjs +87 -0
- package/dist/v1/components/data-table/data-table.cjs.map +1 -0
- package/dist/v1/components/data-table/data-table.d.ts +12 -0
- package/dist/v1/components/data-table/data-table.d.ts.map +1 -0
- package/dist/v1/components/data-table/data-table.js +85 -0
- package/dist/v1/components/data-table/data-table.js.map +1 -0
- package/dist/v1/components/data-table/data-table.module.css.cjs +8 -0
- package/dist/v1/components/data-table/data-table.module.css.cjs.map +1 -0
- package/dist/v1/components/data-table/data-table.module.css.js +4 -0
- package/dist/v1/components/data-table/data-table.module.css.js.map +1 -0
- package/dist/v1/components/data-table/data-table.types.cjs +9 -0
- package/dist/v1/components/data-table/data-table.types.cjs.map +1 -0
- package/dist/v1/components/data-table/data-table.types.d.ts +102 -0
- package/dist/v1/components/data-table/data-table.types.d.ts.map +1 -0
- package/dist/v1/components/data-table/data-table.types.js +7 -0
- package/dist/v1/components/data-table/data-table.types.js.map +1 -0
- package/dist/v1/components/data-table/hooks/useDataTable.cjs +15 -0
- package/dist/v1/components/data-table/hooks/useDataTable.cjs.map +1 -0
- package/dist/v1/components/data-table/hooks/useDataTable.d.ts +2 -0
- package/dist/v1/components/data-table/hooks/useDataTable.d.ts.map +1 -0
- package/dist/v1/components/data-table/hooks/useDataTable.js +13 -0
- package/dist/v1/components/data-table/hooks/useDataTable.js.map +1 -0
- package/dist/v1/components/data-table/hooks/useFilters.cjs +78 -0
- package/dist/v1/components/data-table/hooks/useFilters.cjs.map +1 -0
- package/dist/v1/components/data-table/hooks/useFilters.d.ts +9 -0
- package/dist/v1/components/data-table/hooks/useFilters.d.ts.map +1 -0
- package/dist/v1/components/data-table/hooks/useFilters.js +76 -0
- package/dist/v1/components/data-table/hooks/useFilters.js.map +1 -0
- package/dist/v1/components/data-table/index.d.ts +4 -0
- package/dist/v1/components/data-table/index.d.ts.map +1 -0
- package/dist/v1/components/data-table/utils/filter-operations.cjs +83 -0
- package/dist/v1/components/data-table/utils/filter-operations.cjs.map +1 -0
- package/dist/v1/components/data-table/utils/filter-operations.d.ts +11 -0
- package/dist/v1/components/data-table/utils/filter-operations.d.ts.map +1 -0
- package/dist/v1/components/data-table/utils/filter-operations.js +80 -0
- package/dist/v1/components/data-table/utils/filter-operations.js.map +1 -0
- package/dist/v1/components/data-table/utils/index.cjs +156 -0
- package/dist/v1/components/data-table/utils/index.cjs.map +1 -0
- package/dist/v1/components/data-table/utils/index.d.ts +14 -0
- package/dist/v1/components/data-table/utils/index.d.ts.map +1 -0
- package/dist/v1/components/data-table/utils/index.js +147 -0
- package/dist/v1/components/data-table/utils/index.js.map +1 -0
- package/dist/v1/components/dialog/dialog.cjs +33 -0
- package/dist/v1/components/dialog/dialog.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.d.ts +33 -0
- package/dist/v1/components/dialog/dialog.d.ts.map +1 -0
- package/dist/v1/components/dialog/dialog.js +30 -0
- package/dist/v1/components/dialog/dialog.js.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs +8 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.js +4 -0
- package/dist/v1/components/dialog/dialog.module.css.js.map +1 -0
- package/dist/v1/components/dialog/index.d.ts +2 -0
- package/dist/v1/components/dialog/index.d.ts.map +1 -0
- package/dist/v1/components/filter-chip/filter-chip.cjs +28 -19
- package/dist/v1/components/filter-chip/filter-chip.cjs.map +1 -1
- package/dist/v1/components/filter-chip/filter-chip.d.ts +3 -7
- package/dist/v1/components/filter-chip/filter-chip.d.ts.map +1 -1
- package/dist/v1/components/filter-chip/filter-chip.js +28 -19
- package/dist/v1/components/filter-chip/filter-chip.js.map +1 -1
- package/dist/v1/components/flex/flex.cjs +9 -0
- package/dist/v1/components/flex/flex.cjs.map +1 -1
- package/dist/v1/components/flex/flex.d.ts +1 -1
- package/dist/v1/components/flex/flex.d.ts.map +1 -1
- package/dist/v1/components/flex/flex.js +9 -0
- package/dist/v1/components/flex/flex.js.map +1 -1
- package/dist/v1/components/flex/flex.module.css.cjs +1 -1
- package/dist/v1/components/flex/flex.module.css.js +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs.map +1 -1
- package/dist/v1/components/icon-button/icon-button.d.ts +1 -2
- package/dist/v1/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/v1/components/icon-button/icon-button.js +1 -1
- package/dist/v1/components/icon-button/icon-button.js.map +1 -1
- package/dist/v1/components/icons/assets/filter.svg.cjs +41 -0
- package/dist/v1/components/icons/assets/filter.svg.cjs.map +1 -0
- package/dist/v1/components/icons/assets/filter.svg.js +20 -0
- package/dist/v1/components/icons/assets/filter.svg.js.map +1 -0
- package/dist/v1/components/icons/icons.d.ts +3 -0
- package/dist/v1/components/icons/icons.d.ts.map +1 -0
- package/dist/v1/components/icons/index.d.ts +2 -0
- package/dist/v1/components/icons/index.d.ts.map +1 -0
- package/dist/v1/components/input-field/input-field.cjs +1 -1
- package/dist/v1/components/input-field/input-field.cjs.map +1 -1
- package/dist/v1/components/input-field/input-field.js +1 -1
- package/dist/v1/components/input-field/input-field.js.map +1 -1
- package/dist/v1/components/input-field/input-field.module.css.cjs +1 -1
- package/dist/v1/components/input-field/input-field.module.css.js +1 -1
- package/dist/v1/components/select/select.cjs +5 -5
- package/dist/v1/components/select/select.cjs.map +1 -1
- package/dist/v1/components/select/select.d.ts +12 -1
- package/dist/v1/components/select/select.d.ts.map +1 -1
- package/dist/v1/components/select/select.js +5 -5
- package/dist/v1/components/select/select.js.map +1 -1
- package/dist/v1/components/select/select.module.css.cjs +1 -1
- package/dist/v1/components/select/select.module.css.js +1 -1
- package/dist/v1/components/sheet/index.d.ts +2 -0
- package/dist/v1/components/sheet/index.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.cjs +48 -0
- package/dist/v1/components/sheet/sheet.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.d.ts +35 -0
- package/dist/v1/components/sheet/sheet.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.js +43 -0
- package/dist/v1/components/sheet/sheet.js.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs +8 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.js +4 -0
- package/dist/v1/components/sheet/sheet.module.css.js.map +1 -0
- package/dist/v1/components/sidebar/index.d.ts +2 -0
- package/dist/v1/components/sidebar/index.d.ts.map +1 -0
- package/dist/v1/components/sidebar/sidebar.cjs +47 -0
- package/dist/v1/components/sidebar/sidebar.cjs.map +1 -0
- package/dist/v1/components/{sidepanel/sidepanel.d.ts → sidebar/sidebar.d.ts} +22 -11
- package/dist/v1/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/v1/components/sidebar/sidebar.js +45 -0
- package/dist/v1/components/sidebar/sidebar.js.map +1 -0
- package/dist/v1/components/sidebar/sidebar.module.css.cjs +8 -0
- package/dist/v1/components/sidebar/sidebar.module.css.cjs.map +1 -0
- package/dist/v1/components/sidebar/sidebar.module.css.js +4 -0
- package/dist/v1/components/sidebar/sidebar.module.css.js.map +1 -0
- package/dist/v1/components/table/index.d.ts +2 -0
- package/dist/v1/components/table/index.d.ts.map +1 -0
- package/dist/v1/components/table/table.cjs +44 -0
- package/dist/v1/components/table/table.cjs.map +1 -0
- package/dist/v1/components/table/table.d.ts +30 -0
- package/dist/v1/components/table/table.d.ts.map +1 -0
- package/dist/v1/components/table/table.js +42 -0
- package/dist/v1/components/table/table.js.map +1 -0
- package/dist/v1/components/table/table.module.css.cjs +8 -0
- package/dist/v1/components/table/table.module.css.cjs.map +1 -0
- package/dist/v1/components/table/table.module.css.js +4 -0
- package/dist/v1/components/table/table.module.css.js.map +1 -0
- package/dist/v1/components/tooltip/tooltip.cjs +3 -2
- package/dist/v1/components/tooltip/tooltip.cjs.map +1 -1
- package/dist/v1/components/tooltip/tooltip.d.ts +8 -2
- package/dist/v1/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/v1/components/tooltip/tooltip.js +3 -2
- package/dist/v1/components/tooltip/tooltip.js.map +1 -1
- package/dist/v1/index.cjs +16 -2
- package/dist/v1/index.cjs.map +1 -1
- package/dist/v1/index.d.ts +7 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +9 -1
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs +11 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js +9 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js +27 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs +103 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js +101 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs +224 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js +214 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs +298 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js +280 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs +235 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js +233 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs +32 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs +254 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js +252 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs +92 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +89 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs +40 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-menu@2.0.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs +17 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js +15 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs +133 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js +131 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs +88 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js +85 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs +82 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js +79 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs +50 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js +48 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs +23 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs +14 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js +12 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs +131 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js +72 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_react-table@8.9.2_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs +3338 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js +3299 -0
- package/dist/v1/node_modules/.pnpm/@tanstack_table-core@8.9.2/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs +39 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js +8 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs +146 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js +142 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.cjs +16 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.js +12 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.cjs +16 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.js +12 -0
- package/dist/v1/node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +34 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +169 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +60 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +24 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +100 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +97 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +12 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -2
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +2 -2
- package/dist/v1/style.css +1 -1
- package/dist/v1/types/filters.cjs +39 -0
- package/dist/v1/types/filters.cjs.map +1 -0
- package/dist/v1/types/filters.d.ts +42 -0
- package/dist/v1/types/filters.d.ts.map +1 -0
- package/dist/v1/types/filters.js +36 -0
- package/dist/v1/types/filters.js.map +1 -0
- package/package.json +2 -1
- package/dist/v1/components/sidepanel/index.d.ts +0 -2
- package/dist/v1/components/sidepanel/index.d.ts.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.cjs +0 -44
- package/dist/v1/components/sidepanel/sidepanel.cjs.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.d.ts.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.js +0 -42
- package/dist/v1/components/sidepanel/sidepanel.js.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.module.css.cjs +0 -8
- package/dist/v1/components/sidepanel/sidepanel.module.css.cjs.map +0 -1
- package/dist/v1/components/sidepanel/sidepanel.module.css.js +0 -4
- package/dist/v1/components/sidepanel/sidepanel.module.css.js.map +0 -1
|
@@ -23,40 +23,41 @@ function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", placeholder = "DD
|
|
|
23
23
|
selectedDateRef.current = selectedDate;
|
|
24
24
|
}, [selectedDate]);
|
|
25
25
|
function isElementOutside(el) {
|
|
26
|
-
return !isDropdownOpenRef.current && // Month and Year dropdown from Date picker
|
|
26
|
+
return (!isDropdownOpenRef.current && // Month and Year dropdown from Date picker
|
|
27
27
|
!textFieldRef.current?.contains(el) && // TextField
|
|
28
|
-
!contentRef.current?.contains(el);
|
|
28
|
+
!contentRef.current?.contains(el));
|
|
29
29
|
}
|
|
30
30
|
const handleMouseDown = useCallback((event) => {
|
|
31
|
-
const el =
|
|
31
|
+
const el = event.target;
|
|
32
32
|
if (el && isElementOutside(el))
|
|
33
33
|
removeEventListeners();
|
|
34
34
|
}, []);
|
|
35
35
|
function registerEventListeners() {
|
|
36
36
|
isInputFieldFocused.current = true;
|
|
37
|
-
document.addEventListener(
|
|
37
|
+
document.addEventListener("mouseup", handleMouseDown);
|
|
38
38
|
}
|
|
39
|
-
function removeEventListeners() {
|
|
39
|
+
function removeEventListeners(skipUpdate = false) {
|
|
40
40
|
isInputFieldFocused.current = false;
|
|
41
41
|
setShowCalendar(false);
|
|
42
42
|
const updatedVal = dayjs(selectedDateRef.current).format(dateFormat);
|
|
43
43
|
if (textFieldRef.current)
|
|
44
44
|
textFieldRef.current.value = updatedVal;
|
|
45
|
-
if (inputState === undefined)
|
|
45
|
+
if (inputState === undefined && !skipUpdate)
|
|
46
46
|
onSelect(dayjs(updatedVal).toDate());
|
|
47
|
-
document.removeEventListener(
|
|
47
|
+
document.removeEventListener("mouseup", handleMouseDown);
|
|
48
48
|
}
|
|
49
49
|
const handleSelect = (day) => {
|
|
50
50
|
setSelectedDate(day);
|
|
51
51
|
onSelect(day);
|
|
52
52
|
setInputState(undefined);
|
|
53
|
-
removeEventListeners();
|
|
53
|
+
removeEventListeners(true);
|
|
54
54
|
};
|
|
55
55
|
function onDropdownOpen() {
|
|
56
56
|
isDropdownOpenRef.current = true;
|
|
57
57
|
}
|
|
58
58
|
function onOpenChange(open) {
|
|
59
|
-
if (!isDropdownOpenRef.current &&
|
|
59
|
+
if (!isDropdownOpenRef.current &&
|
|
60
|
+
!(isInputFieldFocused.current && showCalendar)) {
|
|
60
61
|
setShowCalendar(Boolean(open));
|
|
61
62
|
}
|
|
62
63
|
isDropdownOpenRef.current = false;
|
|
@@ -79,32 +80,40 @@ function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", placeholder = "DD
|
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
function handleKeyUp(event) {
|
|
82
|
-
if (event.code ===
|
|
83
|
+
if (event.code === "Enter" && textFieldRef.current) {
|
|
83
84
|
textFieldRef.current.blur();
|
|
84
85
|
removeEventListeners();
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
function handleInputChange(event) {
|
|
88
89
|
const { value } = event.target;
|
|
89
|
-
const format = value.includes("/")
|
|
90
|
+
const format = value.includes("/")
|
|
91
|
+
? "DD/MM/YYYY"
|
|
92
|
+
: value.includes("-")
|
|
93
|
+
? "DD-MM-YYYY"
|
|
94
|
+
: undefined;
|
|
90
95
|
const date = dayjs(value.replace(/(\d{1,2})\/(\d{1,2})\/(\d{4})/, (_, day, month, year) => {
|
|
91
|
-
return `${day.padStart(2,
|
|
96
|
+
return `${day.padStart(2, "0")}/${month.padStart(2, "0")}/${year}`; // Replaces [8/8/2024] to [08/08/2024]
|
|
92
97
|
}), format);
|
|
93
98
|
const isValidDate = date.isValid();
|
|
94
|
-
const isAfter = calendarProps?.startMonth !== undefined
|
|
95
|
-
|
|
99
|
+
const isAfter = calendarProps?.startMonth !== undefined
|
|
100
|
+
? dayjs(date).isSameOrAfter(calendarProps.startMonth)
|
|
101
|
+
: true;
|
|
102
|
+
const isBefore = calendarProps?.endMonth !== undefined
|
|
103
|
+
? dayjs(date).isSameOrBefore(calendarProps.endMonth)
|
|
104
|
+
: true;
|
|
96
105
|
const isValid = isValidDate && isAfter && isBefore && dayjs(date).isSameOrBefore(dayjs());
|
|
97
106
|
if (isValid) {
|
|
98
107
|
setSelectedDate(date.toDate());
|
|
99
|
-
if (inputState ===
|
|
108
|
+
if (inputState === "invalid")
|
|
100
109
|
setInputState(undefined);
|
|
101
110
|
}
|
|
102
111
|
else {
|
|
103
|
-
setInputState(
|
|
112
|
+
setInputState("invalid");
|
|
104
113
|
}
|
|
105
114
|
}
|
|
106
115
|
const defaultTrigger = (jsxRuntimeExports.jsx(TextField, { ref: textFieldRef, defaultValue: formattedDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, onChange: handleInputChange, onFocus: handleInputFocus, onBlur: handleInputBlur, state: inputState, placeholder: placeholder, onKeyUp: handleKeyUp, className: styles.datePickerInput, ...textFieldProps }));
|
|
107
|
-
const trigger = typeof children ===
|
|
116
|
+
const trigger = typeof children === "function"
|
|
108
117
|
? children({ selectedDate: formattedDate })
|
|
109
118
|
: children || defaultTrigger;
|
|
110
119
|
return (jsxRuntimeExports.jsxs(Popover, { open: showCalendar, onOpenChange: onOpenChange, children: [jsxRuntimeExports.jsx(Popover.Trigger, { asChild: true, children: trigger }), jsxRuntimeExports.jsx(Popover.Content, { side: side, className: styles.calendarPopover, ref: contentRef, children: jsxRuntimeExports.jsx(Calendar, { required: true, ...calendarProps, onDropdownOpen: onDropdownOpen, mode: "single", selected: selectedDate, month: selectedDate, onSelect: handleSelect, onMonthChange: setSelectedDate }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","sources":["../../../../v1/components/calendar/date-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { PropsBase, PropsSingleRequired } from \"react-day-picker\";\n\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ndayjs.extend(customParseFormat);\n\ninterface DatePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n calendarProps?: PropsSingleRequired & PropsBase;\n onSelect?: (date: Date) => void;\n placeholder?: string;\n value?: Date;\n children?: React.ReactNode | ((props: { selectedDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\nexport function DatePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n placeholder = \"DD/MM/YYYY\",\n textFieldProps,\n calendarProps,\n value = new Date(),\n onSelect = () => {},\n children,\n showCalendarIcon = true,\n}: DatePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [selectedDate, setSelectedDate] = useState(value);\n const [inputState, setInputState] = useState<Partial<React.ComponentProps<typeof TextField>['state']>>();\n\n const formattedDate = dayjs(selectedDate).format(dateFormat);\n\n const isDropdownOpenRef = useRef(false);\n const textFieldRef = useRef<HTMLInputElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const isInputFieldFocused = useRef(false);\n const selectedDateRef = useRef(selectedDate);\n\n useEffect(() => {\n selectedDateRef.current = selectedDate;\n }, [selectedDate]);\n\n function isElementOutside(el: HTMLElement) {\n return !isDropdownOpenRef.current && // Month and Year dropdown from Date picker\n !textFieldRef.current?.contains(el) && // TextField\n !contentRef.current?.contains(el);\n }\n\n const handleMouseDown = useCallback((event: MouseEvent) => {\n const el = (event.target) as HTMLElement | null;\n if (el && isElementOutside(el)) removeEventListeners();\n }, [])\n\n function registerEventListeners() {\n isInputFieldFocused.current = true;\n document.addEventListener('mouseup', handleMouseDown);\n }\n\n function removeEventListeners() {\n isInputFieldFocused.current = false;\n setShowCalendar(false);\n\n const updatedVal = dayjs(selectedDateRef.current).format(dateFormat);\n\n if (textFieldRef.current) textFieldRef.current.value = updatedVal;\n if (inputState === undefined) onSelect(dayjs(updatedVal).toDate());\n\n document.removeEventListener('mouseup', handleMouseDown);\n }\n\n const handleSelect = (day: Date) => {\n setSelectedDate(day);\n onSelect(day);\n setInputState(undefined);\n removeEventListeners();\n };\n\n function onDropdownOpen() {\n isDropdownOpenRef.current = true;\n }\n\n function onOpenChange(open?: boolean) {\n if (!isDropdownOpenRef.current && !(isInputFieldFocused.current && showCalendar)) {\n setShowCalendar(Boolean(open));\n }\n\n isDropdownOpenRef.current = false;\n }\n\n function handleInputFocus() {\n if (isInputFieldFocused.current) return;\n if (!showCalendar) setShowCalendar(true);\n }\n\n function handleInputBlur(event: React.FocusEvent) {\n if (isInputFieldFocused.current) {\n const el = event.relatedTarget as HTMLElement | null;\n if (el && isElementOutside(el)) removeEventListeners();\n } else {\n registerEventListeners();\n setTimeout(() => textFieldRef.current?.select());\n }\n }\n\n function handleKeyUp(event: React.KeyboardEvent) {\n if (event.code === 'Enter' && textFieldRef.current) {\n textFieldRef.current.blur();\n removeEventListeners();\n }\n }\n\n function handleInputChange(event: React.ChangeEvent<HTMLInputElement>) {\n const { value } = event.target;\n\n const format = value.includes(\"/\") ? \"DD/MM/YYYY\" : value.includes(\"-\") ? \"DD-MM-YYYY\" : undefined;\n const date = dayjs(value.replace(/(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})/, (_, day, month, year) => {\n\t\t\t\treturn `${day.padStart(2, '0')}/${month.padStart(2, '0')}/${year}`; // Replaces [8/8/2024] to [08/08/2024]\n\t\t}), format);\n\n const isValidDate = date.isValid();\n\n const isAfter = calendarProps?.startMonth !== undefined ? dayjs(date).isSameOrAfter(calendarProps.startMonth) : true;\n const isBefore = calendarProps?.endMonth !== undefined ? dayjs(date).isSameOrBefore(calendarProps.endMonth) : true;\n\n const isValid = isValidDate && isAfter && isBefore && dayjs(date).isSameOrBefore(dayjs());\n\n if (isValid) {\n setSelectedDate(date.toDate());\n if (inputState === 'invalid') setInputState(undefined);\n } else {\n setInputState('invalid');\n }\n }\n\n const defaultTrigger = (\n <TextField\n ref={textFieldRef}\n defaultValue={formattedDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n onChange={handleInputChange}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n state={inputState}\n placeholder={placeholder}\n onKeyUp={handleKeyUp}\n className={styles.datePickerInput}\n {...textFieldProps}\n />\n );\n\n const trigger = typeof children === 'function'\n ? children({ selectedDate: formattedDate })\n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n\n <Popover.Content side={side} className={styles.calendarPopover} ref={contentRef}>\n <Calendar\n required={true}\n {...calendarProps}\n onDropdownOpen={onDropdownOpen}\n mode=\"single\"\n selected={selectedDate}\n month={selectedDate}\n onSelect={handleSelect}\n onMonthChange={setSelectedDate}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;AAYA,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;SAchB,UAAU,CAAC,EACzB,IAAI,GAAG,KAAK,EACZ,UAAU,GAAG,YAAY,EACzB,WAAW,GAAG,YAAY,EAC1B,cAAc,EACd,aAAa,EACb,KAAK,GAAG,IAAI,IAAI,EAAE,EAClB,QAAQ,GAAG,MAAK,GAAG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GAAG,OAAO,QAAQ,KAAK,UAAU;UAC1C,QAAQ,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AAC3C,UAAE,QAAQ,IAAI,cAAc,CAAC;AAE/B,IAAA,QACEC,sBAAC,CAAA,OAAO,EAAC,EAAA,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EACrD,QAAA,EAAA,CAAAD,qBAAA,CAAC,OAAO,CAAC,OAAO,EAAC,EAAA,OAAO,EACrB,IAAA,EAAA,QAAA,EAAA,OAAO,GACQ,EAElBA,qBAAA,CAAC,OAAO,CAAC,OAAO,EAAC,EAAA,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,GAAG,EAAE,UAAU,YAC7EA,qBAAC,CAAA,QAAQ,EACP,EAAA,QAAQ,EAAE,IAAI,EAAA,GACV,aAAa,EACjB,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,eAAe,GAC9B,EACc,CAAA,CAAA,EAAA,CACV,EACV;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"date-picker.js","sources":["../../../../v1/components/calendar/date-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { PropsBase, PropsSingleRequired } from \"react-day-picker\";\n\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ndayjs.extend(customParseFormat);\n\ninterface DatePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n calendarProps?: PropsSingleRequired & PropsBase;\n onSelect?: (date: Date) => void;\n placeholder?: string;\n value?: Date;\n children?:\n | React.ReactNode\n | ((props: { selectedDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\nexport function DatePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n placeholder = \"DD/MM/YYYY\",\n textFieldProps,\n calendarProps,\n value = new Date(),\n onSelect = () => {},\n children,\n showCalendarIcon = true,\n}: DatePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [selectedDate, setSelectedDate] = useState(value);\n const [inputState, setInputState] =\n useState<Partial<React.ComponentProps<typeof TextField>[\"state\"]>>();\n\n const formattedDate = dayjs(selectedDate).format(dateFormat);\n\n const isDropdownOpenRef = useRef(false);\n const textFieldRef = useRef<HTMLInputElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const isInputFieldFocused = useRef(false);\n const selectedDateRef = useRef(selectedDate);\n\n useEffect(() => {\n selectedDateRef.current = selectedDate;\n }, [selectedDate]);\n\n function isElementOutside(el: HTMLElement) {\n return (\n !isDropdownOpenRef.current && // Month and Year dropdown from Date picker\n !textFieldRef.current?.contains(el) && // TextField\n !contentRef.current?.contains(el)\n );\n }\n\n const handleMouseDown = useCallback((event: MouseEvent) => {\n const el = event.target as HTMLElement | null;\n if (el && isElementOutside(el)) removeEventListeners();\n }, []);\n\n function registerEventListeners() {\n isInputFieldFocused.current = true;\n document.addEventListener(\"mouseup\", handleMouseDown);\n }\n\n function removeEventListeners(skipUpdate = false) {\n isInputFieldFocused.current = false;\n setShowCalendar(false);\n\n const updatedVal = dayjs(selectedDateRef.current).format(dateFormat);\n\n if (textFieldRef.current) textFieldRef.current.value = updatedVal;\n if (inputState === undefined && !skipUpdate)\n onSelect(dayjs(updatedVal).toDate());\n\n document.removeEventListener(\"mouseup\", handleMouseDown);\n }\n\n const handleSelect = (day: Date) => {\n setSelectedDate(day);\n onSelect(day);\n setInputState(undefined);\n removeEventListeners(true);\n };\n\n function onDropdownOpen() {\n isDropdownOpenRef.current = true;\n }\n\n function onOpenChange(open?: boolean) {\n if (\n !isDropdownOpenRef.current &&\n !(isInputFieldFocused.current && showCalendar)\n ) {\n setShowCalendar(Boolean(open));\n }\n\n isDropdownOpenRef.current = false;\n }\n\n function handleInputFocus() {\n if (isInputFieldFocused.current) return;\n if (!showCalendar) setShowCalendar(true);\n }\n\n function handleInputBlur(event: React.FocusEvent) {\n if (isInputFieldFocused.current) {\n const el = event.relatedTarget as HTMLElement | null;\n if (el && isElementOutside(el)) removeEventListeners();\n } else {\n registerEventListeners();\n setTimeout(() => textFieldRef.current?.select());\n }\n }\n\n function handleKeyUp(event: React.KeyboardEvent) {\n if (event.code === \"Enter\" && textFieldRef.current) {\n textFieldRef.current.blur();\n removeEventListeners();\n }\n }\n\n function handleInputChange(event: React.ChangeEvent<HTMLInputElement>) {\n const { value } = event.target;\n\n const format = value.includes(\"/\")\n ? \"DD/MM/YYYY\"\n : value.includes(\"-\")\n ? \"DD-MM-YYYY\"\n : undefined;\n const date = dayjs(\n value.replace(/(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})/, (_, day, month, year) => {\n return `${day.padStart(2, \"0\")}/${month.padStart(2, \"0\")}/${year}`; // Replaces [8/8/2024] to [08/08/2024]\n }),\n format\n );\n\n const isValidDate = date.isValid();\n\n const isAfter =\n calendarProps?.startMonth !== undefined\n ? dayjs(date).isSameOrAfter(calendarProps.startMonth)\n : true;\n const isBefore =\n calendarProps?.endMonth !== undefined\n ? dayjs(date).isSameOrBefore(calendarProps.endMonth)\n : true;\n\n const isValid =\n isValidDate && isAfter && isBefore && dayjs(date).isSameOrBefore(dayjs());\n\n if (isValid) {\n setSelectedDate(date.toDate());\n if (inputState === \"invalid\") setInputState(undefined);\n } else {\n setInputState(\"invalid\");\n }\n }\n\n const defaultTrigger = (\n <TextField\n ref={textFieldRef}\n defaultValue={formattedDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n onChange={handleInputChange}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n state={inputState}\n placeholder={placeholder}\n onKeyUp={handleKeyUp}\n className={styles.datePickerInput}\n {...textFieldProps}\n />\n );\n\n const trigger =\n typeof children === \"function\"\n ? children({ selectedDate: formattedDate })\n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>{trigger}</Popover.Trigger>\n\n <Popover.Content\n side={side}\n className={styles.calendarPopover}\n ref={contentRef}\n >\n <Calendar\n required={true}\n {...calendarProps}\n onDropdownOpen={onDropdownOpen}\n mode=\"single\"\n selected={selectedDate}\n month={selectedDate}\n onSelect={handleSelect}\n onMonthChange={setSelectedDate}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;AAYA,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;SAgBhB,UAAU,CAAC,EACzB,IAAI,GAAG,KAAK,EACZ,UAAU,GAAG,YAAY,EACzB,WAAW,GAAG,YAAY,EAC1B,cAAc,EACd,aAAa,EACb,KAAK,GAAG,IAAI,IAAI,EAAE,EAClB,QAAQ,GAAG,MAAK,GAAG,EACnB,QAAQ,EACR,gBAAgB,GAAG,IAAI,GACP,EAAA;IAChB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAC/B,QAAQ,EAA4D,CAAC;IAEvE,MAAM,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAE7D,IAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACxC,IAAA,MAAM,YAAY,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;AAC3D,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,EACjC,GAAG,EAAE,UAAU,YAEfA,qBAAC,CAAA,QAAQ,EACP,EAAA,QAAQ,EAAE,IAAI,EAAA,GACV,aAAa,EACjB,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,eAAe,GAC9B,EACc,CAAA,CAAA,EAAA,CACV,EACV;AACJ;;;;"}
|
|
@@ -10,7 +10,7 @@ var textfield = require('../textfield/textfield.cjs');
|
|
|
10
10
|
var calendar = require('./calendar.cjs');
|
|
11
11
|
var calendar_module = require('./calendar.module.css.cjs');
|
|
12
12
|
|
|
13
|
-
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, onSelect = () => { }, value = {
|
|
13
|
+
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, placeholders, calendarProps, onSelect = () => { }, value = {
|
|
14
14
|
to: new Date(),
|
|
15
15
|
from: new Date(),
|
|
16
16
|
}, pickerGroupClassName, children, showCalendarIcon = true, }) {
|
|
@@ -41,7 +41,7 @@ function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps,
|
|
|
41
41
|
function onOpenChange(open) {
|
|
42
42
|
setShowCalendar(Boolean(open));
|
|
43
43
|
}
|
|
44
|
-
const defaultTrigger = (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps }), jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps })] }));
|
|
44
|
+
const defaultTrigger = (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.startDate || "Select start date" }), jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.endDate || "Select end date" })] }));
|
|
45
45
|
const trigger = typeof children === 'function'
|
|
46
46
|
? children({ startDate, endDate })
|
|
47
47
|
: children || defaultTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-picker.cjs","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["useState","dayjs","_jsxs","Flex","_jsx","TextField","CalendarIcon","styles","Popover","Calendar"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"range-picker.cjs","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n placeholders?: { startDate?: string; endDate?: string };\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n placeholders,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.startDate || \"Select start date\"}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.endDate || \"Select end date\"}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["useState","dayjs","_jsxs","Flex","_jsx","TextField","CalendarIcon","styles","Popover","Calendar"],"mappings":";;;;;;;;;;;;AA2BM,SAAU,WAAW,CAAC,EAC1B,IAAI,GAAG,KAAK,EACZ,UAAU,GAAG,YAAY,EACzB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,QAAQ,GAAG,MAAO,GAAC,EACnB,KAAK,GAAG;IACN,EAAE,EAAE,IAAI,IAAI,EAAE;IACd,IAAI,EAAE,IAAI,IAAI,E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S,EAAED,uBAAM,CAAC,eAAe,EAAA,QAAA,EAC5DH,gCAAC,CAAAK,iBAAQ,IACP,eAAe,EAAE,KAAK,EACtB,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,aAAa,CAAC,IAAI,EAChC,QAAQ,EAAE,IAAI,EACV,GAAA,aAAa,EACjB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,EAAA,CACtB,EACc,CAAA,CAAA,EAAA,CACV,EACV;AACJ;;;;"}
|
|
@@ -4,6 +4,10 @@ interface RangePickerProps {
|
|
|
4
4
|
side?: "top" | "right" | "bottom" | "left";
|
|
5
5
|
dateFormat?: string;
|
|
6
6
|
textFieldProps?: TextfieldProps;
|
|
7
|
+
placeholders?: {
|
|
8
|
+
startDate?: string;
|
|
9
|
+
endDate?: string;
|
|
10
|
+
};
|
|
7
11
|
calendarProps?: PropsRangeRequired & PropsBase;
|
|
8
12
|
onSelect?: (date: DateRange) => void;
|
|
9
13
|
pickerGroupClassName?: string;
|
|
@@ -14,6 +18,6 @@ interface RangePickerProps {
|
|
|
14
18
|
}) => React.ReactNode);
|
|
15
19
|
showCalendarIcon?: boolean;
|
|
16
20
|
}
|
|
17
|
-
export declare function RangePicker({ side, dateFormat, textFieldProps, calendarProps, onSelect, value, pickerGroupClassName, children, showCalendarIcon, }: RangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function RangePicker({ side, dateFormat, textFieldProps, placeholders, calendarProps, onSelect, value, pickerGroupClassName, children, showCalendarIcon, }: RangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
22
|
export {};
|
|
19
23
|
//# sourceMappingURL=range-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-picker.d.ts","sourceRoot":"","sources":["../../../../v1/components/calendar/range-picker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,MA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E,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,aAAa,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAClG,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAID,wBAAgB,WAAW,CAAC,EAC1B,IAAY,EACZ,UAAyB,EACzB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,QAAmB,EACnB,KAGC,EACD,oBAAoB,EACpB,QAAQ,EACR,gBAAuB,GACxB,EAAE,gBAAgB,2CA6ElB"}
|
|
@@ -8,7 +8,7 @@ import { TextField } from '../textfield/textfield.js';
|
|
|
8
8
|
import { Calendar } from './calendar.js';
|
|
9
9
|
import styles from './calendar.module.css.js';
|
|
10
10
|
|
|
11
|
-
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, onSelect = () => { }, value = {
|
|
11
|
+
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, placeholders, calendarProps, onSelect = () => { }, value = {
|
|
12
12
|
to: new Date(),
|
|
13
13
|
from: new Date(),
|
|
14
14
|
}, pickerGroupClassName, children, showCalendarIcon = true, }) {
|
|
@@ -39,7 +39,7 @@ function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps,
|
|
|
39
39
|
function onOpenChange(open) {
|
|
40
40
|
setShowCalendar(Boolean(open));
|
|
41
41
|
}
|
|
42
|
-
const defaultTrigger = (jsxRuntimeExports.jsxs(Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntimeExports.jsx(TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps }), jsxRuntimeExports.jsx(TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps })] }));
|
|
42
|
+
const defaultTrigger = (jsxRuntimeExports.jsxs(Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntimeExports.jsx(TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.startDate || "Select start date" }), jsxRuntimeExports.jsx(TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.endDate || "Select end date" })] }));
|
|
43
43
|
const trigger = typeof children === 'function'
|
|
44
44
|
? children({ startDate, endDate })
|
|
45
45
|
: children || defaultTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-picker.js","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"range-picker.js","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n placeholders?: { startDate?: string; endDate?: string };\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n placeholders,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.startDate || \"Select start date\"}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.endDate || \"Select end date\"}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;AA2BM,SAAU,WAAW,CAAC,EAC1B,IAAI,GAAG,KAAK,EACZ,UAAU,GAAG,YAAY,EACzB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,QAAQ,GAAG,MAAO,GAAC,E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CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,eAAe,EAAA,QAAA,EAC5DA,qBAAC,CAAA,QAAQ,IACP,eAAe,EAAE,KAAK,EACtB,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,aAAa,CAAC,IAAI,EAChC,QAAQ,EAAE,IAAI,EACV,GAAA,aAAa,EACjB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,EAAA,CACtB,EACc,CAAA,CAAA,EAAA,CACV,EACV;AACJ;;;;"}
|
|
@@ -14,23 +14,23 @@ const chip = index.cva(chip_module.default.chip, {
|
|
|
14
14
|
large: chip_module.default["chip-size-large"],
|
|
15
15
|
small: chip_module.default["chip-size-small"],
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
neutral: chip_module.default["chip-
|
|
19
|
-
accent: chip_module.default["chip-
|
|
17
|
+
color: {
|
|
18
|
+
neutral: chip_module.default["chip-color-neutral"],
|
|
19
|
+
accent: chip_module.default["chip-color-accent"],
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
defaultVariants: {
|
|
23
23
|
variant: "outline",
|
|
24
24
|
size: "small",
|
|
25
|
-
|
|
25
|
+
color: "neutral",
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
const Chip = ({ variant, size,
|
|
28
|
+
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role = "status", ariaLabel, }) => {
|
|
29
29
|
const handleDismiss = (e) => {
|
|
30
30
|
e.stopPropagation();
|
|
31
31
|
onDismiss?.();
|
|
32
32
|
};
|
|
33
|
-
return (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: chip({ variant, size,
|
|
33
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === "string" ? children : undefined), onClick: onClick, children: [leadingIcon && (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default["leading-icon"], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntime.jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: chip_module.default["dismiss-button"], "aria-label": `Remove ${typeof children === "string" ? children : "item"}`, type: "button", children: jsxRuntime.jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntime.jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default["trailing-icon"], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
34
34
|
};
|
|
35
35
|
Chip.displayName = "Chip";
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.cjs","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"chip.cjs","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\",\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n onClick?: () => void;\n role?: string;\n ariaLabel?: string;\n};\n\nexport const Chip = ({\n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n onClick,\n role = \"status\",\n ariaLabel,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span\n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={\n ariaLabel || (typeof children === \"string\" ? children : undefined)\n }\n onClick={onClick}\n >\n {leadingIcon && (\n <span\n className={styles[\"leading-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button\n onClick={handleDismiss}\n className={styles[\"dismiss-button\"]}\n aria-label={`Remove ${\n typeof children === \"string\" ? children : \"item\"\n }`}\n type=\"button\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span\n className={styles[\"trailing-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";\n"],"names":["cva","styles","_jsxs","_jsx"],"mappings":";;;;;;AAKA,MAAM,IAAI,GAAGA,SAAG,CAACC,mBAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAEA,mBAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAEA,mBAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAEA,mBAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAEA,mBAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF,CAAA,CAAC,CAAC;AAcI,MAAM,IAAI,GAAG,CAAC,EACnB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,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,cAAc,EACnB,CAAA,EAAA,CACE,GACC,IACP,YAAY,IACdA,gCACE,CAAA,MAAA,EAAA,EAAA,SAAS,EAAEF,mBAAM,CAAC,eAAe,CAAC,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,YAElB,YAAY,EAAA,CACR,IACL,IAAI,CAAA,EAAA,CACH,EACP;AACJ,EAAE;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type VariantProps } from "class-variance-authority";
|
|
2
1
|
import { ReactNode } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const chip: (props?: ({
|
|
4
4
|
variant?: "outline" | "filled" | null | undefined;
|
|
5
5
|
size?: "small" | "large" | null | undefined;
|
|
6
|
-
|
|
6
|
+
color?: "accent" | "neutral" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
8
|
type ChipProps = VariantProps<typeof chip> & {
|
|
9
9
|
trailingIcon?: ReactNode;
|
|
@@ -12,11 +12,12 @@ type ChipProps = VariantProps<typeof chip> & {
|
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
className?: string;
|
|
14
14
|
onDismiss?: () => void;
|
|
15
|
+
onClick?: () => void;
|
|
15
16
|
role?: string;
|
|
16
17
|
ariaLabel?: string;
|
|
17
18
|
};
|
|
18
19
|
export declare const Chip: {
|
|
19
|
-
({ variant, size,
|
|
20
|
+
({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role, ariaLabel, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
displayName: string;
|
|
21
22
|
};
|
|
22
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../v1/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../v1/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,IAAI;;;;mFAoBR,CAAC;AAEH,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,GAAG;IAC3C,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,IAAI;oIAad,SAAS;;CA8DX,CAAC"}
|
|
@@ -12,23 +12,23 @@ const chip = cva(styles.chip, {
|
|
|
12
12
|
large: styles["chip-size-large"],
|
|
13
13
|
small: styles["chip-size-small"],
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
neutral: styles["chip-
|
|
17
|
-
accent: styles["chip-
|
|
15
|
+
color: {
|
|
16
|
+
neutral: styles["chip-color-neutral"],
|
|
17
|
+
accent: styles["chip-color-accent"],
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
21
21
|
variant: "outline",
|
|
22
22
|
size: "small",
|
|
23
|
-
|
|
23
|
+
color: "neutral",
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
|
-
const Chip = ({ variant, size,
|
|
26
|
+
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, onClick, role = "status", ariaLabel, }) => {
|
|
27
27
|
const handleDismiss = (e) => {
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
onDismiss?.();
|
|
30
30
|
};
|
|
31
|
-
return (jsxRuntimeExports.jsxs("span", { className: chip({ variant, size,
|
|
31
|
+
return (jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === "string" ? children : undefined), onClick: onClick, children: [leadingIcon && (jsxRuntimeExports.jsx("span", { className: styles["leading-icon"], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: styles["dismiss-button"], "aria-label": `Remove ${typeof children === "string" ? children : "item"}`, type: "button", children: jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntimeExports.jsx("span", { className: styles["trailing-icon"], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
32
32
|
};
|
|
33
33
|
Chip.displayName = "Chip";
|
|
34
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\",\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n onClick?: () => void;\n role?: string;\n ariaLabel?: string;\n};\n\nexport const Chip = ({\n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n onClick,\n role = \"status\",\n ariaLabel,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span\n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={\n ariaLabel || (typeof children === \"string\" ? children : undefined)\n }\n onClick={onClick}\n >\n {leadingIcon && (\n <span\n className={styles[\"leading-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button\n onClick={handleDismiss}\n className={styles[\"dismiss-button\"]}\n aria-label={`Remove ${\n typeof children === \"string\" ? children : \"item\"\n }`}\n type=\"button\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span\n className={styles[\"trailing-icon\"]}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";\n"],"names":["_jsxs","_jsx"],"mappings":";;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,MAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAE,MAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA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,qBAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,qgBAAqgB,EACvgB,IAAI,EAAC,cAAc,EACnB,CAAA,EAAA,CACE,GACC,IACP,YAAY,IACdA,qBACE,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,YAElB,YAAY,EAAA,CACR,IACL,IAAI,CAAA,EAAA,CACH,EACP;AACJ,EAAE;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var styles = {"chip":"chip-module_chip__EgHT3","chip-variant-outline":"chip-module_chip-variant-outline__hCEkT","chip-variant-filled":"chip-module_chip-variant-filled__NrLkO","chip-size-large":"chip-module_chip-size-large__dRgtH","chip-size-small":"chip-module_chip-size-small__KdfAe","chip-
|
|
5
|
+
var styles = {"chip":"chip-module_chip__EgHT3","chip-variant-outline":"chip-module_chip-variant-outline__hCEkT","chip-variant-filled":"chip-module_chip-variant-filled__NrLkO","chip-size-large":"chip-module_chip-size-large__dRgtH","chip-size-small":"chip-module_chip-size-small__KdfAe","chip-color-neutral":"chip-module_chip-color-neutral__UWAPC","chip-color-accent":"chip-module_chip-color-accent__X1oLG","leading-icon":"chip-module_leading-icon__S37LS","trailing-icon":"chip-module_trailing-icon__ldobb","dismiss-button":"chip-module_dismiss-button__gPMmm","chip___variant___outline":"chip-module_chip-variant-outline__hCEkT","chip___variant___filled":"chip-module_chip-variant-filled__NrLkO","chip___size___large":"chip-module_chip-size-large__dRgtH","chip___size___small":"chip-module_chip-size-small__KdfAe","chip___color___neutral":"chip-module_chip-color-neutral__UWAPC","chip___color___accent":"chip-module_chip-color-accent__X1oLG","leading___icon":"chip-module_leading-icon__S37LS","trailing___icon":"chip-module_trailing-icon__ldobb","dismiss___button":"chip-module_dismiss-button__gPMmm"};
|
|
6
6
|
|
|
7
7
|
exports.default = styles;
|
|
8
8
|
//# sourceMappingURL=chip.module.css.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var styles = {"chip":"chip-module_chip__EgHT3","chip-variant-outline":"chip-module_chip-variant-outline__hCEkT","chip-variant-filled":"chip-module_chip-variant-filled__NrLkO","chip-size-large":"chip-module_chip-size-large__dRgtH","chip-size-small":"chip-module_chip-size-small__KdfAe","chip-
|
|
1
|
+
var styles = {"chip":"chip-module_chip__EgHT3","chip-variant-outline":"chip-module_chip-variant-outline__hCEkT","chip-variant-filled":"chip-module_chip-variant-filled__NrLkO","chip-size-large":"chip-module_chip-size-large__dRgtH","chip-size-small":"chip-module_chip-size-small__KdfAe","chip-color-neutral":"chip-module_chip-color-neutral__UWAPC","chip-color-accent":"chip-module_chip-color-accent__X1oLG","leading-icon":"chip-module_leading-icon__S37LS","trailing-icon":"chip-module_trailing-icon__ldobb","dismiss-button":"chip-module_dismiss-button__gPMmm","chip___variant___outline":"chip-module_chip-variant-outline__hCEkT","chip___variant___filled":"chip-module_chip-variant-filled__NrLkO","chip___size___large":"chip-module_chip-size-large__dRgtH","chip___size___small":"chip-module_chip-size-small__KdfAe","chip___color___neutral":"chip-module_chip-color-neutral__UWAPC","chip___color___accent":"chip-module_chip-color-accent__X1oLG","leading___icon":"chip-module_leading-icon__S37LS","trailing___icon":"chip-module_trailing-icon__ldobb","dismiss___button":"chip-module_dismiss-button__gPMmm"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
4
4
|
//# sourceMappingURL=chip.module.css.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
|
|
6
|
+
var index = require('../../node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs');
|
|
7
|
+
var index$1 = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
|
|
8
|
+
var dialog = require('../dialog/dialog.cjs');
|
|
9
|
+
var flex = require('../flex/flex.cjs');
|
|
10
|
+
var command_module = require('./command.module.css.cjs');
|
|
11
|
+
|
|
12
|
+
const command = index$1.cva(command_module.default.command);
|
|
13
|
+
const CommandRoot = React.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx(index.Command, { ref: ref, className: command({ className }), ...props })));
|
|
14
|
+
CommandRoot.displayName = index.Command.displayName;
|
|
15
|
+
const CommandDialog = ({ children, ...props }) => {
|
|
16
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(dialog.Dialog, { ...props, children: jsxRuntime.jsxRuntimeExports.jsx(dialog.Dialog.Content, { style: { overflow: "hidden", padding: "0" }, children: jsxRuntime.jsxRuntimeExports.jsx(Command, { className: command_module.default.dialogcommand, children: children }) }) }));
|
|
17
|
+
};
|
|
18
|
+
const input = index$1.cva(command_module.default.input);
|
|
19
|
+
const CommandInput = React.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { align: "center", gap: "small", "cmdk-input-wrapper": "", className: command_module.default.inputWrapper, children: [jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.MagnifyingGlassIcon, { className: command_module.default.inputIcon, width: 16, height: 16 }), jsxRuntime.jsxRuntimeExports.jsx(index.Command.Input, { ref: ref, className: input({ className }), ...props })] })));
|
|
20
|
+
CommandInput.displayName = index.Command.Input.displayName;
|
|
21
|
+
const list = index$1.cva(command_module.default.list);
|
|
22
|
+
const CommandList = React.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx(index.Command.List, { ref: ref, className: list({ className }), ...props })));
|
|
23
|
+
CommandList.displayName = index.Command.List.displayName;
|
|
24
|
+
const CommandEmpty = React.forwardRef((props, ref) => (jsxRuntime.jsxRuntimeExports.jsx(index.Command.Empty, { ref: ref, className: command_module.default.empty, ...props })));
|
|
25
|
+
CommandEmpty.displayName = index.Command.Empty.displayName;
|
|
26
|
+
const group = index$1.cva(command_module.default.group);
|
|
27
|
+
const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx(index.Command.Group, { ref: ref, className: group({ className }), ...props })));
|
|
28
|
+
CommandGroup.displayName = index.Command.Group.displayName;
|
|
29
|
+
const separator = index$1.cva(command_module.default.separator);
|
|
30
|
+
const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx(index.Command.Separator, { ref: ref, className: separator({ className }), ...props })));
|
|
31
|
+
CommandSeparator.displayName = index.Command.Separator.displayName;
|
|
32
|
+
const item = index$1.cva(command_module.default.item);
|
|
33
|
+
const CommandItem = React.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx(index.Command.Item, { ref: ref, className: item({ className }), ...props })));
|
|
34
|
+
CommandItem.displayName = index.Command.Item.displayName;
|
|
35
|
+
const shortcut = index$1.cva(command_module.default.shortcut);
|
|
36
|
+
const CommandShortcut = ({ className, ...props }) => {
|
|
37
|
+
return jsxRuntime.jsxRuntimeExports.jsx("span", { className: shortcut({ className }), ...props });
|
|
38
|
+
};
|
|
39
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
40
|
+
const Command = Object.assign(CommandRoot, {
|
|
41
|
+
Dialog: CommandDialog,
|
|
42
|
+
Input: CommandInput,
|
|
43
|
+
List: CommandList,
|
|
44
|
+
Empty: CommandEmpty,
|
|
45
|
+
Group: CommandGroup,
|
|
46
|
+
Item: CommandItem,
|
|
47
|
+
Shortcut: CommandShortcut,
|
|
48
|
+
Separator: CommandSeparator,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
exports.Command = Command;
|
|
52
|
+
//# sourceMappingURL=command.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.cjs","sources":["../../../../v1/components/command/command.tsx"],"sourcesContent":["import React from \"react\";\nimport { DialogProps } from \"@radix-ui/react-dialog\";\nimport { MagnifyingGlassIcon } from \"@radix-ui/react-icons\";\nimport { Command as CommandPrimitive } from \"cmdk\";\n\nimport { cva } from \"class-variance-authority\";\nimport { Dialog } from \"../dialog\";\nimport { Flex } from \"../flex\";\n\nimport styles from \"./command.module.css\";\n\nconst command = cva(styles.command);\nconst CommandRoot = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive ref={ref} className={command({ className })} {...props} />\n));\nCommandRoot.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <Dialog.Content style={{ overflow: \"hidden\", padding: \"0\" }}>\n <Command className={styles.dialogcommand}>{children}</Command>\n </Dialog.Content>\n </Dialog>\n );\n};\n\nconst input = cva(styles.input);\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <Flex\n align=\"center\"\n gap=\"small\"\n cmdk-input-wrapper=\"\"\n className={styles.inputWrapper}\n >\n <MagnifyingGlassIcon className={styles.inputIcon} width={16} height={16} />\n <CommandPrimitive.Input\n ref={ref}\n className={input({ className })}\n {...props}\n />\n </Flex>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst list = cva(styles.list);\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List ref={ref} className={list({ className })} {...props} />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className={styles.empty} {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst group = cva(styles.group);\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={group({ className })}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst separator = cva(styles.separator);\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={separator({ className })}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst item = cva(styles.item);\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item ref={ref} className={item({ className })} {...props} />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst shortcut = cva(styles.shortcut);\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={shortcut({ className })} {...props} />;\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport const Command: any = Object.assign(CommandRoot, {\n Dialog: CommandDialog,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Group: CommandGroup,\n Item: CommandItem,\n Shortcut: CommandShortcut,\n Separator: CommandSeparator,\n});\n"],"names":["cva","styles","_jsx","CommandPrimitive","Dialog","_jsxs","Flex","MagnifyingGlassIcon"],"mappings":";;;;;;;;;;;AAWA,MAAM,OAAO,GAAGA,WAAG,CAACC,sBAAM,CAAC,OAAO,CAAC,CAAC;AACpC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BC,gCAAC,CAAAC,aAAgB,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAA,GAAM,KAAK,EAAI,CAAA,CAC7E,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAGA,aAAgB,CAAC,WAAW,CAAC;AAIvD,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAsB,KAAI;AACnE,IAAA,QACED,gCAAC,CAAAE,aAAM,EAAK,EAAA,GAAA,KAAK,YACfF,gCAAC,CAAAE,aAAM,CAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,EAAA,QAAA,EACzDF,gCAAC,CAAA,OAAO,IAAC,SAAS,EAAED,sBAAM,CAAC,aAAa,EAAG,QAAA,EAAA,QAAQ,GAAW,EAC/C,CAAA,EAAA,CACV,EACT;AACJ,CAAC,CAAC;AAEF,MAAM,KAAK,GAAGD,WAAG,CAACC,sBAAM,CAAC,KAAK,CAAC,CAAC;AAChC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BI,iCAAA,CAACC,SAAI,EACH,EAAA,KAAK,EAAC,QAAQ,EACd,GAAG,EAAC,OAAO,EAAA,o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